diff --git a/.c8rc.json b/.c8rc.json new file mode 100644 index 0000000000000..4f56a7ed0712f --- /dev/null +++ b/.c8rc.json @@ -0,0 +1,7 @@ +{ + "reporter": ["lcovonly", "cobertura"], + "src": "src", + "include": ["src/**", "built/local/**"], + "exclude": ["**/node_modules/**"], + "mergeAsync": true +} \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 5089051839926..89a200bf8fede 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,8 +10,13 @@ "node": true, "es6": true }, + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/stylistic" + ], "plugins": [ - "@typescript-eslint", "no-null", "import", "eslint-plugin-local", "simple-import-sort" + "@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort" ], "ignorePatterns": [ "**/node_modules/**", @@ -25,16 +30,42 @@ "/coverage/**" ], "rules": { - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/no-array-constructor": "error", + // eslint + "dot-notation": "error", + "eqeqeq": "error", + "no-caller": "error", + "no-constant-condition": ["error", { "checkLoops": false }], + "no-eval": "error", + "no-extra-bind": "error", + "no-new-func": "error", + "no-new-wrappers": "error", + "no-return-await": "error", + "no-restricted-globals": [ + "error", + { "name": "setTimeout" }, + { "name": "clearTimeout" }, + { "name": "setInterval" }, + { "name": "clearInterval" }, + { "name": "setImmediate" }, + { "name": "clearImmediate" } + ], + "no-template-curly-in-string": "error", + "no-throw-literal": "error", + "no-undef-init": "error", + "no-var": "error", + "object-shorthand": "error", + "prefer-const": "error", + "prefer-object-spread": "error", + "unicode-bom": ["error", "never"], - "brace-style": "off", - "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], + // Enabled in eslint:recommended, but not applicable here + "no-extra-boolean-cast": "off", + "no-case-declarations": "off", + "no-cond-assign": "off", + "no-control-regex": "off", + "no-inner-declarations": "off", + // @typescript-eslint/eslint-plugin "@typescript-eslint/naming-convention": [ "error", { "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } }, @@ -48,110 +79,85 @@ { "selector": "property", "format": null } ], - "@typescript-eslint/consistent-type-definitions": ["error", "interface"], - "@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }], - - "max-statements-per-line": ["error", { "max": 1 }], - - "no-duplicate-imports": "off", - "@typescript-eslint/no-duplicate-imports": "error", - - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-this-alias": "error", - - "no-unused-expressions": "off", - "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }], - - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/prefer-as-const": "error", - - "quotes": "off", - "@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }], - - "semi": "off", - "@typescript-eslint/semi": "error", - "@typescript-eslint/no-extra-semi": "error", - - "space-before-function-paren": "off", - "@typescript-eslint/space-before-function-paren": ["error", { - "asyncArrow": "always", - "anonymous": "always", - "named": "never" - }], + // Rules enabled in typescript-eslint configs that are not applicable here + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/class-literal-property-style": "off", + "@typescript-eslint/consistent-indexed-object-style": "off", + "@typescript-eslint/no-duplicate-enum-values": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-non-null-asserted-optional-chain": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/ban-types": [ + "error", + { + "extendDefaults": true, + "types": { + // This is theoretically good, but ts-eslint appears to mistake our declaration of Symbol for the global Symbol type. + // See: https://github.com/typescript-eslint/typescript-eslint/issues/7306 + "Symbol": false, + "{}": false // {} is a totally useful and valid type. + } + } + ], - "@typescript-eslint/triple-slash-reference": "error", - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unified-signatures": "error", + // Todo: For each of these, investigate whether we want to enable them ✨ + "no-useless-escape": "off", + "prefer-rest-params": "off", + "prefer-spread": "off", + "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-extra-non-null-assertion": "error", + // Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820 + "@typescript-eslint/prefer-optional-chain": "off", // scripts/eslint/rules - "local/object-literal-surrounding-space": "error", - "local/no-type-assertion-whitespace": "error", - "local/type-operator-spacing": "error", - "local/only-arrow-functions": ["error", { - "allowNamedFunctions": true , - "allowDeclarations": true - }], - "local/no-double-space": "error", + "local/only-arrow-functions": [ + "error", + { + "allowNamedFunctions": true , + "allowDeclarations": true + } + ], "local/argument-trivia": "error", "local/no-in-operator": "error", - "local/simple-indent": "error", "local/debug-assert": "error", "local/no-keywords": "error", "local/jsdoc-format": "error", - // eslint-plugin-import - "import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }], - // eslint-plugin-no-null "no-null/no-null": "error", - // eslint - "constructor-super": "error", + // eslint-plugin-simple-import-sort + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error", + + // Formatting rules; remove once a formatter enforces these. "curly": ["error", "multi-line"], - "dot-notation": "error", - "eqeqeq": "error", "linebreak-style": ["error", "windows"], + "max-statements-per-line": ["error", { "max": 1 }], "new-parens": "error", - "no-caller": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-eval": "error", - "no-extra-bind": "error", - "no-fallthrough": "error", - "no-new-func": "error", - "no-new-wrappers": "error", - "no-return-await": "error", - "no-restricted-globals": ["error", - { "name": "setTimeout" }, - { "name": "clearTimeout" }, - { "name": "setInterval" }, - { "name": "clearInterval" }, - { "name": "setImmediate" }, - { "name": "clearImmediate" } - ], - "no-sparse-arrays": "error", - "no-template-curly-in-string": "error", - "no-throw-literal": "error", "no-trailing-spaces": "error", - "no-undef-init": "error", - "no-unsafe-finally": "error", - "no-unused-labels": "error", - "no-var": "error", - "object-shorthand": "error", - "prefer-const": "error", - "prefer-object-spread": "error", "quote-props": ["error", "consistent-as-needed"], "space-in-parens": "error", - "unicode-bom": ["error", "never"], - "use-isnan": "error", - "no-prototype-builtins": "error", - "no-self-assign": "error", - "no-dupe-else-if": "error" + "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], + "@typescript-eslint/no-extra-semi": "error", + "@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }], + "@typescript-eslint/semi": "error", + "@typescript-eslint/space-before-function-paren": [ + "error", + { + "asyncArrow": "always", + "anonymous": "always", + "named": "never" + } + ], + "local/object-literal-surrounding-space": "error", + "local/no-type-assertion-whitespace": "error", + "local/type-operator-spacing": "error", + "local/no-double-space": "error", + "local/simple-indent": "error" }, "overrides": [ // By default, the ESLint CLI only looks at .js files. But, it will also look at diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index d920d7ec3ddff..73549d2697b84 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -43,10 +43,8 @@ Please keep and fill in the line that best applies: ### ⏯ Playground Link @@ -54,7 +52,7 @@ Please keep and fill in the line that best applies: ### 💻 Code - + ```ts // We can quickly address your report if: // - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code! diff --git a/.github/ISSUE_TEMPLATE/module_resolution.yml b/.github/ISSUE_TEMPLATE/module_resolution.yml new file mode 100644 index 0000000000000..19e3101c62870 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/module_resolution.yml @@ -0,0 +1,102 @@ +name: Module Resolution +description: Report a problem with module resolution +title: "Module Resolution:" +labels: [] +body: + - type: markdown + attributes: + value: | + Module resolution can be very difficult to configure correctly! + + Be sure you've read the docs and asked for help in other places before filling out this form. + + Most module resolution bug reports are actually misconfigurations, so we require a thorough pre-investigation before we can look into any potential issues. + + Let's make sure you're ready to file a module resolution bug. + + - type: markdown + attributes: + value: | + A module resolution bug requires five things: + + 1. A module that's trying to import some target module + 2. That target module + 3. The configuration of the importing module + 4. The configuration of the target module + 5. A difference in runtime behavior + + You will also be required to post a cloneable repository. + This repo must involve running `tsc`, not a third-party tool (e.g. vue-tsc, ngc, expo, ...) + + - type: input + id: repo-url + attributes: + label: Demo Repo + description: Post a cloneable repo that reproduces the issue. We will run `npm`, `yarn`, or `pnpm` here, but will not invoke more complex build scripts or other build tools. + placeholder: https://github.com/ghost/myrepro + validations: + required: true + + - type: dropdown + id: defect-kind + attributes: + label: Which of the following problems are you reporting? + options: + - The module specifier resolves at runtime, but not at build time + - The module specifier resolves at build time, but shouldn't because it doesn't at runtime + - The module specifier resolves, but to the wrong file + - The module specifier resolves to the right file, but something about the types are wrong + - Something else more complicated which I'll explain in more detail + validations: + required: true + + - type: textarea + id: code-proof + attributes: + label: Demonstrate the defect described above with a code sample. + description: This should be at most four lines of code, and come from your demo repo. + placeholder: import * as foo from "./bar"; // Should not resolve + validations: + required: true + + - type: textarea + id: config + attributes: + label: Run `tsc --showConfig` and paste its output here + description: Repros that depend on running within external tools (yarn, pnpm, esbuild, etc.) are not TypeScript defects and will not be investigated. + placeholder: "> tsc --showConfig" + validations: + required: true + + - type: textarea + id: traceResolution + attributes: + label: Run `tsc --traceResolution` and paste its output here + description: Run `tsc --traceResolution` and paste the output here. + placeholder: "> tsc --traceResolution" + validations: + required: true + + - type: textarea + id: import-package-json + attributes: + label: Paste the `package.json` of the *importing* module, if it exists + placeholder: "my_project/package.json" + validations: + required: true + + - type: textarea + id: export-package-json + attributes: + label: Paste the `package.json` of the *target* module, if it exists + placeholder: "node_modules/somepkg/package.json" + validations: + required: true + + - type: textarea + id: comments + attributes: + label: Any other comments can go here + placeholder: "Have a nice day!" + validations: + required: true diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 70c26603f3446..0000000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,670 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "src/server/protocol.ts" - ], - "pathFilter": "src/server/protocol.ts" - } - }, - { - "name": "isAction", - "parameters": { - "action": "opened" - } - } - ] - }, - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @mjbvz, @zkat, and @joj for you. Feel free to loop in other consumers/maintainers if necessary" - } - } - ], - "taskName": "Server Breaking Changes" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "lib" - ], - "pathFilter": "lib" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "user": "", - "association": "MEMBER" - } - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "lib update" - } - } - ] - } - ] - }, - "taskName": "Don't update lib!", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "It looks like you've sent a pull request to update our 'lib' files. These files aren't meant to be edited by hand, as they consist of last-known good states of the compiler and are generated from 'src/lib' or possibly our lib generator. Unless this is necessary, consider closing the pull request and sending a separate PR to update 'src/lib' or https://github.com/microsoft/TypeScript-DOM-lib-generator" - } - }, - { - "name": "addLabels", - "parameters": { - "labels": [ - "lib update" - ] - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.0", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 18 - ] - }, - { - "weekDay": 1, - "hours": [ - 18 - ] - }, - { - "weekDay": 2, - "hours": [ - 18 - ] - }, - { - "weekDay": 3, - "hours": [ - 18 - ] - }, - { - "weekDay": 4, - "hours": [ - 18 - ] - }, - { - "weekDay": 5, - "hours": [ - 18 - ] - }, - { - "weekDay": 6, - "hours": [ - 18 - ] - } - ], - "searchTerms": [ - { - "name": "noActivitySince", - "parameters": { - "days": 2 - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Duplicate" - } - }, - { - "name": "isOpen", - "parameters": {} - } - ], - "taskName": "Close Duplicates", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes." - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.0", - "config": { - "taskName": "Close Externals", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 10 - ], - "restrictions": [ - { - "name": "" - } - ] - }, - { - "weekDay": 1, - "hours": [ - 10 - ] - }, - { - "weekDay": 2, - "hours": [ - 10 - ] - }, - { - "weekDay": 3, - "hours": [ - 10 - ] - }, - { - "weekDay": 4, - "hours": [ - 10 - ] - }, - { - "weekDay": 5, - "hours": [ - 10 - ] - }, - { - "weekDay": 6, - "hours": [ - 10 - ] - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "External" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 2 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "lib/lib.dom" - ], - "pathFilter": "lib/lib.dom" - } - }, - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "src/lib/dom.generated.d.ts" - ], - "pathFilter": "src/lib/dom.generated.d.ts" - } - }, - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "src/lib/dom.iterable.generated.d.ts" - ], - "pathFilter": "src/lib/dom.iterable.generated.d.ts" - } - }, - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "webworker.generated.d.ts" - ], - "pathFilter": "webworker.generated.d.ts" - } - }, - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "lib/lib.webworker.d.ts" - ], - "pathFilter": "lib/lib.webworker.d.ts" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "association": "MEMBER" - } - } - ] - } - ] - }, - "taskName": "Close generated DOM lib PRs", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "It looks like you've sent a pull request to update some generated declaration files related to the DOM. These files aren't meant to be edited by hand, as they are synchronized with files in [the TSJS-lib-generator repository](https://github.com/Microsoft/TSJS-lib-generator). You can [read more here](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes). For house-keeping purposes, this pull request will be closed." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.0", - "config": { - "taskName": "Close Working as Intended", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 20 - ] - }, - { - "weekDay": 1, - "hours": [ - 20 - ] - }, - { - "weekDay": 2, - "hours": [ - 20 - ] - }, - { - "weekDay": 3, - "hours": [ - 20 - ] - }, - { - "weekDay": 4, - "hours": [ - 20 - ] - }, - { - "weekDay": 5, - "hours": [ - 20 - ] - }, - { - "weekDay": 6, - "hours": [ - 20 - ] - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "Working as Intended" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 2 - } - } - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "prIncludesModifiedFile", - "parameters": { - "pathFilters": [ - "src/services/preProcess.ts" - ], - "pathFilter": "src/services/preProcess.ts" - } - }, - { - "name": "isAction", - "parameters": { - "eventName": "pull_request", - "action": "opened" - } - } - ] - }, - "taskName": "Managed Side Preprocessing Must Be Handled", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Thanks for the PR! It looks like you've changed 'preProcess.ts' in some way. Please ensure that any changes here don't break consumers with unique project systems such as Visual Studio. Pinging @sheetalkamat, @zkat, and @joj so they are aware of the changes." - } - } - ] - }, - "disabled": true - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close Questions", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 12 - ] - }, - { - "weekDay": 1, - "hours": [ - 0, - 12 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 12 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 12 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 12 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 12 - ] - }, - { - "weekDay": 6, - "hours": [ - 0, - 12 - ] - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "Question" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 2 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to [stackoverflow](https://stackoverflow.com/questions/tagged/typescript) or the [TypeScript Discord community](https://discord.gg/typescript)." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "permissions": "write", - "association": "MEMBER" - } - }, - { - "name": "commentContains", - "parameters": { - "commentPattern": "please close this" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Close issue on behalf of allowed comment", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "I've closed this for you." - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "prModifiesFiles", - "parameters": { - "pathFilters": [ - "tests/baselines/reference/api/typescript.d.ts", - "tests/baselines/reference/api/tsserverlibrary.d.ts" - ] - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them [on our wiki's API Breaking Changes page](https://github.com/microsoft/TypeScript/wiki/API-Breaking-Changes).\n\nAlso, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up" - } - } - ], - "taskName": "Check for API Changes" - } - } - ], - "userGroups": [] -} diff --git a/.github/workflows/accept-baselines-fix-lints.yaml b/.github/workflows/accept-baselines-fix-lints.yaml index cccf0d235cba5..7462a8ec794c8 100644 --- a/.github/workflows/accept-baselines-fix-lints.yaml +++ b/.github/workflows/accept-baselines-fix-lints.yaml @@ -6,6 +6,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bce28f22e5ad..a551bed2d27e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: test: runs-on: ubuntu-latest @@ -101,7 +107,9 @@ jobs: node-version: "*" check-latest: true - run: | - corepack enable npm + npm --version + # corepack enable npm + npm install -g $(jq -r '.packageManager' < package.json) npm --version - run: npm ci @@ -147,8 +155,13 @@ jobs: node-version: "*" check-latest: true - run: | - corepack enable npm npm --version + # corepack enable npm + + - run: | + npm install -g $(jq -r '.packageManager' < package.json) + npm --version + working-directory: ./pr - run: npm ci working-directory: ./pr diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml new file mode 100644 index 0000000000000..f3321ebaa05a4 --- /dev/null +++ b/.github/workflows/close-issues.yml @@ -0,0 +1,49 @@ +name: Close issues + +on: + schedule: + - cron: '0 1 * * *' + workflow_dispatch: + +permissions: + contents: read + +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + +jobs: + close-issues: + runs-on: ubuntu-latest + if: github.repository == 'microsoft/TypeScript' + permissions: + contents: read # Apparently required to create issues + issues: write + + steps: + - name: Close issues + env: + GH_TOKEN: ${{ secrets.TS_BOT_GITHUB_TOKEN }} + run: | + DATE=$(date --date='2 days ago' --iso-8601) + + close_issues() { + echo "Closing issues marked as '$1'." + for issue in $(gh issue list --limit 100 --label "$1" --repo ${{ github.repository }} --state open --search "updated:<$DATE" --json number --jq '.[].number'); do + echo "Closing https://github.com/${{ github.repository }}/issues/$issue" + gh issue close $issue --repo ${{ github.repository }} --reason "not planned" --comment "This issue has been marked as \"$1\" and has seen no recent activity. It has been automatically closed for house-keeping purposes." + done + } + + close_issues "Duplicate" + close_issues "Unactionable" + close_issues "Not a Defect" + close_issues "External" + close_issues "Working as Intended" + close_issues "Question" + close_issues "Out of Scope" + close_issues "Declined" + close_issues "Won't Fix" + close_issues "Too Complex" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 31e870e479748..b90bfec110d5d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,6 +24,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: CodeQL-Build: # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest diff --git a/.github/workflows/ensure-related-repos-run-crons.yml b/.github/workflows/ensure-related-repos-run-crons.yml index f7979ca54f23a..2e72bd2c6e6e3 100644 --- a/.github/workflows/ensure-related-repos-run-crons.yml +++ b/.github/workflows/ensure-related-repos-run-crons.yml @@ -14,6 +14,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/error-deltas-watchdog.yaml b/.github/workflows/error-deltas-watchdog.yaml index c7f15c51e390e..14b2cff887408 100644 --- a/.github/workflows/error-deltas-watchdog.yaml +++ b/.github/workflows/error-deltas-watchdog.yaml @@ -8,6 +8,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: check-for-recent: runs-on: ubuntu-latest @@ -36,4 +42,4 @@ jobs: DATE=$(date --date="7 days ago" --iso-8601) gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \ | grep -qe "[0-9]" \ - || gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)." \ No newline at end of file + || gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)." diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index dcd720a42da4f..8d5ec9a7010c8 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -7,6 +7,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest @@ -17,7 +23,9 @@ jobs: steps: - uses: actions/setup-node@v3 - run: | - corepack enable npm + npm --version + # corepack enable npm + npm install -g $(jq -r '.packageManager' < package.json) npm --version - uses: actions/checkout@v3 with: diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index e365ad71fda49..8692ed2d75e83 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -11,6 +11,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest @@ -23,7 +29,9 @@ jobs: # Use NODE_AUTH_TOKEN environment variable to authenticate to this registry. registry-url: https://registry.npmjs.org/ - run: | - corepack enable npm + npm --version + # corepack enable npm + npm install -g $(jq -r '.packageManager' < package.json) npm --version - name: Setup and publish nightly run: | diff --git a/.github/workflows/pr-modified-files.yml b/.github/workflows/pr-modified-files.yml new file mode 100644 index 0000000000000..09841f73fc6b3 --- /dev/null +++ b/.github/workflows/pr-modified-files.yml @@ -0,0 +1,136 @@ +name: Check modified files +on: + # For security reasons, we have to use pull_request_target here. + # This differs from pull_request in that it runs at the _base_ of the PR, + # e.g. main. This allows us to access secrets. In this workflow, we should + # never actually clone the PR, as it may contain malicious code. + # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ + pull_request_target: + branches: + - main + +# We only ever need one of these running on a single PR. +# Just let the newest one complete if there are multiple running. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + +jobs: + manage-prs: + runs-on: ubuntu-latest + if: github.repository == 'microsoft/TypeScript' + + # No need to set explicit permissions; we are using typescript-bot's token, not github-actions' token. + + env: + GH_TOKEN: ${{ secrets.TS_BOT_GITHUB_TOKEN }} + + steps: + - name: Check if PR author is in pr_owners.txt + id: pr_owner + run: | + curl -s https://raw.githubusercontent.com/microsoft/TypeScript/main/.github/pr_owners.txt > pr_owners.txt + if grep -Fxq -m1 "${{ github.event.pull_request.user.login }}" pr_owners.txt; then + echo "pr_owner=true" >> "$GITHUB_OUTPUT" + else + echo "pr_owner=false" >> "$GITHUB_OUTPUT" + fi + + - name: Create scripts + run: | + cat > is_changed.sh <<'EOF' + #!/bin/bash + FILENAME=changed_files.txt + if [ ! -f $FILENAME ]; then + # The gh command only returns info for the first 100 files. To get + # the rest, we have to use the graphql API. See: + # https://github.com/cli/cli/issues/5368#issuecomment-1344253654 + gh api graphql -f query=' + query($endCursor: String) { + repository(owner: "microsoft", name: "TypeScript") { + pullRequest(number: ${{ github.event.pull_request.number }}) { + files(first: 100, after: $endCursor) { + pageInfo{ hasNextPage, endCursor } + nodes { + path + } + } + } + } + }' --paginate --jq '.data.repository.pullRequest.files.nodes.[].path' > $FILENAME + fi + for file in "$@"; do + grep -Fxq -m1 "$file" $FILENAME && exit 0 + done + exit 1 + EOF + chmod +x is_changed.sh + + cat > already_commented.sh <<'EOF' + #!/bin/bash + FILENAME=bot_comments.txt + if [ ! -f $FILENAME ]; then + gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} \ + --json 'comments' --jq '.comments[] | select(.author.login == "typescript-bot") | .body' > $FILENAME + fi + exec grep -Fq -m1 "$1" $FILENAME + EOF + chmod +x already_commented.sh + + - name: Generated DOM files + if: steps.pr_owner.outputs.pr_owner == 'false' + run: | + if ./is_changed.sh "src/lib/dom.generated.d.ts" \ + "src/lib/dom.iterable.generated.d.ts" \ + "src/lib/webworker.generated.d.ts" \ + "src/lib/webworker.iterable.generated.d.ts"; then + MESSAGE="It looks like you've sent a pull request to update some generated declaration files related to the DOM." + MESSAGE+=" These files aren't meant to be edited by hand, as they are synchronized with files in" + MESSAGE+=" [the TypeScript-DOM-lib-generator repository](https://github.com/microsoft/TypeScript-DOM-lib-generator)." + MESSAGE+=" You can [read more here](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md#contributing-libdts-fixes)." + MESSAGE+=" For house-keeping purposes, this pull request will be closed." + + gh pr close ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --comment "$MESSAGE" + exit 1 # Stop the pipeline; we just closed the PR. + fi + + - name: Check if PR modifies protocol.ts + run: | + if ./is_changed.sh "src/server/protocol.ts"; then + MESSAGE="Thanks for the PR! It looks like you've changed the TSServer protocol in some way." + MESSAGE+=" Please ensure that any changes here don't break consumers of the current TSServer API." + MESSAGE+=" For some extra review, we'll ping @sheetalkamat, @mjbvz, @zkat, and @joj for you." + MESSAGE+=" Feel free to loop in other consumers/maintainers if necessary." + + if ./already_commented.sh "It looks like you've changed the TSServer protocol in some way."; then + echo "Already commented." + else + gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "$MESSAGE" + fi + fi + + - name: Check for breaking changes + run: | + if ./is_changed.sh "tests/baselines/reference/api/typescript.d.ts" \ + "tests/baselines/reference/api/tsserverlibrary.d.ts"; then + MESSAGE="Looks like you're introducing a change to the public API surface area." + MESSAGE+=" If this includes breaking changes, please document them" + MESSAGE+=" [on our wiki's API Breaking Changes page](https://github.com/microsoft/TypeScript/wiki/API-Breaking-Changes)." + MESSAGE+=$'\n\n' + MESSAGE+="Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up." + + if ./already_commented.sh "Looks like you're introducing a change to the public API surface area."; then + echo "Already commented." + else + gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "$MESSAGE" + fi + fi diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index 39c4426e27e9b..e0b95bdf00660 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -8,6 +8,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest @@ -16,7 +22,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - run: | - corepack enable npm + npm --version + # corepack enable npm + npm install -g $(jq -r '.packageManager' < package.json) npm --version - name: npm install and test run: | diff --git a/.github/workflows/rich-navigation.yml b/.github/workflows/rich-navigation.yml index 531cdc7fda241..c5c59e0cdf9f6 100644 --- a/.github/workflows/rich-navigation.yml +++ b/.github/workflows/rich-navigation.yml @@ -13,6 +13,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: richnav: runs-on: windows-latest diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 2fbdb3ada9157..0e7e361a188d3 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -34,7 +34,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6 + uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3 with: results_file: results.sarif results_format: sarif diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index 0fc9d58d16706..ec04aebfefe0b 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -7,6 +7,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest @@ -20,7 +26,9 @@ jobs: with: ref: ${{ github.event.client_payload.branch_name }} - run: | - corepack enable npm + npm --version + # corepack enable npm + npm install -g $(jq -r '.packageManager' < package.json) npm --version # notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists # do note that executing the transform below will prevent the `configurePrerelease` script from running on the source, as it makes the diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index 5a5395978c5dd..cbe0a3ca0834b 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -12,6 +12,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml index f466ff1737d6a..38b20f96657b5 100644 --- a/.github/workflows/sync-wiki.yml +++ b/.github/workflows/sync-wiki.yml @@ -5,6 +5,12 @@ on: [gollum] permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: sync: runs-on: ubuntu-latest diff --git a/.github/workflows/twoslash-repros.yaml b/.github/workflows/twoslash-repros.yaml index 3b544d16f428d..c4bdbf38258fe 100644 --- a/.github/workflows/twoslash-repros.yaml +++ b/.github/workflows/twoslash-repros.yaml @@ -22,6 +22,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: run: if: ${{ github.repository == 'microsoft/TypeScript' }} diff --git a/.github/workflows/update-lkg.yml b/.github/workflows/update-lkg.yml index 98e825f9f7de2..3caf672ccc9bb 100644 --- a/.github/workflows/update-lkg.yml +++ b/.github/workflows/update-lkg.yml @@ -6,6 +6,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml index 6bcba20a1ebfe..f3b2c35e4e173 100644 --- a/.github/workflows/update-package-lock.yaml +++ b/.github/workflows/update-package-lock.yaml @@ -10,6 +10,12 @@ on: permissions: contents: read +# Ensure scripts are run with pipefail. See: +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference +defaults: + run: + shell: bash + jobs: build: runs-on: ubuntu-latest @@ -26,7 +32,9 @@ jobs: with: node-version: 16 - run: | - corepack enable npm + npm --version + # corepack enable npm + npm install -g $(jq -r '.packageManager' < package.json) npm --version - name: Update package-lock.json and push diff --git a/.gitignore b/.gitignore index f609bf8d5d0de..b084ac14ecc28 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,4 @@ TEST-results.xml package-lock.json .eslintcache *v8.log -lib/ +/lib/ diff --git a/Herebyfile.mjs b/Herebyfile.mjs index 883ba191f18d2..50c90575eee73 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -577,6 +577,7 @@ export const runTests = task({ // task("runtests").flags = { // "-t --tests=": "Pattern for tests to run.", // " --failed": "Runs tests listed in '.failed-tests'.", +// " --coverage": "Generate test coverage using c8", // "-r --reporter=": "The mocha reporter to use.", // "-i --break": "Runs tests in inspector mode (NodeJS 8 and later)", // " --keepFailed": "Keep tests in .failed-tests even if they pass", @@ -714,6 +715,7 @@ export const runTestsParallel = task({ }); // task("runtests-parallel").flags = { +// " --coverage": "Generate test coverage using c8", // " --light": "Run tests in light mode (fewer verifications, but tests run faster).", // " --keepFailed": "Keep tests in .failed-tests even if they pass.", // " --dirty": "Run tests without first cleaning test output directories.", diff --git a/package-lock.json b/package-lock.json index c1c88b160f586..2d1d3810cd865 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typescript", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "typescript", - "version": "5.1.0", + "version": "5.2.0", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -14,7 +14,7 @@ }, "devDependencies": { "@esfx/canceltoken": "^1.0.0", - "@octokit/rest": "latest", + "@octokit/rest": "^19.0.13", "@types/chai": "^4.3.4", "@types/fs-extra": "^9.0.13", "@types/glob": "^8.1.0", @@ -25,19 +25,19 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.6", "@types/which": "^2.0.1", - "@typescript-eslint/eslint-plugin": "^5.33.1", - "@typescript-eslint/parser": "^5.33.1", - "@typescript-eslint/utils": "^5.33.1", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@typescript-eslint/utils": "^6.0.0", "azure-devops-node-api": "^12.0.0", + "c8": "^7.14.0", "chai": "^4.3.7", "chalk": "^4.1.2", "chokidar": "^3.5.3", "del": "^6.1.1", "diff": "^5.1.0", - "esbuild": "^0.17.2", + "esbuild": "^0.18.1", "eslint": "^8.22.0", "eslint-formatter-autolinkable-stylish": "^1.2.0", - "eslint-plugin-import": "^2.26.0", "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", @@ -60,10 +60,25 @@ "node": ">=14.17" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "node_modules/@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz", + "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", "cpu": [ "arm" ], @@ -77,9 +92,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", + "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", "cpu": [ "arm64" ], @@ -93,9 +108,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.17.tgz", + "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", "cpu": [ "x64" ], @@ -109,9 +124,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", + "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", "cpu": [ "arm64" ], @@ -125,9 +140,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", + "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", "cpu": [ "x64" ], @@ -141,9 +156,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", + "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", "cpu": [ "arm64" ], @@ -157,9 +172,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", + "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", "cpu": [ "x64" ], @@ -173,9 +188,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", + "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", "cpu": [ "arm" ], @@ -189,9 +204,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", + "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", "cpu": [ "arm64" ], @@ -205,9 +220,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", + "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", "cpu": [ "ia32" ], @@ -221,9 +236,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", + "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", "cpu": [ "loong64" ], @@ -237,9 +252,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", + "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", "cpu": [ "mips64el" ], @@ -253,9 +268,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", + "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", "cpu": [ "ppc64" ], @@ -269,9 +284,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", + "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", "cpu": [ "riscv64" ], @@ -285,9 +300,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", + "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", "cpu": [ "s390x" ], @@ -301,9 +316,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", + "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", "cpu": [ "x64" ], @@ -317,9 +332,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", + "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", "cpu": [ "x64" ], @@ -333,9 +348,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", + "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", "cpu": [ "x64" ], @@ -349,9 +364,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", + "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", "cpu": [ "x64" ], @@ -365,9 +380,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", + "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", "cpu": [ "arm64" ], @@ -381,9 +396,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", + "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", "cpu": [ "ia32" ], @@ -397,9 +412,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", + "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", "cpu": [ "x64" ], @@ -454,23 +469,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -486,18 +501,18 @@ } }, "node_modules/@eslint/js": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", - "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -527,6 +542,40 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -563,21 +612,18 @@ } }, "node_modules/@octokit/auth-token": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz", - "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", + "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", "dev": true, - "dependencies": { - "@octokit/types": "^9.0.0" - }, "engines": { "node": ">= 14" } }, "node_modules/@octokit/core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz", - "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", + "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", "dev": true, "dependencies": { "@octokit/auth-token": "^3.0.0", @@ -593,9 +639,9 @@ } }, "node_modules/@octokit/endpoint": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz", - "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", + "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", "dev": true, "dependencies": { "@octokit/types": "^9.0.0", @@ -607,9 +653,9 @@ } }, "node_modules/@octokit/graphql": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz", - "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", + "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", "dev": true, "dependencies": { "@octokit/request": "^6.0.0", @@ -621,18 +667,19 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", - "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", + "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==", "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz", - "integrity": "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", + "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", "dev": true, "dependencies": { - "@octokit/types": "^9.0.0" + "@octokit/tsconfig": "^1.0.2", + "@octokit/types": "^9.2.3" }, "engines": { "node": ">= 14" @@ -651,13 +698,12 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz", - "integrity": "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", + "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", "dev": true, "dependencies": { - "@octokit/types": "^9.0.0", - "deprecation": "^2.3.1" + "@octokit/types": "^10.0.0" }, "engines": { "node": ">= 14" @@ -666,10 +712,19 @@ "@octokit/core": ">=3" } }, + "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", + "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", + "dev": true, + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, "node_modules/@octokit/request": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", - "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "version": "6.2.8", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", + "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", "dev": true, "dependencies": { "@octokit/endpoint": "^7.0.0", @@ -698,9 +753,9 @@ } }, "node_modules/@octokit/request/node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", "dev": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -718,27 +773,33 @@ } }, "node_modules/@octokit/rest": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz", - "integrity": "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA==", + "version": "19.0.13", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.13.tgz", + "integrity": "sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA==", "dev": true, "dependencies": { - "@octokit/core": "^4.1.0", - "@octokit/plugin-paginate-rest": "^6.0.0", + "@octokit/core": "^4.2.1", + "@octokit/plugin-paginate-rest": "^6.1.2", "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^7.0.0" + "@octokit/plugin-rest-endpoint-methods": "^7.1.2" }, "engines": { "node": ">= 14" } }, + "node_modules/@octokit/tsconfig": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", + "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", + "dev": true + }, "node_modules/@octokit/types": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", - "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^16.0.0" + "@octokit/openapi-types": "^18.0.0" } }, "node_modules/@types/chai": { @@ -766,16 +827,16 @@ "@types/node": "*" } }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", "dev": true }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "node_modules/@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, "node_modules/@types/microsoft__typescript-etw": { @@ -809,15 +870,15 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.0.tgz", - "integrity": "sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==", + "version": "20.4.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", + "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==", "dev": true }, "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, "node_modules/@types/source-map-support": { @@ -836,32 +897,34 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", - "integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.0.tgz", + "integrity": "sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/type-utils": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/type-utils": "6.2.0", + "@typescript-eslint/utils": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -870,25 +933,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", - "integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.0.tgz", + "integrity": "sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/typescript-estree": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -897,16 +961,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", - "integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz", + "integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2" + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -914,25 +978,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", - "integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.0.tgz", + "integrity": "sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/typescript-estree": "6.2.0", + "@typescript-eslint/utils": "6.2.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -941,12 +1005,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", - "integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.0.tgz", + "integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -954,21 +1018,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", - "integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz", + "integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -981,42 +1045,41 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", - "integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.0.tgz", + "integrity": "sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/typescript-estree": "6.2.0", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", - "integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz", + "integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.2", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.2.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1024,9 +1087,9 @@ } }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1134,38 +1197,6 @@ "node": ">=8" } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -1175,42 +1206,6 @@ "node": ">=8" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -1229,22 +1224,10 @@ "node": ">= 4.0.0" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/azure-devops-node-api": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", - "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.1.0.tgz", + "integrity": "sha512-VY+G45eNKVJfMIO0uyZfbi4PzUR8JHEfsHQjEUAXUGRkYhhBbhGHjy8cpiyYFxLXc3a4PL5cqgqqV/YD1SaCXg==", "dev": true, "dependencies": { "tunnel": "0.0.6", @@ -1306,6 +1289,32 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/c8": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", + "integrity": "sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.1.4", + "rimraf": "^3.0.2", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1540,6 +1549,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1625,22 +1640,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -1708,98 +1707,10 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/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, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.17.tgz", + "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", "dev": true, "hasInstallScript": true, "bin": { @@ -1809,28 +1720,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" + "@esbuild/android-arm": "0.18.17", + "@esbuild/android-arm64": "0.18.17", + "@esbuild/android-x64": "0.18.17", + "@esbuild/darwin-arm64": "0.18.17", + "@esbuild/darwin-x64": "0.18.17", + "@esbuild/freebsd-arm64": "0.18.17", + "@esbuild/freebsd-x64": "0.18.17", + "@esbuild/linux-arm": "0.18.17", + "@esbuild/linux-arm64": "0.18.17", + "@esbuild/linux-ia32": "0.18.17", + "@esbuild/linux-loong64": "0.18.17", + "@esbuild/linux-mips64el": "0.18.17", + "@esbuild/linux-ppc64": "0.18.17", + "@esbuild/linux-riscv64": "0.18.17", + "@esbuild/linux-s390x": "0.18.17", + "@esbuild/linux-x64": "0.18.17", + "@esbuild/netbsd-x64": "0.18.17", + "@esbuild/openbsd-x64": "0.18.17", + "@esbuild/sunos-x64": "0.18.17", + "@esbuild/win32-arm64": "0.18.17", + "@esbuild/win32-ia32": "0.18.17", + "@esbuild/win32-x64": "0.18.17" } }, "node_modules/escalade": { @@ -1855,16 +1766,16 @@ } }, "node_modules/eslint": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", - "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", + "version": "8.45.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", + "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.40.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -1875,7 +1786,7 @@ "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "espree": "^9.6.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1883,22 +1794,19 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -1927,111 +1835,6 @@ "eslint": "^8.3.0" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", - "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.7.4", - "has": "^1.0.3", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.6", - "resolve": "^1.22.1", - "semver": "^6.3.0", - "tsconfig-paths": "^3.14.1" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-plugin-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-local/-/eslint-plugin-local-1.0.0.tgz", @@ -2060,16 +1863,19 @@ } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", + "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { @@ -2084,52 +1890,27 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2150,15 +1931,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2171,7 +1943,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -2180,15 +1952,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2205,9 +1968,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -2233,9 +1996,9 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.2.tgz", - "integrity": "sha512-DLzIPtQqmvmdq3VUKR7T6omPK/VCRNqgFlGtbESfyhcH2R4I8EzK1/K6E8PkRCK2EabWrUHK32NjYRbEFnnz0Q==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.6.tgz", + "integrity": "sha512-Xo1qV++h/Y3Ng8dphjahnYe+rGHaaNdsYOBWL9Y9GCPKpNKilJtilvWkLcI9f9X2DoKTLsZsGYAls5+JL5jfLA==", "dev": true, "funding": [ { @@ -2363,13 +2126,17 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "dependencies": { - "is-callable": "^1.1.3" + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" } }, "node_modules/formdata-polyfill": { @@ -2425,33 +2192,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2471,35 +2211,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -2567,21 +2292,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -2602,28 +2312,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/has": { @@ -2638,15 +2336,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -2656,18 +2345,6 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -2692,21 +2369,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2736,6 +2398,12 @@ "node": ">= 12.20" } }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -2805,20 +2473,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/irregular-plurals": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", @@ -2828,32 +2482,6 @@ "node": ">=8" } }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2866,61 +2494,6 @@ "node": ">=8" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2951,18 +2524,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2972,21 +2533,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -3023,121 +2569,58 @@ "node": ">=0.10.0" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "engines": { + "node": ">=8" } }, "node_modules/js-yaml": { @@ -3164,18 +2647,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -3265,6 +2736,21 @@ "node": ">=10" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3431,6 +2917,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3481,9 +2976,9 @@ } }, "node_modules/node-fetch": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", - "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dev": true, "dependencies": { "data-uri-to-buffer": "^4.0.0", @@ -3516,50 +3011,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/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, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3570,17 +3021,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -3682,12 +3133,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -3773,9 +3218,9 @@ } }, "node_modules/qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, "dependencies": { "side-channel": "^1.0.4" @@ -3837,23 +3282,6 @@ "node": ">=6" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3863,23 +3291,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3977,24 +3388,10 @@ } ] }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4050,6 +3447,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -4092,51 +3495,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4149,15 +3507,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4188,18 +3537,6 @@ "node": ">=8" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -4215,6 +3552,40 @@ "node": ">=8.0.0" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4239,43 +3610,22 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", - "dev": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, "engines": { - "node": ">= 6" + "node": ">=16.13.0" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": ">=4.2.0" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "node_modules/tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, "node_modules/tunnel": { @@ -4320,24 +3670,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/typed-rest-client": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", - "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", "dev": true, "dependencies": { "qs": "^6.9.1", @@ -4346,16 +3682,16 @@ } }, "node_modules/typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12.20" + "node": ">=14.17" } }, "node_modules/typical": { @@ -4367,21 +3703,6 @@ "node": ">=8" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/underscore": { "version": "1.13.6", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", @@ -4412,6 +3733,20 @@ "punycode": "^2.1.0" } }, + "node_modules/v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/web-streams-polyfill": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", @@ -4452,51 +3787,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/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, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wordwrapjs": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", @@ -4573,9 +3863,9 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" @@ -4610,157 +3900,169 @@ } }, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz", + "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", + "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.17.tgz", + "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", + "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", + "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", + "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", + "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", + "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", + "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", + "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", + "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", + "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", + "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", + "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", + "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", + "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", + "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", + "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", + "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", + "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", + "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", + "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", "dev": true, "optional": true }, @@ -4800,20 +4102,20 @@ } }, "@eslint-community/regexpp": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", - "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", "dev": true }, "@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -4823,15 +4125,15 @@ } }, "@eslint/js": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", - "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -4851,6 +4153,34 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4878,64 +4208,62 @@ } }, "@octokit/auth-token": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz", - "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==", - "dev": true, - "requires": { - "@octokit/types": "9.0.0" - } + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", + "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", + "dev": true }, "@octokit/core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz", - "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", + "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", "dev": true, "requires": { "@octokit/auth-token": "^3.0.0", "@octokit/graphql": "^5.0.0", "@octokit/request": "^6.0.0", "@octokit/request-error": "^3.0.0", - "@octokit/types": "9.0.0", + "@octokit/types": "^9.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" } }, "@octokit/endpoint": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz", - "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", + "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", "dev": true, "requires": { - "@octokit/types": "9.0.0", + "@octokit/types": "^9.0.0", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" } }, "@octokit/graphql": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz", - "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", + "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", "dev": true, "requires": { "@octokit/request": "^6.0.0", - "@octokit/types": "9.0.0", + "@octokit/types": "^9.0.0", "universal-user-agent": "^6.0.0" } }, "@octokit/openapi-types": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", - "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", + "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==", "dev": true }, "@octokit/plugin-paginate-rest": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz", - "integrity": "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", + "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", "dev": true, "requires": { - "@octokit/types": "9.0.0" + "@octokit/tsconfig": "^1.0.2", + "@octokit/types": "^9.2.3" } }, "@octokit/plugin-request-log": { @@ -4946,33 +4274,43 @@ "requires": {} }, "@octokit/plugin-rest-endpoint-methods": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz", - "integrity": "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", + "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", "dev": true, "requires": { - "@octokit/types": "9.0.0", - "deprecation": "^2.3.1" + "@octokit/types": "^10.0.0" + }, + "dependencies": { + "@octokit/types": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", + "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", + "dev": true, + "requires": { + "@octokit/openapi-types": "^18.0.0" + } + } } }, "@octokit/request": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", - "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "version": "6.2.8", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", + "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", "dev": true, "requires": { "@octokit/endpoint": "^7.0.0", "@octokit/request-error": "^3.0.0", - "@octokit/types": "9.0.0", + "@octokit/types": "^9.0.0", "is-plain-object": "^5.0.0", "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" }, "dependencies": { "node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", "dev": true, "requires": { "whatwg-url": "^5.0.0" @@ -4986,30 +4324,36 @@ "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", "dev": true, "requires": { - "@octokit/types": "9.0.0", + "@octokit/types": "^9.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "@octokit/rest": { - "version": "19.0.7", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz", - "integrity": "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA==", + "version": "19.0.13", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.13.tgz", + "integrity": "sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA==", "dev": true, "requires": { - "@octokit/core": "^4.1.0", - "@octokit/plugin-paginate-rest": "^6.0.0", + "@octokit/core": "^4.2.1", + "@octokit/plugin-paginate-rest": "^6.1.2", "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^7.0.0" + "@octokit/plugin-rest-endpoint-methods": "^7.1.2" } }, + "@octokit/tsconfig": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", + "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==", + "dev": true + }, "@octokit/types": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", - "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", "dev": true, "requires": { - "@octokit/openapi-types": "16.0.0" + "@octokit/openapi-types": "^18.0.0" } }, "@types/chai": { @@ -5037,16 +4381,16 @@ "@types/node": "*" } }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", "dev": true }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, "@types/microsoft__typescript-etw": { @@ -5080,15 +4424,15 @@ "dev": true }, "@types/node": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.0.tgz", - "integrity": "sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==", + "version": "20.4.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", + "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==", "dev": true }, "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, "@types/source-map-support": { @@ -5107,108 +4451,110 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", - "integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.0.tgz", + "integrity": "sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==", "dev": true, "requires": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/type-utils": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/type-utils": "6.2.0", + "@typescript-eslint/utils": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/parser": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", - "integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.0.tgz", + "integrity": "sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/typescript-estree": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", - "integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz", + "integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2" + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0" } }, "@typescript-eslint/type-utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", - "integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.0.tgz", + "integrity": "sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/typescript-estree": "6.2.0", + "@typescript-eslint/utils": "6.2.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/types": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", - "integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.0.tgz", + "integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", - "integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz", + "integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/visitor-keys": "6.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" } }, "@typescript-eslint/utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", - "integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.0.tgz", + "integrity": "sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==", "dev": true, "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.2.0", + "@typescript-eslint/types": "6.2.0", + "@typescript-eslint/typescript-estree": "6.2.0", + "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", - "integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz", + "integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.2", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.2.0", + "eslint-visitor-keys": "^3.4.1" } }, "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true }, "acorn-jsx": { @@ -5283,59 +4629,12 @@ "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", "dev": true }, - "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - } - }, - "array-includes": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", - "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "get-intrinsic": "^1.1.3", - "is-string": "^1.0.7" - } - }, "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.prototype.flat": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", - "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - } - }, - "array.prototype.flatmap": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", - "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-shim-unscopables": "^1.0.0" - } - }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -5348,16 +4647,10 @@ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true - }, "azure-devops-node-api": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", - "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.1.0.tgz", + "integrity": "sha512-VY+G45eNKVJfMIO0uyZfbi4PzUR8JHEfsHQjEUAXUGRkYhhBbhGHjy8cpiyYFxLXc3a4PL5cqgqqV/YD1SaCXg==", "dev": true, "requires": { "tunnel": "0.0.6", @@ -5413,6 +4706,26 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "c8": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", + "integrity": "sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.1.4", + "rimraf": "^3.0.2", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9" + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -5590,6 +4903,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -5651,16 +4970,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, "del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -5713,107 +5022,34 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - } - }, - "es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - } - }, - "es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "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" - } - }, "esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.17.tgz", + "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.18.17", + "@esbuild/android-arm64": "0.18.17", + "@esbuild/android-x64": "0.18.17", + "@esbuild/darwin-arm64": "0.18.17", + "@esbuild/darwin-x64": "0.18.17", + "@esbuild/freebsd-arm64": "0.18.17", + "@esbuild/freebsd-x64": "0.18.17", + "@esbuild/linux-arm": "0.18.17", + "@esbuild/linux-arm64": "0.18.17", + "@esbuild/linux-ia32": "0.18.17", + "@esbuild/linux-loong64": "0.18.17", + "@esbuild/linux-mips64el": "0.18.17", + "@esbuild/linux-ppc64": "0.18.17", + "@esbuild/linux-riscv64": "0.18.17", + "@esbuild/linux-s390x": "0.18.17", + "@esbuild/linux-x64": "0.18.17", + "@esbuild/netbsd-x64": "0.18.17", + "@esbuild/openbsd-x64": "0.18.17", + "@esbuild/sunos-x64": "0.18.17", + "@esbuild/win32-arm64": "0.18.17", + "@esbuild/win32-ia32": "0.18.17", + "@esbuild/win32-x64": "0.18.17" } }, "escalade": { @@ -5829,16 +5065,16 @@ "dev": true }, "eslint": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", - "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", + "version": "8.45.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", + "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.40.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -5849,7 +5085,7 @@ "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "espree": "^9.6.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -5857,41 +5093,22 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "dependencies": { - "eslint-scope": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", - "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, "glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -5913,97 +5130,6 @@ "plur": "^4.0.0" } }, - "eslint-import-resolver-node": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", - "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "is-core-module": "^2.11.0", - "resolve": "^1.22.1" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "requires": { - "debug": "^3.2.7" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-plugin-import": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", - "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", - "dev": true, - "requires": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.7.4", - "has": "^1.0.3", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.values": "^1.1.6", - "resolve": "^1.22.1", - "semver": "^6.3.0", - "tsconfig-paths": "^3.14.1" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "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-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-local/-/eslint-plugin-local-1.0.0.tgz", @@ -6025,13 +5151,13 @@ "requires": {} }, "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", + "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", "dev": true, "requires": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" } }, "eslint-visitor-keys": { @@ -6041,12 +5167,12 @@ "dev": true }, "espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" } @@ -6058,14 +5184,6 @@ "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "esrecurse": { @@ -6075,20 +5193,12 @@ "dev": true, "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -6104,9 +5214,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -6129,9 +5239,9 @@ "dev": true }, "fast-xml-parser": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.2.tgz", - "integrity": "sha512-DLzIPtQqmvmdq3VUKR7T6omPK/VCRNqgFlGtbESfyhcH2R4I8EzK1/K6E8PkRCK2EabWrUHK32NjYRbEFnnz0Q==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.6.tgz", + "integrity": "sha512-Xo1qV++h/Y3Ng8dphjahnYe+rGHaaNdsYOBWL9Y9GCPKpNKilJtilvWkLcI9f9X2DoKTLsZsGYAls5+JL5jfLA==", "dev": true, "requires": { "strnum": "^1.0.5" @@ -6212,13 +5322,14 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "requires": { - "is-callable": "^1.1.3" + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" } }, "formdata-polyfill": { @@ -6261,24 +5372,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -6292,26 +5385,17 @@ "dev": true }, "get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" } }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, "glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -6363,15 +5447,6 @@ "type-fest": "^0.20.2" } }, - "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3" - } - }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -6386,25 +5461,16 @@ "slash": "^3.0.0" } }, - "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.3" - } - }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "has": { @@ -6416,27 +5482,12 @@ "function-bind": "^1.1.1" } }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, "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-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, "has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -6449,15 +5500,6 @@ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -6478,6 +5520,12 @@ "pretty-ms": "^8.0.0" } }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -6528,43 +5576,12 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, "irregular-plurals": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", "dev": true }, - "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -6574,40 +5591,6 @@ "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true - }, - "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -6629,27 +5612,12 @@ "is-extglob": "^2.1.1" } }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "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 }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -6674,83 +5642,45 @@ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - } - }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true }, + "istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -6772,15 +5702,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, "jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -6850,6 +5771,15 @@ "yallist": "^4.0.0" } }, + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + } + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -6969,6 +5899,12 @@ "requires": { "has-flag": "^4.0.0" } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true } } }, @@ -7009,9 +5945,9 @@ "dev": true }, "node-fetch": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", - "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dev": true, "requires": { "data-uri-to-buffer": "^4.0.0", @@ -7031,35 +5967,6 @@ "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "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.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, - "object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -7070,17 +5977,17 @@ } }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" } }, "p-limit": { @@ -7143,12 +6050,6 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -7204,9 +6105,9 @@ "dev": true }, "qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, "requires": { "side-channel": "^1.0.4" @@ -7242,34 +6143,12 @@ "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true }, - "regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -7322,21 +6201,10 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, - "safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - } - }, "semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -7377,6 +6245,12 @@ "object-inspect": "^1.9.0" } }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -7410,39 +6284,6 @@ "strip-ansi": "^6.0.1" } }, - "string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, - "string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - } - }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -7452,12 +6293,6 @@ "ansi-regex": "^5.0.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -7479,12 +6314,6 @@ "has-flag": "^4.0.0" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -7497,6 +6326,33 @@ "wordwrapjs": "^4.0.0" } }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -7518,41 +6374,19 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } + "requires": {} }, "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -7580,21 +6414,10 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, - "typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - } - }, "typed-rest-client": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", - "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", "dev": true, "requires": { "qs": "^6.9.1", @@ -7603,9 +6426,9 @@ } }, "typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "dev": true }, "typical": { @@ -7614,18 +6437,6 @@ "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", "dev": true }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, "underscore": { "version": "1.13.6", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", @@ -7653,6 +6464,17 @@ "punycode": "^2.1.0" } }, + "v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + }, "web-streams-polyfill": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", @@ -7684,39 +6506,6 @@ "isexe": "^2.0.0" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - } - }, - "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 - }, "wordwrapjs": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", @@ -7778,9 +6567,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yargs-unparser": { diff --git a/package.json b/package.json index 5ac9044fde463..deec92a87bcd7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.1.0", + "version": "5.2.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -40,7 +40,7 @@ ], "devDependencies": { "@esfx/canceltoken": "^1.0.0", - "@octokit/rest": "latest", + "@octokit/rest": "^19.0.13", "@types/chai": "^4.3.4", "@types/fs-extra": "^9.0.13", "@types/glob": "^8.1.0", @@ -51,19 +51,19 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.6", "@types/which": "^2.0.1", - "@typescript-eslint/eslint-plugin": "^5.33.1", - "@typescript-eslint/parser": "^5.33.1", - "@typescript-eslint/utils": "^5.33.1", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@typescript-eslint/utils": "^6.0.0", "azure-devops-node-api": "^12.0.0", + "c8": "^7.14.0", "chai": "^4.3.7", "chalk": "^4.1.2", "chokidar": "^3.5.3", "del": "^6.1.1", "diff": "^5.1.0", - "esbuild": "^0.17.2", + "esbuild": "^0.18.1", "eslint": "^8.22.0", "eslint-formatter-autolinkable-stylish": "^1.2.0", - "eslint-plugin-import": "^2.26.0", "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", @@ -83,9 +83,7 @@ "which": "^2.0.2" }, "overrides": { - "typescript@*": "$typescript", - "@octokit/types": "9.0.0", - "@octokit/openapi-types": "16.0.0" + "typescript@*": "$typescript" }, "scripts": { "test": "hereby runtests-parallel --light=false", @@ -110,9 +108,9 @@ "source-map-support": false, "inspector": false }, - "packageManager": "npm@8.19.3", + "packageManager": "npm@8.19.4", "volta": { - "node": "14.21.1", - "npm": "8.19.3" + "node": "20.1.0", + "npm": "8.19.4" } } diff --git a/scripts/build/options.mjs b/scripts/build/options.mjs index 63b6981131d90..ce2aa1330cb67 100644 --- a/scripts/build/options.mjs +++ b/scripts/build/options.mjs @@ -4,7 +4,7 @@ import os from "os"; const ci = ["1", "true"].includes(process.env.CI ?? ""); const parsed = minimist(process.argv.slice(2), { - boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck", "lint"], + boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck", "lint", "coverage"], string: ["browser", "tests", "break", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"], alias: { /* eslint-disable quote-props */ @@ -42,6 +42,7 @@ const parsed = minimist(process.argv.slice(2), { bundle: true, typecheck: true, lint: true, + coverage: false, } }); @@ -88,5 +89,6 @@ export default options; * @property {boolean} bundle * @property {boolean} typecheck * @property {boolean} lint + * @property {boolean} coverage */ void 0; diff --git a/scripts/build/tests.mjs b/scripts/build/tests.mjs index 3edddad9efafa..62973c89419bc 100644 --- a/scripts/build/tests.mjs +++ b/scripts/build/tests.mjs @@ -7,13 +7,14 @@ import path from "path"; import { findUpFile, findUpRoot } from "./findUpDir.mjs"; import cmdLineOptions from "./options.mjs"; -import { exec } from "./utils.mjs"; +import { exec, ExecError } from "./utils.mjs"; const mochaJs = path.resolve(findUpRoot(), "node_modules", "mocha", "bin", "_mocha"); export const localBaseline = "tests/baselines/local/"; export const refBaseline = "tests/baselines/reference/"; export const localRwcBaseline = "internal/baselines/rwc/local"; export const refRwcBaseline = "internal/baselines/rwc/reference"; +export const coverageDir = "coverage"; /** * @param {string} runJs @@ -35,11 +36,13 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt const keepFailed = cmdLineOptions.keepFailed; const shards = +cmdLineOptions.shards || undefined; const shardId = +cmdLineOptions.shardId || undefined; + const coverage = cmdLineOptions.coverage; if (!cmdLineOptions.dirty) { if (options.watching) { console.log(chalk.yellowBright(`[watch] cleaning test directories...`)); } await cleanTestDirs(); + await cleanCoverageDir(); if (options.token?.signaled) { return; @@ -128,21 +131,28 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt /** @type {Error | undefined} */ let error; + const savedNodeEnv = process.env.NODE_ENV; + const savedNodeV8Coverage = process.env.NODE_V8_COVERAGE; try { - setNodeEnvToDevelopment(); + process.env.NODE_ENV = "development"; + if (coverage) { + process.env.NODE_V8_COVERAGE = path.resolve(coverageDir, "tmp"); + } - const { exitCode } = await exec(process.execPath, args, { token: options.token }); - if (exitCode !== 0) { - errorStatus = exitCode; - error = new Error(`Process exited with status code ${errorStatus}.`); + await exec(process.execPath, args, { token: options.token }); + if (coverage) { + await exec("npm", ["--prefer-offline", "exec", "--", "c8", "report"], { token: options.token }); } } catch (e) { - errorStatus = undefined; + errorStatus = e instanceof ExecError ? e.exitCode ?? undefined : undefined; error = /** @type {Error} */ (e); } finally { - restoreSavedNodeEnv(); + if (coverage) { + process.env.NODE_V8_COVERAGE = savedNodeV8Coverage; + } + process.env.NODE_ENV = savedNodeEnv; } await del("test.config"); @@ -169,6 +179,10 @@ export async function cleanTestDirs() { await fs.promises.mkdir(localBaseline, { recursive: true }); } +async function cleanCoverageDir() { + await del([coverageDir]); +} + /** * used to pass data from command line directly to run.js * @param {string} tests @@ -200,17 +214,6 @@ export function writeTestConfigFile(tests, runners, light, taskConfigsFolder, wo fs.writeFileSync("test.config", testConfigContents); } -/** @type {string | undefined} */ -let savedNodeEnv; -function setNodeEnvToDevelopment() { - savedNodeEnv = process.env.NODE_ENV; - process.env.NODE_ENV = "development"; -} - -function restoreSavedNodeEnv() { - process.env.NODE_ENV = savedNodeEnv; -} - function deleteTemporaryProjectOutput() { return del(path.join(localBaseline, "projectOutput/")); } diff --git a/scripts/build/utils.mjs b/scripts/build/utils.mjs index 2c8fe8c0c584b..ec3b7bccaa220 100644 --- a/scripts/build/utils.mjs +++ b/scripts/build/utils.mjs @@ -35,7 +35,7 @@ export async function exec(cmd, args, options = {}) { } else { const reason = options.token?.signaled ? options.token.reason ?? new CancelError() : - new Error(`Process exited with code: ${exitCode}`); + new ExecError(exitCode); reject(reason); } subscription?.unsubscribe(); @@ -53,6 +53,19 @@ export async function exec(cmd, args, options = {}) { })); } +export class ExecError extends Error { + exitCode; + + /** + * @param {number | null} exitCode + * @param {string} message + */ + constructor(exitCode, message = `Process exited with code: ${exitCode}`) { + super(message); + this.exitCode = exitCode; + } +} + /** * Reads JSON data with optional comments using the LKG TypeScript compiler * @param {string} jsonPath diff --git a/scripts/eslint/rules/argument-trivia.cjs b/scripts/eslint/rules/argument-trivia.cjs index 9b12ba27bcbd1..49ec726dc4b04 100644 --- a/scripts/eslint/rules/argument-trivia.cjs +++ b/scripts/eslint/rules/argument-trivia.cjs @@ -25,7 +25,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { argumentTriviaArgumentError: `Tag argument with parameter name`, @@ -180,7 +179,7 @@ module.exports = createRule({ } const getSignature = memoize(() => { - if (context.parserServices?.hasFullTypeInformation) { + if (context.parserServices?.program) { const parserServices = ESLintUtils.getParserServices(context); const checker = parserServices.program.getTypeChecker(); const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); diff --git a/scripts/eslint/rules/debug-assert.cjs b/scripts/eslint/rules/debug-assert.cjs index da4c70bf4600f..8b2e0b0596a11 100644 --- a/scripts/eslint/rules/debug-assert.cjs +++ b/scripts/eslint/rules/debug-assert.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { secondArgumentDebugAssertError: `Second argument to 'Debug.assert' should be a string literal`, diff --git a/scripts/eslint/rules/jsdoc-format.cjs b/scripts/eslint/rules/jsdoc-format.cjs index d8d78b97970d0..140e22b5e4fd3 100644 --- a/scripts/eslint/rules/jsdoc-format.cjs +++ b/scripts/eslint/rules/jsdoc-format.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { internalCommentInNonJSDocError: `@internal should not appear in non-JSDoc comment for declaration.`, diff --git a/scripts/eslint/rules/no-double-space.cjs b/scripts/eslint/rules/no-double-space.cjs index 1d716d084b08f..75c74d031a4fe 100644 --- a/scripts/eslint/rules/no-double-space.cjs +++ b/scripts/eslint/rules/no-double-space.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { noDoubleSpaceError: `Use only one space`, diff --git a/scripts/eslint/rules/no-in-operator.cjs b/scripts/eslint/rules/no-in-operator.cjs index d17e88be951cf..bbd2b60532596 100644 --- a/scripts/eslint/rules/no-in-operator.cjs +++ b/scripts/eslint/rules/no-in-operator.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { noInOperatorError: `Don't use the 'in' keyword - use 'hasProperty' to check for key presence instead`, diff --git a/scripts/eslint/rules/no-keywords.cjs b/scripts/eslint/rules/no-keywords.cjs index 673a857912cd4..0cb0c9f7b1d4f 100644 --- a/scripts/eslint/rules/no-keywords.cjs +++ b/scripts/eslint/rules/no-keywords.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: `disallows the use of certain TypeScript keywords as variable or parameter names`, - recommended: "error", }, messages: { noKeywordsError: `{{ name }} clashes with keyword/type`, diff --git a/scripts/eslint/rules/no-type-assertion-whitespace.cjs b/scripts/eslint/rules/no-type-assertion-whitespace.cjs index 174de300562e8..3f10a85dbc7f8 100644 --- a/scripts/eslint/rules/no-type-assertion-whitespace.cjs +++ b/scripts/eslint/rules/no-type-assertion-whitespace.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { noTypeAssertionWhitespace: `Excess trailing whitespace found around type assertion`, diff --git a/scripts/eslint/rules/object-literal-surrounding-space.cjs b/scripts/eslint/rules/object-literal-surrounding-space.cjs index 2321acbce1cf1..b2c8604790170 100644 --- a/scripts/eslint/rules/object-literal-surrounding-space.cjs +++ b/scripts/eslint/rules/object-literal-surrounding-space.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { leadingExcessStringError: `No trailing whitespace found on single-line object literal`, diff --git a/scripts/eslint/rules/only-arrow-functions.cjs b/scripts/eslint/rules/only-arrow-functions.cjs index d2d553ab3b3d6..d68ab8a397a67 100644 --- a/scripts/eslint/rules/only-arrow-functions.cjs +++ b/scripts/eslint/rules/only-arrow-functions.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: `Disallows traditional (non-arrow) function expressions.`, - recommended: "error", }, messages: { onlyArrowFunctionsError: "non-arrow functions are forbidden", diff --git a/scripts/eslint/rules/simple-indent.cjs b/scripts/eslint/rules/simple-indent.cjs index 3701da068bb84..958e04658ee29 100644 --- a/scripts/eslint/rules/simple-indent.cjs +++ b/scripts/eslint/rules/simple-indent.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: "Enforce consistent indentation", - recommended: "error", }, messages: { simpleIndentError: "4 space indentation expected", diff --git a/scripts/eslint/rules/type-operator-spacing.cjs b/scripts/eslint/rules/type-operator-spacing.cjs index 16a493eaf0922..5d0fd8f1e9794 100644 --- a/scripts/eslint/rules/type-operator-spacing.cjs +++ b/scripts/eslint/rules/type-operator-spacing.cjs @@ -6,7 +6,6 @@ module.exports = createRule({ meta: { docs: { description: ``, - recommended: "error", }, messages: { typeOperatorSpacingError: `The '|' and '&' operators must be surrounded by spaces`, diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 5a01767f96d44..34d731e880695 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -33,6 +33,8 @@ export * from "../visitorPublic"; export * from "../sourcemap"; export * from "../transformers/utilities"; export * from "../transformers/destructuring"; +export * from "../transformers/classThis"; +export * from "../transformers/namedEvaluation"; export * from "../transformers/taggedTemplate"; export * from "../transformers/ts"; export * from "../transformers/classFields"; diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f54a3e0666f00..cefe7b9c88797 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -87,6 +87,7 @@ import { getElementOrPropertyAccessName, getEmitScriptTarget, getEnclosingBlockScopeContainer, + getEnclosingContainer, getErrorSpanForNode, getEscapedTextOfIdentifierOrLiteral, getEscapedTextOfJsxNamespacedName, @@ -312,7 +313,7 @@ import { unusedLabelIsError, VariableDeclaration, WhileStatement, - WithStatement, + WithStatement } from "./_namespaces/ts"; import * as performance from "./_namespaces/ts.performance"; @@ -444,6 +445,14 @@ function getModuleInstanceStateForAliasTarget(specifier: ExportSpecifier, visite if (found === ModuleInstanceState.Instantiated) { return found; } + if (statement.kind === SyntaxKind.ImportEqualsDeclaration) { + // Treat re-exports of import aliases as instantiated, + // since they're ambiguous. This is consistent with + // `export import x = mod.x` being treated as instantiated: + // import x = mod.x; + // export { x }; + found = ModuleInstanceState.Instantiated; + } } } if (found !== undefined) { @@ -455,7 +464,8 @@ function getModuleInstanceStateForAliasTarget(specifier: ExportSpecifier, visite return ModuleInstanceState.Instantiated; // Couldn't locate, assume could refer to a value } -const enum ContainerFlags { +/** @internal */ +export const enum ContainerFlags { // The current node is not a container, and no container manipulation should happen before // recursing into it. None = 0, @@ -2356,7 +2366,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { const saveCurrentFlow = currentFlow; for (const typeAlias of delayedTypeAliases) { const host = typeAlias.parent.parent; - container = (findAncestor(host.parent, n => !!(getContainerFlags(n) & ContainerFlags.IsContainer)) as IsContainer | undefined) || file; + container = (getEnclosingContainer(host) as IsContainer | undefined) || file; blockScopeContainer = (getEnclosingBlockScopeContainer(host) as IsBlockScopedContainer | undefined) || file; currentFlow = initFlowNode({ flags: FlowFlags.Start }); parent = typeAlias; @@ -3725,7 +3735,7 @@ function isExecutableStatement(s: Statement): boolean { // Don't remove statements that can validly be used before they appear. return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (NodeFlags.Let | NodeFlags.Const)) && s.declarationList.declarations.some(d => !d.initializer)); + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (NodeFlags.BlockScoped)) && s.declarationList.declarations.some(d => !d.initializer)); } function isPurelyTypeDeclaration(s: Statement): boolean { @@ -3768,7 +3778,8 @@ export function isExportsOrModuleExportsOrAlias(sourceFile: SourceFile, node: Ex return false; } -function getContainerFlags(node: Node): ContainerFlags { +/** @internal */ +export function getContainerFlags(node: Node): ContainerFlags { switch (node.kind) { case SyntaxKind.ClassExpression: case SyntaxKind.ClassDeclaration: diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 80724963973e3..7eae60d4e434b 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -22,6 +22,7 @@ import { convertToOptionsWithAbsolutePaths, createBuildInfo, createGetCanonicalFileName, + createModuleNotFoundChain, createProgram, CustomTransformers, Debug, @@ -68,8 +69,11 @@ import { ProjectReference, ReadBuildProgramHost, ReadonlyCollection, + RepopulateDiagnosticChainInfo, + RepopulateModuleNotFoundDiagnosticChain, returnFalse, returnUndefined, + sameMap, SemanticDiagnosticsBuilderProgram, skipTypeChecking, some, @@ -103,7 +107,18 @@ export interface ReusableDiagnosticRelatedInformation { } /** @internal */ -export type ReusableDiagnosticMessageChain = DiagnosticMessageChain; +export interface ReusableRepopulateModuleNotFoundChain { + info: RepopulateModuleNotFoundDiagnosticChain; + next?: ReusableDiagnosticMessageChain[]; +} + +/** @internal */ +export type SerializedDiagnosticMessageChain = Omit & { + next?: ReusableDiagnosticMessageChain[]; +}; + +/** @internal */ +export type ReusableDiagnosticMessageChain = SerializedDiagnosticMessageChain | ReusableRepopulateModuleNotFoundChain; /** * Signature (Hash of d.ts emitted), is string if it was emitted using same d.ts.map option as what compilerOptions indicate, otherwise tuple of string @@ -364,7 +379,12 @@ function createBuilderProgramState(newProgram: Program, oldState: Readonly { + if (isString(diag.messageText)) return diag; + const repopulatedChain = convertOrRepopulateDiagnosticMessageChain(diag.messageText, diag.file, newProgram, chain => chain.repopulateInfo?.()); + return repopulatedChain === diag.messageText ? + diag : + { ...diag, messageText: repopulatedChain }; + }); +} + +function convertOrRepopulateDiagnosticMessageChain( + chain: T, + sourceFile: SourceFile | undefined, + newProgram: Program, + repopulateInfo: (chain: T) => RepopulateDiagnosticChainInfo | undefined, +): DiagnosticMessageChain { + const info = repopulateInfo(chain); + if (info) { + return { + ...createModuleNotFoundChain(sourceFile!, newProgram, info.moduleReference, info.mode, info.packageName || info.moduleReference), + next: convertOrRepopulateDiagnosticMessageChainArray(chain.next as T[], sourceFile, newProgram, repopulateInfo), + }; + } + const next = convertOrRepopulateDiagnosticMessageChainArray(chain.next as T[], sourceFile, newProgram, repopulateInfo); + return next === chain.next ? chain as DiagnosticMessageChain : { ...chain as DiagnosticMessageChain, next }; +} + +function convertOrRepopulateDiagnosticMessageChainArray( + array: T[] | undefined, + sourceFile: SourceFile | undefined, + newProgram: Program, + repopulateInfo: (chain: T) => RepopulateDiagnosticChainInfo | undefined, +): DiagnosticMessageChain[] | undefined { + return sameMap(array, chain => convertOrRepopulateDiagnosticMessageChain(chain, sourceFile, newProgram, repopulateInfo)); +} + function convertToDiagnostics(diagnostics: readonly ReusableDiagnostic[], newProgram: Program): readonly Diagnostic[] { if (!diagnostics.length) return emptyArray; let buildInfoDirectory: string | undefined; @@ -474,9 +531,13 @@ function convertToDiagnostics(diagnostics: readonly ReusableDiagnostic[], newPro function convertToDiagnosticRelatedInformation(diagnostic: ReusableDiagnosticRelatedInformation, newProgram: Program, toPath: (path: string) => Path): DiagnosticRelatedInformation { const { file } = diagnostic; + const sourceFile = file ? newProgram.getSourceFileByPath(toPath(file)) : undefined; return { ...diagnostic, - file: file ? newProgram.getSourceFileByPath(toPath(file)) : undefined + file: sourceFile, + messageText: isString(diagnostic.messageText) ? + diagnostic.messageText : + convertOrRepopulateDiagnosticMessageChain(diagnostic.messageText, sourceFile, newProgram, chain => (chain as ReusableRepopulateModuleNotFoundChain).info), }; } @@ -1232,10 +1293,36 @@ function convertToReusableDiagnosticRelatedInformation(diagnostic: DiagnosticRel const { file } = diagnostic; return { ...diagnostic, - file: file ? relativeToBuildInfo(file.resolvedPath) : undefined + file: file ? relativeToBuildInfo(file.resolvedPath) : undefined, + messageText: isString(diagnostic.messageText) ? diagnostic.messageText : convertToReusableDiagnosticMessageChain(diagnostic.messageText), }; } +function convertToReusableDiagnosticMessageChain(chain: DiagnosticMessageChain): ReusableDiagnosticMessageChain { + if (chain.repopulateInfo) { + return { + info: chain.repopulateInfo(), + next: convertToReusableDiagnosticMessageChainArray(chain.next), + }; + } + const next = convertToReusableDiagnosticMessageChainArray(chain.next); + return next === chain.next ? chain : { ...chain, next }; +} + +function convertToReusableDiagnosticMessageChainArray(array: DiagnosticMessageChain[] | undefined): ReusableDiagnosticMessageChain[] | undefined { + if (!array) return array; + return forEach(array, (chain, index) => { + const reusable = convertToReusableDiagnosticMessageChain(chain); + if (chain === reusable) return undefined; + const result: ReusableDiagnosticMessageChain[] = index > 0 ? array.slice(0, index - 1) : []; + result.push(reusable); + for (let i = index + 1; i < array.length; i++) { + result.push(convertToReusableDiagnosticMessageChain(array[i])); + } + return result; + }) || array; +} + /** @internal */ export enum BuilderProgramKind { SemanticDiagnosticsBuilderProgram, diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 74dd774bb942d..d48ecea74aae5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24,6 +24,7 @@ import { arrayToMultiMap, ArrayTypeNode, ArrowFunction, + AsExpression, AssertionExpression, AssignmentDeclarationKind, AssignmentKind, @@ -110,6 +111,7 @@ import { createGetCanonicalFileName, createGetSymbolWalker, createModeAwareCacheKey, + createModuleNotFoundChain, createMultiMap, createPrinterWithDefaults, createPrinterWithRemoveComments, @@ -246,6 +248,7 @@ import { getCombinedModifierFlags, getCombinedNodeFlags, getContainingClass, + getContainingClassExcludingClassDecorators, getContainingClassStaticBlock, getContainingFunction, getContainingFunctionOrClassStaticBlock, @@ -272,6 +275,7 @@ import { getEmitModuleResolutionKind, getEmitScriptTarget, getEnclosingBlockScopeContainer, + getEnclosingContainer, getEntityNameFromTypeNode, getErrorSpanForNode, getEscapedTextOfIdentifierOrLiteral, @@ -331,6 +335,7 @@ import { getParseTreeNode, getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode, + getPropertyNameFromType, getResolutionDiagnostic, getResolutionModeOverrideForClause, getResolvedExternalModuleName, @@ -359,7 +364,6 @@ import { getThisParameter, getTrailingSemicolonDeferringWriter, getTypeParameterFromJsDoc, - getTypesPackageName, getUseDefineForClassFields, group, hasAbstractModifier, @@ -607,7 +611,6 @@ import { isKnownSymbol, isLateVisibilityPaintedStatement, isLeftHandSideExpression, - isLet, isLineBreak, isLiteralComputedPropertyDeclarationName, isLiteralExpression, @@ -727,12 +730,12 @@ import { isTypeQueryNode, isTypeReferenceNode, isTypeReferenceType, + isTypeUsableAsPropertyName, isUMDExportSymbol, isValidBigIntString, isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration, - isVarConst, isVariableDeclaration, isVariableDeclarationInitializedToBareOrAccessedRequire, isVariableDeclarationInVariableStatement, @@ -776,6 +779,7 @@ import { JSDocVariadicType, JsxAttribute, JsxAttributeLike, + JsxAttributeName, JsxAttributes, JsxChild, JsxClosingElement, @@ -805,7 +809,6 @@ import { LiteralExpression, LiteralType, LiteralTypeNode, - mangleScopedPackageName, map, mapDefined, MappedSymbol, @@ -814,7 +817,6 @@ import { MatchingKeys, maybeBind, MemberOverrideStatus, - memoize, MetaProperty, MethodDeclaration, MethodSignature, @@ -852,7 +854,6 @@ import { nodeIsPresent, nodeIsSynthesized, NodeLinks, - nodeModulesPathPart, nodeStartsNewLexicalEnvironment, NodeWithTypeArguments, NonNullChain, @@ -1260,6 +1261,7 @@ export const enum CheckMode { RestBindingElement = 1 << 6, // Checking a type that is going to be used to determine the type of a rest binding element // e.g. in `const { a, ...rest } = foo`, when checking the type of `foo` to determine the type of `rest`, // we need to preserve generic types instead of substituting them for constraints + TypeOnly = 1 << 7, // Called from getTypeOfExpression, diagnostics may be omitted } /** @internal */ @@ -1391,22 +1393,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Why var? It avoids TDZ checks in the runtime which can be costly. // See: https://github.com/microsoft/TypeScript/issues/52924 /* eslint-disable no-var */ - var getPackagesMap = memoize(() => { - // A package name maps to true when we detect it has .d.ts files. - // This is useful as an approximation of whether a package bundles its own types. - // Note: we only look at files already found by module resolution, - // so there may be files we did not consider. - var map = new Map(); - host.getSourceFiles().forEach(sf => { - if (!sf.resolvedModules) return; - - sf.resolvedModules.forEach(({ resolvedModule }) => { - if (resolvedModule?.packageId) map.set(resolvedModule.packageId.name, resolvedModule.extension === Extension.Dts || !!map.get(resolvedModule.packageId.name)); - }); - }); - return map; - }); - var deferredDiagnosticsCallbacks: (() => void)[] = []; var addLazyDiagnostic = (arg: () => void) => { @@ -1486,6 +1472,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { /** This will be set during calls to `getResolvedSignature` where services determines an apparent number of arguments greater than what is actually provided. */ var apparentArgumentCount: number | undefined; + var lastGetCombinedNodeFlagsNode: Node | undefined; + var lastGetCombinedNodeFlagsResult = NodeFlags.None; + var lastGetCombinedModifierFlagsNode: Declaration | undefined; + var lastGetCombinedModifierFlagsResult = ModifierFlags.None; + // for public members that accept a Node or one of its subtypes, we must guard against // synthetic nodes created during transformations by calling `getParseTreeNode`. // for most of these, we perform the guard only on `checker` to avoid any possible @@ -1549,7 +1540,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return node ? getTypeFromTypeNode(node) : errorType; }, getParameterType: getTypeAtPosition, - getParameterIdentifierNameAtPosition, + getParameterIdentifierInfoAtPosition, getPromisedTypeOfPromise, getAwaitedType: type => getAwaitedType(type), getReturnTypeOfSignature, @@ -1657,8 +1648,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.Normal), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray) => - runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(call, candidatesOutArray, /*argumentCount*/ undefined, CheckMode.IsForStringLiteralArgumentCompletions)), + getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = CheckMode.IsForStringLiteralArgumentCompletions) => { + if (checkMode & CheckMode.IsForStringLiteralArgumentCompletions) { + return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(call, candidatesOutArray, /*argumentCount*/ undefined, checkMode & ~CheckMode.IsForStringLiteralArgumentCompletions)); + } + return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker(call, candidatesOutArray, /*argumentCount*/ undefined, checkMode & ~CheckMode.IsForStringLiteralArgumentCompletions)); + }, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.IsForSignatureHelp)), getExpandedParameters, @@ -1840,14 +1835,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }; function runWithoutResolvedSignatureCaching(node: Node | undefined, fn: () => T): T { - const containingCall = findAncestor(node, isCallLikeExpression); - const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = undefined; + const cachedSignatures = []; + while (node) { + if (isCallLikeExpression(node)) { + const nodeLinks = getNodeLinks(node); + const resolvedSignature = nodeLinks.resolvedSignature; + cachedSignatures.push([nodeLinks, resolvedSignature] as const); + nodeLinks.resolvedSignature = undefined; + } + node = node.parent; } const result = fn(); - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + for (const [nodeLinks, resolvedSignature] of cachedSignatures) { + nodeLinks.resolvedSignature = resolvedSignature; } return result; } @@ -2070,7 +2070,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { /** Key is "/path/to/a.ts|/path/to/b.ts". */ var amalgamatedDuplicates: Map | undefined; var reverseMappedCache = new Map(); - var inInferTypeForHomomorphicMappedType = false; + var homomorphicMappedTypeInferenceStack: string[] = []; var ambientModulesCache: Symbol[] | undefined; /** * List of every ambient module with a "*" wildcard. @@ -2121,6 +2121,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var deferredGlobalImportMetaType: ObjectType; var deferredGlobalImportMetaExpressionType: ObjectType; var deferredGlobalImportCallOptionsType: ObjectType | undefined; + var deferredGlobalDisposableType: ObjectType | undefined; + var deferredGlobalAsyncDisposableType: ObjectType | undefined; var deferredGlobalExtractSymbol: Symbol | undefined; var deferredGlobalOmitSymbol: Symbol | undefined; var deferredGlobalAwaitedSymbol: Symbol | undefined; @@ -2401,7 +2403,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isDeprecatedDeclaration(declaration: Declaration) { - return !!(getCombinedNodeFlags(declaration) & NodeFlags.Deprecated); + return !!(getCombinedNodeFlagsCached(declaration) & NodeFlags.Deprecated); } function addDeprecatedSuggestion(location: Node, declarations: Node[], deprecatedEntity: string) { @@ -3040,8 +3042,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // (it refers to the constant type of the expression instead) return undefined; } - if (isModuleDeclaration(location) && lastLocation && location.name === lastLocation) { - // If this is the name of a namespace, skip the parent since it will have is own locals that could + if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { + // If lastLocation is the name of a namespace or enum, skip the parent since it will have is own locals that could // conflict. lastLocation = location; location = location.parent; @@ -3407,6 +3409,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (nameNotFoundMessage) { addLazyDiagnostic(() => { if (!errorLocation || + errorLocation.parent.kind !== SyntaxKind.JSDocLink && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg!) && // TODO: GH#18217 !checkAndReportErrorForInvalidInitializer() && !checkAndReportErrorForExtendingInterface(errorLocation) && @@ -4905,8 +4908,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); - error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + const importOrExport = + findAncestor(location, isImportDeclaration)?.importClause || + findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (!(importOrExport?.isTypeOnly || findAncestor(location, isImportTypeNode))) { + const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); + error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + } } if (sourceFile.symbol) { @@ -5066,31 +5074,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function errorOnImplicitAnyModule(isError: boolean, errorNode: Node, sourceFile: SourceFile, mode: ResolutionMode, { packageId, resolvedFileName }: ResolvedModuleFull, moduleReference: string): void { - let errorInfo; + let errorInfo: DiagnosticMessageChain | undefined; if (!isExternalModuleNameRelative(moduleReference) && packageId) { - const node10Result = sourceFile.resolvedModules?.get(moduleReference, mode)?.node10Result; - errorInfo = node10Result - ? chainDiagnosticMessages( - /*details*/ undefined, - Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, - node10Result, - node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageId.name)}` : packageId.name) - : typesPackageExists(packageId.name) - ? chainDiagnosticMessages( - /*details*/ undefined, - Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1, - packageId.name, mangleScopedPackageName(packageId.name)) - : packageBundlesTypes(packageId.name) - ? chainDiagnosticMessages( - /*details*/ undefined, - Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1, - packageId.name, - moduleReference) - : chainDiagnosticMessages( - /*details*/ undefined, - 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)); + errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name); } errorOrSuggestion(isError, errorNode, chainDiagnosticMessages( errorInfo, @@ -5098,12 +5084,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { moduleReference, resolvedFileName)); } - function typesPackageExists(packageName: string): boolean { - return getPackagesMap().has(getTypesPackageName(packageName)); - } - function packageBundlesTypes(packageName: string): boolean { - return !!getPackagesMap().get(packageName); - } function resolveExternalModuleSymbol(moduleSymbol: Symbol, dontResolveAlias?: boolean): Symbol; function resolveExternalModuleSymbol(moduleSymbol: Symbol | undefined, dontResolveAlias?: boolean): Symbol | undefined; @@ -5627,7 +5607,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function createIntrinsicType(kind: TypeFlags, intrinsicName: string, objectFlags = ObjectFlags.None): IntrinsicType { const type = createType(kind) as IntrinsicType; type.intrinsicName = intrinsicName; - type.objectFlags = objectFlags; + type.objectFlags = objectFlags | ObjectFlags.CouldContainTypeVariablesComputed | ObjectFlags.IsGenericTypeComputed | ObjectFlags.IsUnknownLikeUnionComputed | ObjectFlags.IsNeverIntersectionComputed; return type; } @@ -5771,7 +5751,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return rightMeaning === SymbolFlags.Value ? SymbolFlags.Value : SymbolFlags.Namespace; } - function getAccessibleSymbolChain(symbol: Symbol | undefined, enclosingDeclaration: Node | undefined, meaning: SymbolFlags, useOnlyExternalAliasing: boolean, visitedSymbolTablesMap: Map = new Map()): Symbol[] | undefined { + function getAccessibleSymbolChain(symbol: Symbol | undefined, enclosingDeclaration: Node | undefined, meaning: SymbolFlags, useOnlyExternalAliasing: boolean, visitedSymbolTablesMap = new Map()): Symbol[] | undefined { if (!(symbol && !isPropertyOrMethodDeclarationSymbol(symbol))) { return undefined; } @@ -6666,6 +6646,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const questionToken = type.declaration.questionToken ? factory.createToken(type.declaration.questionToken.kind) as QuestionToken | PlusToken | MinusToken : undefined; let appropriateConstraintTypeNode: TypeNode; let newTypeVariable: TypeReferenceNode | undefined; + // If the mapped type isn't `keyof` constraint-declared, _but_ still has modifiers preserved, and its naive instantiation won't preserve modifiers because its constraint isn't `keyof` constrained, we have work to do + const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type) + && !(getModifiersTypeFromMappedType(type).flags & TypeFlags.Unknown) + && context.flags & NodeBuilderFlags.GenerateNamesForShadowedTypeParams + && !(getConstraintTypeFromMappedType(type).flags & TypeFlags.TypeParameter && getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type))?.flags! & TypeFlags.Index); if (isMappedTypeWithKeyofConstraintDeclaration(type)) { // We have a { [P in keyof T]: X } // We do this to ensure we retain the toplevel keyof-ness of the type which may be lost due to keyof distribution during `getConstraintTypeFromMappedType` @@ -6676,6 +6661,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } appropriateConstraintTypeNode = factory.createTypeOperatorNode(SyntaxKind.KeyOfKeyword, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context)); } + else if (needsModifierPreservingWrapper) { + // So, step 1: new type variable + const newParam = createTypeParameter(createSymbol(SymbolFlags.TypeParameter, "T" as __String)); + const name = typeParameterToName(newParam, context); + newTypeVariable = factory.createTypeReferenceNode(name); + // step 2: make that new type variable itself the constraint node, making the mapped type `{[K in T_1]: Template}` + appropriateConstraintTypeNode = newTypeVariable; + } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context); } @@ -6697,6 +6690,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) ); } + else if (needsModifierPreservingWrapper) { + // and step 3: once the mapped type is reconstructed, create a `ConstraintType extends infer T_1 extends keyof ModifiersType ? {[K in T_1]: Template} : never` + // subtly different from the `keyof` constraint case, by including the `keyof` constraint on the `infer` type parameter, it doesn't rely on the constraint type being itself + // constrained to a `keyof` type to preserve its modifier-preserving behavior. This is all basically because we preserve modifiers for a wider set of mapped types than + // just homomorphic ones. + return factory.createConditionalTypeNode( + typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context), + factory.createInferTypeNode(factory.createTypeParameterDeclaration(/*modifiers*/ undefined, factory.cloneNode(newTypeVariable!.typeName) as Identifier, factory.createTypeOperatorNode(SyntaxKind.KeyOfKeyword, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context)))), + result, + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) + ); + } return result; } @@ -6915,21 +6920,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const arity = getTypeReferenceArity(type); const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context); if (tupleConstituentNodes) { - if ((type.target as TupleType).labeledElementDeclarations) { - for (let i = 0; i < tupleConstituentNodes.length; i++) { - const flags = (type.target as TupleType).elementFlags[i]; + const { labeledElementDeclarations } = type.target as TupleType; + for (let i = 0; i < tupleConstituentNodes.length; i++) { + const flags = (type.target as TupleType).elementFlags[i]; + const labeledElementDeclaration = labeledElementDeclarations?.[i]; + + if (labeledElementDeclaration) { tupleConstituentNodes[i] = factory.createNamedTupleMember( flags & ElementFlags.Variable ? factory.createToken(SyntaxKind.DotDotDotToken) : undefined, - factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel((type.target as TupleType).labeledElementDeclarations![i]))), + factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))), flags & ElementFlags.Optional ? factory.createToken(SyntaxKind.QuestionToken) : undefined, flags & ElementFlags.Rest ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i] ); } - } - else { - for (let i = 0; i < Math.min(arity, tupleConstituentNodes.length); i++) { - const flags = (type.target as TupleType).elementFlags[i]; + else { tupleConstituentNodes[i] = flags & ElementFlags.Variable ? factory.createRestTypeNode(flags & ElementFlags.Rest ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & ElementFlags.Optional ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : @@ -7171,35 +7176,36 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const methodDeclaration = signatureToSignatureDeclarationHelper(signature, SyntaxKind.MethodSignature, context, { name: propertyName, questionToken: optionalToken }) as MethodSignature; typeElements.push(preserveCommentsOn(methodDeclaration)); } + if (signatures.length || !optionalToken) { + return; + } + } + let propertyTypeNode: TypeNode; + if (shouldUsePlaceholderForProperty(propertySymbol, context)) { + propertyTypeNode = createElidedInformationPlaceholder(context); } else { - let propertyTypeNode: TypeNode; - if (shouldUsePlaceholderForProperty(propertySymbol, context)) { - propertyTypeNode = createElidedInformationPlaceholder(context); + if (propertyIsReverseMapped) { + context.reverseMappedStack ||= []; + context.reverseMappedStack.push(propertySymbol as ReverseMappedSymbol); } - else { - if (propertyIsReverseMapped) { - context.reverseMappedStack ||= []; - context.reverseMappedStack.push(propertySymbol as ReverseMappedSymbol); - } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); - if (propertyIsReverseMapped) { - context.reverseMappedStack!.pop(); - } - } - - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined; - if (modifiers) { - context.approximateLength += 9; + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + if (propertyIsReverseMapped) { + context.reverseMappedStack!.pop(); } - const propertySignature = factory.createPropertySignature( - modifiers, - propertyName, - optionalToken, - propertyTypeNode); + } - typeElements.push(preserveCommentsOn(propertySignature)); + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined; + if (modifiers) { + context.approximateLength += 9; } + const propertySignature = factory.createPropertySignature( + modifiers, + propertyName, + optionalToken, + propertyTypeNode); + + typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node: T) { if (some(propertySymbol.declarations, d => d.kind === SyntaxKind.JSDocPropertyTag)) { @@ -7466,6 +7472,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } + if (signature.declaration?.kind === SyntaxKind.JSDocSignature && signature.declaration.parent.kind === SyntaxKind.JSDocOverloadTag) { + const comment = getTextOfNode(signature.declaration.parent.parent, /*includeTrivia*/ true).slice(2, -2).split(/\r\n|\n|\r/).map(line => line.replace(/^\s+/, " ")).join("\n"); + addSyntheticLeadingComment(node, SyntaxKind.MultiLineCommentTrivia, comment, /*hasTrailingNewLine*/ true); + } cleanup?.(); return node; @@ -8714,7 +8724,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ? symbol.parent?.valueDeclaration && isSourceFile(symbol.parent?.valueDeclaration) ? NodeFlags.Const // exports are immutable in es6, which is what we emulate and check; so it's safe to mark all exports as `const` (there's no difference to consumers, but it allows unique symbol type declarations) : undefined - : isConstVariable(symbol) + : isConstantVariable(symbol) ? NodeFlags.Const : NodeFlags.Let; const name = (needsPostExportDefault || !(symbol.flags & SymbolFlags.Property)) ? localName : getUnusedName(localName, symbol); @@ -9989,7 +9999,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const parent = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) - if (!(getCombinedModifierFlags(node as Declaration) & ModifierFlags.Export) && + if (!(getCombinedModifierFlagsCached(node as Declaration) & ModifierFlags.Export) && !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && parent.flags & NodeFlags.Ambient)) { return isGlobalSourceFile(parent); } @@ -10207,6 +10217,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return getTypeOfPropertyOfType(type, name) || getApplicableIndexInfoForName(type, name)?.type || unknownType; } + /** + * Similar to `getTypeOfPropertyOrIndexSignature`, + * but returns `undefined` if there is no matching property or index signature, + * and adds optionality to index signature types. + */ + function getTypeOfPropertyOrIndexSignatureOfType(type: Type, name: __String): Type | undefined { + let propType; + return getTypeOfPropertyOfType(type, name) || + (propType = getApplicableIndexInfoForName(type, name)?.type) && + addOptionality(propType, /*isProperty*/ true, /*isOptional*/ true); + } + function isTypeAny(type: Type | undefined) { return type && (type.flags & TypeFlags.Any) !== 0; } @@ -10503,11 +10525,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && - !(getCombinedModifierFlags(declaration) & ModifierFlags.Export) && !(declaration.flags & NodeFlags.Ambient)) { + !(getCombinedModifierFlagsCached(declaration) & ModifierFlags.Export) && !(declaration.flags & NodeFlags.Ambient)) { // If --noImplicitAny is on or the declaration is in a Javascript file, // use control flow tracked 'any' type for non-ambient, non-exported var or let variables with no // initializer or a 'null' or 'undefined' initializer. - if (!(getCombinedNodeFlags(declaration) & NodeFlags.Const) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) { + if (!(getCombinedNodeFlagsCached(declaration) & NodeFlags.Constant) && (!declaration.initializer || isNullOrUndefined(declaration.initializer))) { return autoType; } // Use control flow tracked 'any[]' type for non-ambient, non-exported variables with an empty array @@ -10760,7 +10782,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } const widened = getWidenedType(addOptionality(type, /*isProperty*/ false, definedInMethod && !definedInConstructor)); - if (symbol.valueDeclaration && filterType(widened, t => !!(t.flags & ~TypeFlags.Nullable)) === neverType) { + if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, t => !!(t.flags & ~TypeFlags.Nullable)) === neverType) { reportImplicitAny(symbol.valueDeclaration, anyType); return anyType; } @@ -12296,13 +12318,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return type as InterfaceTypeWithDeclaredMembers; } - /** - * Indicates whether a type can be used as a property name. - */ - function isTypeUsableAsPropertyName(type: Type): type is StringLiteralType | NumberLiteralType | UniqueESSymbolType { - return !!(type.flags & TypeFlags.StringOrNumberLiteralOrUnique); - } - /** * Indicates whether a declaration name is definitely late-bindable. * A declaration name is only late-bindable if: @@ -12348,19 +12363,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return isDynamicName(node) && !isLateBindableName(node); } - /** - * Gets the symbolic name for a member from its type. - */ - function getPropertyNameFromType(type: StringLiteralType | NumberLiteralType | UniqueESSymbolType): __String { - if (type.flags & TypeFlags.UniqueESSymbol) { - return (type as UniqueESSymbolType).escapedName; - } - if (type.flags & (TypeFlags.StringLiteral | TypeFlags.NumberLiteral)) { - return escapeLeadingUnderscores("" + (type as StringLiteralType | NumberLiteralType).value); - } - return Debug.fail(); - } - /** * Adds a declaration to a late-bound dynamic member. This performs the same function for * late-bound members that `addDeclarationToSymbol` in binder.ts performs for early-bound @@ -12482,7 +12484,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } } - const assignments = symbol.assignmentDeclarationMembers; + const assignments = (symbol.valueDeclaration?.kind === SyntaxKind.ArrowFunction || symbol.valueDeclaration?.kind === SyntaxKind.FunctionExpression) && + getSymbolOfNode(symbol.valueDeclaration.parent)?.assignmentDeclarationMembers || + symbol.assignmentDeclarationMembers; + if (assignments) { const decls = arrayFrom(assignments.values()); for (const member of decls) { @@ -12544,10 +12549,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (getObjectFlags(type) & ObjectFlags.Reference) { const target = (type as TypeReference).target; const typeArguments = getTypeArguments(type as TypeReference); - if (length(target.typeParameters) === length(typeArguments)) { - const ref = createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType!])); - return needApparentType ? getApparentType(ref) : ref; - } + return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType!])) : type; } else if (type.flags & TypeFlags.Intersection) { const types = sameMap((type as IntersectionType).types, t => getTypeWithThisArgument(t, thisArgument, needApparentType)); @@ -12556,10 +12558,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return needApparentType ? getApparentType(type) : type; } - function getThisArgument(type: Type) { - return getObjectFlags(type) & ObjectFlags.Reference && length(getTypeArguments(type as TypeReference)) > getTypeReferenceArity(type as TypeReference) ? last(getTypeArguments(type as TypeReference)) : type; - } - function resolveObjectTypeMembers(type: ObjectType, source: InterfaceTypeWithDeclaredMembers, typeParameters: readonly TypeParameter[], typeArguments: readonly Type[]) { let mapper: TypeMapper | undefined; let members: SymbolTable; @@ -12678,19 +12676,20 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getExpandedParameters(sig: Signature, skipUnionExpanding?: boolean): readonly (readonly Symbol[])[] { if (signatureHasRestParameter(sig)) { const restIndex = sig.parameters.length - 1; + const restName = sig.parameters[restIndex].escapedName; const restType = getTypeOfSymbol(sig.parameters[restIndex]); if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex)]; + return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; } else if (!skipUnionExpanding && restType.flags & TypeFlags.Union && every((restType as UnionType).types, isTupleType)) { - return map((restType as UnionType).types, t => expandSignatureParametersWithTupleMembers(t as TupleTypeReference, restIndex)); + return map((restType as UnionType).types, t => expandSignatureParametersWithTupleMembers(t as TupleTypeReference, restIndex, restName)); } } return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType: TupleTypeReference, restIndex: number) { - const elementTypes = getElementTypes(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType); + function expandSignatureParametersWithTupleMembers(restType: TupleTypeReference, restIndex: number, restName: __String) { + const elementTypes = getTypeArguments(restType); + const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); const restParams = map(elementTypes, (t, i) => { // Lookup the label from the individual tuple passed in before falling back to the signature `rest` parameter name const name = associatedNames && associatedNames[i] ? associatedNames[i] : @@ -12705,10 +12704,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return concatenate(sig.parameters.slice(0, restIndex), restParams); } - function getUniqAssociatedNamesFromTupleType(type: TupleTypeReference) { + function getUniqAssociatedNamesFromTupleType(type: TupleTypeReference, restName: __String) { const associatedNamesMap = new Map<__String, number>(); - return map(type.target.labeledElementDeclarations, labeledElement => { - const name = getTupleElementLabel(labeledElement); + return map(type.target.labeledElementDeclarations, (labeledElement, i) => { + const name = getTupleElementLabel(labeledElement, i, restName); const prevCounter = associatedNamesMap.get(name); if (prevCounter === undefined) { associatedNamesMap.set(name, 1); @@ -13085,19 +13084,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return; } // Combinations of function, class, enum and module - let members = emptySymbols; + let members = getExportsOfSymbol(symbol); let indexInfos: IndexInfo[] | undefined; - if (symbol.exports) { - members = getExportsOfSymbol(symbol); - if (symbol === globalThisSymbol) { - const varsOnly = new Map<__String, Symbol>(); - members.forEach(p => { - if (!(p.flags & SymbolFlags.BlockScoped) && !(p.flags & SymbolFlags.ValueModule && p.declarations?.length && every(p.declarations, isAmbientModule))) { - varsOnly.set(p.escapedName, p); - } - }); - members = varsOnly; - } + if (symbol === globalThisSymbol) { + const varsOnly = new Map<__String, Symbol>(); + members.forEach(p => { + if (!(p.flags & SymbolFlags.BlockScoped) && !(p.flags & SymbolFlags.ValueModule && p.declarations?.length && every(p.declarations, isAmbientModule))) { + varsOnly.set(p.escapedName, p); + } + }); + members = varsOnly; } let baseConstructorIndexInfo: IndexInfo | undefined; setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray); @@ -13580,14 +13576,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined; } - function isConstTypeVariable(type: Type | undefined): boolean { - return !!(type && ( + function isConstTypeVariable(type: Type | undefined, depth = 0): boolean { + return depth < 5 && !!(type && ( type.flags & TypeFlags.TypeParameter && some((type as TypeParameter).symbol?.declarations, d => hasSyntacticModifier(d, ModifierFlags.Const)) || - type.flags & TypeFlags.Union && some((type as UnionType).types, isConstTypeVariable) || - type.flags & TypeFlags.IndexedAccess && isConstTypeVariable((type as IndexedAccessType).objectType) || - type.flags & TypeFlags.Conditional && isConstTypeVariable(getConstraintOfConditionalType(type as ConditionalType)) || - type.flags & TypeFlags.Substitution && isConstTypeVariable((type as SubstitutionType).baseType) || - isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & ElementFlags.Variadic) && isConstTypeVariable(t)) >= 0)); + type.flags & TypeFlags.Union && some((type as UnionType).types, t => isConstTypeVariable(t, depth)) || + type.flags & TypeFlags.IndexedAccess && isConstTypeVariable((type as IndexedAccessType).objectType, depth + 1) || + type.flags & TypeFlags.Conditional && isConstTypeVariable(getConstraintOfConditionalType(type as ConditionalType), depth + 1) || + type.flags & TypeFlags.Substitution && isConstTypeVariable((type as SubstitutionType).baseType, depth) || + isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & ElementFlags.Variadic) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type: IndexedAccessType) { @@ -13741,7 +13737,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return type.resolvedBaseConstraint; } const stack: object[] = []; - return type.resolvedBaseConstraint = getTypeWithThisArgument(getImmediateBaseConstraint(type), getThisArgument(type)); + return type.resolvedBaseConstraint = getImmediateBaseConstraint(type); function getImmediateBaseConstraint(t: Type): Type { if (!t.immediateBaseConstraint) { @@ -13847,8 +13843,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // We substitute constraints for variadic elements only when the constraints are array types or // non-variadic tuple types as we want to avoid further (possibly unbounded) recursion. const newElements = map(getElementTypes(t), (v, i) => { - const constraint = t.target.elementFlags[i] & ElementFlags.Variadic && getBaseConstraint(v) || v; - return constraint && everyType(constraint, c => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v; + const constraint = v.flags & TypeFlags.TypeParameter && t.target.elementFlags[i] & ElementFlags.Variadic && getBaseConstraint(v) || v; + return constraint !== v && everyType(constraint, c => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v; }); return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations); } @@ -13856,8 +13852,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function getApparentTypeOfIntersectionType(type: IntersectionType) { - return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type, /*needApparentType*/ true)); + function getApparentTypeOfIntersectionType(type: IntersectionType, thisArgument: Type) { + return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, thisArgument, /*needApparentType*/ true)); } function getResolvedTypeParameterDefault(typeParameter: TypeParameter): Type | undefined { @@ -13935,9 +13931,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * type itself. */ function getApparentType(type: Type): Type { - const t = !(type.flags & TypeFlags.Instantiable) ? type : getBaseConstraintOfType(type) || unknownType; - return getObjectFlags(t) & ObjectFlags.Mapped ? getApparentTypeOfMappedType(t as MappedType) : - t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(t as IntersectionType) : + const t = type.flags & TypeFlags.Instantiable ? getBaseConstraintOfType(type) || unknownType : type; + const objectFlags = getObjectFlags(t); + return objectFlags & ObjectFlags.Mapped ? getApparentTypeOfMappedType(t as MappedType) : + objectFlags & ObjectFlags.Reference && t !== type ? getTypeWithThisArgument(t, type) : + t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(t as IntersectionType, type) : t.flags & TypeFlags.StringLike ? globalStringType : t.flags & TypeFlags.NumberLike ? globalNumberType : t.flags & TypeFlags.BigIntLike ? getGlobalBigIntType() : @@ -14091,7 +14089,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else if (type !== firstType) { checkFlags |= CheckFlags.HasNonUniformType; } - if (isLiteralType(type) || isPatternLiteralType(type) || type === uniqueLiteralType) { + if (isLiteralType(type) || isPatternLiteralType(type)) { checkFlags |= CheckFlags.HasLiteralType; } if (type.flags & TypeFlags.Never && type !== uniqueLiteralType) { @@ -14307,7 +14305,36 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * maps primitive types and type parameters are to their apparent types. */ function getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[] { - return getSignaturesOfStructuredType(getReducedApparentType(type), kind); + const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind); + if (kind === SignatureKind.Call && !length(result) && type.flags & TypeFlags.Union) { + if ((type as UnionType).arrayFallbackSignatures) { + return (type as UnionType).arrayFallbackSignatures!; + } + // If the union is all different instantiations of a member of the global array type... + let memberName: __String; + if (everyType(type, t => !!t.symbol?.parent && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName))) { + // Transform the type from `(A[] | B[])["member"]` to `(A | B)[]["member"]` (since we pretend array is covariant anyway) + const arrayArg = mapType(type, t => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters![0], (t as AnonymousType).mapper!)); + const arrayType = createArrayType(arrayArg, someType(type, t => isReadonlyArraySymbol(t.symbol.parent))); + return (type as UnionType).arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName!)!, kind); + } + (type as UnionType).arrayFallbackSignatures = result; + } + return result; + } + + function isArrayOrTupleSymbol(symbol: Symbol | undefined) { + if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); + } + + function isReadonlyArraySymbol(symbol: Symbol | undefined) { + if (!symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); } function findIndexInfo(indexInfos: readonly IndexInfo[], keyType: Type) { @@ -14861,8 +14888,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return getReturnTypeOfTypeTag(declaration); } - function isResolvingReturnTypeOfSignature(signature: Signature) { - return !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, TypeSystemPropertyName.ResolvedReturnType) >= 0; + function isResolvingReturnTypeOfSignature(signature: Signature): boolean { + return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || + !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, TypeSystemPropertyName.ResolvedReturnType) >= 0; } function getRestTypeOfSignature(signature: Signature): Type { @@ -15832,6 +15860,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return (deferredGlobalIteratorReturnResultType ||= getGlobalType("IteratorReturnResult" as __String, /*arity*/ 1, reportErrors)) || emptyGenericType; } + function getGlobalDisposableType(reportErrors: boolean) { + return (deferredGlobalDisposableType ||= getGlobalType("Disposable" as __String, /*arity*/ 0, reportErrors)) || emptyObjectType; + } + + function getGlobalAsyncDisposableType(reportErrors: boolean) { + return (deferredGlobalAsyncDisposableType ||= getGlobalType("AsyncDisposable" as __String, /*arity*/ 0, reportErrors)) || emptyObjectType; + } + function getGlobalTypeOrUndefined(name: __String, arity = 0): ObjectType | undefined { const symbol = getGlobalSymbol(name, SymbolFlags.Type, /*diagnostic*/ undefined); return symbol && getTypeOfGlobalSymbol(symbol, arity) as GenericType; @@ -15945,8 +15981,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map((node as TupleTypeNode).elements, getTupleElementFlags); - const missingName = some((node as TupleTypeNode).elements, e => e.kind !== SyntaxKind.NamedTupleMember); - return getTupleTargetType(elementFlags, readonly, /*associatedNames*/ missingName ? undefined : (node as TupleTypeNode).elements as readonly NamedTupleMember[]); + return getTupleTargetType(elementFlags, readonly, map((node as TupleTypeNode).elements, memberIfLabeledElementDeclaration)); + } + + function memberIfLabeledElementDeclaration(member: Node): NamedTupleMember | ParameterDeclaration | undefined { + return isNamedTupleMember(member) || isParameter(member) ? member : undefined; } // Return true if the given type reference node is directly aliased or if it needs to be deferred @@ -16036,21 +16075,22 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return isTypeOperatorNode(node) && node.operator === SyntaxKind.ReadonlyKeyword; } - function createTupleType(elementTypes: readonly Type[], elementFlags?: readonly ElementFlags[], readonly = false, namedMemberDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]) { + function createTupleType(elementTypes: readonly Type[], elementFlags?: readonly ElementFlags[], readonly = false, namedMemberDeclarations: readonly (NamedTupleMember | ParameterDeclaration | undefined)[] = []) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, _ => ElementFlags.Required), readonly, namedMemberDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget; } - function getTupleTargetType(elementFlags: readonly ElementFlags[], readonly: boolean, namedMemberDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]): GenericType { + function getTupleTargetType(elementFlags: readonly ElementFlags[], readonly: boolean, namedMemberDeclarations: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]): GenericType { if (elementFlags.length === 1 && elementFlags[0] & ElementFlags.Rest) { // [...X[]] is equivalent to just X[] return readonly ? globalReadonlyArrayType : globalArrayType; } + const memberIds = mapDefined(namedMemberDeclarations, node => node ? getNodeId(node) : undefined); const key = map(elementFlags, f => f & ElementFlags.Required ? "#" : f & ElementFlags.Optional ? "?" : f & ElementFlags.Rest ? "." : "*").join() + (readonly ? "R" : "") + - (namedMemberDeclarations && namedMemberDeclarations.length ? "," + map(namedMemberDeclarations, getNodeId).join(",") : ""); + (memberIds.length ? "," + memberIds.join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -16065,7 +16105,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // // Note that the generic type created by this function has no symbol associated with it. The same // is true for each of the synthesized type parameters. - function createTupleTargetType(elementFlags: readonly ElementFlags[], readonly: boolean, namedMemberDeclarations: readonly (NamedTupleMember | ParameterDeclaration)[] | undefined): TupleType { + function createTupleTargetType(elementFlags: readonly ElementFlags[], readonly: boolean, namedMemberDeclarations: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]): TupleType { const arity = elementFlags.length; const minLength = countWhere(elementFlags, f => !!(f & (ElementFlags.Required | ElementFlags.Variadic))); let typeParameters: TypeParameter[] | undefined; @@ -16147,7 +16187,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // In either layout, zero or more generic variadic elements may be present at any location. const expandedTypes: Type[] = []; const expandedFlags: ElementFlags[] = []; - let expandedDeclarations: (NamedTupleMember | ParameterDeclaration)[] | undefined = []; + const expandedDeclarations: (NamedTupleMember | ParameterDeclaration | undefined)[] = []; let lastRequiredIndex = -1; let firstRestIndex = -1; let lastOptionalOrRestIndex = -1; @@ -16190,7 +16230,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { (t, i) => expandedFlags[firstRestIndex + i] & ElementFlags.Variadic ? getIndexedAccessType(t, numberType) : t)); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedDeclarations?.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); + expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); } const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : @@ -16209,12 +16249,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } expandedTypes.push(flags & ElementFlags.Optional ? addOptionality(type, /*isProperty*/ true) : type); expandedFlags.push(flags); - if (expandedDeclarations && declaration) { - expandedDeclarations.push(declaration); - } - else { - expandedDeclarations = undefined; - } + expandedDeclarations.push(declaration); } } @@ -16531,36 +16566,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function getUnionOrIntersectionTypePredicate(signatures: readonly Signature[], kind: TypeFlags | undefined): TypePredicate | undefined { - let first: TypePredicate | undefined; + let last: TypePredicate | undefined; const types: Type[] = []; for (const sig of signatures) { const pred = getTypePredicateOfSignature(sig); - if (!pred || pred.kind === TypePredicateKind.AssertsThis || pred.kind === TypePredicateKind.AssertsIdentifier) { - if (kind !== TypeFlags.Intersection) { - continue; - } - else { - return; // intersections demand all members be type predicates for the result to have a predicate - } - } - - if (first) { - if (!typePredicateKindsMatch(first, pred)) { - // No common type predicate. + if (pred) { + // Constituent type predicates must all have matching kinds. We don't create composite type predicates for assertions. + if (pred.kind !== TypePredicateKind.This && pred.kind !== TypePredicateKind.Identifier || last && !typePredicateKindsMatch(last, pred)) { return undefined; } + last = pred; + types.push(pred.type); } else { - first = pred; + // In composite union signatures we permit and ignore signatures with a return type `false`. + const returnType = kind !== TypeFlags.Intersection ? getReturnTypeOfSignature(sig) : undefined; + if (returnType !== falseType && returnType !== regularFalseType) { + return undefined; + } } - types.push(pred.type); } - if (!first) { - // No signatures had a type predicate. + if (!last) { return undefined; } const compositeType = getUnionOrIntersectionType(types, kind); - return createTypePredicate(first.kind, first.parameterName, first.parameterIndex, compositeType); + return createTypePredicate(last.kind, last.parameterName, last.parameterIndex, compositeType); } function typePredicateKindsMatch(a: TypePredicate, b: TypePredicate): boolean { @@ -16782,7 +16812,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Also, unlike union types, the order of the constituent types is preserved in order that overload resolution // for intersections of types with signatures can be deterministic. function getIntersectionType(types: readonly Type[], aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[], noSupertypeReduction?: boolean): Type { - const typeMembershipMap: Map = new Map(); + const typeMembershipMap = new Map(); const includes = addTypesToIntersection(typeMembershipMap, 0 as TypeFlags, types); const typeSet: Type[] = arrayFrom(typeMembershipMap.values()); // An intersection type is considered empty if it contains @@ -17029,19 +17059,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function getLiteralTypeFromPropertyName(name: PropertyName) { + function getLiteralTypeFromPropertyName(name: PropertyName | JsxAttributeName) { if (isPrivateIdentifier(name)) { return neverType; } - return isIdentifier(name) ? getStringLiteralType(unescapeLeadingUnderscores(name.escapedText)) : - getRegularTypeOfLiteralType(isComputedPropertyName(name) ? checkComputedPropertyName(name) : checkExpression(name)); + if (isNumericLiteral(name)) { + return getRegularTypeOfLiteralType(checkExpression(name)); + } + if (isComputedPropertyName(name)) { + return getRegularTypeOfLiteralType(checkComputedPropertyName(name)); + } + const propertyName = getPropertyNameForPropertyNameNode(name); + if (propertyName !== undefined) { + return getStringLiteralType(unescapeLeadingUnderscores(propertyName)); + } + if (isExpression(name)) { + return getRegularTypeOfLiteralType(checkExpression(name)); + } + return neverType; } function getLiteralTypeFromProperty(prop: Symbol, include: TypeFlags, includeNonPublic?: boolean) { if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & ModifierFlags.NonPublicAccessibilityModifier)) { let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type) { - const name = getNameOfDeclaration(prop.valueDeclaration) as PropertyName; + const name = getNameOfDeclaration(prop.valueDeclaration) as PropertyName | JsxAttributeName; type = prop.escapedName === InternalSymbolName.Default ? getStringLiteralType("default") : name && getLiteralTypeFromPropertyName(name) || (!isKnownSymbol(prop) ? getStringLiteralType(symbolName(prop)) : undefined); } @@ -17309,7 +17351,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isCallLikeExpression(parent)) { return isCallOrNewExpression(parent) && isIdentifier(node) && hasMatchingArgument(parent, node); } - return every(symbol.declarations, d => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated)); + return every(symbol.declarations, d => !isFunctionLike(d) || isDeprecatedDeclaration(d)); } return true; } @@ -17857,9 +17899,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const context = createInferenceContext(freshParams, /*signature*/ undefined, InferenceFlags.None); if (freshMapper) { const freshCombinedMapper = combineTypeMappers(mapper, freshMapper); - for (const p of freshParams) { - if (root.inferTypeParameters.indexOf(p) === -1) { - p.mapper = freshCombinedMapper; + for (let i = 0; i < freshParams.length; i++) { + if (freshParams[i] !== root.inferTypeParameters[i]) { + freshParams[i].mapper = freshCombinedMapper; } } } @@ -18807,13 +18849,23 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { result = target.objectFlags & ObjectFlags.Reference ? createDeferredTypeReference((type as DeferredTypeReference).target, (type as DeferredTypeReference).node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & ObjectFlags.Mapped ? instantiateMappedType(target as MappedType, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); - // If none of the type arguments for the outer type parameters contain type variables, it follows - // that the instantiated type doesn't reference type variables. - if (result.flags & TypeFlags.ObjectFlagsType && !((result as ObjectFlagsType).objectFlags & ObjectFlags.CouldContainTypeVariablesComputed)) { - (result as ObjectFlagsType).objectFlags |= ObjectFlags.CouldContainTypeVariablesComputed | - (some(typeArguments, couldContainTypeVariables) ? ObjectFlags.CouldContainTypeVariables : 0); + target.instantiations.set(id, result); // Set cached result early in case we recursively invoke instantiation while eagerly computing type variable visibility below + const resultObjectFlags = getObjectFlags(result); + if (result.flags & TypeFlags.ObjectFlagsType && !(resultObjectFlags & ObjectFlags.CouldContainTypeVariablesComputed)) { + const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); // one of the input type arguments might be or contain the result + if (!(getObjectFlags(result) & ObjectFlags.CouldContainTypeVariablesComputed)) { + // if `result` is one of the object types we tried to make (it may not be, due to how `instantiateMappedType` works), we can carry forward the type variable containment check from the input type arguments + if (resultObjectFlags & (ObjectFlags.Mapped | ObjectFlags.Anonymous | ObjectFlags.Reference)) { + (result as ObjectFlagsType).objectFlags |= ObjectFlags.CouldContainTypeVariablesComputed | (resultCouldContainTypeVariables ? ObjectFlags.CouldContainTypeVariables : 0); + } + // If none of the type arguments for the outer type parameters contain type variables, it follows + // that the instantiated type doesn't reference type variables. + // Intrinsics have `CouldContainTypeVariablesComputed` pre-set, so this should only cover unions and intersections resulting from `instantiateMappedType` + else { + (result as ObjectFlagsType).objectFlags |= !resultCouldContainTypeVariables ? ObjectFlags.CouldContainTypeVariablesComputed : 0; + } + } } - target.instantiations.set(id, result); } return result; } @@ -18850,25 +18902,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.TypeQuery: const entityName = (node as TypeQueryNode).exprName; const firstIdentifier = getFirstIdentifier(entityName); - const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); - const tpDeclaration = tp.symbol.declarations![0]; // There is exactly one declaration, otherwise `containsReference` is not called - let tpScope: Node; - if (tpDeclaration.kind === SyntaxKind.TypeParameter) { // Type parameter is a regular type parameter, e.g. foo - tpScope = tpDeclaration.parent; - } - else if (tp.isThisType) { - // Type parameter is the this type, and its declaration is the class declaration. - tpScope = tpDeclaration; - } - else { - // Type parameter's declaration was unrecognized. - // This could happen if the type parameter comes from e.g. a JSDoc annotation, so we default to returning true. - return true; - } - - if (firstIdentifierSymbol.declarations) { - return some(firstIdentifierSymbol.declarations, idDecl => isNodeDescendantOf(idDecl, tpScope)) || - some((node as TypeQueryNode).typeArguments, containsReference); + if (!isThisIdentifier(firstIdentifier)) { // Don't attempt to analyze typeof this.xxx + const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); + const tpDeclaration = tp.symbol.declarations![0]; // There is exactly one declaration, otherwise `containsReference` is not called + const tpScope = tpDeclaration.kind === SyntaxKind.TypeParameter ? tpDeclaration.parent : // Type parameter is a regular type parameter, e.g. foo + tp.isThisType ? tpDeclaration : // Type parameter is the this type, and its declaration is the class declaration. + undefined; // Type parameter's declaration was unrecognized, e.g. comes from JSDoc annotation. + if (firstIdentifierSymbol.declarations && tpScope) { + return some(firstIdentifierSymbol.declarations, idDecl => isNodeDescendantOf(idDecl, tpScope)) || + some((node as TypeQueryNode).typeArguments, containsReference); + } } return true; case SyntaxKind.MethodDeclaration: @@ -18947,6 +18990,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const singleton = elementFlags[i] & ElementFlags.Variadic ? t : elementFlags[i] & ElementFlags.Rest ? createArrayType(t) : createTupleType([t], [elementFlags[i]]); + // avoid infinite recursion, if the singleton is the type variable itself + // then we'd just get back here with the same arguments from within instantiateMappedType + if (singleton === typeVariable) { + return mappedType; + } // The singleton is never a generic tuple type, so it is safe to recurse here. return instantiateMappedType(mappedType, prependTypeMapping(typeVariable, singleton, mapper)); }); @@ -19365,9 +19413,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return true; } switch (node.kind) { + case SyntaxKind.AsExpression: + if (!isConstAssertion(node)) { + break; + } + // fallthrough case SyntaxKind.JsxExpression: case SyntaxKind.ParenthesizedExpression: - return elaborateError((node as ParenthesizedExpression | JsxExpression).expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); + return elaborateError((node as AsExpression | ParenthesizedExpression | JsxExpression).expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); case SyntaxKind.BinaryExpression: switch ((node as BinaryExpression).operatorToken.kind) { case SyntaxKind.EqualsToken: @@ -21506,11 +21559,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Relate components directly before falling back to constraint relationships // A type S[K] is related to a type T[J] if S is related to T and K is related to J. if (result = isRelatedTo((source as IndexedAccessType).objectType, (target as IndexedAccessType).objectType, RecursionFlags.Both, reportErrors)) { - // This does _not_ generalize - specific instantiations of `S[K]` and `T[J]` may be related, even if the indexed accesses generally are not. - // For example, `S = {x: string, a: string}`, `T = {x: string, b: string}`, `K = J = "x"`. `S` and `T` are unrelated, but the result of executing - // `S["x"]` and `T["x"]` _are_. Given that, we have to flag the object type comparison here as "unreliable", since while the generic result can reliably - // be used in the affirmative case, it failing is not an indicator that the structural result will not succeed. - instantiateType((source as IndexedAccessType).objectType, reportUnreliableMapper); result &= isRelatedTo((source as IndexedAccessType).indexType, (target as IndexedAccessType).indexType, RecursionFlags.Both, reportErrors); } if (result) { @@ -21622,9 +21670,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const c = target as ConditionalType; // We check for a relationship to a conditional type target only when the conditional type has no - // 'infer' positions and is not distributive or is distributive but doesn't reference the check type - // parameter in either of the result types. - if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) { + // 'infer' positions, is not distributive or is distributive but doesn't reference the check type + // parameter in either of the result types, and the source isn't an instantiation of the same + // conditional type (as happens when computing variance). + if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source.flags & TypeFlags.Conditional && (source as ConditionalType).root === c.root)) { // Check if the conditional is always true or always false but still deferred for distribution purposes. const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType)); const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType)); @@ -21670,17 +21719,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, RecursionFlags.Source, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & TypeFlags.TypeParameter), /*headMessage*/ undefined, intersectionState)) { return result; } - if (sourceFlags & TypeFlags.IndexedAccess) { - const indexType = (source as IndexedAccessType).indexType; - if (indexType.flags & TypeFlags.Index) { - const unresolvedIndexConstraint = getBaseConstraintOfType((indexType as IndexType).type); - const indexConstraint = unresolvedIndexConstraint && unresolvedIndexConstraint !== noConstraintType ? getIndexType(unresolvedIndexConstraint) : keyofConstraintType; - const constraint = getIndexedAccessType((source as IndexedAccessType).objectType, indexConstraint); - if (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) { - return result; - } - } - } if (isMappedTypeGenericIndexedAccess(source)) { // For an indexed access type { [P in K]: E}[X], above we have already explored an instantiation of E with X // substituted for P. We also want to explore type { [P in K]: E }[C], where C is the constraint of X. @@ -22699,7 +22737,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let matched = false; for (let i = 0; i < types.length; i++) { if (include[i]) { - const targetType = getTypeOfPropertyOfType(types[i], propertyName); + const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); if (targetType && related(getDiscriminatingType(), targetType)) { matched = true; } @@ -22715,7 +22753,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } } - const filtered = contains(include, Ternary.False) ? getUnionType(types.filter((_, i) => include[i])) : target; + const filtered = contains(include, Ternary.False) ? getUnionType(types.filter((_, i) => include[i]), UnionReduction.None) : target; return filtered.flags & TypeFlags.Never ? target : filtered; } @@ -23012,7 +23050,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getRecursionIdentity(type: Type): object { // Object and array literals are known not to contain recursive references and don't need a recursion identity. if (type.flags & TypeFlags.Object && !isObjectOrArrayLiteralType(type)) { - if (getObjectFlags(type) && ObjectFlags.Reference && (type as TypeReference).node) { + 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. @@ -23275,7 +23313,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isTupleLikeType(type: Type): boolean { - return isTupleType(type) || !!getPropertyOfType(type, "0" as __String); + let lengthType; + return isTupleType(type) || + !!getPropertyOfType(type, "0" as __String) || + isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length" as __String)) && everyType(lengthType, t => !!(t.flags & TypeFlags.NumberLiteral)); } function isArrayOrTupleLikeType(type: Type): boolean { @@ -24091,17 +24132,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * variable T[P] (i.e. we treat the type T[P] as the type variable we're inferring for). */ function inferTypeForHomomorphicMappedType(source: Type, target: MappedType, constraint: IndexType): Type | undefined { - if (inInferTypeForHomomorphicMappedType) { - return undefined; + const cacheKey = source.id + "," + target.id + "," + constraint.id; + if (reverseMappedCache.has(cacheKey)) { + return reverseMappedCache.get(cacheKey); } - const key = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(key)) { - return reverseMappedCache.get(key); + const recursionKey = source.id + "," + (target.target || target).id; + if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) { + return undefined; } - inInferTypeForHomomorphicMappedType = true; + homomorphicMappedTypeInferenceStack.push(recursionKey); const type = createReverseMappedType(source, target, constraint); - inInferTypeForHomomorphicMappedType = false; - reverseMappedCache.set(key, type); + homomorphicMappedTypeInferenceStack.pop(); + reverseMappedCache.set(cacheKey, type); return type; } @@ -25237,7 +25279,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { // If the fallback type satisfies the constraint, we pick it. Otherwise, we pick the constraint. inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } @@ -25460,7 +25502,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function tryGetNameFromEntityNameExpression(node: EntityNameOrEntityNameExpression) { const symbol = resolveEntityName(node, SymbolFlags.Value, /*ignoreErrors*/ true); - if (!symbol || !(isConstVariable(symbol) || (symbol.flags & SymbolFlags.EnumMember))) return undefined; + if (!symbol || !(isConstantVariable(symbol) || (symbol.flags & SymbolFlags.EnumMember))) return undefined; const declaration = symbol.valueDeclaration; if (declaration === undefined) return undefined; @@ -26470,10 +26512,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function isConstantReference(node: Node): boolean { switch (node.kind) { + case SyntaxKind.ThisKeyword: + return true; case SyntaxKind.Identifier: if (!isThisInTypeQuery(node)) { const symbol = getResolvedSymbol(node as Identifier); - return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); + return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; case SyntaxKind.PropertyAccessExpression: @@ -26592,7 +26636,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (container && container !== flowContainer && reference.kind !== SyntaxKind.PropertyAccessExpression && reference.kind !== SyntaxKind.ElementAccessExpression && - reference.kind !== SyntaxKind.ThisKeyword) { + !(reference.kind === SyntaxKind.ThisKeyword && container.kind !== SyntaxKind.ArrowFunction) + ) { flow = container.flowNode!; continue; } @@ -26656,7 +26701,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } // A matching dotted name might also be an expando property on a function *expression*, // in which case we continue control flow analysis back to the function's declaration - if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { + if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike(node))) { const init = getDeclaredExpandoInitializer(node); if (init && (init.kind === SyntaxKind.FunctionExpression || init.kind === SyntaxKind.ArrowFunction)) { return getTypeAtFlowNode(flow.antecedent); @@ -26965,7 +27010,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } else if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration!; // Given 'const x = obj.kind', allow 'x' as an alias for 'obj.kind' if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && @@ -27140,14 +27185,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } const target = getReferenceCandidate(expr.right); - const leftType = getTypeOfExpression(expr.left); - if (leftType.flags & TypeFlags.StringOrNumberLiteralOrUnique) { - if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target) && - getAccessedPropertyName(reference) === getPropertyNameFromType(leftType as StringLiteralType | NumberLiteralType | UniqueESSymbolType)) { + if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { return getTypeWithFacts(type, assumeTrue ? TypeFacts.NEUndefined : TypeFacts.EQUndefined); } - if (isMatchingReference(reference, target)) { - return narrowTypeByInKeyword(type, leftType as StringLiteralType | NumberLiteralType | UniqueESSymbolType, assumeTrue); + } + if (isMatchingReference(reference, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType)) { + return narrowTypeByInKeyword(type, leftType, assumeTrue); } } break; @@ -27557,7 +27604,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // up to five levels of aliased conditional expressions that are themselves declared as const variables. if (!isMatchingReference(reference, expr) && inlineLevel < 5) { const symbol = getResolvedSymbol(expr as Identifier); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) { inlineLevel++; @@ -27613,7 +27660,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = getTypeOfExpression(location as Expression); + const type = removeOptionalTypeMarker(getTypeOfExpression(location as Expression)); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -27673,8 +27720,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function isConstVariable(symbol: Symbol) { - return symbol.flags & SymbolFlags.Variable && (getDeclarationNodeFlagsFromSymbol(symbol) & NodeFlags.Const) !== 0; + function isConstantVariable(symbol: Symbol) { + return symbol.flags & SymbolFlags.Variable && (getDeclarationNodeFlagsFromSymbol(symbol) & NodeFlags.Constant) !== 0; } function parameterInitializerContainsUndefined(declaration: ParameterDeclaration): boolean { @@ -27829,7 +27876,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // destructuring from the narrowed parent type. if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent = declaration.parent.parent; - if (parent.kind === SyntaxKind.VariableDeclaration && getCombinedNodeFlags(declaration) & NodeFlags.Const || parent.kind === SyntaxKind.Parameter) { + if (parent.kind === SyntaxKind.VariableDeclaration && getCombinedNodeFlagsCached(declaration) & NodeFlags.Constant || parent.kind === SyntaxKind.Parameter) { const links = getNodeLinks(parent); if (!(links.flags & NodeCheckFlags.InCheckIdentifier)) { links.flags |= NodeCheckFlags.InCheckIdentifier; @@ -28035,7 +28082,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // analysis to include the immediately enclosing function. while (flowContainer !== declarationContainer && (flowContainer.kind === SyntaxKind.FunctionExpression || flowContainer.kind === SyntaxKind.ArrowFunction || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && - (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter && !isSymbolAssigned(localOrExportSymbol))) { + (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } // We only look for uninitialized variables in strict null checking mode, and only when we can analyze @@ -28446,20 +28493,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function getTypeForThisExpressionFromJSDoc(node: Node) { - const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === SyntaxKind.JSDocFunctionType) { - const jsDocFunctionType = jsdocType as JSDocFunctionType; - if (jsDocFunctionType.parameters.length > 0 && - jsDocFunctionType.parameters[0].name && - (jsDocFunctionType.parameters[0].name as Identifier).escapedText === InternalSymbolName.This) { - return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type!); - } - } + function getTypeForThisExpressionFromJSDoc(node: SignatureDeclaration) { const thisTag = getJSDocThisTag(node); if (thisTag && thisTag.typeExpression) { return getTypeFromTypeNode(thisTag.typeExpression); } + const signature = getSignatureOfTypeTag(node); + if (signature) { + return getThisTypeOfSignature(signature); + } } function isInConstructorArgumentInitializer(node: Node, constructorDecl: Node): boolean { @@ -28698,6 +28740,22 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }); } + function getThisTypeOfObjectLiteralFromContextualType(containingLiteral: ObjectLiteralExpression, contextualType: Type | undefined) { + let literal = containingLiteral; + let type = contextualType; + while (type) { + const thisType = getThisTypeFromContextualType(type); + if (thisType) { + return thisType; + } + if (literal.parent.kind !== SyntaxKind.PropertyAssignment) { + break; + } + literal = literal.parent.parent as ObjectLiteralExpression; + type = getApparentTypeOfContextualType(literal, /*contextFlags*/ undefined); + } + } + function getContextualThisParameterType(func: SignatureDeclaration): Type | undefined { if (func.kind === SyntaxKind.ArrowFunction) { return undefined; @@ -28719,18 +28777,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // that includes a ThisType. If so, T is the contextual type for 'this'. We continue looking in // any directly enclosing object literals. const contextualType = getApparentTypeOfContextualType(containingLiteral, /*contextFlags*/ undefined); - let literal = containingLiteral; - let type = contextualType; - while (type) { - const thisType = getThisTypeFromContextualType(type); - if (thisType) { - return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); - } - if (literal.parent.kind !== SyntaxKind.PropertyAssignment) { - break; - } - literal = literal.parent.parent as ObjectLiteralExpression; - type = getApparentTypeOfContextualType(literal, /*contextFlags*/ undefined); + const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); + if (thisType) { + return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } // There was no contextual ThisType for the containing object literal, so the contextual type // for 'this' is the non-null form of the contextual type for the containing object literal or @@ -29344,6 +29393,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.NumericLiteral: case SyntaxKind.BigIntLiteral: case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: case SyntaxKind.NullKeyword: @@ -29935,6 +29985,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { (node.kind === SyntaxKind.BinaryExpression && (node as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken); } + function isSpreadIntoCallOrNew(node: ArrayLiteralExpression) { + const parent = walkUpParenthesizedExpressions(node.parent); + return isSpreadElement(parent) && isCallOrNewExpression(parent.parent); + } + function checkArrayLiteral(node: ArrayLiteralExpression, checkMode: CheckMode | undefined, forceTuple: boolean | undefined): Type { const elements = node.elements; const elementCount = elements.length; @@ -29942,10 +29997,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const elementFlags: ElementFlags[] = []; pushCachedContextualType(node); const inDestructuringPattern = isAssignmentTarget(node); - const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent); - const inConstContext = isSpreadIntoCallOrNew || isConstContext(node); + const inConstContext = isConstContext(node); const contextualType = getApparentTypeOfContextualType(node, /*contextFlags*/ undefined); - const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType); + const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType); let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; @@ -30114,7 +30168,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return links.immediateTarget; } - function checkObjectLiteral(node: ObjectLiteralExpression, checkMode?: CheckMode): Type { + function checkObjectLiteral(node: ObjectLiteralExpression, checkMode: CheckMode = CheckMode.Normal): Type { const inDestructuringPattern = isAssignmentTarget(node); // Grammar checking checkGrammarObjectLiteralExpression(node, inDestructuringPattern); @@ -30216,7 +30270,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { member = prop; allPropertiesTable?.set(prop.escapedName, prop); - if (contextualType && checkMode && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && + if (contextualType && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && (memberDecl.kind === SyntaxKind.PropertyAssignment || memberDecl.kind === SyntaxKind.MethodDeclaration) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); // In CheckMode.Inferential we should always have an inference context @@ -30236,7 +30290,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { hasComputedNumberProperty = false; hasComputedSymbolProperty = false; } - const type = getReducedType(checkExpression(memberDecl.expression)); + const type = getReducedType(checkExpression(memberDecl.expression, checkMode & CheckMode.Inferential)); if (isValidSpreadType(type)) { const mergedType = tryMergeUnionOfObjectTypeAndEmptyObject(type, inConstContext); if (allPropertiesTable) { @@ -30436,7 +30490,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * @remarks Because this function calls getSpreadType, it needs to use the same checks as checkObjectLiteral, * which also calls getSpreadType. */ - function createJsxAttributesTypeFromAttributesProperty(openingLikeElement: JsxOpeningLikeElement, checkMode: CheckMode | undefined) { + function createJsxAttributesTypeFromAttributesProperty(openingLikeElement: JsxOpeningLikeElement, checkMode: CheckMode = CheckMode.Normal) { const attributes = openingLikeElement.attributes; const contextualType = getContextualType(attributes, ContextFlags.None); const allAttributesTable = strictNullChecks ? createSymbolTable() : undefined; @@ -30473,7 +30527,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText as string); } } - if (contextualType && checkMode && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && isContextSensitive(attributeDecl)) { + if (contextualType && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && isContextSensitive(attributeDecl)) { const inferenceContext = getInferenceContext(attributes); Debug.assert(inferenceContext); // In CheckMode.Inferential we should always have an inference context const inferenceNode = (attributeDecl.initializer as JsxExpression).expression!; @@ -30486,7 +30540,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, /*readonly*/ false); attributesTable = createSymbolTable(); } - const exprType = getReducedType(checkExpressionCached(attributeDecl.expression, checkMode)); + const exprType = getReducedType(checkExpression(attributeDecl.expression, checkMode & CheckMode.Inferential)); if (isTypeAny(exprType)) { hasSpreadAnyType = true; } @@ -31057,7 +31111,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function getDeclarationNodeFlagsFromSymbol(s: Symbol): NodeFlags { - return s.valueDeclaration ? getCombinedNodeFlags(s.valueDeclaration) : 0; + return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0; } /** @@ -31368,7 +31422,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Lookup the private identifier lexically. function lookupSymbolForPrivateIdentifierDeclaration(propName: __String, location: Node): Symbol | undefined { - for (let containingClass = getContainingClass(location); !!containingClass; containingClass = getContainingClass(containingClass)) { + for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { const { symbol } = containingClass; const name = getSymbolNameForPrivateIdentifier(symbol, propName); const prop = (symbol.members && symbol.members.get(name)) || (symbol.exports && symbol.exports.get(name)); @@ -31508,23 +31562,29 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (assignmentKind && lexicallyScopedSymbol && lexicallyScopedSymbol.valueDeclaration && isMethodDeclaration(lexicallyScopedSymbol.valueDeclaration)) { grammarErrorOnNode(right, Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, idText(right)); } - if (isAnyLike) { if (lexicallyScopedSymbol) { return isErrorType(apparentType) ? errorType : apparentType; } - if (!getContainingClass(right)) { + if (getContainingClassExcludingClassDecorators(right) === undefined) { grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); return anyType; } } - prop = lexicallyScopedSymbol ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol) : undefined; - // Check for private-identifier-specific shadowing and lexical-scoping errors. - if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { - return errorType; + + prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol); + if (prop === undefined) { + // Check for private-identifier-specific shadowing and lexical-scoping errors. + if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { + return errorType; + } + const containingClass = getContainingClassExcludingClassDecorators(right); + if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) { + grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right)); + } } else { - const isSetonlyAccessor = prop && prop.flags & SymbolFlags.SetAccessor && !(prop.flags & SymbolFlags.GetAccessor); + const isSetonlyAccessor = prop.flags & SymbolFlags.SetAccessor && !(prop.flags & SymbolFlags.GetAccessor); if (isSetonlyAccessor && assignmentKind !== AssignmentKind.Definite) { error(node, Diagnostics.Private_accessor_was_defined_without_a_getter); } @@ -31585,7 +31645,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) { error(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); } - if (indexInfo.declaration && getCombinedNodeFlags(indexInfo.declaration) & NodeFlags.Deprecated) { + if (indexInfo.declaration && isDeprecatedDeclaration(indexInfo.declaration)) { addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText as string); } } @@ -31690,7 +31750,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) - && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & ModifierFlags.Static) + && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & ModifierFlags.Static) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } @@ -32504,7 +32564,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== SyntaxKind.OmittedExpression && !(checkMode & CheckMode.IsForStringLiteralArgumentCompletions && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== SyntaxKind.OmittedExpression) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -32640,8 +32700,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // can be specified by users through attributes property. const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); const attributesType = checkExpressionWithContextualType(node.attributes, paramType, /*inferenceContext*/ undefined, checkMode); + const checkAttributesType = checkMode & CheckMode.SkipContextSensitive ? getRegularTypeOfObjectLiteral(attributesType) : attributesType; return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( - attributesType, + checkAttributesType, paramType, relation, reportErrors ? node.tagName : undefined, @@ -32654,7 +32715,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (getJsxNamespaceContainerForImplicitImport(node)) { return true; // factory is implicitly jsx/jsxdev - assume it fits the bill, since we don't strongly look for the jsx/jsxs/jsxDEV factory APIs anywhere else (at least not yet) } - const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicTagName(node.tagName) ? checkExpression(node.tagName) : undefined; + const tagType = (isJsxOpeningElement(node) || isJsxSelfClosingElement(node)) && !(isJsxIntrinsicTagName(node.tagName) || isJsxNamespacedName(node.tagName)) ? checkExpression(node.tagName) : undefined; if (!tagType) { return true; } @@ -33124,12 +33185,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const candidates = candidatesOutArray || []; // reorderCandidates fills up the candidates array directly reorderCandidates(signatures, candidates, callChainFlags); - if (!candidates.length) { - if (reportErrors) { - diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures)); - } - return resolveErrorCall(node); - } + Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); const args = getEffectiveCallArguments(node); @@ -33147,7 +33203,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // decorators are applied to a declaration by the emitter, and not to an expression. const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; let argCheckMode = !isDecorator && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? CheckMode.SkipContextSensitive : CheckMode.Normal; - argCheckMode |= checkMode & CheckMode.IsForStringLiteralArgumentCompletions; // The following variables are captured and modified by calls to chooseOverload. // If overload resolution or type argument inference fails, we want to report the @@ -33386,7 +33441,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // If one or more context sensitive arguments were excluded, we start including // them now (and keeping do so for any subsequent candidates) and perform a second // round of type inference and applicability checking for this particular candidate. - argCheckMode = checkMode & CheckMode.IsForStringLiteralArgumentCompletions; + argCheckMode = CheckMode.Normal; if (inferenceContext) { const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); @@ -33445,7 +33500,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, candidate => tryGetTypeAtPosition(candidate, i)))); } const restParameterSymbols = mapDefined(candidates, c => signatureHasRestParameter(c) ? last(c.parameters) : undefined); - let flags = SignatureFlags.None; + let flags = SignatureFlags.IsSignatureCandidateForOverloadFailure; if (restParameterSymbols.length !== 0) { const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), UnionReduction.Subtype)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); @@ -34215,7 +34270,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let name: Expression | BindingName | undefined; let decl: Node | undefined; if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !(isVarConst(node.parent) && isFunctionLikeDeclaration(node))) { + if (!isInJSFile(node) && !(isVarConstLike(node.parent) && isFunctionLikeDeclaration(node))) { return undefined; } name = node.parent.name; @@ -34343,6 +34398,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function checkDeprecatedSignature(signature: Signature, node: CallLikeExpression) { + if (signature.flags & SignatureFlags.IsSignatureCandidateForOverloadFailure) return; if (signature.declaration && signature.declaration.flags & NodeFlags.Deprecated) { const suggestionNode = getDeprecatedSuggestionNode(node); const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)); @@ -34564,6 +34620,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return getRegularTypeOfLiteralType(exprType); } + const links = getNodeLinks(node); + links.assertionExpressionType = exprType; checkSourceElement(type); checkNodeDeferred(node); return getTypeFromTypeNode(type); @@ -34588,9 +34646,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function checkAssertionDeferred(node: JSDocTypeAssertion | AssertionExpression) { - const { type, expression } = getAssertionTypeAndExpression(node); + const { type } = getAssertionTypeAndExpression(node); const errNode = isParenthesizedExpression(node) ? type : node; - const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(checkExpression(expression))); + const links = getNodeLinks(node); + Debug.assertIsDefined(links.assertionExpressionType); + const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType)); const targetType = getTypeFromTypeNode(type); if (!isErrorType(targetType)) { addLazyDiagnostic(() => { @@ -34778,7 +34838,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return type; } - function getTupleElementLabel(d: ParameterDeclaration | NamedTupleMember) { + function getTupleElementLabel(d: ParameterDeclaration | NamedTupleMember): __String; + function getTupleElementLabel(d: ParameterDeclaration | NamedTupleMember | undefined, index: number, restParameterName?: __String): __String; + function getTupleElementLabel(d: ParameterDeclaration | NamedTupleMember | undefined, index?: number, restParameterName = "arg" as __String) { + if (!d) { + return `${restParameterName}_${index}` as __String; + } Debug.assert(isIdentifier(d.name)); // Parameter declarations could be binding patterns, but we only allow identifier names return d.name.escapedText; } @@ -34793,23 +34858,29 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isTupleType(restType)) { const associatedNames = ((restType as TypeReference).target as TupleType).labeledElementDeclarations; const index = pos - paramCount; - return associatedNames && getTupleElementLabel(associatedNames[index]) || restParameter.escapedName + "_" + index as __String; + return getTupleElementLabel(associatedNames?.[index], index, restParameter.escapedName); } return restParameter.escapedName; } - function getParameterIdentifierNameAtPosition(signature: Signature, pos: number): [parameterName: __String, isRestParameter: boolean] | undefined { + function getParameterIdentifierInfoAtPosition(signature: Signature, pos: number): { parameter: Identifier, parameterName: __String, isRestParameter: boolean } | undefined { if (signature.declaration?.kind === SyntaxKind.JSDocFunctionType) { return undefined; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { const param = signature.parameters[pos]; - return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : undefined; + const paramIdent = getParameterDeclarationIdentifier(param); + return paramIdent ? { + parameter: paramIdent, + parameterName: param.escapedName, + isRestParameter: false + } : undefined; } const restParameter = signature.parameters[paramCount] || unknownSymbol; - if (!isParameterDeclarationWithIdentifierName(restParameter)) { + const restIdent = getParameterDeclarationIdentifier(restParameter); + if (!restIdent) { return undefined; } @@ -34819,20 +34890,23 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const index = pos - paramCount; const associatedName = associatedNames?.[index]; const isRestTupleElement = !!associatedName?.dotDotDotToken; - return associatedName ? [ - getTupleElementLabel(associatedName), - isRestTupleElement - ] : undefined; + + if (associatedName) { + Debug.assert(isIdentifier(associatedName.name)); + return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; + } + + return undefined; } if (pos === paramCount) { - return [restParameter.escapedName, true]; + return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true }; } return undefined; } - function isParameterDeclarationWithIdentifierName(symbol: Symbol) { - return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); + function getParameterDeclarationIdentifier(symbol: Symbol) { + return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d: Declaration): d is NamedTupleMember | (ParameterDeclaration & { name: Identifier }) { return d.kind === SyntaxKind.NamedTupleMember || (isParameter(d) && d.name && isIdentifier(d.name)); @@ -36049,7 +36123,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Unions and intersections of the above (unions and intersections eagerly set isReadonly on creation) return !!(getCheckFlags(symbol) & CheckFlags.Readonly || symbol.flags & SymbolFlags.Property && getDeclarationModifierFlagsFromSymbol(symbol) & ModifierFlags.Readonly || - symbol.flags & SymbolFlags.Variable && getDeclarationNodeFlagsFromSymbol(symbol) & NodeFlags.Const || + symbol.flags & SymbolFlags.Variable && getDeclarationNodeFlagsFromSymbol(symbol) & NodeFlags.Constant || symbol.flags & SymbolFlags.Accessor && !(symbol.flags & SymbolFlags.SetAccessor) || symbol.flags & SymbolFlags.EnumMember || some(symbol.declarations, isReadonlyAssignmentDeclaration) @@ -36155,11 +36229,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return undefinedWideningType; } - function checkAwaitExpressionGrammar(node: AwaitExpression): void { + function checkAwaitGrammar(node: AwaitExpression | VariableDeclarationList): boolean { // Grammar checking + let hasError = false; const container = getContainingFunctionOrClassStaticBlock(node); if (container && isClassStaticBlockDeclaration(container)) { - error(node, Diagnostics.Await_expression_cannot_be_used_inside_a_class_static_block); + // NOTE: We report this regardless as to whether there are parse diagnostics. + const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : + Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block; + error(node, message); + hasError = true; } else if (!(node.flags & NodeFlags.AwaitContext)) { if (isInTopLevelContext(node)) { @@ -36168,9 +36247,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let span: TextSpan | undefined; if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { span ??= getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, - Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module); + const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module : + Diagnostics.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); diagnostics.add(diagnostic); + hasError = true; } switch (moduleKind) { case ModuleKind.Node16: @@ -36180,6 +36261,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { diagnostics.add( createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) ); + hasError = true; break; } // fallthrough @@ -36192,11 +36274,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // fallthrough default: span ??= getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add( - createFileDiagnostic(sourceFile, span.start, span.length, - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) - ); + const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher : + Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher; + diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); + hasError = true; break; } } @@ -36206,23 +36287,30 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); + const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); if (container && container.kind !== SyntaxKind.Constructor && (getFunctionFlags(container) & FunctionFlags.Async) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } diagnostics.add(diagnostic); + hasError = true; } } } - if (isInParameterInitializerBeforeContainingFunction(node)) { + if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) { + // NOTE: We report this regardless as to whether there are parse diagnostics. error(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + hasError = true; } + + return hasError; } function checkAwaitExpression(node: AwaitExpression): Type { - addLazyDiagnostic(() => checkAwaitExpressionGrammar(node)); + addLazyDiagnostic(() => checkAwaitGrammar(node)); const operandType = checkExpression(node.expression); const awaitedType = checkAwaitedType(operandType, /*withAlias*/ true, node, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); @@ -36773,7 +36861,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const rightType = getLastResult(state); Debug.assertIsDefined(rightType); - result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node); + result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node); } state.skip = false; @@ -36844,7 +36932,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const rightType = checkExpression(right, checkMode); - return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode); } function checkBinaryLikeExpressionWorker( @@ -36853,6 +36941,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { right: Expression, leftType: Type, rightType: Type, + checkMode?: CheckMode, errorNode?: Node ): Type { const operator = operatorToken.kind; @@ -37006,14 +37095,22 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.ExclamationEqualsToken: case SyntaxKind.EqualsEqualsEqualsToken: case SyntaxKind.ExclamationEqualsEqualsToken: - if (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) { - const eqType = operator === SyntaxKind.EqualsEqualsToken || operator === SyntaxKind.EqualsEqualsEqualsToken; - error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + // We suppress errors in CheckMode.TypeOnly (meaning the invocation came from getTypeOfExpression). During + // control flow analysis it is possible for operands to temporarily have narrower types, and those narrower + // types may cause the operands to not be comparable. We don't want such errors reported (see #46475). + if (!(checkMode && checkMode & CheckMode.TypeOnly)) { + if ( + (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && + // only report for === and !== in JS, not == or != + (!isInJSFile(left) || (operator === SyntaxKind.EqualsEqualsEqualsToken || operator === SyntaxKind.ExclamationEqualsEqualsToken)) + ) { + const eqType = operator === SyntaxKind.EqualsEqualsToken || operator === SyntaxKind.EqualsEqualsEqualsToken; + error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + } + checkNaNEquality(errorNode, operator, left, right); + reportOperatorErrorUnless((left, right) => isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left)); } - checkNaNEquality(errorNode, operator, left, right); - reportOperatorErrorUnless((left, right) => isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left)); return booleanType; - case SyntaxKind.InstanceOfKeyword: return checkInstanceOfExpression(left, right, leftType, rightType); case SyntaxKind.InKeyword: @@ -37368,7 +37465,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function checkConditionalExpression(node: ConditionalExpression, checkMode?: CheckMode): Type { - const type = checkTruthinessExpression(node.condition); + const type = checkTruthinessExpression(node.condition, checkMode); checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue); const type1 = checkExpression(node.whenTrue, checkMode); const type2 = checkExpression(node.whenFalse, checkMode); @@ -37392,7 +37489,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - return isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType(node, /*contextFlags*/ undefined) || unknownType, isTemplateLiteralContextualType) ? getTemplateLiteralType(texts, types) : stringType; + if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType(node, /*contextFlags*/ undefined) || unknownType, isTemplateLiteralContextualType)) { + return getTemplateLiteralType(texts, types); + } + const evaluated = node.parent.kind !== SyntaxKind.TaggedTemplateExpression && evaluateTemplateExpression(node); + return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } function isTemplateLiteralContextualType(type: Type): boolean { @@ -37493,7 +37594,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function widenTypeInferredFromInitializer(declaration: HasExpressionInitializer, type: Type) { - const widened = getCombinedNodeFlags(declaration) & NodeFlags.Const || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + const widened = getCombinedNodeFlagsCached(declaration) & NodeFlags.Constant || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); if (isInJSFile(declaration)) { if (isEmptyLiteralType(widened)) { reportImplicitAny(declaration, anyType); @@ -37745,7 +37846,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node); + const type = checkExpression(node, CheckMode.TypeOnly); // If control flow analysis was required to determine the type, it is worth caching. if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); @@ -37835,7 +37936,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (getIsolatedModules(compilerOptions)) { Debug.assert(!!(type.symbol.flags & SymbolFlags.ConstEnum)); const constEnumDeclaration = type.symbol.valueDeclaration as EnumDeclaration; - if (constEnumDeclaration.flags & NodeFlags.Ambient) { + if (constEnumDeclaration.flags & NodeFlags.Ambient && !isValidTypeOnlyAliasUseSite(node)) { error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } } @@ -37879,7 +37980,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return hasSkipDirectInferenceFlag(node) ? - anyType : + wildcardType : getFreshTypeOfLiteralType(getStringLiteralType((node as StringLiteralLike).text)); case SyntaxKind.NumericLiteral: checkGrammarNumericLiteral(node as NumericLiteral); @@ -38206,7 +38307,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function checkSignatureDeclarationDiagnostics() { checkCollisionWithArgumentsInGeneratedCode(node); - const returnTypeNode = getEffectiveReturnTypeNode(node); + + let returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeErrorLocation = returnTypeNode; + + if (isInJSFile(node)) { + const typeTag = getJSDocTypeTag(node); + if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) { + const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); + if (signature && signature.declaration) { + returnTypeNode = getEffectiveReturnTypeNode(signature.declaration); + returnTypeErrorLocation = typeTag.typeExpression.type; + } + } + } + if (noImplicitAny && !returnTypeNode) { switch (node.kind) { case SyntaxKind.ConstructSignature: @@ -38218,12 +38333,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - if (returnTypeNode) { + if (returnTypeNode && returnTypeErrorLocation) { const functionFlags = getFunctionFlags(node as FunctionDeclaration); if ((functionFlags & (FunctionFlags.Invalid | FunctionFlags.Generator)) === FunctionFlags.Generator) { const returnType = getTypeFromTypeNode(returnTypeNode); if (returnType === voidType) { - error(returnTypeNode, Diagnostics.A_generator_cannot_have_a_void_type_annotation); + error(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { // Naively, one could check that Generator is assignable to the return type annotation. @@ -38236,11 +38351,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(IterationTypeKind.Return, returnType, (functionFlags & FunctionFlags.Async) !== 0) || generatorYieldType; const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(IterationTypeKind.Next, returnType, (functionFlags & FunctionFlags.Async) !== 0) || unknownType; const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & FunctionFlags.Async)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeNode); + checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); } } else if ((functionFlags & FunctionFlags.AsyncGenerator) === FunctionFlags.Async) { - checkAsyncFunctionReturnType(node as FunctionLikeDeclaration, returnTypeNode); + checkAsyncFunctionReturnType(node as FunctionLikeDeclaration, returnTypeNode, returnTypeErrorLocation); } } if (node.kind !== SyntaxKind.IndexSignature && node.kind !== SyntaxKind.JSDocFunctionType) { @@ -38350,6 +38465,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case "length": case "caller": case "arguments": + if (compilerOptions.useDefineForClassFields) { + break; + } + // fall through case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); @@ -38789,12 +38908,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const elementTypes = node.elements; let seenOptionalElement = false; let seenRestElement = false; - const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - 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) { const type = getTypeFromTypeNode((e as RestTypeNode | NamedTupleMember).type); @@ -38984,7 +39098,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function getEffectiveDeclarationFlags(n: Declaration, flagsToCheck: ModifierFlags): ModifierFlags { - let flags = getCombinedModifierFlags(n); + let flags = getCombinedModifierFlagsCached(n); // children of classes (even ambient classes) should not be marked as ambient or export // because those flags have no useful semantics there. @@ -38992,8 +39106,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { n.parent.kind !== SyntaxKind.ClassDeclaration && n.parent.kind !== SyntaxKind.ClassExpression && n.flags & NodeFlags.Ambient) { - if (!(flags & ModifierFlags.Ambient) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { - // It is nested in an ambient context, which means it is automatically exported + const container = getEnclosingContainer(n); + if ((container && container.flags & NodeFlags.ExportContext) && !(flags & ModifierFlags.Ambient) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + // It is nested in an ambient export context, which means it is automatically exported flags |= ModifierFlags.Export; } flags |= ModifierFlags.Ambient; @@ -39747,7 +39862,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * * @param node The signature to check */ - function checkAsyncFunctionReturnType(node: FunctionLikeDeclaration | MethodSignature, returnTypeNode: TypeNode) { + function checkAsyncFunctionReturnType(node: FunctionLikeDeclaration | MethodSignature, returnTypeNode: TypeNode, returnTypeErrorLocation: TypeNode) { // As part of our emit for an async function, we will need to emit the entity name of // the return type annotation as an expression. To meet the necessary runtime semantics // for __awaiter, we must also check that the type of the declaration (e.g. the static @@ -39773,7 +39888,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // } // const returnType = getTypeFromTypeNode(returnTypeNode); - if (languageVersion >= ScriptTarget.ES2015) { if (isErrorType(returnType)) { return; @@ -39782,7 +39896,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) { // The promise type was not a valid type reference to the global promise type, so we // report an error and return the unknown type. - error(returnTypeNode, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); + reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); return; } } @@ -39796,7 +39910,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode); if (promiseConstructorName === undefined) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(returnType)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, typeToString(returnType)); return; } @@ -39804,10 +39918,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : errorType; if (isErrorType(promiseConstructorType)) { if (promiseConstructorName.kind === SyntaxKind.Identifier && promiseConstructorName.escapedText === "Promise" && getTargetType(returnType) === getGlobalPromiseType(/*reportErrors*/ false)) { - error(returnTypeNode, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error(returnTypeErrorLocation, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); } return; } @@ -39816,12 +39930,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (globalPromiseConstructorLikeType === emptyObjectType) { // If we couldn't resolve the global PromiseConstructorLike type we cannot verify // compatibility with __awaiter. - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); return; } - if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeNode, - Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value)) { + const headMessage = Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? undefined : chainDiagnosticMessages(/*details*/ undefined, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) { return; } @@ -39835,7 +39950,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return; } } + checkAwaitedType(returnType, /*withAlias*/ false, node, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + + function reportErrorForInvalidReturnType(message: DiagnosticMessage, returnTypeNode: TypeNode, returnTypeErrorLocation: TypeNode, typeName: string) { + if (returnTypeNode === returnTypeErrorLocation) { + error(returnTypeErrorLocation, message, typeName); + } + else { + const diag = error(returnTypeErrorLocation, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + addRelatedInfo(diag, createDiagnosticForNode(returnTypeNode, message, typeName)); + } + } } /** Check a decorator */ @@ -40116,6 +40242,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { for (const parameter of containingSignature.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } + markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature)); break; } } @@ -40542,7 +40669,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } else if (isVariableDeclaration(declaration)) { - addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + const blockScopeKind = getCombinedNodeFlagsCached(declaration) & NodeFlags.BlockScoped; + const name = getNameOfDeclaration(declaration); + if (blockScopeKind !== NodeFlags.Using && blockScopeKind !== NodeFlags.AwaitUsing || !name || !isIdentifierThatStartsWithUnderscore(name)) { + addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + } } else { const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); @@ -40895,7 +41026,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // } // skip block-scoped variables and parameters - if ((getCombinedNodeFlags(node) & NodeFlags.BlockScoped) !== 0 || isParameterDeclaration(node)) { + if ((getCombinedNodeFlagsCached(node) & NodeFlags.BlockScoped) !== 0 || isParameterDeclaration(node)) { return; } @@ -41071,7 +41202,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!symbol.exports?.size; if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== SyntaxKind.ForInStatement) { - checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(initializer), type, node, initializer, /*headMessage*/ undefined); + const initializerType = checkExpressionCached(initializer); + checkTypeAssignableToAndOptionallyElaborate(initializerType, type, node, initializer, /*headMessage*/ undefined); + const blockScopeKind = getCombinedNodeFlagsCached(node) & NodeFlags.BlockScoped; + if (blockScopeKind === NodeFlags.AwaitUsing) { + const globalAsyncDisposableType = getGlobalAsyncDisposableType(/*reportErrors*/ true); + const globalDisposableType = getGlobalDisposableType(/*reportErrors*/ true); + if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } + else if (blockScopeKind === NodeFlags.Using) { + const globalDisposableType = getGlobalDisposableType(/*reportErrors*/ true); + if (globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } } } if (symbol.declarations && symbol.declarations.length > 1) { @@ -41160,10 +41308,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return checkVariableLikeDeclaration(node); } + function checkVariableDeclarationList(node: VariableDeclarationList) { + const blockScopeKind = getCombinedNodeFlags(node) & NodeFlags.BlockScoped; + if (blockScopeKind === NodeFlags.Using || blockScopeKind === NodeFlags.AwaitUsing) { + checkExternalEmitHelpers(node, ExternalEmitHelpers.AddDisposableResourceAndDisposeResources); + } + + forEach(node.declarations, checkSourceElement); + } + function checkVariableStatement(node: VariableStatement) { // Grammar checking - if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) checkGrammarForDisallowedLetOrConstStatement(node); - forEach(node.declarationList.declarations, checkSourceElement); + if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) checkGrammarForDisallowedBlockScopedVariableStatement(node); + checkVariableDeclarationList(node.declarationList); } function checkExpressionStatement(node: ExpressionStatement) { @@ -41345,7 +41502,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (node.initializer) { if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { - forEach((node.initializer as VariableDeclarationList).declarations, checkVariableDeclaration); + checkVariableDeclarationList(node.initializer as VariableDeclarationList); } else { checkExpression(node.initializer); @@ -41366,7 +41523,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const container = getContainingFunctionOrClassStaticBlock(node); if (node.awaitModifier) { if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnNode(node.awaitModifier, Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block); + grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); } else { const functionFlags = getFunctionFlags(container); @@ -41387,7 +41544,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. if (node.initializer.kind === SyntaxKind.VariableDeclarationList) { - checkForInOrForOfVariableDeclaration(node); + checkVariableDeclarationList(node.initializer as VariableDeclarationList); } else { const varExpr = node.initializer; @@ -41438,7 +41595,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - checkForInOrForOfVariableDeclaration(node); + checkVariableDeclarationList(node.initializer as VariableDeclarationList); } else { // In a 'for-in' statement of the form @@ -41474,15 +41631,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function checkForInOrForOfVariableDeclaration(iterationStatement: ForInOrOfStatement): void { - const variableDeclarationList = iterationStatement.initializer as VariableDeclarationList; - // checkGrammarForInOrForOfStatement will check that there is exactly one declaration. - if (variableDeclarationList.declarations.length >= 1) { - const decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } - function checkRightHandSideOfForOf(statement: ForOfStatement): Type { const use = statement.awaitModifier ? IterationUse.ForAwaitOf : IterationUse.ForOf; return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression); @@ -43669,7 +43817,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return value; } - function evaluate(expr: Expression, location: Declaration): string | number | undefined { + function evaluate(expr: Expression, location?: Declaration): string | number | undefined { switch (expr.kind) { case SyntaxKind.PrefixUnaryExpression: const value = evaluate((expr as PrefixUnaryExpression).operand, location); @@ -43726,11 +43874,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const symbol = resolveEntityName(expr, SymbolFlags.Value, /*ignoreErrors*/ true); if (symbol) { if (symbol.flags & SymbolFlags.EnumMember) { - return evaluateEnumMember(expr, symbol, location); + return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration as EnumMember); } - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration as VariableDeclaration | undefined; - if (declaration && !declaration.type && declaration.initializer && declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location)) { + if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } @@ -43745,7 +43893,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const name = escapeLeadingUnderscores(((expr as ElementAccessExpression).argumentExpression as StringLiteralLike).text); const member = rootSymbol.exports!.get(name); if (member) { - return evaluateEnumMember(expr, member, location); + return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration as EnumMember); } } } @@ -43767,7 +43915,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return getEnumMemberValue(declaration as EnumMember); } - function evaluateTemplateExpression(expr: TemplateExpression, location: Declaration) { + function evaluateTemplateExpression(expr: TemplateExpression, location?: Declaration) { let result = expr.head.text; for (const span of expr.templateSpans) { const value = evaluate(span.expression, location); @@ -45436,7 +45584,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const containingLiteral = getContainingObjectLiteral(container); if (containingLiteral) { const contextualType = getApparentTypeOfContextualType(containingLiteral, /*contextFlags*/ undefined); - const type = contextualType && getThisTypeFromContextualType(contextualType); + const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); return type && !isTypeAny(type); } } @@ -45534,11 +45682,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const symbol = getIntrinsicTagSymbol(name.parent as JsxOpeningLikeElement); return symbol === unknownSymbol ? undefined : symbol; } - const result = resolveEntityName(name, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true, getHostSignatureFromJSDoc(name)); + const result = resolveEntityName(name, meaning, /*ignoreErrors*/ true, /*dontResolveAlias*/ true, getHostSignatureFromJSDoc(name)); if (!result && isJSDoc) { const container = findAncestor(name, or(isClassLike, isInterfaceDeclaration)); if (container) { - return resolveJSDocMemberName(name, /*ignoreErrors*/ false, getSymbolOfDeclaration(container)); + return resolveJSDocMemberName(name, /*ignoreErrors*/ true, getSymbolOfDeclaration(container)); } } if (result && isJSDoc) { @@ -46600,7 +46748,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; @@ -47035,7 +47183,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (requestedExternalEmitHelperNames.has(name)) continue; requestedExternalEmitHelperNames.add(name); - const symbol = getSymbol(helpersModule.exports!, escapeLeadingUnderscores(name), SymbolFlags.Value); + const symbol = resolveSymbol(getSymbol(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), SymbolFlags.Value)); if (!symbol) { error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); } @@ -47090,6 +47238,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case ExternalEmitHelpers.CreateBinding: return ["__createBinding"]; case ExternalEmitHelpers.SetFunctionName: return ["__setFunctionName"]; case ExternalEmitHelpers.PropKey: return ["__propKey"]; + case ExternalEmitHelpers.AddDisposableResourceAndDisposeResources: return ["__addDisposableResource", "__disposeResources"]; default: return Debug.fail("Unrecognized helper"); } } @@ -47113,6 +47262,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); } + const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & NodeFlags.BlockScoped : NodeFlags.None; let lastStatic: Node | undefined, lastDeclare: Node | undefined, lastAsync: Node | undefined, lastOverride: Node | undefined, firstDecorator: Decorator | undefined; let flags = ModifierFlags.None; let sawExportBeforeDecorators = false; @@ -47343,6 +47493,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else if (node.kind === SyntaxKind.Parameter) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } + else if (blockScopeKind === NodeFlags.Using) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); + } + else if (blockScopeKind === NodeFlags.AwaitUsing) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); + } flags |= ModifierFlags.Export; break; case SyntaxKind.DefaultKeyword: @@ -47350,6 +47506,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (container.kind === SyntaxKind.ModuleDeclaration && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } + else if (blockScopeKind === NodeFlags.Using) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); + } + else if (blockScopeKind === NodeFlags.AwaitUsing) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); + } else if (!(flags & ModifierFlags.Export)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } @@ -47375,6 +47537,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else if (node.kind === SyntaxKind.Parameter) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } + else if (blockScopeKind === NodeFlags.Using) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + } + else if (blockScopeKind === NodeFlags.AwaitUsing) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + } else if ((node.parent.flags & NodeFlags.Ambient) && node.parent.kind === SyntaxKind.ModuleBlock) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } @@ -47546,9 +47714,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return findFirstModifierExcept(node, SyntaxKind.AbstractKeyword); case SyntaxKind.ClassExpression: case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.VariableStatement: case SyntaxKind.TypeAliasDeclaration: return find(node.modifiers, isModifier); + case SyntaxKind.VariableStatement: + return node.declarationList.flags & NodeFlags.Using ? + findFirstModifierExcept(node, SyntaxKind.AwaitKeyword) : + find(node.modifiers, isModifier); case SyntaxKind.EnumDeclaration: return findFirstModifierExcept(node, SyntaxKind.ConstKeyword); default: @@ -48397,7 +48568,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { initializer.kind === SyntaxKind.TrueKeyword || initializer.kind === SyntaxKind.FalseKeyword || isBigIntLiteralExpression(initializer) ); - const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); + const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && (isVarConstLike(node)); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); @@ -48410,21 +48581,37 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function checkGrammarVariableDeclaration(node: VariableDeclaration) { + const nodeFlags = getCombinedNodeFlagsCached(node); + const blockScopeKind = nodeFlags & NodeFlags.BlockScoped; + if (isBindingPattern(node.name)) { + switch (blockScopeKind) { + case NodeFlags.AwaitUsing: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "await using"); + case NodeFlags.Using: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); + } + } + if (node.parent.parent.kind !== SyntaxKind.ForInStatement && node.parent.parent.kind !== SyntaxKind.ForOfStatement) { - if (node.flags & NodeFlags.Ambient) { + if (nodeFlags & NodeFlags.Ambient) { checkAmbientInitializer(node); } else if (!node.initializer) { if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) { return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer); } - if (isVarConst(node)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_must_be_initialized); + switch (blockScopeKind) { + case NodeFlags.AwaitUsing: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "await using"); + case NodeFlags.Using: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "using"); + case NodeFlags.Const: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "const"); } } } - if (node.exclamationToken && (node.parent.parent.kind !== SyntaxKind.VariableStatement || !node.type || node.initializer || node.flags & NodeFlags.Ambient)) { + if (node.exclamationToken && (node.parent.parent.kind !== SyntaxKind.VariableStatement || !node.type || node.initializer || nodeFlags & NodeFlags.Ambient)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type @@ -48438,8 +48625,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { checkESModuleMarker(node.name); } - const checkLetConstNames = (isLet(node) || isVarConst(node)); - // 1. LexicalDeclaration : LetOrConst BindingList ; // It is a Syntax Error if the BoundNames of BindingList contains "let". // 2. ForDeclaration: ForDeclaration : LetOrConst ForBinding @@ -48447,7 +48632,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code // and its Identifier is eval or arguments - return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); + return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name: Identifier | BindingPattern): boolean { @@ -48493,6 +48678,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!declarationList.declarations.length) { return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); } + + const blockScopeFlags = declarationList.flags & NodeFlags.BlockScoped; + if ((blockScopeFlags === NodeFlags.Using || blockScopeFlags === NodeFlags.AwaitUsing) && isForInStatement(declarationList.parent)) { + return grammarErrorOnNode(declarationList, + blockScopeFlags === NodeFlags.Using ? + Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : + Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration); + } + + if (blockScopeFlags === NodeFlags.AwaitUsing) { + return checkAwaitGrammar(declarationList); + } + return false; } @@ -48513,13 +48711,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return true; } - function checkGrammarForDisallowedLetOrConstStatement(node: VariableStatement) { + function checkGrammarForDisallowedBlockScopedVariableStatement(node: VariableStatement) { if (!allowLetAndConstDeclarations(node.parent)) { - if (isLet(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } - else if (isVarConst(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_can_only_be_declared_inside_a_block); + const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & NodeFlags.BlockScoped; + if (blockScopeKind) { + const keyword = blockScopeKind === NodeFlags.Let ? "let" : + blockScopeKind === NodeFlags.Const ? "const" : + blockScopeKind === NodeFlags.Using ? "using" : + blockScopeKind === NodeFlags.AwaitUsing ? "await using" : + Debug.fail("Unknown BlockScope flag"); + return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -48943,6 +49144,34 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : undefined; } + + function getCombinedModifierFlagsCached(node: Declaration) { + // we hold onto the last node and result to speed up repeated lookups against the same node. + if (lastGetCombinedModifierFlagsNode === node) { + return lastGetCombinedModifierFlagsResult; + } + + lastGetCombinedModifierFlagsNode = node; + lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node); + return lastGetCombinedModifierFlagsResult; + } + + function getCombinedNodeFlagsCached(node: Node) { + // we hold onto the last node and result to speed up repeated lookups against the same node. + if (lastGetCombinedNodeFlagsNode === node) { + return lastGetCombinedNodeFlagsResult; + } + lastGetCombinedNodeFlagsNode = node; + lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node); + return lastGetCombinedNodeFlagsResult; + } + + function isVarConstLike(node: VariableDeclaration | VariableDeclarationList) { + const blockScopeKind = getCombinedNodeFlagsCached(node) & NodeFlags.BlockScoped; + return blockScopeKind === NodeFlags.Const || + blockScopeKind === NodeFlags.Using || + blockScopeKind === NodeFlags.AwaitUsing; + } } function isNotAccessor(declaration: Declaration): boolean { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3b2120d258c8c..1443d98edb3b2 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -176,6 +176,7 @@ const libEntries: [string, string][] = [ ["es2015.symbol", "lib.es2015.symbol.d.ts"], ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], ["es2017.string", "lib.es2017.string.d.ts"], @@ -211,14 +212,18 @@ const libEntries: [string, string][] = [ ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.es2023.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"], ]; @@ -652,6 +657,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ { name: "checkJs", type: "boolean", + affectsModuleResolution: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 1acb342daa494..495cc2e3a700c 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -364,21 +364,21 @@ export function *mapIterator(iter: Iterable, mapFn: (x: T) => U) { * Maps from T to T and avoids allocation if all elements map to themselves * * @internal */ -export function sameMap(array: T[], f: (x: T, i: number) => T): T[]; +export function sameMap(array: T[], f: (x: T, i: number) => U): U[]; /** @internal */ -export function sameMap(array: readonly T[], f: (x: T, i: number) => T): readonly T[]; +export function sameMap(array: readonly T[], f: (x: T, i: number) => U): readonly U[]; /** @internal */ -export function sameMap(array: T[] | undefined, f: (x: T, i: number) => T): T[] | undefined; +export function sameMap(array: T[] | undefined, f: (x: T, i: number) => U): U[] | undefined; /** @internal */ -export function sameMap(array: readonly T[] | undefined, f: (x: T, i: number) => T): readonly T[] | undefined; +export function sameMap(array: readonly T[] | undefined, f: (x: T, i: number) => U): readonly U[] | undefined; /** @internal */ -export function sameMap(array: readonly T[] | undefined, f: (x: T, i: number) => T): readonly T[] | undefined { +export function sameMap(array: readonly T[] | undefined, f: (x: T, i: number) => U): readonly U[] | undefined { if (array) { for (let i = 0; i < array.length; i++) { const item = array[i]; const mapped = f(item, i); - if (item !== mapped) { - const result = array.slice(0, i); + if (item as unknown !== mapped) { + const result: U[] = array.slice(0, i) as unknown[] as U[]; result.push(mapped); for (i++; i < array.length; i++) { result.push(f(array[i], i)); @@ -387,7 +387,7 @@ export function sameMap(array: readonly T[] | undefined, f: (x: T, i: number) } } } - return array; + return array as unknown[] as U[]; } /** diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts index 6542d1086e9a1..706f11594855f 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -1,6 +1,6 @@ // 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 = "5.1"; +export const versionMajorMinor = "5.2"; // The following is baselined as a literal template type without intervention /** The version of the TypeScript compiler release */ // eslint-disable-next-line @typescript-eslint/no-inferrable-types diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 94838e3f8634a..79eac952ddc54 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -72,6 +72,7 @@ import { ObjectFlags, ObjectType, RelationComparisonResult, + ScriptKind, Signature, SignatureCheckMode, SignatureFlags, @@ -192,6 +193,7 @@ export namespace Debug { } export function fail(message?: string, stackCrawlMark?: AnyFunction): never { + // eslint-disable-next-line no-debugger debugger; const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); if ((Error as any).captureStackTrace) { @@ -439,6 +441,10 @@ export namespace Debug { return formatEnum(kind, (ts as any).SnippetKind, /*isFlags*/ false); } + export function formatScriptKind(kind: ScriptKind | undefined): string { + return formatEnum(kind, (ts as any).ScriptKind, /*isFlags*/ false); + } + export function formatNodeFlags(flags: NodeFlags | undefined): string { return formatEnum(flags, (ts as any).NodeFlags, /*isFlags*/ true); } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f3e482be32ab2..6bb7d2b777742 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -199,6 +199,10 @@ "category": "Error", "code": 1064 }, + "The return type of an async function or method must be the global Promise type.": { + "category": "Error", + "code": 1065 + }, "In ambient enum declarations member initializer must be constant expression.": { "category": "Error", "code": 1066 @@ -315,6 +319,10 @@ "category": "Error", "code": 1110 }, + "Private field '{0}' must be declared in an enclosing class.": { + "category": "Error", + "code": 1111 + }, "A 'default' clause cannot appear more than once in a 'switch' statement.": { "category": "Error", "code": 1113 @@ -451,18 +459,14 @@ "category": "Error", "code": 1149 }, - "'const' declarations must be initialized.": { + "'{0}' declarations must be initialized.": { "category": "Error", "code": 1155 }, - "'const' declarations can only be declared inside a block.": { + "'{0}' declarations can only be declared inside a block.": { "category": "Error", "code": 1156 }, - "'let' declarations can only be declared inside a block.": { - "category": "Error", - "code": 1157 - }, "Unterminated template literal.": { "category": "Error", "code": 1160 @@ -1188,14 +1192,6 @@ "category": "Error", "code": 1371 }, - "Convert to type-only import": { - "category": "Message", - "code": 1373 - }, - "Convert all imports not used as a value to type-only imports": { - "category": "Message", - "code": 1374 - }, "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.": { "category": "Error", "code": 1375 @@ -1609,6 +1605,26 @@ "category": "Error", "code": 1490 }, + "'{0}' modifier cannot appear on a 'using' declaration.": { + "category": "Error", + "code": 1491 + }, + "'{0}' declarations may not have binding patterns.": { + "category": "Error", + "code": 1492 + }, + "The left-hand side of a 'for...in' statement cannot be a 'using' declaration.": { + "category": "Error", + "code": 1493 + }, + "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration.": { + "category": "Error", + "code": 1494 + }, + "'{0}' modifier cannot appear on an 'await using' declaration.": { + "category": "Error", + "code": 1495 + }, "The types of '{0}' are incompatible between these types.": { "category": "Error", @@ -1848,10 +1864,6 @@ "category": "Error", "code": 2345 }, - "Call target does not contain any signatures.": { - "category": "Error", - "code": 2346 - }, "Untyped function calls may not accept type arguments.": { "category": "Error", "code": 2347 @@ -3631,6 +3643,26 @@ "category": "Error", "code": 2849 }, + "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'.": { + "category": "Error", + "code": 2850 + }, + "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'.": { + "category": "Error", + "code": 2851 + }, + "'await using' statements are only allowed within async functions and at the top levels of modules.": { + "category": "Error", + "code": 2852 + }, + "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module.": { + "category": "Error", + "code": 2853 + }, + "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.": { + "category": "Error", + "code": 2854 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -4245,10 +4277,6 @@ "category": "Error", "code": 5083 }, - "Tuple members must all have names or all not have names.": { - "category": "Error", - "code": 5084 - }, "A tuple member cannot be both optional and rest.": { "category": "Error", "code": 5085 @@ -4337,6 +4365,14 @@ "category": "Error", "code": 5108 }, + "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'.": { + "category": "Error", + "code": 5109 + }, + "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'.": { + "category": "Error", + "code": 5110 + }, "Generates a sourcemap for each corresponding '.d.ts' file.": { "category": "Message", @@ -4917,6 +4953,10 @@ "category": "Message", "code": 6163 }, + "Skipping module '{0}' that looks like an absolute URI, target file types: {1}.": { + "category": "Message", + "code": 6164 + }, "Do not truncate error messages.": { "category": "Message", "code": 6165 @@ -5610,6 +5650,14 @@ "category": "Message", "code": 6416 }, + "Searching all ancestor node_modules directories for preferred extensions: {0}.": { + "category": "Message", + "code": 6417 + }, + "Searching all ancestor node_modules directories for fallback extensions: {0}.": { + "category": "Message", + "code": 6418 + }, "The expected type comes from property '{0}' which is declared here on type '{1}'": { "category": "Message", @@ -6512,6 +6560,10 @@ "category": "Error", "code": 8016 }, + "Signature declarations can only be used in TypeScript files.": { + "category": "Error", + "code": 8017 + }, "Report errors in .js files.": { "category": "Message", "code": 8019 @@ -7608,6 +7660,42 @@ "category": "Message", "code": 95178 }, + "Cannot move to file, selected file is invalid": { + "category": "Message", + "code": 95179 + }, + "Use 'import type'": { + "category": "Message", + "code": 95180 + }, + "Use 'type {0}'": { + "category": "Message", + "code": 95181 + }, + "Fix all with type-only imports": { + "category": "Message", + "code": 95182 + }, + "Cannot move statements to the selected file": { + "category": "Message", + "code": 95183 + }, + "Inline variable": { + "category": "Message", + "code": 95184 + }, + "Could not find variable to inline.": { + "category": "Message", + "code": 95185 + }, + "Variables with multiple declarations cannot be inlined.": { + "category": "Message", + "code": 95186 + }, + "Add missing comma for object member completion '{0}'.": { + "category": "Message", + "code": 95187 + }, "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": { "category": "Error", @@ -7713,11 +7801,11 @@ "category": "Error", "code": 18036 }, - "Await expression cannot be used inside a class static block.": { + "'await' expression cannot be used inside a class static block.": { "category": "Error", "code": 18037 }, - "'For await' loops cannot be used inside a class static block.": { + "'for await' loops cannot be used inside a class static block.": { "category": "Error", "code": 18038 }, @@ -7776,5 +7864,9 @@ "Its type '{0}' is not a valid JSX element type.": { "category": "Error", "code": 18053 + }, + "'await using' statements cannot be used inside a class static block.": { + "category": "Error", + "code": 18054 } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index da4f3f56fa5e7..a58223868f8b0 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -179,6 +179,7 @@ import { getSyntheticLeadingComments, getSyntheticTrailingComments, getTextOfJSDocComment, + getTextOfJsxNamespacedName, getTrailingCommentRanges, getTrailingSemicolonDeferringWriter, getTransformers, @@ -228,6 +229,7 @@ import { isJSDocLikeText, isJsonSourceFile, isJsxClosingElement, + isJsxNamespacedName, isJsxOpeningElement, isKeyword, isLet, @@ -252,8 +254,10 @@ import { isUnparsedNode, isUnparsedPrepend, isUnparsedSource, + isVarAwaitUsing, isVarConst, isVariableStatement, + isVarUsing, JSDoc, JSDocAugmentsTag, JSDocCallbackTag, @@ -2066,6 +2070,8 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return emitJsxSpreadAttribute(node as JsxSpreadAttribute); case SyntaxKind.JsxExpression: return emitJsxExpression(node as JsxExpression); + case SyntaxKind.JsxNamespacedName: + return emitJsxNamespacedName(node as JsxNamespacedName); // Clauses case SyntaxKind.CaseClause: @@ -2283,8 +2289,6 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return emitJsxSelfClosingElement(node as JsxSelfClosingElement); case SyntaxKind.JsxFragment: return emitJsxFragment(node as JsxFragment); - case SyntaxKind.JsxNamespacedName: - return emitJsxNamespacedName(node as JsxNamespacedName); // Synthesized list case SyntaxKind.SyntaxList: @@ -3683,7 +3687,18 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri } function emitVariableDeclarationList(node: VariableDeclarationList) { - writeKeyword(isLet(node) ? "let" : isVarConst(node) ? "const" : "var"); + if (isVarAwaitUsing(node)) { + writeKeyword("await"); + writeSpace(); + writeKeyword("using"); + } + else { + const head = isLet(node) ? "let" : + isVarConst(node) ? "const" : + isVarUsing(node) ? "using" : + "var"; + writeKeyword(head); + } writeSpace(); emitList(node, node.declarations, ListFormat.VariableDeclarationList); } @@ -5528,7 +5543,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return node; } - function getTextOfNode(node: Identifier | PrivateIdentifier | LiteralExpression, includeTrivia?: boolean): string { + function getTextOfNode(node: Identifier | PrivateIdentifier | LiteralExpression | JsxNamespacedName, includeTrivia?: boolean): string { if (isGeneratedIdentifier(node) || isGeneratedPrivateIdentifier(node)) { return generateName(node); } @@ -5542,6 +5557,11 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri return idText(node); } } + else if (isJsxNamespacedName(node)) { + if (!canUseSourceFile || getSourceFileOfNode(node) !== getOriginalNode(sourceFile)) { + return getTextOfJsxNamespacedName(node); + } + } else { Debug.assertNode(node, isLiteralExpression); // not strictly necessary if (!canUseSourceFile) { @@ -5554,7 +5574,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri function getLiteralTextOfNode(node: LiteralLikeNode, neverAsciiEscape: boolean | undefined, jsxAttributeEscape: boolean): string { if (node.kind === SyntaxKind.StringLiteral && (node as StringLiteral).textSourceNode) { const textSourceNode = (node as StringLiteral).textSourceNode!; - if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode)) { + if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) { const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode); return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || (getEmitFlags(node) & EmitFlags.NoAsciiEscaping) ? `"${escapeString(text)}"` : diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts index 9f0cd1d2a9d9e..e198c123f302b 100644 --- a/src/compiler/factory/emitHelpers.ts +++ b/src/compiler/factory/emitHelpers.ts @@ -59,6 +59,8 @@ export interface ESDecorateClassContext { * The name of the decorated element. */ name: Expression; + + metadata: Expression; } /** @@ -75,6 +77,7 @@ export interface ESDecorateClassElementContext { static: boolean; private: boolean; access: ESDecorateClassElementAccess; + metadata: Expression; } /** @internal */ @@ -136,6 +139,9 @@ export interface EmitHelperFactory { createClassPrivateFieldGetHelper(receiver: Expression, state: Identifier, kind: PrivateIdentifierKind, f: Identifier | undefined): Expression; createClassPrivateFieldSetHelper(receiver: Expression, state: Identifier, value: Expression, kind: PrivateIdentifierKind, f: Identifier | undefined): Expression; createClassPrivateFieldInHelper(state: Identifier, receiver: Expression): Expression; + // 'using' helpers + createAddDisposableResourceHelper(envBinding: Expression, value: Expression, async: boolean): Expression; + createDisposeResourcesHelper(envBinding: Expression): Expression; } /** @internal */ @@ -183,7 +189,10 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel // Class Fields Helpers createClassPrivateFieldGetHelper, createClassPrivateFieldSetHelper, - createClassPrivateFieldInHelper + createClassPrivateFieldInHelper, + // 'using' helpers + createAddDisposableResourceHelper, + createDisposeResourcesHelper, }; /** @@ -245,12 +254,14 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel // ES Decorators Helpers function createESDecorateClassContextObject(contextIn: ESDecorateClassContext) { - return factory.createObjectLiteralExpression([ + const properties = [ factory.createPropertyAssignment(factory.createIdentifier("kind"), factory.createStringLiteral("class")), - factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name) - ]); - } + factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name), + factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata), + ]; + return factory.createObjectLiteralExpression(properties); + } function createESDecorateClassElementAccessGetMethod(elementName: ESDecorateName) { const accessor = elementName.computed ? @@ -344,13 +355,15 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel } function createESDecorateClassElementContextObject(contextIn: ESDecorateClassElementContext) { - return factory.createObjectLiteralExpression([ + const properties = [ factory.createPropertyAssignment(factory.createIdentifier("kind"), factory.createStringLiteral(contextIn.kind)), factory.createPropertyAssignment(factory.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory.createStringLiteralFromNode(contextIn.name.name)), factory.createPropertyAssignment(factory.createIdentifier("static"), contextIn.static ? factory.createTrue() : factory.createFalse()), factory.createPropertyAssignment(factory.createIdentifier("private"), contextIn.private ? factory.createTrue() : factory.createFalse()), - factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)) - ]); + factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + factory.createPropertyAssignment(factory.createIdentifier("metadata"), contextIn.metadata), + ]; + return factory.createObjectLiteralExpression(properties); } function createESDecorateContextObject(contextIn: ESDecorateContext) { @@ -381,7 +394,6 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel value ? [thisArg, initializers, value] : [thisArg, initializers] ); } - // ES2018 Helpers function createAssignHelper(attributesSegments: Expression[]) { @@ -666,6 +678,20 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel context.requestEmitHelper(classPrivateFieldInHelper); return factory.createCallExpression(getUnscopedHelperName("__classPrivateFieldIn"), /*typeArguments*/ undefined, [state, receiver]); } + + function createAddDisposableResourceHelper(envBinding: Expression, value: Expression, async: boolean): Expression { + context.requestEmitHelper(addDisposableResourceHelper); + return factory.createCallExpression( + getUnscopedHelperName("__addDisposableResource"), + /*typeArguments*/ undefined, + [envBinding, value, async ? factory.createTrue() : factory.createFalse()] + ); + } + + function createDisposeResourcesHelper(envBinding: Expression) { + context.requestEmitHelper(disposeResourcesHelper); + return factory.createCallExpression(getUnscopedHelperName("__disposeResources"), /*typeArguments*/ undefined, [envBinding]); + } } /** @internal */ @@ -761,10 +787,10 @@ export const esDecorateHelper: UnscopedEmitHelper = { if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.push(_); + if (_ = accept(result.init)) initializers.unshift(_); } else if (_ = accept(result)) { - if (kind === "field") initializers.push(_); + if (kind === "field") initializers.unshift(_); else descriptor[key] = _; } } @@ -1367,6 +1393,71 @@ export const classPrivateFieldInHelper: UnscopedEmitHelper = { };` }; +/** + * @internal + */ +export const addDisposableResourceHelper: UnscopedEmitHelper = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: false, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` +}; + +/** + * @internal + */ +export const disposeResourcesHelper: UnscopedEmitHelper = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: false, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` +}; + let allUnscopedEmitHelpers: ReadonlyMap | undefined; /** @internal */ @@ -1399,7 +1490,9 @@ export function getAllUnscopedEmitHelpers() { classPrivateFieldSetHelper, classPrivateFieldInHelper, createBindingHelper, - setModuleDefaultHelper + setModuleDefaultHelper, + addDisposableResourceHelper, + disposeResourcesHelper, ], helper => helper.name)); } diff --git a/src/compiler/factory/nodeConverters.ts b/src/compiler/factory/nodeConverters.ts index 1541d56bf0232..bc12cb58cc73a 100644 --- a/src/compiler/factory/nodeConverters.ts +++ b/src/compiler/factory/nodeConverters.ts @@ -6,6 +6,7 @@ import { BindingOrAssignmentPattern, Block, cast, + ClassDeclaration, ConciseBody, Debug, Expression, @@ -17,6 +18,8 @@ import { isBindingElement, isBindingPattern, isBlock, + isDefaultModifier, + isExportModifier, isExpression, isIdentifier, isObjectBindingPattern, @@ -39,6 +42,7 @@ export function createNodeConverters(factory: NodeFactory): NodeConverters { return { convertToFunctionBlock, convertToFunctionExpression, + convertToClassExpression, convertToArrayAssignmentElement, convertToObjectAssignmentElement, convertToAssignmentPattern, @@ -59,7 +63,7 @@ export function createNodeConverters(factory: NodeFactory): NodeConverters { function convertToFunctionExpression(node: FunctionDeclaration) { if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); const updated = factory.createFunctionExpression( - getModifiers(node), + getModifiers(node)?.filter(modifier => !isExportModifier(modifier) && !isDefaultModifier(modifier)), node.asteriskToken, node.name, node.typeParameters, @@ -75,6 +79,22 @@ export function createNodeConverters(factory: NodeFactory): NodeConverters { return updated; } + function convertToClassExpression(node: ClassDeclaration) { + const updated = factory.createClassExpression( + node.modifiers?.filter(modifier => !isExportModifier(modifier) && !isDefaultModifier(modifier)), + node.name, + node.typeParameters, + node.heritageClauses, + node.members + ); + setOriginalNode(updated, node); + setTextRange(updated, node); + if (getStartsOnNewLine(node)) { + setStartsOnNewLine(updated, /*newLine*/ true); + } + return updated; + } + function convertToArrayAssignmentElement(element: ArrayBindingOrAssignmentElement) { if (isBindingElement(element)) { if (element.dotDotDotToken) { @@ -163,6 +183,7 @@ export function createNodeConverters(factory: NodeFactory): NodeConverters { export const nullNodeConverters: NodeConverters = { convertToFunctionBlock: notImplemented, convertToFunctionExpression: notImplemented, + convertToClassExpression: notImplemented, convertToArrayAssignmentElement: notImplemented, convertToObjectAssignmentElement: notImplemented, convertToAssignmentPattern: notImplemented, diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index c3d2e25f38e35..9dd48e0437efe 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -125,6 +125,7 @@ import { getSyntheticLeadingComments, getSyntheticTrailingComments, getTextOfIdentifierOrLiteral, + HasDecorators, hasInvalidEscape, HasModifiers, hasProperty, @@ -133,6 +134,8 @@ import { Identifier, idText, IfStatement, + ImmediatelyInvokedArrowFunction, + ImmediatelyInvokedFunctionExpression, ImportClause, ImportDeclaration, ImportEqualsDeclaration, @@ -990,6 +993,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode createExportDefault, createExternalModuleExport, createTypeCheck, + createIsNotTypeCheck, createMethodCall, createGlobalMethodCall, createFunctionBindCall, @@ -1023,6 +1027,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode liftToBlock, mergeLexicalEnvironment, updateModifiers, + updateModifierLike, }; forEach(nodeFactoryPatchers, fn => fn(factory)); @@ -1320,6 +1325,10 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode TransformFlags.ContainsES2018; break; + case SyntaxKind.UsingKeyword: + transformFlags = TransformFlags.ContainsESNext; + break; + case SyntaxKind.PublicKeyword: case SyntaxKind.PrivateKeyword: case SyntaxKind.ProtectedKeyword: @@ -4176,6 +4185,9 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode TransformFlags.ContainsES2015 | TransformFlags.ContainsBlockScopedBinding; } + if (flags & NodeFlags.Using) { + node.transformFlags |= TransformFlags.ContainsESNext; + } return node; } @@ -6312,8 +6324,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode } // compound nodes - function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; - function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): ImmediatelyInvokedFunctionExpression; + function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedFunctionExpression; function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param?: ParameterDeclaration, paramValue?: Expression) { return createCallExpression( createFunctionExpression( @@ -6330,8 +6342,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode ); } - function createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; - function createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + function createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; + function createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; function createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param?: ParameterDeclaration, paramValue?: Expression) { return createCallExpression( createArrowFunction( @@ -6373,9 +6385,15 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode // function createTypeCheck(value: Expression, tag: TypeOfTag) { - return tag === "undefined" - ? factory.createStrictEquality(value, createVoidZero()) - : factory.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + return tag === "null" ? factory.createStrictEquality(value, createNull()) : + tag === "undefined" ? factory.createStrictEquality(value, createVoidZero()) : + factory.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + } + + function createIsNotTypeCheck(value: Expression, tag: TypeOfTag) { + return tag === "null" ? factory.createStrictInequality(value, createNull()) : + tag === "undefined" ? factory.createStrictInequality(value, createVoidZero()) : + factory.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); } function createMethodCall(object: Expression, methodName: string | Identifier, argumentsList: readonly Expression[]) { @@ -6989,6 +7007,18 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode Debug.assertNever(node); } + function updateModifierLike(node: T, modifiers: readonly ModifierLike[]): T; + function updateModifierLike(node: HasModifiers & HasDecorators, modifierArray: readonly ModifierLike[]) { + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : + isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : + isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : + isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : + isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : + isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : + isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : + Debug.assertNever(node); + } + function asNodeArray(array: readonly T[]): NodeArray; function asNodeArray(array: readonly T[] | undefined): NodeArray | undefined; function asNodeArray(array: readonly T[] | undefined): NodeArray | undefined { @@ -7571,10 +7601,12 @@ export function createSourceMapSource(fileName: string, text: string, skipTrivia // Utilities export function setOriginalNode(node: T, original: Node | undefined): T { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) node.emitNode = mergeEmitNode(emitNode, node.emitNode); + if (node.original !== original) { + node.original = original; + if (original) { + const emitNode = original.emitNode; + if (emitNode) node.emitNode = mergeEmitNode(emitNode, node.emitNode); + } } return node; } @@ -7582,7 +7614,7 @@ export function setOriginalNode(node: T, original: Node | undefi function mergeEmitNode(sourceEmitNode: EmitNode, destEmitNode: EmitNode | undefined) { const { flags, - internalFlags, + internalFlags, leadingComments, trailingComments, commentRange, @@ -7592,24 +7624,95 @@ function mergeEmitNode(sourceEmitNode: EmitNode, destEmitNode: EmitNode | undefi helpers, startsOnNewLine, snippetElement, + classThis, + assignedName, } = sourceEmitNode; if (!destEmitNode) destEmitNode = {} as EmitNode; - // We are using `.slice()` here in case `destEmitNode.leadingComments` is pushed to later. - if (leadingComments) destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - if (flags) destEmitNode.flags = flags; - if (internalFlags) destEmitNode.internalFlags = internalFlags & ~InternalEmitFlags.Immutable; - if (commentRange) destEmitNode.commentRange = commentRange; - if (sourceMapRange) destEmitNode.sourceMapRange = sourceMapRange; - if (tokenSourceMapRanges) destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges!); - if (constantValue !== undefined) destEmitNode.constantValue = constantValue; + + // NOTE: We should have one or more lines here for each property in EmitNode, even if the line + // consists only of a comment indicating the property does not merge + + // `flags` overwrites the destination + if (flags) { + destEmitNode.flags = flags; + } + + // `internalFlags` overwrites the destination. We do not copy over the immutability of the source. + if (internalFlags) { + destEmitNode.internalFlags = internalFlags & ~InternalEmitFlags.Immutable; + } + + // `annotatedNodes` are not merged as they should only present on the parse tree node of a `SourceFile`. + + // `leadingComments` are concatenated with any existing leading comments on the destination + if (leadingComments) { + // We use `.slice()` in case `destEmitNode.leadingComments` is pushed to later + destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); + } + + // `trailingComments` are concatenated with any existing trailing comments on the destination + if (trailingComments) { + // We use `.slice()` in case `destEmitNode.trailingComments` is pushed to later + destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + } + + // `commentRange` overwrites the destination + if (commentRange) { + destEmitNode.commentRange = commentRange; + } + + // `sourceMapRange` overwrites the destination + if (sourceMapRange) { + destEmitNode.sourceMapRange = sourceMapRange; + } + + // `tokenSourceMapRanges` are merged with the destination + if (tokenSourceMapRanges) { + destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges!); + } + + // `constantValue` overwrites the destination + if (constantValue !== undefined) { + destEmitNode.constantValue = constantValue; + } + + // `externalHelpersModuleName` is not merged + // `externalHelpers` is not merged + + // `helpers` are merged into the destination if (helpers) { for (const helper of helpers) { destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); } } - if (startsOnNewLine !== undefined) destEmitNode.startsOnNewLine = startsOnNewLine; - if (snippetElement !== undefined) destEmitNode.snippetElement = snippetElement; + + // `startsOnNewLine` overwrites the destination + if (startsOnNewLine !== undefined) { + destEmitNode.startsOnNewLine = startsOnNewLine; + } + + // `snippetElement` overwrites the destination + if (snippetElement !== undefined) { + destEmitNode.snippetElement = snippetElement; + } + + // `typeNode` is not merged as it only applies to comment emit for a variable declaration. + // TODO: `typeNode` should overwrite the destination + + // `classThis` overwrites the destination + if (classThis) { + destEmitNode.classThis = classThis; + } + + // `assignedName` overwrites the destination + if (assignedName) { + destEmitNode.assignedName = assignedName; + } + + // `identifierTypeArguments` are not merged as they only apply to an Identifier in quick info + // `autoGenerate` is not merged as it only applies to a specific generated Identifier/PrivateIdentifier + // `generatedImportReference` is not merged as it only applies to an Identifier + return destEmitNode; } diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index 2e2721eadcaaf..bac8f690e1940 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -178,6 +178,7 @@ import { Token, TransformFlags, TypeNode, + WrappedExpression } from "../_namespaces/ts"; // Compound nodes @@ -655,6 +656,8 @@ export function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): return false; } +/** @internal */ +export function skipOuterExpressions(node: WrappedExpression): T; /** @internal */ export function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; /** @internal */ diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index c860198172c30..4538377dafd3d 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -9,6 +9,7 @@ import { CommandLineOption, comparePaths, Comparison, + CompilerHost, CompilerOptions, concatenate, contains, @@ -35,10 +36,13 @@ import { forEach, forEachAncestorDirectory, formatMessage, + getAllowJSCompilerOption, + getAnyExtensionFromPath, getBaseFileName, GetCanonicalFileName, getCommonSourceDirectory, getCompilerOptionValue, + getDeclarationEmitExtensionForPath, getDirectoryPath, GetEffectiveTypeRootsHost, getEmitModuleKind, @@ -98,6 +102,7 @@ import { startsWith, stringContains, supportedDeclarationExtensions, + supportedJSExtensionsFlat, supportedTSImplementationExtensions, toPath, tryExtractTSExtension, @@ -193,6 +198,15 @@ function formatExtensions(extensions: Extensions) { return result.join(", "); } +function extensionsToExtensionsArray(extensions: Extensions) { + const result: Extension[] = []; + if (extensions & Extensions.TypeScript) result.push(...supportedTSImplementationExtensions); + if (extensions & Extensions.JavaScript) result.push(...supportedJSExtensionsFlat); + if (extensions & Extensions.Declaration) result.push(...supportedDeclarationExtensions); + if (extensions & Extensions.Json) result.push(Extension.Json); + return result; +} + interface PathAndPackageId { readonly fileName: string; readonly packageId: PackageId | undefined; @@ -880,7 +894,7 @@ function compilerOptionValueToString(value: unknown): string { /** @internal */ export function getKeyForCompilerOptions(options: CompilerOptions, affectingOptionDeclarations: readonly CommandLineOption[]) { - return affectingOptionDeclarations.map(option => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + (options.pathsBasePath ? `|${options.pathsBasePath}` : undefined); + return affectingOptionDeclarations.map(option => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } /** @internal */ @@ -1758,8 +1772,6 @@ function nodeModuleNameResolverWorker(features: NodeResolutionFeatures, moduleNa const diagnosticState = { ...state, features: state.features & ~NodeResolutionFeatures.Exports, - failedLookupLocations: [], - affectingLocations: [], reportDiagnostic: noop, }; const diagnosticResult = tryResolve(extensions & (Extensions.TypeScript | Extensions.Declaration), diagnosticState); @@ -1795,6 +1807,12 @@ function nodeModuleNameResolverWorker(features: NodeResolutionFeatures, moduleNa resolved = loadModuleFromSelfNameReference(extensions, moduleName, containingDirectory, state, cache, redirectedReference); } if (!resolved) { + if (moduleName.indexOf(":") > -1) { + if (traceEnabled) { + trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions)); + } + return undefined; + } if (traceEnabled) { trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions)); } @@ -2080,11 +2098,16 @@ function loadNodeModuleFromDirectory(extensions: Extensions, candidate: string, return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths)); } +/** @internal */ +export interface GetPackageJsonEntrypointsHost extends ModuleResolutionHost { + readDirectory: CompilerHost["readDirectory"]; +} + /** @internal */ export function getEntrypointsFromPackageJsonInfo( packageJsonInfo: PackageJsonInfo, options: CompilerOptions, - host: ModuleResolutionHost, + host: GetPackageJsonEntrypointsHost, cache: ModuleResolutionCache | undefined, resolveJs?: boolean, ): string[] | false { @@ -2115,7 +2138,7 @@ export function getEntrypointsFromPackageJsonInfo( arrayIsEqualTo ); for (const conditions of conditionSets) { - const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions }; + const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host }; const exportResolutions = loadEntrypointsFromExportMap( packageJsonInfo, packageJsonInfo.contents.packageJsonContent.exports, @@ -2135,7 +2158,7 @@ export function getEntrypointsFromPackageJsonInfo( function loadEntrypointsFromExportMap( scope: PackageJsonInfo, exports: object, - state: ModuleResolutionState, + state: ModuleResolutionState & { host: GetPackageJsonEntrypointsHost }, extensions: Extensions, ): PathAndExtension[] | undefined { let entrypoints: PathAndExtension[] | undefined; @@ -2156,17 +2179,37 @@ function loadEntrypointsFromExportMap( return entrypoints; function loadEntrypointsFromTargetExports(target: unknown): boolean | undefined { - if (typeof target === "string" && startsWith(target, "./") && target.indexOf("*") === -1) { - const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { - return false; + if (typeof target === "string" && startsWith(target, "./")) { + if (target.indexOf("*") >= 0 && state.host.readDirectory) { + if (target.indexOf("*") !== target.lastIndexOf("*")) { + return false; + } + + state.host.readDirectory( + scope.packageDirectory, + extensionsToExtensionsArray(extensions), + /*excludes*/ undefined, + [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] + ).forEach(entry => { + entrypoints = appendIfUnique(entrypoints, { + path: entry, + ext: getAnyExtensionFromPath(entry), + resolvedUsingTsExtension: undefined + }); + }); } - const resolvedTarget = combinePaths(scope.packageDirectory, target); - const finalPath = getNormalizedAbsolutePath(resolvedTarget, state.host.getCurrentDirectory?.()); - const result = loadFileNameFromPackageJsonField(extensions, finalPath, /*onlyRecordFailures*/ false, state); - if (result) { - entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); - return true; + else { + const partsAfterFirst = getPathComponents(target).slice(2); + if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + return false; + } + const resolvedTarget = combinePaths(scope.packageDirectory, target); + const finalPath = getNormalizedAbsolutePath(resolvedTarget, state.host.getCurrentDirectory?.()); + const result = loadFileNameFromPackageJsonField(extensions, finalPath, /*onlyRecordFailures*/ false, state); + if (result) { + entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); + return true; + } } } else if (Array.isArray(target)) { @@ -2416,7 +2459,16 @@ function loadModuleFromSelfNameReference(extensions: Extensions, moduleName: str // in order to be consistent with (non-self) library-name loading in // `loadModuleFromNearestNodeModulesDirectoryWorker`, which uses two passes in order // to prioritize `@types` packages higher up the directory tree over untyped - // implementation packages. + // implementation packages. See the selfNameModuleAugmentation.ts test for why this + // matters. + // + // However, there's an exception. If the user has `allowJs` and `declaration`, we need + // to ensure that self-name imports of their own package can resolve back to their + // input JS files via `tryLoadInputFileForPath` at a higher priority than their output + // declaration files, so we need to do a single pass with all extensions for that case. + if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { + return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); + } const priorityExtensions = extensions & (Extensions.TypeScript | Extensions.Declaration); const secondaryExtensions = extensions & ~(Extensions.TypeScript | Extensions.Declaration); return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) @@ -2671,12 +2723,6 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } - function useCaseSensitiveFileNames() { - return !state.host.useCaseSensitiveFileNames ? true : - typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : - state.host.useCaseSensitiveFileNames(); - } - function tryLoadInputFileForPath(finalPath: string, entry: string, packagePath: string, isImports: boolean) { // Replace any references to outputs for files in the program with the input files to support package self-names used with outDir // PROBLEM: We don't know how to calculate the output paths yet, because the "common source directory" we use as the base of the file structure @@ -2686,13 +2732,13 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 - && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true) + && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true) ) { // So that all means we'll only try these guesses for files outside `node_modules` in a directory where the `package.json` and `tsconfig.json` are siblings. // Even with all that, we still don't know if the root of the output file structure will be (relative to the package file) // `.`, `./src` or any other deeper directory structure. (If project references are used, it's definitely `.` by fiat, so that should be pretty common.) - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses: string[] = []; // A `rootDir` compiler option strongly indicates the root location // A `composite` project is using project references and has it's common src dir set to `.`, so it shouldn't need to check any other locations @@ -2747,7 +2793,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo for (const commonSourceDirGuess of commonSourceDirGuesses) { const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) { + if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { // The matched export is looking up something in either the out declaration or js dir, now map the written path back into the source dir and source extension const pathFragment = finalPath.slice(candidateDir.length + 1); // +1 to also remove directory seperator const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); @@ -2757,7 +2803,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo const inputExts = getPossibleOriginalInputExtensionForExtension(possibleInputBase); for (const possibleExt of inputExts) { if (!extensionIsOk(extensions, possibleExt)) continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); if (state.host.fileExists(possibleInputWithInputExtension)) { return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField(extensions, possibleInputWithInputExtension, /*onlyRecordFailures*/ false, state))); } @@ -2817,11 +2863,13 @@ function loadModuleFromNearestNodeModulesDirectoryWorker(extensions: Extensions, const secondaryExtensions = extensions & ~(Extensions.TypeScript | Extensions.Declaration); // (1) if (priorityExtensions) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); const result = lookup(priorityExtensions); if (result) return result; } // (2) if (secondaryExtensions && !typesScopeOnly) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); return lookup(secondaryExtensions); } @@ -2896,7 +2944,7 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu const loader: ResolutionKindSpecificLoader = (extensions, candidate, onlyRecordFailures, state) => { let pathAndExtension = - loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) || + (rest || !(state.features & NodeResolutionFeatures.EsmMode)) && loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) || loadNodeModuleFromDirectoryWorker( extensions, candidate, @@ -2937,7 +2985,6 @@ function loadModuleFromSpecificNodeModulesDirectory(extensions: Extensions, modu return fromPaths.value; } } - return loader(extensions, candidate, !nodeModulesDirectoryExists, state); } @@ -3188,3 +3235,9 @@ function traceIfEnabled(state: ModuleResolutionState, diagnostic: DiagnosticMess trace(state.host, diagnostic, ...args); } } + +function useCaseSensitiveFileNames(state: ModuleResolutionState) { + return !state.host.useCaseSensitiveFileNames ? true : + typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : + state.host.useCaseSensitiveFileNames(); +} diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index ae2025148fd4b..eeeeb75615994 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -24,6 +24,7 @@ import { ExportAssignment, Extension, extensionFromPath, + extensionsNotSupportingExtensionlessResolution, fileExtensionIsOneOf, FileIncludeKind, firstDefined, @@ -91,6 +92,7 @@ import { removeExtension, removeFileExtension, removeSuffix, + removeTrailingDirectorySeparator, ResolutionMode, resolvePath, ScriptKind, @@ -773,7 +775,9 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl: string, paths: MapLike)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = (exports as MapLike)[key]; - const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions); + const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { return result; } @@ -1007,10 +1011,24 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan // happens very easily in fourslash tests though, since every test file listed gets included. See // importNameCodeFix_typesVersions.ts for an example.) const mainExportFile = toPath(mainFileRelative, packageRootPath, getCanonicalFileName); - if (removeFileExtension(mainExportFile) === removeFileExtension(getCanonicalFileName(moduleFileToTry))) { + const canonicalModuleFileToTry = getCanonicalFileName(moduleFileToTry); + if (removeFileExtension(mainExportFile) === removeFileExtension(canonicalModuleFileToTry)) { // ^ An arbitrary removal of file extension for this comparison is almost certainly wrong return { packageRootPath, moduleFileToTry }; } + else if ( + packageJsonContent.type !== "module" && + !fileExtensionIsOneOf(canonicalModuleFileToTry, extensionsNotSupportingExtensionlessResolution) && + startsWith(canonicalModuleFileToTry, mainExportFile) && + getDirectoryPath(canonicalModuleFileToTry) === removeTrailingDirectorySeparator(mainExportFile) && + removeFileExtension(getBaseFileName(canonicalModuleFileToTry)) === "index" + ) { + // if mainExportFile is a directory, which contains moduleFileToTry, we just try index file + // example mainExportFile: `pkg/lib` and moduleFileToTry: `pkg/lib/index`, we can use packageRootPath + // but this behavior is deprecated for packages with "type": "module", so we only do this for packages without "type": "module" + // and make sure that the extension on index.{???} is something that supports omitting the extension + return { packageRootPath, moduleFileToTry }; + } } } else { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a13e1e6a8aa1e..b55ba9b70fc8e 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -147,6 +147,7 @@ import { isJSDocNullableType, isJSDocReturnTag, isJSDocTypeTag, + isJsxNamespacedName, isJsxOpeningElement, isJsxOpeningFragment, isKeyword, @@ -228,7 +229,6 @@ import { JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, - JsxTagNamePropertyAccess, JsxText, JsxTokenSyntaxKind, LabeledStatement, @@ -1778,7 +1778,8 @@ namespace Parser { const statements = parseList(ParsingContext.SourceElements, parseStatement); Debug.assert(token() === SyntaxKind.EndOfFileToken); - const endOfFileToken = addJSDocComment(parseTokenNode()); + const endHasJSDoc = hasPrecedingJSDocComment(); + const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); const sourceFile = createSourceFile(fileName, languageVersion, scriptKind, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator); @@ -1806,12 +1807,12 @@ namespace Parser { } } + let hasDeprecatedTag = false; function withJSDoc(node: T, hasJSDoc: boolean): T { - return hasJSDoc ? addJSDocComment(node) : node; - } + if (!hasJSDoc) { + return node; + } - let hasDeprecatedTag = false; - function addJSDocComment(node: T): T { Debug.assert(!node.jsDoc); // Should only be called once per node const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), comment => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); if (jsDoc.length) node.jsDoc = jsDoc; @@ -2869,6 +2870,11 @@ namespace Parser { case ParsingContext.HeritageClauses: return isHeritageClause(); case ParsingContext.ImportOrExportSpecifiers: + // bail out if the next token is [FromKeyword StringLiteral]. + // That means we're in something like `import { from "mod"`. Stop here can give better error message. + if (token() === SyntaxKind.FromKeyword && lookAhead(nextTokenIsStringLiteral)) { + return false; + } return tokenIsIdentifierOrKeyword(token()); case ParsingContext.JsxAttributes: return tokenIsIdentifierOrKeyword(token()) || token() === SyntaxKind.OpenBraceToken; @@ -3390,7 +3396,11 @@ namespace Parser { 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.ImportOrExportSpecifiers: + if (token() === SyntaxKind.FromKeyword) { + return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); + } + return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case ParsingContext.JsxAttributes: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case ParsingContext.JsxChildren: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case ParsingContext.AssertEntries: return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); // AssertionKey. @@ -5016,13 +5026,14 @@ namespace Parser { // binary expression here, so we pass in the 'lowest' precedence here so that it matches // and consumes anything. const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const expr = parseBinaryExpressionOrHigher(OperatorPrecedence.Lowest); // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single // identifier and the current token is an arrow. if (expr.kind === SyntaxKind.Identifier && token() === SyntaxKind.EqualsGreaterThanToken) { - return parseSimpleArrowFunctionExpression(pos, expr as Identifier, allowReturnTypeInArrowFunction, /*asyncModifier*/ undefined); + return parseSimpleArrowFunctionExpression(pos, expr as Identifier, allowReturnTypeInArrowFunction, hasJSDoc, /*asyncModifier*/ undefined); } // Now see if we might be in cases '2' or '3'. @@ -5098,7 +5109,7 @@ namespace Parser { } } - function parseSimpleArrowFunctionExpression(pos: number, identifier: Identifier, allowReturnTypeInArrowFunction: boolean, asyncModifier?: NodeArray | undefined): ArrowFunction { + function parseSimpleArrowFunctionExpression(pos: number, identifier: Identifier, allowReturnTypeInArrowFunction: boolean, hasJSDoc: boolean, asyncModifier?: NodeArray | undefined): ArrowFunction { Debug.assert(token() === SyntaxKind.EqualsGreaterThanToken, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory.createParameterDeclaration( /*modifiers*/ undefined, @@ -5114,7 +5125,7 @@ namespace Parser { const equalsGreaterThanToken = parseExpectedToken(SyntaxKind.EqualsGreaterThanToken); const body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier, allowReturnTypeInArrowFunction); const node = factory.createArrowFunction(asyncModifier, /*typeParameters*/ undefined, parameters, /*type*/ undefined, equalsGreaterThanToken, body); - return addJSDocComment(finishNode(node, pos)); + return withJSDoc(finishNode(node, pos), hasJSDoc); } function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction: boolean): Expression | undefined { @@ -5301,9 +5312,10 @@ namespace Parser { if (token() === SyntaxKind.AsyncKeyword) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === Tristate.True) { const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(OperatorPrecedence.Lowest); - return parseSimpleArrowFunctionExpression(pos, expr as Identifier, allowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr as Identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); } } return undefined; @@ -6122,11 +6134,15 @@ namespace Parser { // primaryExpression in the form of an identifier and "this" keyword // We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword // We only want to consider "this" as a primaryExpression - let expression: JsxTagNameExpression = parseJsxTagName(); + const initialExpression = parseJsxTagName(); + if (isJsxNamespacedName(initialExpression)) { + return initialExpression; // `a:b.c` is invalid syntax, don't even look for the `.` if we parse `a:b`, and let `parseAttribute` report "unexpected :" instead. + } + let expression: PropertyAccessExpression | Identifier | ThisExpression = initialExpression; while (parseOptional(SyntaxKind.DotToken)) { - expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ false)), pos) as JsxTagNamePropertyAccess; + expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ false)), pos); } - return expression; + return expression as JsxTagNameExpression; } function parseJsxTagName(): Identifier | JsxNamespacedName | ThisExpression { @@ -6812,7 +6828,9 @@ namespace Parser { let initializer!: VariableDeclarationList | Expression; if (token() !== SyntaxKind.SemicolonToken) { - if (token() === SyntaxKind.VarKeyword || token() === SyntaxKind.LetKeyword || token() === SyntaxKind.ConstKeyword) { + if (token() === SyntaxKind.VarKeyword || token() === SyntaxKind.LetKeyword || token() === SyntaxKind.ConstKeyword || + token() === SyntaxKind.UsingKeyword && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || + token() === SyntaxKind.AwaitKeyword && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); } else { @@ -7048,6 +7066,10 @@ namespace Parser { case SyntaxKind.ClassKeyword: case SyntaxKind.EnumKeyword: return true; + case SyntaxKind.UsingKeyword: + return isUsingDeclaration(); + case SyntaxKind.AwaitKeyword: + return isAwaitUsingDeclaration(); // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; // however, an identifier cannot be followed by another identifier on the same line. This is what we @@ -7084,11 +7106,17 @@ namespace Parser { case SyntaxKind.ProtectedKeyword: case SyntaxKind.PublicKeyword: case SyntaxKind.ReadonlyKeyword: + const previousToken = token(); nextToken(); // ASI takes effect for this modifier. if (scanner.hasPrecedingLineBreak()) { return false; } + if (previousToken === SyntaxKind.DeclareKeyword && token() === SyntaxKind.TypeKeyword) { + // If we see 'declare type', then commit to parsing a type alias. parseTypeAliasDeclaration will + // report Line_break_not_permitted_here if needed. + return true; + } continue; case SyntaxKind.GlobalKeyword: @@ -7114,6 +7142,7 @@ namespace Parser { case SyntaxKind.StaticKeyword: nextToken(); continue; + default: return false; } @@ -7131,6 +7160,7 @@ namespace Parser { case SyntaxKind.OpenBraceToken: case SyntaxKind.VarKeyword: case SyntaxKind.LetKeyword: + case SyntaxKind.UsingKeyword: case SyntaxKind.FunctionKeyword: case SyntaxKind.ClassKeyword: case SyntaxKind.EnumKeyword: @@ -7196,6 +7226,41 @@ namespace Parser { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(/*disallowOf*/ true); + } + + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf?: boolean) { + nextToken(); + if (disallowOf && token() === SyntaxKind.OfKeyword) return false; + return (isBindingIdentifier() || token() === SyntaxKind.OpenBraceToken) && !scanner.hasPrecedingLineBreak(); + } + + function isUsingDeclaration() { + // 'using' always starts a lexical declaration if followed by an identifier. We also eagerly parse + // |ObjectBindingPattern| so that we can report a grammar error during check. We don't parse out + // |ArrayBindingPattern| since it potentially conflicts with element access (i.e., `using[x]`). + return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); + } + + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { + return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(/*disallowOf*/ true); + } + + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf?: boolean) { + if (nextToken() === SyntaxKind.UsingKeyword) { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); + } + return false; + } + + function isAwaitUsingDeclaration() { + // 'await using' always starts a lexical declaration if followed by an identifier. We also eagerly parse + // |ObjectBindingPattern| so that we can report a grammar error during check. We don't parse out + // |ArrayBindingPattern| since it potentially conflicts with element access (i.e., `await using[x]`). + return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); + } + function parseStatement(): Statement { switch (token()) { case SyntaxKind.SemicolonToken: @@ -7209,6 +7274,16 @@ namespace Parser { return parseVariableStatement(getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ undefined); } break; + case SyntaxKind.AwaitKeyword: + if (isAwaitUsingDeclaration()) { + return parseVariableStatement(getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ undefined); + } + break; + case SyntaxKind.UsingKeyword: + if (isUsingDeclaration()) { + return parseVariableStatement(getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ undefined); + } + break; case SyntaxKind.FunctionKeyword: return parseFunctionDeclaration(getNodePos(), hasPrecedingJSDocComment(), /*modifiers*/ undefined); case SyntaxKind.ClassKeyword: @@ -7313,6 +7388,8 @@ namespace Parser { case SyntaxKind.VarKeyword: case SyntaxKind.LetKeyword: case SyntaxKind.ConstKeyword: + case SyntaxKind.UsingKeyword: + case SyntaxKind.AwaitKeyword: return parseVariableStatement(pos, hasJSDoc, modifiersIn); case SyntaxKind.FunctionKeyword: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); @@ -7354,6 +7431,9 @@ namespace Parser { } } + function nextTokenIsStringLiteral() { + return nextToken() === SyntaxKind.StringLiteral; + } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === SyntaxKind.StringLiteral); @@ -7407,7 +7487,7 @@ namespace Parser { function parseObjectBindingPattern(): ObjectBindingPattern { const pos = getNodePos(); parseExpected(SyntaxKind.OpenBraceToken); - const elements = parseDelimitedList(ParsingContext.ObjectBindingElements, parseObjectBindingElement); + const elements = allowInAnd(() => parseDelimitedList(ParsingContext.ObjectBindingElements, parseObjectBindingElement)); parseExpected(SyntaxKind.CloseBraceToken); return finishNode(factory.createObjectBindingPattern(elements), pos); } @@ -7415,7 +7495,7 @@ namespace Parser { function parseArrayBindingPattern(): ArrayBindingPattern { const pos = getNodePos(); parseExpected(SyntaxKind.OpenBracketToken); - const elements = parseDelimitedList(ParsingContext.ArrayBindingElements, parseArrayBindingElement); + const elements = allowInAnd(() => parseDelimitedList(ParsingContext.ArrayBindingElements, parseArrayBindingElement)); parseExpected(SyntaxKind.CloseBracketToken); return finishNode(factory.createArrayBindingPattern(elements), pos); } @@ -7469,6 +7549,14 @@ namespace Parser { case SyntaxKind.ConstKeyword: flags |= NodeFlags.Const; break; + case SyntaxKind.UsingKeyword: + flags |= NodeFlags.Using; + break; + case SyntaxKind.AwaitKeyword: + Debug.assert(isAwaitUsingDeclaration()); + flags |= NodeFlags.AwaitUsing; + nextToken(); + break; default: Debug.fail(); } @@ -8025,6 +8113,9 @@ namespace Parser { function parseTypeAliasDeclaration(pos: number, hasJSDoc: boolean, modifiers: NodeArray | undefined): TypeAliasDeclaration { parseExpected(SyntaxKind.TypeKeyword); + if (scanner.hasPrecedingLineBreak()) { + parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); + } const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(SyntaxKind.EqualsToken); @@ -9146,7 +9237,7 @@ namespace Parser { const comment = parseTrailingTagComments(start, getNodePos(), indent, indentText); - const nestedTypeLiteral = target !== PropertyLikeParse.CallbackParameter && parseNestedTypeLiteral(typeExpression, name, target, indent); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -9461,7 +9552,6 @@ namespace Parser { if (canParseTag) { const child = tryParseChildTag(target, indent); if (child && (child.kind === SyntaxKind.JSDocParameterTag || child.kind === SyntaxKind.JSDocPropertyTag) && - target !== PropertyLikeParse.CallbackParameter && name && (isIdentifierNode(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } @@ -10385,7 +10475,7 @@ function getNamedArgRegEx(name: string): RegExp { } const tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; -const singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; +const singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; function extractPragmas(pragmas: PragmaPseudoMapEntry[], range: CommentRange, text: string) { const tripleSlash = range.kind === SyntaxKind.SingleLineCommentTrivia && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index cb47acffd4b57..227d3b5a3983f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -153,6 +153,7 @@ import { getTsBuildInfoEmitOutputFilePath, getTsConfigObjectLiteralExpression, getTsConfigPropArrayElementValue, + getTypesPackageName, HasChangedAutomaticTypeDirectiveNames, hasChangesInResolutions, hasExtension, @@ -1336,7 +1337,7 @@ export function getImpliedNodeFormatForFileWorker( } /** @internal */ -export const plainJSErrors: Set = new Set([ +export const plainJSErrors = new Set([ // binder errors Diagnostics.Cannot_redeclare_block_scoped_variable_0.code, Diagnostics.A_module_cannot_have_multiple_default_exports.code, @@ -1391,7 +1392,7 @@ export const plainJSErrors: Set = new Set([ Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, Diagnostics.Duplicate_label_0.code, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block.code, + Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, @@ -1421,14 +1422,17 @@ export const plainJSErrors: Set = new Set([ Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, Diagnostics._0_modifier_cannot_be_used_here.code, Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics.const_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics.const_declarations_must_be_initialized.code, + Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, + Diagnostics._0_declarations_must_be_initialized.code, Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, Diagnostics.Class_constructor_may_not_be_a_generator.code, Diagnostics.Class_constructor_may_not_be_an_accessor.code, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code, ]); /** @@ -1505,6 +1509,9 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg let resolvedLibReferences: Map | undefined; let resolvedLibProcessing: Map | undefined; + let packageMap: Map | undefined; + + // The below settings are to track if a .js file should be add to the program if loaded via searching under node_modules. // This works as imported modules are discovered recursively in a depth first manner, specifically: // - For each root file, findSourceFile is called. @@ -1862,6 +1869,9 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg redirectTargetsMap, usesUriStyleNodeCoreModules, resolvedLibReferences, + getCurrentPackagesMap: () => packageMap, + typesPackageExists, + packageBundlesTypes, isEmittedFile, getConfigFileParsingDiagnostics, getProjectReferences, @@ -1908,6 +1918,30 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg return program; + function getPackagesMap() { + if (packageMap) return packageMap; + packageMap = new Map(); + // A package name maps to true when we detect it has .d.ts files. + // This is useful as an approximation of whether a package bundles its own types. + // Note: we only look at files already found by module resolution, + // so there may be files we did not consider. + files.forEach(sf => { + if (!sf.resolvedModules) return; + + sf.resolvedModules.forEach(({ resolvedModule }) => { + if (resolvedModule?.packageId) packageMap!.set(resolvedModule.packageId.name, resolvedModule.extension === Extension.Dts || !!packageMap!.get(resolvedModule.packageId.name)); + }); + }); + return packageMap; + } + + function typesPackageExists(packageName: string): boolean { + return getPackagesMap().has(getTypesPackageName(packageName)); + } + function packageBundlesTypes(packageName: string): boolean { + return !!getPackagesMap().get(packageName); + } + function addResolutionDiagnostics(resolution: ResolvedModuleWithFailedLookupLocations | ResolvedTypeReferenceDirectiveWithFailedLookupLocations) { if (!resolution.resolutionDiagnostics?.length) return; (fileProcessingDiagnostics ??= []).push({ @@ -2338,8 +2372,8 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg for (const oldSourceFile of oldSourceFiles) { const sourceFileOptions = getCreateSourceFileOptions(oldSourceFile.fileName, moduleResolutionCache, host, options); let newSourceFile = host.getSourceFileByPath - ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath, sourceFileOptions, /*onError*/ undefined, shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat) - : host.getSourceFile(oldSourceFile.fileName, sourceFileOptions, /*onError*/ undefined, shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat); // TODO: GH#18217 + ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath, sourceFileOptions, /*onError*/ undefined, shouldCreateNewSourceFile) + : host.getSourceFile(oldSourceFile.fileName, sourceFileOptions, /*onError*/ undefined, shouldCreateNewSourceFile); // TODO: GH#18217 if (!newSourceFile) { return StructureIsReused.Not; @@ -2536,6 +2570,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg redirectTargetsMap = oldProgram.redirectTargetsMap; usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules; resolvedLibReferences = oldProgram.resolvedLibReferences; + packageMap = oldProgram.getCurrentPackagesMap(); return StructureIsReused.Completely; } @@ -2987,6 +3022,14 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg case SyntaxKind.TypeAliasDeclaration: diagnostics.push(createDiagnosticForNode(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; + case SyntaxKind.Constructor: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.FunctionDeclaration: + if (!(node as FunctionLikeDeclaration).body) { + diagnostics.push(createDiagnosticForNode(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); + return "skip"; + } + return; case SyntaxKind.EnumDeclaration: const enumKeyword = Debug.checkDefined(tokenToString(SyntaxKind.EnumKeyword)); diagnostics.push(createDiagnosticForNode(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); @@ -3583,7 +3626,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg fileName, sourceFileOptions, hostErrorMessage => addFilePreprocessingFileExplainingDiagnostic(/*file*/ undefined, reason, Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage]), - shouldCreateNewSourceFile || (oldProgram?.getSourceFileByPath(toPath(fileName))?.impliedNodeFormat !== sourceFileOptions.impliedNodeFormat) + shouldCreateNewSourceFile, ); if (packageId) { @@ -4370,6 +4413,24 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler"); } + if ( + ModuleKind[moduleKind] && + (ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) && + !(ModuleResolutionKind.Node16 <= moduleResolution && moduleResolution <= ModuleResolutionKind.NodeNext) + ) { + const moduleKindName = ModuleKind[moduleKind]; + createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); + } + else if ( + ModuleResolutionKind[moduleResolution] && + (ModuleResolutionKind.Node16 <= moduleResolution && moduleResolution <= ModuleResolutionKind.NodeNext) && + !(ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) + ) { + const moduleResolutionName = ModuleResolutionKind[moduleResolution]; + createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); + } + + // 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(); @@ -5107,18 +5168,10 @@ export function filterSemanticDiagnostics(diagnostic: readonly Diagnostic[], opt } /** @internal */ -export interface CompilerHostLike { - useCaseSensitiveFileNames(): boolean; - getCurrentDirectory(): string; - fileExists(fileName: string): boolean; - readFile(fileName: string): string | undefined; - readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[]; - trace?(s: string): void; - onUnRecoverableConfigFileDiagnostic?: DiagnosticReporter; -} - -/** @internal */ -export function parseConfigHostFromCompilerHostLike(host: CompilerHostLike, directoryStructureHost: DirectoryStructureHost = host): ParseConfigFileHost { +export function parseConfigHostFromCompilerHostLike( + host: (CompilerHost | ProgramHost) & { onUnRecoverableConfigFileDiagnostic?: DiagnosticReporter }, + directoryStructureHost: DirectoryStructureHost = host, +): ParseConfigFileHost { return { fileExists: f => directoryStructureHost.fileExists(f), readDirectory(root, extensions, excludes, includes, depth) { @@ -5126,10 +5179,13 @@ export function parseConfigHostFromCompilerHostLike(host: CompilerHostLike, dire return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: f => directoryStructureHost.readFile(f), + directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), + getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), + realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), getCurrentDirectory: () => host.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined, - trace: host.trace ? (s) => host.trace!(s) : undefined + trace: host.trace ? (s) => host.trace!(s) : undefined, }; } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 31c0818e1280b..bf7972763a568 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -153,6 +153,7 @@ export interface ResolutionWithFailedLookupLocations { refCount?: number; // Files that have this resolution using files?: Set; + node10Result?: string; } interface ResolutionWithResolvedFileName { @@ -956,43 +957,48 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD (resolution.files ??= new Set()).add(filePath); } + function watchFailedLookupLocation(failedLookupLocation: string, setAtRoot: boolean) { + const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); + const toWatch = getDirectoryToWatchFailedLookupLocation( + failedLookupLocation, + failedLookupLocationPath, + rootDir, + rootPath, + rootPathComponents, + getCurrentDirectory, + ); + if (toWatch) { + const { dir, dirPath, nonRecursive } = toWatch; + if (dirPath === rootPath) { + Debug.assert(nonRecursive); + setAtRoot = true; + } + else { + setDirectoryWatcher(dir, dirPath, nonRecursive); + } + } + return setAtRoot; + } + function watchFailedLookupLocationOfResolution(resolution: ResolutionWithFailedLookupLocations) { Debug.assert(!!resolution.refCount); - const { failedLookupLocations, affectingLocations } = resolution; - if (!failedLookupLocations?.length && !affectingLocations?.length) return; - if (failedLookupLocations?.length) resolutionsWithFailedLookups.add(resolution); + const { failedLookupLocations, affectingLocations, node10Result } = resolution; + if (!failedLookupLocations?.length && !affectingLocations?.length && !node10Result) return; + if (failedLookupLocations?.length || node10Result) resolutionsWithFailedLookups.add(resolution); let setAtRoot = false; if (failedLookupLocations) { for (const failedLookupLocation of failedLookupLocations) { - const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); - const toWatch = getDirectoryToWatchFailedLookupLocation( - failedLookupLocation, - failedLookupLocationPath, - rootDir, - rootPath, - rootPathComponents, - getCurrentDirectory, - ); - if (toWatch) { - const { dir, dirPath, nonRecursive } = toWatch; - if (dirPath === rootPath) { - Debug.assert(nonRecursive); - setAtRoot = true; - } - else { - setDirectoryWatcher(dir, dirPath, nonRecursive); - } - } - } - - if (setAtRoot) { - // This is always non recursive - setDirectoryWatcher(rootDir, rootPath, /*nonRecursive*/ true); // TODO: GH#18217 + setAtRoot = watchFailedLookupLocation(failedLookupLocation, setAtRoot); } } - watchAffectingLocationsOfResolution(resolution, !failedLookupLocations?.length); + if (node10Result) setAtRoot = watchFailedLookupLocation(node10Result, setAtRoot); + if (setAtRoot) { + // This is always non recursive + setDirectoryWatcher(rootDir, rootPath, /*nonRecursive*/ true); + } + watchAffectingLocationsOfResolution(resolution, !failedLookupLocations?.length && !node10Result); } function watchAffectingLocationsOfResolution(resolution: ResolutionWithFailedLookupLocations, addToResolutionsWithOnlyAffectingLocations: boolean) { @@ -1080,6 +1086,28 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD } } + function stopWatchFailedLookupLocation(failedLookupLocation: string, removeAtRoot: boolean) { + const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); + const toWatch = getDirectoryToWatchFailedLookupLocation( + failedLookupLocation, + failedLookupLocationPath, + rootDir, + rootPath, + rootPathComponents, + getCurrentDirectory, + ); + if (toWatch) { + const { dirPath } = toWatch; + if (dirPath === rootPath) { + removeAtRoot = true; + } + else { + removeDirectoryWatcher(dirPath); + } + } + return removeAtRoot; + } + function stopWatchFailedLookupLocationOfResolution( resolution: T, filePath: Path, @@ -1097,32 +1125,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD if (resolutions?.delete(resolution) && !resolutions.size) resolvedFileToResolution.delete(key); } - const { failedLookupLocations, affectingLocations } = resolution; + const { failedLookupLocations, affectingLocations, node10Result } = resolution; if (resolutionsWithFailedLookups.delete(resolution)) { let removeAtRoot = false; - for (const failedLookupLocation of failedLookupLocations!) { - const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); - const toWatch = getDirectoryToWatchFailedLookupLocation( - failedLookupLocation, - failedLookupLocationPath, - rootDir, - rootPath, - rootPathComponents, - getCurrentDirectory, - ); - if (toWatch) { - const { dirPath } = toWatch; - if (dirPath === rootPath) { - removeAtRoot = true; - } - else { - removeDirectoryWatcher(dirPath); - } + if (failedLookupLocations) { + for (const failedLookupLocation of failedLookupLocations) { + removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); } } - if (removeAtRoot) { - removeDirectoryWatcher(rootPath); - } + if (node10Result) removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot); + if (removeAtRoot) removeDirectoryWatcher(rootPath); } else if (affectingLocations?.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); @@ -1313,7 +1325,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD function canInvalidateFailedLookupResolution(resolution: ResolutionWithFailedLookupLocations) { if (canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution)) return true; if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks) return false; - return resolution.failedLookupLocations?.some(location => isInvalidatedFailedLookup(resolutionHost.toPath(location))); + return resolution.failedLookupLocations?.some(location => isInvalidatedFailedLookup(resolutionHost.toPath(location))) || + (!!resolution.node10Result && isInvalidatedFailedLookup(resolutionHost.toPath(resolution.node10Result))); } function isInvalidatedFailedLookup(locationPath: Path) { diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 9f539aec49d80..bd1e3854ac9b6 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -194,6 +194,7 @@ export const textToKeywordObj: MapLike = { undefined: SyntaxKind.UndefinedKeyword, unique: SyntaxKind.UniqueKeyword, unknown: SyntaxKind.UnknownKeyword, + using: SyntaxKind.UsingKeyword, var: SyntaxKind.VarKeyword, void: SyntaxKind.VoidKeyword, while: SyntaxKind.WhileKeyword, @@ -1141,7 +1142,7 @@ export function createScanner(languageVersion: ScriptTarget, // | NonOctalDecimalIntegerLiteral // LegacyOctalIntegerLiteral ::= '0' [0-7]+ // NonOctalDecimalIntegerLiteral ::= '0' [0-7]* [89] [0-9]* - function scanNumber(): { type: SyntaxKind, value: string } { + function scanNumber(): SyntaxKind { let start = pos; let mainFragment: string; if (text.charCodeAt(pos) === CharacterCodes._0) { @@ -1172,7 +1173,7 @@ export function createScanner(languageVersion: ScriptTarget, const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); if (withMinus) start--; error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start, pos - start, literal); - return { type: SyntaxKind.NumericLiteral, value: tokenValue }; + return SyntaxKind.NumericLiteral; } } else { @@ -1216,21 +1217,21 @@ export function createScanner(languageVersion: ScriptTarget, if (tokenFlags & TokenFlags.ContainsLeadingZero) { error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start, end - start); // if a literal has a leading zero, it must not be bigint - return { type: SyntaxKind.NumericLiteral, value: "" + +result }; + tokenValue = "" + +result; + return SyntaxKind.NumericLiteral; } if (decimalFragment !== undefined || tokenFlags & TokenFlags.Scientific) { checkForIdentifierStartAfterNumericLiteral(start, decimalFragment === undefined && !!(tokenFlags & TokenFlags.Scientific)); - return { - type: SyntaxKind.NumericLiteral, - value: "" + +result // if value is not an integer, it can be safely coerced to a number - }; + // if value is not an integer, it can be safely coerced to a number + tokenValue = "" + +result; + return SyntaxKind.NumericLiteral; } else { tokenValue = result; const type = checkBigIntSuffix(); // if value is an integer, check whether it is a bigint checkForIdentifierStartAfterNumericLiteral(start); - return { type, value: tokenValue }; + return type; } } @@ -1936,7 +1937,7 @@ export function createScanner(languageVersion: ScriptTarget, return token = SyntaxKind.MinusToken; case CharacterCodes.dot: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = scanNumber().value; + scanNumber(); return token = SyntaxKind.NumericLiteral; } if (text.charCodeAt(pos + 1) === CharacterCodes.dot && text.charCodeAt(pos + 2) === CharacterCodes.dot) { @@ -2064,8 +2065,7 @@ export function createScanner(languageVersion: ScriptTarget, case CharacterCodes._7: case CharacterCodes._8: case CharacterCodes._9: - ({ type: token, value: tokenValue } = scanNumber()); - return token; + return token = scanNumber(); case CharacterCodes.colon: pos++; return token = SyntaxKind.ColonToken; diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index ace8ed10678dc..db12d3a6dd96e 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -812,7 +812,7 @@ function createDirectoryWatcherSupportingRecursive({ } /** @internal */ -export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined, modifiedTime?: Date) => void; +export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined | null, modifiedTime?: Date) => void; /** @internal */ export type FsWatch = (fileOrDirectory: string, entryKind: FileSystemEntryKind, callback: FsWatchCallback, recursive: boolean, fallbackPollingInterval: PollingInterval, fallbackOptions: WatchOptions | undefined) => FileWatcher; /** @internal */ @@ -1205,7 +1205,7 @@ export function createSystemWatchFunctions({ } } - function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined) { + function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined | null) { // In some scenarios, file save operation fires event with fileName.ext~ instead of fileName.ext // To ensure we see the file going missing and coming back up (file delete and then recreated) // and watches being updated correctly we are calling back with fileName.ext as well as fileName.ext~ @@ -1578,7 +1578,7 @@ export let sys: System = (() => { disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, arg => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)), + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, arg => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!(process as any).recordreplay, tryEnableSourceMapsForHost() { try { (require("source-map-support") as typeof import("source-map-support")).install(); @@ -1711,7 +1711,7 @@ export let sys: System = (() => { function bufferFrom(input: string, encoding?: string): Buffer { // See https://github.com/Microsoft/TypeScript/issues/25652 - return Buffer.from && (Buffer.from as Function) !== Int8Array.from + return Buffer.from && Buffer.from !== Int8Array.from ? Buffer.from(input, encoding) : new Buffer(input, encoding); } diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index a6bf29119479c..f8c1ee5d5eeca 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -72,7 +72,7 @@ import { transformNodeModule, transformSystemModule, transformTypeScript, - VariableDeclaration, + VariableDeclaration } from "./_namespaces/ts"; import * as performance from "./_namespaces/ts.performance"; @@ -131,11 +131,6 @@ function getScriptTransformers(compilerOptions: CompilerOptions, customTransform if (compilerOptions.experimentalDecorators) { transformers.push(transformLegacyDecorators); } - else if (languageVersion < ScriptTarget.ESNext || !useDefineForClassFields) { - transformers.push(transformESDecorators); - } - - transformers.push(transformClassFields); if (getJSXTransformEnabled(compilerOptions)) { transformers.push(transformJsx); @@ -145,6 +140,12 @@ function getScriptTransformers(compilerOptions: CompilerOptions, customTransform transformers.push(transformESNext); } + if (!compilerOptions.experimentalDecorators && (languageVersion < ScriptTarget.ESNext || !useDefineForClassFields)) { + transformers.push(transformESDecorators); + } + + transformers.push(transformClassFields); + if (languageVersion < ScriptTarget.ES2021) { transformers.push(transformES2021); } diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 0faf191377a4a..7c7227697a985 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -20,6 +20,8 @@ import { ClassDeclaration, ClassElement, ClassExpression, + classHasClassThisAssignment, + classHasExplicitlyAssignedName, ClassLikeDeclaration, classOrConstructorParameterIsDecorated, ClassStaticBlockDeclaration, @@ -44,7 +46,7 @@ import { filter, find, findComputedPropertyNameCacheAssignment, - findSuperStatementIndex, + findSuperStatementIndexPath, flattenCommaList, ForStatement, GeneratedIdentifier, @@ -73,20 +75,23 @@ import { Identifier, InKeyword, InternalEmitFlags, + isAccessor, isAccessorModifier, isArrayBindingOrAssignmentElement, isArrayLiteralExpression, isArrowFunction, isAssignmentExpression, isAutoAccessorPropertyDeclaration, - isBindingName, + isBlock, isCallChain, isCallToHelper, + isCatchClause, isClassDeclaration, isClassElement, isClassExpression, - isClassLike, + isClassNamedEvaluationHelperBlock, isClassStaticBlockDeclaration, + isClassThisAssignmentBlock, isCommaExpression, isCompoundAssignment, isComputedPropertyName, @@ -95,7 +100,6 @@ import { isElementAccessExpression, isExportOrDefaultModifier, isExpression, - isExpressionStatement, isForInitializer, isGeneratedIdentifier, isGeneratedPrivateIdentifier, @@ -103,6 +107,7 @@ import { isGetAccessorDeclaration, isHeritageClause, isIdentifier, + isIdentifierText, isInitializedProperty, isLeftHandSideExpression, isMethodDeclaration, @@ -126,7 +131,6 @@ import { isPropertyAssignment, isPropertyDeclaration, isPropertyName, - isPropertyNameLiteral, isSetAccessor, isSetAccessorDeclaration, isShorthandPropertyAssignment, @@ -137,9 +141,11 @@ import { isStatement, isStatic, isStaticModifier, + isStringLiteral, isSuperProperty, isTemplateLiteral, isThisProperty, + isTryStatement, isVoidExpression, LeftHandSideExpression, LexicalEnvironment, @@ -152,6 +158,7 @@ import { moveRangePos, newPrivateEnvironment, Node, + NodeArray, NodeCheckFlags, NodeFactory, nodeIsSynthesized, @@ -160,7 +167,6 @@ import { OuterExpressionKinds, ParameterDeclaration, ParenthesizedExpression, - PartiallyEmittedExpression, PostfixUnaryExpression, PrefixUnaryExpression, PrivateEnvironment, @@ -202,6 +208,7 @@ import { ThisExpression, TransformationContext, TransformFlags, + transformNamedEvaluation, tryCast, tryGetTextOfPropertyName, unescapeLeadingUnderscores, @@ -216,7 +223,7 @@ import { visitNodes, Visitor, visitParameterList, - VisitResult, + VisitResult } from "../_namespaces/ts"; const enum ClassPropertySubstitutionFlags { @@ -414,8 +421,11 @@ export function transformClassFields(context: TransformationContext): (x: Source let lexicalEnvironment: LexicalEnv | undefined; const lexicalEnvironmentMap = new Map(); + // Nodes that should not be replaced during emit substitution. + const noSubstitution = new Set(); + let currentClassContainer: ClassLikeDeclaration | undefined; - let currentStaticPropertyDeclarationOrStaticBlock: PropertyDeclaration | ClassStaticBlockDeclaration | undefined; + let currentClassElement: ClassElement | undefined; let shouldSubstituteThisWithClassThis = false; let previousShouldSubstituteThisWithClassThis = false; @@ -458,7 +468,7 @@ export function transformClassFields(context: TransformationContext): (x: Source case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node as ClassDeclaration); case SyntaxKind.ClassExpression: - return visitClassExpression(node as ClassExpression, /*referencedName*/ undefined); + return visitClassExpression(node as ClassExpression); case SyntaxKind.ClassStaticBlockDeclaration: case SyntaxKind.PropertyDeclaration: return Debug.fail("Use `classElementVisitor` instead."); @@ -486,7 +496,7 @@ export function transformClassFields(context: TransformationContext): (x: Source case SyntaxKind.BinaryExpression: return visitBinaryExpression(node as BinaryExpression, /*discarded*/ false); case SyntaxKind.ParenthesizedExpression: - return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ false, /*referencedName*/ undefined); + return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ false); case SyntaxKind.CallExpression: return visitCallExpression(node as CallExpression); case SyntaxKind.ExpressionStatement: @@ -495,15 +505,23 @@ export function transformClassFields(context: TransformationContext): (x: Source return visitTaggedTemplateExpression(node as TaggedTemplateExpression); case SyntaxKind.ForStatement: return visitForStatement(node as ForStatement); + case SyntaxKind.ThisKeyword: + return visitThisExpression(node as ThisExpression); case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: + // If we are descending into a new scope, clear the current class element + return setCurrentClassElementAnd( + /*classElement*/ undefined, + fallbackVisitor, + node + ); case SyntaxKind.Constructor: case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: { - // If we are descending into a new scope, clear the current static property or block - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ undefined, + // If we are descending into a class element, set the class element + return setCurrentClassElementAnd( + node as ConstructorDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration, fallbackVisitor, node ); @@ -517,19 +535,6 @@ export function transformClassFields(context: TransformationContext): (x: Source return visitEachChild(node, visitor, context); } - function namedEvaluationVisitor(node: Node, referencedName: Expression): VisitResult { - switch (node.kind) { - case SyntaxKind.PartiallyEmittedExpression: - return visitPartiallyEmittedExpression(node as PartiallyEmittedExpression, /*discarded*/ false, referencedName); - case SyntaxKind.ParenthesizedExpression: - return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ false, referencedName); - case SyntaxKind.ClassExpression: - return visitClassExpression(node as ClassExpression, referencedName); - default: - return visitor(node); - } - } - /** * Visits a node in an expression whose result is discarded. */ @@ -543,7 +548,7 @@ export function transformClassFields(context: TransformationContext): (x: Source case SyntaxKind.CommaListExpression: return visitCommaListExpression(node as CommaListExpression, /*discarded*/ true); case SyntaxKind.ParenthesizedExpression: - return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ true, /*referencedName*/ undefined); + return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ true); default: return visitor(node); } @@ -582,21 +587,27 @@ export function transformClassFields(context: TransformationContext): (x: Source function classElementVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.Constructor: - return visitConstructorDeclaration(node as ConstructorDeclaration); + return setCurrentClassElementAnd( + node as ConstructorDeclaration, + visitConstructorDeclaration, + node as ConstructorDeclaration); case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: case SyntaxKind.MethodDeclaration: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ undefined, + return setCurrentClassElementAnd( + node as MethodDeclaration | AccessorDeclaration, visitMethodOrAccessorDeclaration, node as MethodDeclaration | AccessorDeclaration); case SyntaxKind.PropertyDeclaration: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ undefined, + return setCurrentClassElementAnd( + node as PropertyDeclaration, visitPropertyDeclaration, node as PropertyDeclaration); case SyntaxKind.ClassStaticBlockDeclaration: - return visitClassStaticBlockDeclaration(node as ClassStaticBlockDeclaration); + return setCurrentClassElementAnd( + node as ClassStaticBlockDeclaration, + visitClassStaticBlockDeclaration, + node as ClassStaticBlockDeclaration); case SyntaxKind.ComputedPropertyName: return visitComputedPropertyName(node as ComputedPropertyName); case SyntaxKind.SemicolonClassElement: @@ -676,9 +687,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, referencedName), isExpression); - return factory.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); @@ -697,13 +706,6 @@ export function transformClassFields(context: TransformationContext): (x: Source return statement; } - function getAssignedNameOfIdentifier(name: Identifier, initializer: Expression) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, ModifierFlags.Default) ? - factory.createStringLiteral("default") : - factory.createStringLiteralFromNode(name); - } - function visitVariableDeclaration(node: VariableDeclaration) { // 14.3.1.2 RS: Evaluation // LexicalBinding : BindingIdentifier Initializer @@ -720,10 +722,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateVariableDeclaration(node, name, /*exclamationToken*/ undefined, /*type*/ undefined, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); @@ -747,18 +746,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateParameterDeclaration( - node, - /*modifiers*/ undefined, - /*dotDotDotToken*/ undefined, - name, - /*questionToken*/ undefined, - /*type*/ undefined, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); @@ -782,11 +770,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateBindingElement(node, /*dotDotDotToken*/ undefined, propertyName, name, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); @@ -803,10 +787,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // is `""`. if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = factory.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation(context, node, /*ignoreEmptyStringLiteral*/ true, node.isExportEquals ? "" : "default"); } return visitEachChild(node, visitor, context); @@ -881,16 +862,19 @@ export function transformClassFields(context: TransformationContext): (x: Source return undefined; } - function setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - current: ClassStaticBlockDeclaration | PropertyDeclaration | undefined, + function setCurrentClassElementAnd( + classElement: ClassElement | undefined, visitor: (arg: T) => U, arg: T, ) { - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; - currentStaticPropertyDeclarationOrStaticBlock = current; - const result = visitor(arg); - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; - return result; + if (classElement !== currentClassElement) { + const savedCurrentClassElement = currentClassElement; + currentClassElement = classElement; + const result = visitor(arg); + currentClassElement = savedCurrentClassElement; + return result; + } + return visitor(arg); } function getHoistedFunctionName(node: MethodDeclaration | AccessorDeclaration) { @@ -1004,15 +988,7 @@ export function transformClassFields(context: TransformationContext): (x: Source } if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - return factory.updatePropertyDeclaration( - node, - visitNodes(node.modifiers, modifierVisitor, isModifier), - name, - /*questionOrExclamationToken*/ undefined, - /*type*/ undefined, - visitNode(node.initializer, child => namedEvaluationVisitor(child, referencedName), isExpression) - ); + node = transformNamedEvaluation(context, node); } return factory.updatePropertyDeclaration( @@ -1033,8 +1009,7 @@ export function transformClassFields(context: TransformationContext): (x: Source const expr = getPropertyNameExpressionIfNeeded( node.name, - /*shouldHoist*/ !!node.initializer || useDefineForClassFields, - /*captureReferencedName*/ isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)); + /*shouldHoist*/ !!node.initializer || useDefineForClassFields); if (expr) { getPendingExpressions().push(...flattenCommaList(expr)); } @@ -1095,8 +1070,31 @@ export function transformClassFields(context: TransformationContext): (x: Source return transformFieldInitializer(node); } + function shouldForceDynamicThis() { + return !!currentClassElement && + hasStaticModifier(currentClassElement) && + isAccessor(currentClassElement) && + isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement)); + } + + /** + * Prevent substitution of `this` to `_classThis` in static getters and setters that wrap `accessor` fields. + */ + function ensureDynamicThisIfNeeded(node: Expression) { + if (shouldForceDynamicThis()) { + // do not substitute `this` with `_classThis` when `this` + // should be bound dynamically. + const innerExpression = skipOuterExpressions(node); + if (innerExpression.kind === SyntaxKind.ThisKeyword) { + noSubstitution.add(innerExpression); + } + } + } + function createPrivateIdentifierAccess(info: PrivateIdentifierInfo, receiver: Expression): Expression { - return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression)); + receiver = visitNode(receiver, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); + return createPrivateIdentifierAccessHelper(info, receiver); } function createPrivateIdentifierAccessHelper(info: PrivateIdentifierInfo, receiver: Expression): Expression { @@ -1146,9 +1144,10 @@ export function transformClassFields(context: TransformationContext): (x: Source } } if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & ClassFacts.ClassWasDecorated) { @@ -1171,8 +1170,9 @@ export function transformClassFields(context: TransformationContext): (x: Source function visitElementAccessExpression(node: ElementAccessExpression) { if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(node) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & ClassFacts.ClassWasDecorated) { @@ -1203,6 +1203,7 @@ export function transformClassFields(context: TransformationContext): (x: Source let info: PrivateIdentifierInfo | undefined; if (info = accessPrivateIdentifier(operand.name)) { const receiver = visitNode(operand.expression, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); let expression: Expression = createPrivateIdentifierAccess(info, readExpression); @@ -1224,8 +1225,9 @@ export function transformClassFields(context: TransformationContext): (x: Source } } else if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(operand) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { // converts `++super.a` into `(Reflect.set(_baseTemp, "a", (_a = Reflect.get(_baseTemp, "a", _classTemp), _b = ++_a), _classTemp), _b)` // converts `++super[f()]` into `(Reflect.set(_baseTemp, _a = f(), (_b = Reflect.get(_baseTemp, _a, _classTemp), _c = ++_b), _classTemp), _c)` @@ -1299,6 +1301,9 @@ export function transformClassFields(context: TransformationContext): (x: Source function createCopiableReceiverExpr(receiver: Expression): { readExpression: Expression; initializeExpression: Expression | undefined } { const clone = nodeIsSynthesized(receiver) ? receiver : factory.cloneNode(receiver); + if (receiver.kind === SyntaxKind.ThisKeyword && noSubstitution.has(receiver)) { + noSubstitution.add(clone); + } if (isSimpleInlineableExpression(receiver)) { return { readExpression: clone, initializeExpression: undefined }; } @@ -1332,8 +1337,9 @@ export function transformClassFields(context: TransformationContext): (x: Source } if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(node.expression) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data?.classConstructor) { // super.x() // super[x]() @@ -1369,8 +1375,9 @@ export function transformClassFields(context: TransformationContext): (x: Source ); } if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(node.tag) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data?.classConstructor) { // converts `` super.f`x` `` into `` Reflect.get(_baseTemp, "f", _classTemp).bind(_classTemp)`x` `` @@ -1397,8 +1404,23 @@ export function transformClassFields(context: TransformationContext): (x: Source } if (shouldTransformPrivateElementsOrClassStaticBlocks) { + if (isClassThisAssignmentBlock(node)) { + const result = visitNode(node.body.statements[0].expression, visitor, isExpression); + // If the generated `_classThis` assignment is a noop (i.e., `_classThis = _classThis`), we can + // eliminate the expression + if (isAssignmentExpression(result, /*excludeCompoundAssignment*/ true) && + result.left === result.right) { + return undefined; + } + return result; + } + + if (isClassNamedEvaluationHelperBlock(node)) { + return visitNode(node.body.statements[0].expression, visitor, isExpression); + } + startLexicalEnvironment(); - let statements = setCurrentStaticPropertyDeclarationOrStaticBlockAnd( + let statements = setCurrentClassElementAnd( node, statements => visitNodes(statements, visitor, isStatement), node.body.statements @@ -1406,9 +1428,10 @@ export function transformClassFields(context: TransformationContext): (x: Source statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const iife = factory.createImmediatelyInvokedArrowFunction(statements); + setOriginalNode(skipParentheses(iife.expression), node); + addEmitFlags(skipParentheses(iife.expression), EmitFlags.AdviseOnEmitNode); setOriginalNode(iife, node); setTextRange(iife, node); - addEmitFlags(iife, EmitFlags.AdviseOnEmitNode); return iife; } } @@ -1416,14 +1439,8 @@ export function transformClassFields(context: TransformationContext): (x: Source function isAnonymousClassNeedingAssignedName(node: AnonymousFunctionDefinition) { if (isClassExpression(node) && !node.name) { const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const classStaticBlock = find(staticPropertiesOrClassStaticBlocks, isClassStaticBlockDeclaration); - if (classStaticBlock) { - for (const statement of classStaticBlock.body.statements) { - if (isExpressionStatement(statement) && - isCallToHelper(statement.expression, "___setFunctionName" as __String)) { - return false; - } - } + if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) { + return false; } const hasTransformableStatics = @@ -1485,10 +1502,8 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node); + Debug.assertNode(node, isAssignmentExpression); } const left = skipOuterExpressions(node.left, OuterExpressionKinds.PartiallyEmittedExpressions | OuterExpressionKinds.Parentheses); @@ -1506,8 +1521,9 @@ export function transformClassFields(context: TransformationContext): (x: Source } } else if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(node.left) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { // super.x = ... // super[x] = ... @@ -1593,7 +1609,7 @@ export function transformClassFields(context: TransformationContext): (x: Source return factory.updateCommaListExpression(node, elements); } - function visitParenthesizedExpression(node: ParenthesizedExpression, discarded: boolean, referencedName: Expression | undefined) { + function visitParenthesizedExpression(node: ParenthesizedExpression, discarded: boolean) { // 8.4.5 RS: NamedEvaluation // ParenthesizedExpression : `(` Expression `)` // ... @@ -1601,46 +1617,16 @@ export function transformClassFields(context: TransformationContext): (x: Source const visitorFunc: Visitor = discarded ? discardedValueVisitor : - referencedName ? node => namedEvaluationVisitor(node, referencedName) : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node: PartiallyEmittedExpression, discarded: boolean, referencedName: Expression | undefined) { - // Emulates 8.4.5 RS: NamedEvaluation - - const visitorFunc: Visitor = - discarded ? discardedValueVisitor : - referencedName ? node => namedEvaluationVisitor(node, referencedName) : - visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory.updatePartiallyEmittedExpression(node, expression); - } - - function visitReferencedPropertyName(node: PropertyName) { - if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) { - const referencedName = factory.createStringLiteralFromNode(node); - const name = visitNode(node, visitor, isPropertyName); - return { referencedName, name }; - } - - if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) { - const referencedName = factory.createStringLiteralFromNode(node.expression); - const name = visitNode(node, visitor, isPropertyName); - return { referencedName, name }; - } - - const referencedName = factory.createTempVariable(hoistVariableDeclaration); - const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression)); - const assignment = factory.createAssignment(referencedName, key); - const name = factory.updateComputedPropertyName(node, injectPendingExpressions(assignment)); - return { referencedName, name }; - } function createPrivateIdentifierAssignment(info: PrivateIdentifierInfo, receiver: Expression, right: Expression, operator: AssignmentOperator): Expression { receiver = visitNode(receiver, visitor, isExpression); right = visitNode(right, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); if (isCompoundAssignment(operator)) { const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); @@ -1697,6 +1683,9 @@ export function transformClassFields(context: TransformationContext): (x: Source if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= ClassFacts.ClassWasDecorated; } + if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) { + facts |= ClassFacts.NeedsClassConstructorReference; + } let containsPublicInstanceFields = false; let containsInitializedPublicInstanceFields = false; let containsInstancePrivateElements = false; @@ -1767,7 +1756,7 @@ export function transformClassFields(context: TransformationContext): (x: Source return visitEachChild(node, visitor, context); } - function visitInNewClassLexicalEnvironment(node: T, referencedName: Expression | undefined, visitor: (node: T, facts: ClassFacts, referencedName: Expression | undefined) => U) { + function visitInNewClassLexicalEnvironment(node: T, visitor: (node: T, facts: ClassFacts) => U) { const savedCurrentClassContainer = currentClassContainer; const savedPendingExpressions = pendingExpressions; const savedLexicalEnvironment = lexicalEnvironment; @@ -1781,6 +1770,22 @@ export function transformClassFields(context: TransformationContext): (x: Source if (name && isIdentifier(name)) { getPrivateIdentifierEnvironment().data.className = name; } + else if (node.emitNode?.assignedName) { + if (isStringLiteral(node.emitNode.assignedName)) { + // If the class name was assigned from a string literal based on an Identifier, use the Identifier + // as the prefix. + if (node.emitNode.assignedName.textSourceNode && + isIdentifier(node.emitNode.assignedName.textSourceNode)) { + getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; + } + // If the class name was assigned from a string literal that is a valid identifier, create an + // identifier from it. + else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { + const prefixName = factory.createIdentifier(node.emitNode.assignedName.text); + getPrivateIdentifierEnvironment().data.className = prefixName; + } + } + } } if (shouldTransformPrivateElementsOrClassStaticBlocks) { @@ -1802,7 +1807,7 @@ export function transformClassFields(context: TransformationContext): (x: Source enableSubstitutionForClassStaticThisOrSuperReference(); } - const result = visitor(node, facts, referencedName); + const result = visitor(node, facts); endClassLexicalEnvironment(); Debug.assert(lexicalEnvironment === savedLexicalEnvironment); currentClassContainer = savedCurrentClassContainer; @@ -1812,7 +1817,7 @@ export function transformClassFields(context: TransformationContext): (x: Source } function visitClassDeclaration(node: ClassDeclaration) { - return visitInNewClassLexicalEnvironment(node, /*referencedName*/ undefined, visitClassDeclarationInNewClassLexicalEnvironment); + return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment); } function visitClassDeclarationInNewClassLexicalEnvironment(node: ClassDeclaration, facts: ClassFacts) { @@ -1899,11 +1904,11 @@ export function transformClassFields(context: TransformationContext): (x: Source return statements; } - function visitClassExpression(node: ClassExpression, referencedName: Expression | undefined): Expression { - return visitInNewClassLexicalEnvironment(node, referencedName, visitClassExpressionInNewClassLexicalEnvironment); + function visitClassExpression(node: ClassExpression): Expression { + return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment); } - function visitClassExpressionInNewClassLexicalEnvironment(node: ClassExpression, facts: ClassFacts, referencedName: Expression | undefined): Expression { + function visitClassExpressionInNewClassLexicalEnvironment(node: ClassExpression, facts: ClassFacts): Expression { // If this class expression is a transformation of a decorated class declaration, // then we want to output the pendingExpressions as statements, not as inlined // expressions with the class statement. @@ -1931,9 +1936,8 @@ export function transformClassFields(context: TransformationContext): (x: Source } const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference = classCheckFlags & NodeCheckFlags.ClassWithConstructorReference; const requiresBlockScopedVar = classCheckFlags & NodeCheckFlags.BlockScopedBindingInLoop; - const temp = factory.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference); + const temp = factory.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, /*reservedInNestedScopes*/ true); getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp); return temp; } @@ -1949,7 +1953,7 @@ export function transformClassFields(context: TransformationContext): (x: Source const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); - let classExpression = factory.updateClassExpression( + const classExpression = factory.updateClassExpression( node, modifiers, node.name, @@ -1972,7 +1976,7 @@ export function transformClassFields(context: TransformationContext): (x: Source isPrivateIdentifierClassElementDeclaration(node) || shouldTransformInitializers && isInitializedProperty(node)); - if (hasTransformableStatics || some(pendingExpressions) || referencedName) { + if (hasTransformableStatics || some(pendingExpressions)) { if (isDecoratedClassDeclaration) { Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); @@ -1981,30 +1985,6 @@ export function transformClassFields(context: TransformationContext): (x: Source addRange(pendingStatements, map(pendingExpressions, factory.createExpressionStatement)); } - if (referencedName) { - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(temp ?? node.emitNode?.classThis ?? factory.getInternalName(node), referencedName); - pendingStatements.push(factory.createExpressionStatement(setNameExpression)); - } - else { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(factory.createThis(), referencedName); - classExpression = factory.updateClassExpression( - classExpression, - classExpression.modifiers, - classExpression.name, - classExpression.typeParameters, - classExpression.heritageClauses, [ - factory.createClassStaticBlockDeclaration( - factory.createBlock([ - factory.createExpressionStatement(setNameExpression) - ]) - ), - ...classExpression.members - ] - ); - } - } - if (some(staticPropertiesOrClassStaticBlocks)) { addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, node.emitNode?.classThis ?? factory.getInternalName(node)); } @@ -2033,9 +2013,6 @@ export function transformClassFields(context: TransformationContext): (x: Source // Add any pending expressions leftover from elided or relocated computed property names addRange(expressions, pendingExpressions); - if (referencedName) { - expressions.push(emitHelpers().createSetFunctionNameHelper(temp, referencedName)); - } addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp)); expressions.push(factory.cloneNode(temp)); } @@ -2062,6 +2039,17 @@ export function transformClassFields(context: TransformationContext): (x: Source return undefined; } + function visitThisExpression(node: ThisExpression) { + if (shouldTransformThisInStaticInitializers && currentClassElement && + isClassStaticBlockDeclaration(currentClassElement) && + lexicalEnvironment?.data) { + const { classThis, classConstructor } = lexicalEnvironment.data; + return classThis ?? classConstructor ?? node; + } + + return node; + } + function transformClassMembers(node: ClassDeclaration | ClassExpression) { const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & InternalEmitFlags.TransformPrivateStaticElements); @@ -2144,9 +2132,16 @@ export function transformClassFields(context: TransformationContext): (x: Source // and return a new array. if (syntheticConstructor || syntheticStaticBlock) { let membersArray: ClassElement[] | undefined; + const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock); + const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock); + membersArray = append(membersArray, classThisAssignmentBlock); + membersArray = append(membersArray, classNamedEvaluationHelperBlock); membersArray = append(membersArray, syntheticConstructor); membersArray = append(membersArray, syntheticStaticBlock); - membersArray = addRange(membersArray, members); + const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? + filter(members, member => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : + members; + membersArray = addRange(membersArray, remainingMembers); members = setTextRange(factory.createNodeArray(membersArray), /*location*/ node.members); } @@ -2203,6 +2198,66 @@ export function transformClassFields(context: TransformationContext): (x: Source ); } + function transformConstructorBodyWorker(statementsOut: Statement[], statementsIn: NodeArray, statementOffset: number, superPath: readonly number[], superPathDepth: number, initializerStatements: readonly Statement[], constructor: ConstructorDeclaration) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + statementOffset = superStatementIndex + 1; + if (isTryStatement(superStatement)) { + const tryBlockStatements: Statement[] = []; + + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ 0, + superPath, + superPathDepth + 1, + initializerStatements, + constructor); + + const tryBlockStatementsArray = factory.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + + statementsOut.push(factory.updateTryStatement( + superStatement, + factory.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock))); + } + else { + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, superStatementIndex, 1)); + + // Add the property initializers. Transforms this: + // + // public x = 1; + // + // Into this: + // + // constructor() { + // this.x = 1; + // } + // + // If we do useDefineForClassFields, they'll be converted elsewhere. + // We instead *remove* them from the transformed output at this stage. + + // parameter-property assignments should occur immediately after the prologue and `super()`, + // so only count the statements that immediately follow. + while (statementOffset < statementsIn.length) { + const statement = statementsIn[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } + else { + break; + } + } + + addRange(statementsOut, initializerStatements); + } + + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, statementOffset)); + } + function transformConstructorBody(node: ClassDeclaration | ClassExpression, constructor: ConstructorDeclaration | undefined, isDerivedClass: boolean) { const instanceProperties = getProperties(node, /*requireInitializer*/ false, /*isStatic*/ false); let properties = instanceProperties; @@ -2221,45 +2276,9 @@ export function transformClassFields(context: TransformationContext): (x: Source resumeLexicalEnvironment(); const needsSyntheticConstructor = !constructor && isDerivedClass; - let indexOfFirstStatementAfterSuperAndPrologue = 0; - let prologueStatementCount = 0; - let superStatementIndex = -1; + let statementOffset = 0; let statements: Statement[] = []; - if (constructor?.body?.statements) { - prologueStatementCount = factory.copyPrologue(constructor.body.statements, statements, /*ensureUseStrict*/ false, visitor); - superStatementIndex = findSuperStatementIndex(constructor.body.statements, prologueStatementCount); - - // If there was a super call, visit existing statements up to and including it - if (superStatementIndex >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1; - statements = [ - ...statements.slice(0, prologueStatementCount), - ...visitNodes(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), - ...statements.slice(prologueStatementCount), - ]; - } - else if (prologueStatementCount >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount; - } - } - - if (needsSyntheticConstructor) { - // Add a synthetic `super` call: - // - // super(...arguments); - // - statements.push( - factory.createExpressionStatement( - factory.createCallExpression( - factory.createSuper(), - /*typeArguments*/ undefined, - [factory.createSpreadElement(factory.createIdentifier("arguments"))] - ) - ) - ); - } - // Add the property initializers. Transforms this: // // public x = 1; @@ -2270,42 +2289,68 @@ export function transformClassFields(context: TransformationContext): (x: Source // this.x = 1; // } // - // If we do useDefineForClassFields, they'll be converted elsewhere. - // We instead *remove* them from the transformed output at this stage. - let parameterPropertyDeclarationCount = 0; - if (constructor?.body) { - // parameter-property assignments should occur immediately after the prologue and `super()`, - // so only count the statements that immediately follow. - for (let i = indexOfFirstStatementAfterSuperAndPrologue; i < constructor.body.statements.length; i++) { - const statement = constructor.body.statements[i]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - parameterPropertyDeclarationCount++; - } - else { - break; - } - } - if (parameterPropertyDeclarationCount > 0) { - indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount; - } - } - + const initializerStatements: Statement[] = []; const receiver = factory.createThis(); + // private methods can be called in property initializers, they should execute first. - addInstanceMethodStatements(statements, privateMethodsAndAccessors, receiver); + addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver); if (constructor) { const parameterProperties = filter(instanceProperties, prop => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); const nonParameterProperties = filter(properties, prop => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - addPropertyOrClassStaticBlockStatements(statements, parameterProperties, receiver); - addPropertyOrClassStaticBlockStatements(statements, nonParameterProperties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver); } else { - addPropertyOrClassStaticBlockStatements(statements, properties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver); } - // Add existing statements after the initial prologues and super call - if (constructor) { - addRange(statements, visitNodes(constructor.body!.statements, visitor, isStatement, indexOfFirstStatementAfterSuperAndPrologue)); + if (constructor?.body) { + statementOffset = factory.copyPrologue(constructor.body.statements, statements, /*ensureUseStrict*/ false, visitor); + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset); + if (superStatementIndices.length) { + transformConstructorBodyWorker( + statements, + constructor.body.statements, + statementOffset, + superStatementIndices, + /*superPathDepth*/ 0, + initializerStatements, + constructor + ); + } + else { + // parameter-property assignments should occur immediately after the prologue and `super()`, + // so only count the statements that immediately follow. + while (statementOffset < constructor.body.statements.length) { + const statement = constructor.body.statements[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } + else { + break; + } + } + addRange(statements, initializerStatements); + addRange(statements, visitNodes(constructor.body.statements, visitor, isStatement, statementOffset)); + } + } + else { + if (needsSyntheticConstructor) { + // Add a synthetic `super` call: + // + // super(...arguments); + // + statements.push( + factory.createExpressionStatement( + factory.createCallExpression( + factory.createSuper(), + /*typeArguments*/ undefined, + [factory.createSpreadElement(factory.createIdentifier("arguments"))] + ) + ) + ); + } + addRange(statements, initializerStatements); } statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment()); @@ -2353,7 +2398,7 @@ export function transformClassFields(context: TransformationContext): (x: Source function transformPropertyOrClassStaticBlock(property: PropertyDeclaration | ClassStaticBlockDeclaration, receiver: LeftHandSideExpression) { const expression = isClassStaticBlockDeclaration(property) ? - transformClassStaticBlockDeclaration(property) : + setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver); if (!expression) { return undefined; @@ -2398,7 +2443,9 @@ export function transformClassFields(context: TransformationContext): (x: Source function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks: readonly (PropertyDeclaration | ClassStaticBlockDeclaration)[], receiver: LeftHandSideExpression) { const expressions: Expression[] = []; for (const property of propertiesOrClassStaticBlocks) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? + setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : + setCurrentClassElementAnd(property, () => transformProperty(property, receiver), /*arg*/ undefined); if (!expression) { continue; } @@ -2420,7 +2467,7 @@ export function transformClassFields(context: TransformationContext): (x: Source * @param receiver The object receiving the property assignment. */ function transformProperty(property: PropertyDeclaration, receiver: LeftHandSideExpression) { - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; + const savedCurrentClassElement = currentClassElement; const transformed = transformPropertyWorker(property, receiver); if (transformed && hasStaticModifier(property) && lexicalEnvironment?.data?.facts) { // capture the lexical environment for the member @@ -2429,7 +2476,7 @@ export function transformClassFields(context: TransformationContext): (x: Source setSourceMapRange(transformed, getSourceMapRange(property.name)); lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment); } - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; + currentClassElement = savedCurrentClassElement; return transformed; } @@ -2437,17 +2484,8 @@ export function transformClassFields(context: TransformationContext): (x: Source // We generate a name here in order to reuse the value cached by the relocated computed name expression (which uses the same generated name) const emitAssignment = !useDefineForClassFields; - let referencedName: Expression | undefined; if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) { - if (isPropertyNameLiteral(property.name) || isPrivateIdentifier(property.name)) { - referencedName = factory.createStringLiteralFromNode(property.name); - } - else if (isPropertyNameLiteral(property.name.expression) && !isIdentifier(property.name.expression)) { - referencedName = factory.createStringLiteralFromNode(property.name.expression); - } - else { - referencedName = factory.getGeneratedNameForNode(property.name); - } + property = transformNamedEvaluation(context, property); } const propertyName = @@ -2458,13 +2496,9 @@ export function transformClassFields(context: TransformationContext): (x: Source property.name; if (hasStaticModifier(property)) { - currentStaticPropertyDeclarationOrStaticBlock = property; + currentClassElement = property; } - const initializerVisitor: Visitor = - referencedName ? child => namedEvaluationVisitor(child, referencedName!) : - visitor; - if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property as PrivateIdentifierPropertyDeclaration)) { const privateIdentifierInfo = accessPrivateIdentifier(propertyName); if (privateIdentifierInfo) { @@ -2473,7 +2507,7 @@ export function transformClassFields(context: TransformationContext): (x: Source return createPrivateInstanceFieldInitializer( factory, receiver, - visitNode(property.initializer, initializerVisitor, isExpression), + visitNode(property.initializer, visitor, isExpression), privateIdentifierInfo.brandCheckIdentifier ); } @@ -2481,7 +2515,7 @@ export function transformClassFields(context: TransformationContext): (x: Source return createPrivateStaticFieldInitializer( factory, privateIdentifierInfo.variableName, - visitNode(property.initializer, initializerVisitor, isExpression) + visitNode(property.initializer, visitor, isExpression) ); } } @@ -2502,7 +2536,7 @@ export function transformClassFields(context: TransformationContext): (x: Source return undefined; } - let initializer = visitNode(property.initializer, initializerVisitor, isExpression); + let initializer = visitNode(property.initializer, visitor, isExpression); if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) { // A parameter-property declaration always overrides the initializer. The only time a parameter-property // declaration *should* have an initializer is when decorators have added initializers that need to run before @@ -2613,10 +2647,10 @@ export function transformClassFields(context: TransformationContext): (x: Source * value of the result or the expression itself if the value is either unused or safe to inline into multiple locations * @param shouldHoist Does the expression need to be reused? (ie, for an initializer or a decorator) */ - function getPropertyNameExpressionIfNeeded(name: PropertyName, shouldHoist: boolean, captureReferencedName: boolean): Expression | undefined { + function getPropertyNameExpressionIfNeeded(name: PropertyName, shouldHoist: boolean): Expression | undefined { if (isComputedPropertyName(name)) { const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - let expression = visitNode(name.expression, visitor, isExpression); + const expression = visitNode(name.expression, visitor, isExpression); const innerExpression = skipPartiallyEmittedExpressions(expression); const inlinable = isSimpleInlineableExpression(innerExpression); const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left); @@ -2628,9 +2662,6 @@ export function transformClassFields(context: TransformationContext): (x: Source else { hoistVariableDeclaration(generatedName); } - if (captureReferencedName) { - expression = emitHelpers().createPropKeyHelper(expression); - } return factory.createAssignment(generatedName, expression); } return (inlinable || isIdentifier(innerExpression)) ? undefined : expression; @@ -2931,8 +2962,9 @@ export function transformClassFields(context: TransformationContext): (x: Source return wrapPrivateIdentifierForDestructuringTarget(node); } else if (shouldTransformSuperInStaticInitializers && + currentClassElement && isSuperProperty(node) && - currentStaticPropertyDeclarationOrStaticBlock && + isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && lexicalEnvironment?.data) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & ClassFacts.ClassWasDecorated) { @@ -2970,10 +3002,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const left = visitDestructuringAssignmentTarget(node.left); - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const right = visitNode(node.right, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateBinaryExpression(node, left, node.operatorToken, right) as AssignmentExpression; + node = transformNamedEvaluation(context, node); } if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) { const left = visitDestructuringAssignmentTarget(node.left); @@ -3038,9 +3067,7 @@ export function transformClassFields(context: TransformationContext): (x: Source // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateShorthandPropertyAssignment(node, node.name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); @@ -3164,6 +3191,7 @@ export function transformClassFields(context: TransformationContext): (x: Source */ function onSubstituteNode(hint: EmitHint, node: Node) { node = previousOnSubstituteNode(hint, node); + if (hint === EmitHint.Expression) { return substituteExpression(node as Expression); } @@ -3181,11 +3209,10 @@ export function transformClassFields(context: TransformationContext): (x: Source } function substituteThisExpression(node: ThisExpression) { - if (enabledSubstitutions & ClassPropertySubstitutionFlags.ClassStaticThisOrSuperReference && lexicalEnvironment?.data) { + if (enabledSubstitutions & ClassPropertySubstitutionFlags.ClassStaticThisOrSuperReference && + lexicalEnvironment?.data && + !noSubstitution.has(node)) { const { facts, classConstructor, classThis } = lexicalEnvironment.data; - if (facts & ClassFacts.ClassWasDecorated && legacyDecorators) { - return factory.createParenthesizedExpression(factory.createVoidZero()); - } const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor; if (substituteThis) { return setTextRange( @@ -3196,6 +3223,9 @@ export function transformClassFields(context: TransformationContext): (x: Source node ); } + if (facts & ClassFacts.ClassWasDecorated && legacyDecorators) { + return factory.createParenthesizedExpression(factory.createVoidZero()); + } } return node; } @@ -3264,3 +3294,11 @@ function isPrivateIdentifierInExpression(node: BinaryExpression): node is Privat return isPrivateIdentifier(node.left) && node.operatorToken.kind === SyntaxKind.InKeyword; } + +function isStaticPropertyDeclaration(node: Node): node is PropertyDeclaration { + return isPropertyDeclaration(node) && hasStaticModifier(node); +} + +function isStaticPropertyDeclarationOrClassStaticBlock(node: Node): node is ClassStaticBlockDeclaration | PropertyDeclaration { + return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration(node); +} \ No newline at end of file diff --git a/src/compiler/transformers/classThis.ts b/src/compiler/transformers/classThis.ts new file mode 100644 index 0000000000000..b03cd68144b09 --- /dev/null +++ b/src/compiler/transformers/classThis.ts @@ -0,0 +1,148 @@ +import { + AssignmentExpression, + Block, + ClassLikeDeclaration, + ClassStaticBlockDeclaration, + EqualsToken, + ExpressionStatement, + getOrCreateEmitNode, + Identifier, + isAssignmentExpression, + isClassDeclaration, + isClassStaticBlockDeclaration, + isExpressionStatement, + isIdentifier, + Node, + NodeArray, + NodeFactory, + setSourceMapRange, + setTextRange, + some, + Statement, + SyntaxKind, + ThisExpression +} from "../_namespaces/ts"; + +/** + * Creates a class `static {}` block used to assign the static `this` to a `_classThis` (or similar) variable. + * + * @param classThis The identifier to use for the captured static `this` reference, usually with the name `_classThis`. + * @param thisExpression Overrides the expression to use for the actual `this` reference. This can be used to provide an + * expression that has already had its `EmitFlags` set or may have been tracked to prevent substitution. + * @internal + */ +export function createClassThisAssignmentBlock(factory: NodeFactory, classThis: Identifier, thisExpression = factory.createThis()): ClassThisAssignmentBlock { + // produces: + // + // static { _classThis = this; } + // + + const expression = factory.createAssignment(classThis, thisExpression); + const statement = factory.createExpressionStatement(expression); + const body = factory.createBlock([statement], /*multiLine*/ false); + const block = factory.createClassStaticBlockDeclaration(body); + + // We use `emitNode.classThis` to indicate this is a `_classThis` assignment helper block + // and to stash the variable used for `_classThis`. + getOrCreateEmitNode(block).classThis = classThis; + + return block as ClassThisAssignmentBlock; +} + +/** @internal */ +export type ClassThisAssignmentBlock = ClassStaticBlockDeclaration & { + readonly body: Block & { + readonly statements: NodeArray & readonly [ + ExpressionStatement & { + readonly expression: AssignmentExpression & { + readonly left: Identifier; + readonly right: ThisExpression; + }; + } + ]; + }; +}; + +/** + * Gets whether a node is a `static {}` block containing only a single assignment of the static `this` to the `_classThis` + * (or similar) variable stored in the `classthis` property of the block's `EmitNode`. + * @internal + */ +export function isClassThisAssignmentBlock(node: Node): node is ClassThisAssignmentBlock { + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && + isAssignmentExpression(statement.expression, /*excludeCompoundAssignment*/ true) && + isIdentifier(statement.expression.left) && + node.emitNode?.classThis === statement.expression.left && + statement.expression.right.kind === SyntaxKind.ThisKeyword; +} + +/** + * Gets whether a `ClassLikeDeclaration` has a `static {}` block containing only a single assignment to a + * `_classThis` (or similar) variable. + * @internal + */ +export function classHasClassThisAssignment(node: ClassLikeDeclaration) { + return !!node.emitNode?.classThis && some(node.members, isClassThisAssignmentBlock); +} + +/** + * Injects a class `static {}` block containing only an assignment of the static `this` to a `_classThis` (or similar) + * variable. + * + * @param classThis The identifier to use for the captured static `this` reference, usually with the name `_classThis`. + * @param thisExpression Overrides the expression to use for the actual `this` reference. This can be used to provide an + * expression that has already had its `EmitFlags` set or may have been tracked to prevent substitution. + * @internal + */ +export function injectClassThisAssignmentIfMissing(factory: NodeFactory, node: T, + classThis: Identifier, thisExpression?: ThisExpression): Extract>; +export function injectClassThisAssignmentIfMissing(factory: NodeFactory, node: T, + classThis: Identifier, thisExpression?: ThisExpression) { + + // given: + // + // class C { + // } + // + // produces: + // + // class C { + // static { _classThis = this; } + // } + + if (classHasClassThisAssignment(node)) { + return node; + } + + const staticBlock = createClassThisAssignmentBlock(factory, classThis, thisExpression); + if (node.name) { + setSourceMapRange(staticBlock.body.statements[0], node.name); + } + + const members = factory.createNodeArray([staticBlock, ...node.members]); + setTextRange(members, node.members); + + const updatedNode = isClassDeclaration(node) ? + factory.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members) : + factory.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members); + + getOrCreateEmitNode(updatedNode).classThis = classThis; + return updatedNode; +} diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4be05fd79eb06..02e6acd9dd816 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -91,6 +91,7 @@ import { ImportTypeNode, IndexSignatureDeclaration, InterfaceDeclaration, + isAmbientModule, isAnyImportSyntax, isArray, isArrayBindingElement, @@ -150,7 +151,9 @@ import { isTypeParameterDeclaration, isTypeQueryNode, isUnparsedSource, + isVarAwaitUsing, isVariableDeclaration, + isVarUsing, last, LateBoundDeclaration, LateVisibilityPaintedStatement, @@ -161,8 +164,10 @@ import { MethodSignature, Modifier, ModifierFlags, + ModifierLike, ModuleBody, ModuleDeclaration, + ModuleName, NamedDeclaration, NamespaceDeclaration, needsScopeMarker, @@ -217,6 +222,7 @@ import { unescapeLeadingUnderscores, UnparsedSource, VariableDeclaration, + VariableDeclarationList, VariableStatement, visitArray, visitEachChild, @@ -1419,6 +1425,31 @@ export function transformDeclarations(context: TransformationContext) { return factory.updateModifiers(statement, modifiers); } + function updateModuleDeclarationAndKeyword( + node: ModuleDeclaration, + modifiers: readonly ModifierLike[] | undefined, + name: ModuleName, + body: ModuleBody | undefined + ) { + const updated = factory.updateModuleDeclaration(node, modifiers, name, body); + + if (isAmbientModule(updated) || updated.flags & NodeFlags.Namespace) { + return updated; + } + + const fixed = factory.createModuleDeclaration( + updated.modifiers, + updated.name, + updated.body, + updated.flags | NodeFlags.Namespace + ); + + setOriginalNode(fixed, updated); + setTextRange(fixed, updated); + + return fixed; + } + function transformTopLevelDeclaration(input: LateVisibilityPaintedStatement) { if (lateMarkedStatements) { while (orderedRemoveItem(lateMarkedStatements, input)); @@ -1595,7 +1626,8 @@ export function transformDeclarations(context: TransformationContext) { needsScopeFixMarker = oldNeedsScopeFix; resultHasScopeMarker = oldHasScopeFix; const mods = ensureModifiers(input); - return cleanup(factory.updateModuleDeclaration( + + return cleanup(updateModuleDeclarationAndKeyword( input, mods, isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, @@ -1611,7 +1643,7 @@ export function transformDeclarations(context: TransformationContext) { const id = getOriginalNodeId(inner!); // TODO: GH#18217 const body = lateStatementReplacementMap.get(id); lateStatementReplacementMap.delete(id); - return cleanup(factory.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, input.name, @@ -1763,7 +1795,19 @@ export function transformDeclarations(context: TransformationContext) { if (!forEach(input.declarationList.declarations, getBindingNameVisible)) return; const nodes = visitNodes(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); if (!length(nodes)) return; - return factory.updateVariableStatement(input, factory.createNodeArray(ensureModifiers(input)), factory.updateVariableDeclarationList(input.declarationList, nodes)); + + const modifiers = factory.createNodeArray(ensureModifiers(input)); + let declList: VariableDeclarationList; + if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) { + declList = factory.createVariableDeclarationList(nodes, NodeFlags.Const); + setOriginalNode(declList, input.declarationList); + setTextRange(declList, input.declarationList); + setCommentRange(declList, input.declarationList); + } + else { + declList = factory.updateVariableDeclarationList(input.declarationList, nodes); + } + return factory.updateVariableStatement(input, modifiers, declList); } function recreateBindingPattern(d: BindingPattern): VariableDeclaration[] { diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index a6e9222b4e8da..5e2b895a23498 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -39,11 +39,12 @@ import { elementAt, EmitFlags, EmitHint, - emptyArray, + every, Expression, ExpressionStatement, ExpressionWithTypeArguments, filter, + findSuperStatementIndexPath, first, firstOrUndefined, flatten, @@ -112,11 +113,13 @@ import { isIterationStatement, isLabeledStatement, isModifier, + isNumericLiteral, isObjectLiteralElementLike, + isObjectLiteralExpression, isOmittedExpression, isPackedArrayLiteral, isPrivateIdentifier, - isPrologueDirective, + isPropertyAssignment, isPropertyDeclaration, isPropertyName, isReturnStatement, @@ -129,6 +132,7 @@ import { isVariableDeclaration, isVariableDeclarationList, isVariableStatement, + isVoidExpression, isWithStatement, IterationStatement, LabeledStatement, @@ -186,7 +190,6 @@ import { SwitchStatement, SyntaxKind, TaggedTemplateExpression, - takeWhile, TemplateExpression, TextRange, TokenFlags, @@ -205,7 +208,7 @@ import { VisitResult, VoidExpression, WhileStatement, - YieldExpression, + YieldExpression } from "../_namespaces/ts"; const enum ES2015SubstitutionFlags { @@ -1188,6 +1191,190 @@ export function transformES2015(context: TransformationContext): (x: SourceFile return block; } + function transformConstructorBodyWorker( + prologueOut: Statement[], + statementsOut: Statement[], + statementsIn: NodeArray, + statementOffset: number, + superPath: readonly number[], + superPathDepth: number, + constructor: ConstructorDeclaration & { body: FunctionBody }, + isDerivedClass: boolean, + hasSynthesizedSuper: boolean, + isFirstStatement: boolean, + ): boolean { + let mayReplaceThis = false; + + const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; + const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; + + // find the index of the first statement material to evaluation + if (isFirstStatement && superStatementIndex >= 0) { + let firstMaterialIndex = statementOffset; + while (isFirstStatement && firstMaterialIndex < superStatementIndex) { + const statement = constructor.body.statements[firstMaterialIndex]; + if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) break; + firstMaterialIndex++; + } + + isFirstStatement = superStatementIndex === firstMaterialIndex; + } + + // visit everything prior to the statement containing `super()`. + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); + + const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : undefined; + if (superStatement && isTryStatement(superStatement)) { + const tryBlockStatements: Statement[] = []; + + mayReplaceThis = transformConstructorBodyWorker( + prologueOut, + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ 0, + superPath, + superPathDepth + 1, + constructor, + isDerivedClass, + hasSynthesizedSuper, + isFirstStatement); + + const tryBlockStatementsArray = factory.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + + statementsOut.push(factory.updateTryStatement( + superStatement, + factory.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock))); + } + else { + const superCall = superStatement && getSuperCallFromStatement(superStatement); + let superCallExpression: Expression | undefined; + if (hasSynthesizedSuper) { + superCallExpression = createDefaultSuperCallOrThis(); + hierarchyFacts |= HierarchyFacts.ConstructorWithCapturedSuper; + } + else if (superCall) { + superCallExpression = visitSuperCallInBody(superCall); + hierarchyFacts |= HierarchyFacts.ConstructorWithCapturedSuper; + } + + if (isDerivedClass || superCallExpression) { + if (superCallExpression && + superStatementIndex === statementsIn.length - 1 && + !(constructor.body.transformFlags & TransformFlags.ContainsLexicalThis)) { + // If the subclass constructor does *not* contain `this` and *ends* with a `super()` call, we will use the + // following representation: + // + // ``` + // // es2015 (source) + // class C extends Base { + // constructor() { + // super("foo"); + // } + // } + // + // // es5 (transformed) + // var C = (function (_super) { + // function C() { + // return _super.call(this, "foo") || this; + // } + // return C; + // })(Base); + // ``` + + const superCall = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); + const returnStatement = factory.createReturnStatement(superCallExpression); + setCommentRange(returnStatement, getCommentRange(superCall)); + setEmitFlags(superCall, EmitFlags.NoComments); + statementsOut.push(returnStatement); + return false; + } + else { + // Otherwise, we will use the following transformed representation for calls to `super()` in a constructor: + // + // ``` + // // es2015 (source) + // class C extends Base { + // constructor() { + // super("foo"); + // this.x = 1; + // } + // } + // + // // es5 (transformed) + // var C = (function (_super) { + // function C() { + // var _this = _super.call(this, "foo") || this; + // _this.x = 1; + // return _this; + // } + // return C; + // })(Base); + // ``` + + // If the super() call is the first statement, we can directly create and assign its result to `_this` + if (isFirstStatement) { + insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); + } + // Since the `super()` call isn't the first statement, it's split across 1-2 statements: + // * A prologue `var _this = this;`, in case the constructor accesses this before super() + // * If it exists, a reassignment to that `_this` of the super() call + else { + insertCaptureThisForNode(prologueOut, constructor, createActualThis()); + if (superCallExpression) { + addSuperThisCaptureThisForNode(statementsOut, superCallExpression); + } + } + + mayReplaceThis = true; + } + } + else { + // If a class is not derived from a base class or does not have a call to `super()`, `this` is only + // captured when necessitated by an arrow function capturing the lexical `this`: + // + // ``` + // // es2015 + // class C {} + // + // // es5 + // var C = (function () { + // function C() { + // } + // return C; + // })(); + // ``` + insertCaptureThisForNodeIfNeeded(prologueOut, constructor); + } + } + + // visit everything following the statement containing `super()`. + if (superStatementIndex >= 0) { + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + + return mayReplaceThis; + } + + function isUninitializedVariableStatement(node: Statement) { + return isVariableStatement(node) && every(node.declarationList.declarations, decl => isIdentifier(decl.name) && !decl.initializer); + } + + function isUsingDeclarationStateVariableStatement(node: Statement) { + if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) return false; + const varDecl = node.declarationList.declarations[0]; + if (!isIdentifier(varDecl.name) || !varDecl.initializer) return false; + const initializer = varDecl.initializer; + if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) return false; + const [stackProp, errorProp, hasErrorProp] = initializer.properties; + if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) return false; + if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) return false; + if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== SyntaxKind.FalseKeyword) return false; + return true; + } + /** * Transforms the body of a constructor declaration of a class. * @@ -1226,134 +1413,40 @@ export function transformES2015(context: TransformationContext): (x: SourceFile // In derived classes, there may be code before the necessary super() call // We'll remove pre-super statements to be tacked on after the rest of the body - const existingPrologue = takeWhile(constructor.body.statements, isPrologueDirective); - const { superCall, superStatementIndex } = findSuperCallAndStatementIndex(constructor.body.statements, existingPrologue); - const postSuperStatementsStart = superStatementIndex === -1 ? existingPrologue.length : superStatementIndex + 1; - - // If a super call has already been synthesized, - // we're going to assume that we should just transform everything after that. - // The assumption is that no prior step in the pipeline has added any prologue directives. - let statementOffset = postSuperStatementsStart; - if (!hasSynthesizedSuper) statementOffset = factory.copyStandardPrologue(constructor.body.statements, prologue, statementOffset, /*ensureUseStrict*/ false); - if (!hasSynthesizedSuper) statementOffset = factory.copyCustomPrologue(constructor.body.statements, statements, statementOffset, visitor, /*filter*/ undefined); - - // If there already exists a call to `super()`, visit the statement directly - let superCallExpression: Expression | undefined; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - } - else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - } - - if (superCallExpression) { + const standardPrologueEnd = factory.copyStandardPrologue(constructor.body.statements, prologue, /*statementOffset*/ 0); + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); + if (hasSynthesizedSuper || superStatementIndices.length > 0) { hierarchyFacts |= HierarchyFacts.ConstructorWithCapturedSuper; } + const mayReplaceThis = transformConstructorBodyWorker( + prologue, + statements, + constructor.body.statements, + standardPrologueEnd, + superStatementIndices, + /*superPathDepth*/ 0, + constructor, + isDerivedClass, + hasSynthesizedSuper, + /*isFirstStatement*/ true // NOTE: this will be recalculated inside of transformConstructorBodyWorker + ); + // Add parameter defaults at the beginning of the output, with prologue statements addDefaultValueAssignmentsIfNeeded(prologue, constructor); addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); - - // visit the remaining statements - addRange(statements, visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset)); - + insertCaptureNewTargetIfNeeded(prologue, constructor); factory.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded(prologue, constructor, /*copyOnWrite*/ false); - if (isDerivedClass || superCallExpression) { - if (superCallExpression && postSuperStatementsStart === constructor.body.statements.length && !(constructor.body.transformFlags & TransformFlags.ContainsLexicalThis)) { - // If the subclass constructor does *not* contain `this` and *ends* with a `super()` call, we will use the - // following representation: - // - // ``` - // // es2015 (source) - // class C extends Base { - // constructor() { - // super("foo"); - // } - // } - // - // // es5 (transformed) - // var C = (function (_super) { - // function C() { - // return _super.call(this, "foo") || this; - // } - // return C; - // })(Base); - // ``` - const superCall = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall)); - setEmitFlags(superCall, EmitFlags.NoComments); - statements.push(returnStatement); - } - else { - // Otherwise, we will use the following transformed representation for calls to `super()` in a constructor: - // - // ``` - // // es2015 (source) - // class C extends Base { - // constructor() { - // super("foo"); - // this.x = 1; - // } - // } - // - // // es5 (transformed) - // var C = (function (_super) { - // function C() { - // var _this = _super.call(this, "foo") || this; - // _this.x = 1; - // return _this; - // } - // return C; - // })(Base); - // ``` - - // If the super() call is the first statement, we can directly create and assign its result to `_this` - if (superStatementIndex <= existingPrologue.length) { - insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis()); - } - // Since the `super()` call isn't the first statement, it's split across 1-2 statements: - // * A prologue `var _this = this;`, in case the constructor accesses this before super() - // * If it exists, a reassignment to that `_this` of the super() call - else { - insertCaptureThisForNode(prologue, constructor, createActualThis()); - if (superCallExpression) { - insertSuperThisCaptureThisForNode(statements, superCallExpression); - } - } - - if (!isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory.createReturnStatement(factory.createUniqueName("_this", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel))); - } - } - } - else { - // If a class is not derived from a base class or does not have a call to `super()`, `this` is only - // captured when necessitated by an arrow function capturing the lexical `this`: - // - // ``` - // // es2015 - // class C {} - // - // // es5 - // var C = (function () { - // function C() { - // } - // return C; - // })(); - // ``` - insertCaptureThisForNodeIfNeeded(prologue, constructor); + if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { + statements.push(factory.createReturnStatement(factory.createUniqueName("_this", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel))); } const body = factory.createBlock( setTextRange( factory.createNodeArray( [ - ...existingPrologue, ...prologue, - ...(superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), ...statements ] ), @@ -1366,24 +1459,6 @@ export function transformES2015(context: TransformationContext): (x: SourceFile return body; } - function findSuperCallAndStatementIndex(originalBodyStatements: NodeArray, existingPrologue: Statement[]) { - for (let i = existingPrologue.length; i < originalBodyStatements.length; i += 1) { - const superCall = getSuperCallFromStatement(originalBodyStatements[i]); - if (superCall) { - // With a super() call, split the statements into pre-super() and 'body' (post-super()) - return { - superCall, - superStatementIndex: i, - }; - } - } - - // Since there was no super() call found, consider all statements to be in the main 'body' (post-super()) - return { - superStatementIndex: -1, - }; - } - /** * We want to try to avoid emitting a return statement in certain cases if a user already returned something. * It would generate obviously dead code, so we'll try to make things a little bit prettier @@ -1758,7 +1833,7 @@ export function transformES2015(context: TransformationContext): (x: SourceFile * @param statements Statements in the constructor body. * @param superExpression Existing `super()` call for the constructor. */ - function insertSuperThisCaptureThisForNode(statements: Statement[], superExpression: Expression): void { + function addSuperThisCaptureThisForNode(statements: Statement[], superExpression: Expression): void { enableSubstitutionsForCapturedThis(); const assignSuperExpression = factory.createExpressionStatement( factory.createBinaryExpression( @@ -1767,7 +1842,7 @@ export function transformES2015(context: TransformationContext): (x: SourceFile superExpression ) ); - insertStatementAfterCustomPrologue(statements, assignSuperExpression); + statements.push(assignSuperExpression); setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); } @@ -1789,7 +1864,7 @@ export function transformES2015(context: TransformationContext): (x: SourceFile insertStatementAfterCustomPrologue(statements, captureThisStatement); } - function insertCaptureNewTargetIfNeeded(statements: Statement[], node: FunctionLikeDeclaration, copyOnWrite: boolean): Statement[] { + function insertCaptureNewTargetIfNeeded(statements: Statement[], node: FunctionLikeDeclaration): Statement[] { if (hierarchyFacts & HierarchyFacts.NewTarget) { let newTarget: Expression; switch (node.kind) { @@ -1853,11 +1928,6 @@ export function transformES2015(context: TransformationContext): (x: SourceFile ); setEmitFlags(captureNewTargetStatement, EmitFlags.NoComments | EmitFlags.CustomPrologue); - - if (copyOnWrite) { - statements = statements.slice(); - } - insertStatementAfterCustomPrologue(statements, captureNewTargetStatement); } @@ -2232,7 +2302,7 @@ export function transformES2015(context: TransformationContext): (x: SourceFile } factory.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded(prologue, node, /*copyOnWrite*/ false); + insertCaptureNewTargetIfNeeded(prologue, node); insertCaptureThisForNodeIfNeeded(prologue, node); // If we added any final generated statements, this must be a multi-line block diff --git a/src/compiler/transformers/esDecorators.ts b/src/compiler/transformers/esDecorators.ts index cdb69e6298752..369c056a36a88 100644 --- a/src/compiler/transformers/esDecorators.ts +++ b/src/compiler/transformers/esDecorators.ts @@ -18,6 +18,7 @@ import { ClassDeclaration, ClassElement, ClassExpression, + classHasDeclaredOrExplicitlyAssignedName, ClassLikeDeclaration, classOrConstructorParameterIsDecorated, ClassStaticBlockDeclaration, @@ -36,7 +37,7 @@ import { Expression, ExpressionStatement, findComputedPropertyNameCacheAssignment, - findSuperStatementIndex, + findSuperStatementIndexPath, firstOrUndefined, forEachEntry, ForStatement, @@ -46,11 +47,9 @@ import { getAllDecoratorsOfClassElement, getCommentRange, getEffectiveBaseTypeNode, - getEmitScriptTarget, getFirstConstructorWithBody, getHeritageClause, getNonAssignmentOperatorForCompoundAssignment, - getOrCreateEmitNode, getOriginalNode, getSourceMapRange, hasAccessorModifier, @@ -60,6 +59,8 @@ import { HeritageClause, Identifier, idText, + injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing, InternalEmitFlags, isAmbientPropertyDeclaration, isArrayBindingOrAssignmentElement, @@ -70,15 +71,18 @@ import { isAutoAccessorPropertyDeclaration, isBindingName, isBlock, + isCatchClause, isClassElement, isClassExpression, isClassLike, + isClassNamedEvaluationHelperBlock, isClassStaticBlockDeclaration, + isClassThisAssignmentBlock, isCompoundAssignment, isComputedPropertyName, isDestructuringAssignment, isElementAccessExpression, - isEmptyStringLiteral, + isExportModifier, isExpression, isForInitializer, isFunctionExpression, @@ -118,6 +122,7 @@ import { isStringLiteral, isSuperProperty, isTemplateLiteral, + isTryStatement, LeftHandSideExpression, map, MethodDeclaration, @@ -156,6 +161,7 @@ import { setSourceMapRange, setTextRange, ShorthandPropertyAssignment, + singleOrMany, skipOuterExpressions, skipParentheses, some, @@ -168,6 +174,7 @@ import { ThisExpression, TransformationContext, TransformFlags, + transformNamedEvaluation, tryCast, VariableDeclaration, visitCommaListElements, @@ -177,6 +184,7 @@ import { visitNodes, Visitor, VisitResult, + WrappedExpression } from "../_namespaces/ts"; // Class/Decorator evaluation order, as it pertains to this transformer: @@ -220,6 +228,7 @@ interface ClassInfo { classExtraInitializersName?: Identifier; // used in step 13 classThis?: Identifier; // `_classThis`, if needed. classSuper?: Identifier; // `_classSuper`, if needed. + metadataReference: Identifier; memberInfos?: Map; // used in step 4.a, 12, and construction @@ -280,9 +289,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc hoistVariableDeclaration, } = context; - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - let top: LexicalEnvironmentStackEntry | undefined; let classInfo: ClassInfo | undefined; let classThis: Identifier | undefined; @@ -412,7 +418,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node as ClassDeclaration); case SyntaxKind.ClassExpression: - return visitClassExpression(node as ClassExpression, /*referencedName*/ undefined); + return visitClassExpression(node as ClassExpression); case SyntaxKind.Constructor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.ClassStaticBlockDeclaration: @@ -440,9 +446,9 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc case SyntaxKind.CommaListExpression: return visitCommaListExpression(node as CommaListExpression, /*discarded*/ false); case SyntaxKind.ParenthesizedExpression: - return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ false, /*referencedName*/ undefined); + return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ false); case SyntaxKind.PartiallyEmittedExpression: - return visitPartiallyEmittedExpression(node as PartiallyEmittedExpression, /*discarded*/ false, /*referencedName*/ undefined); + return visitPartiallyEmittedExpression(node as PartiallyEmittedExpression, /*discarded*/ false); case SyntaxKind.CallExpression: return visitCallExpression(node as CallExpression); case SyntaxKind.TaggedTemplateExpression: @@ -510,19 +516,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } } - function namedEvaluationVisitor(node: Node, referencedName: Expression): VisitResult { - switch (node.kind) { - case SyntaxKind.PartiallyEmittedExpression: - return visitPartiallyEmittedExpression(node as PartiallyEmittedExpression, /*discarded*/ false, referencedName); - case SyntaxKind.ParenthesizedExpression: - return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ false, referencedName); - case SyntaxKind.ClassExpression: - return visitClassExpression(node as ClassExpression, referencedName); - default: - return visitor(node); - } - } - function discardedValueVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.PrefixUnaryExpression: @@ -533,7 +526,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc case SyntaxKind.CommaListExpression: return visitCommaListExpression(node as CommaListExpression, /*discarded*/ true); case SyntaxKind.ParenthesizedExpression: - return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ true, /*referencedName*/ undefined); + return visitParenthesizedExpression(node as ParenthesizedExpression, /*discarded*/ true); default: return visitor(node); } @@ -571,6 +564,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } function createClassInfo(node: ClassLikeDeclaration): ClassInfo { + const metadataReference = factory.createUniqueName("_metadata", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); let instanceExtraInitializersName: Identifier | undefined; let staticExtraInitializersName: Identifier | undefined; let hasStaticInitializers = false; @@ -583,14 +577,16 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc for (const member of node.members) { if (isNamedClassElement(member) && nodeOrChildIsDecorated(/*useLegacyDecorators*/ false, member, node)) { if (hasStaticModifier(member)) { - staticExtraInitializersName ??= factory.createUniqueName("_staticExtraInitializers", GeneratedIdentifierFlags.Optimistic); + staticExtraInitializersName ??= factory.createUniqueName("_staticExtraInitializers", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); } else { - instanceExtraInitializersName ??= factory.createUniqueName("_instanceExtraInitializers", GeneratedIdentifierFlags.Optimistic); + instanceExtraInitializersName ??= factory.createUniqueName("_instanceExtraInitializers", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); } } if (isClassStaticBlockDeclaration(member)) { - hasStaticInitializers = true; + if (!isClassNamedEvaluationHelperBlock(member)) { + hasStaticInitializers = true; + } } else if (isPropertyDeclaration(member)) { if (hasStaticModifier(member)) { @@ -617,6 +613,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc return { class: node, + metadataReference, instanceExtraInitializersName, staticExtraInitializersName, hasStaticInitializers, @@ -625,21 +622,15 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc }; } - function containsLexicalSuperInStaticInitializer(node: ClassLikeDeclaration) { - for (const member of node.members) { - if (isClassStaticBlockDeclaration(member) || - isPropertyDeclaration(member) && hasStaticModifier(member)) { - if (member.transformFlags & TransformFlags.ContainsLexicalSuper) { - return true; - } - } - } - return false; - } - - function transformClassLike(node: ClassLikeDeclaration, className: Expression) { + function transformClassLike(node: ClassLikeDeclaration) { startLexicalEnvironment(); + // When a class has class decorators we end up transforming it into a statement that would otherwise give it an + // assigned name. If the class doesn't have an assigned name, we'll give it an assigned name of `""`) + if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated(/*useLegacyDecorators*/ false, node)) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory.createStringLiteral("")); + } + const classReference = factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false, /*ignoreAssignedName*/ true); const classInfo = createClassInfo(node); const classDefinitionStatements: Statement[] = []; @@ -658,10 +649,15 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // of the mutated class. // - Since a class decorator can add extra initializers, we must define a variable to keep track of // extra initializers. - classInfo.classDecoratorsName = factory.createUniqueName("_classDecorators", GeneratedIdentifierFlags.Optimistic); - classInfo.classDescriptorName = factory.createUniqueName("_classDescriptor", GeneratedIdentifierFlags.Optimistic); - classInfo.classExtraInitializersName = factory.createUniqueName("_classExtraInitializers", GeneratedIdentifierFlags.Optimistic); - classInfo.classThis = factory.createUniqueName("_classThis", GeneratedIdentifierFlags.Optimistic); + classInfo.classDecoratorsName = factory.createUniqueName("_classDecorators", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); + classInfo.classDescriptorName = factory.createUniqueName("_classDescriptor", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); + classInfo.classExtraInitializersName = factory.createUniqueName("_classExtraInitializers", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); + // We do not mark _classThis as FileLevel if it may be reused by class private fields, which requires the + // ability access the captured `_classThis` of outer scopes. + const needsUniqueClassThis = some(node.members, member => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); + classInfo.classThis = factory.createUniqueName("_classThis", needsUniqueClassThis ? + GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.ReservedInNestedScopes : + GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); classDefinitionStatements.push( createLet(classInfo.classDecoratorsName, factory.createArrayLiteralExpression(classDecorators)), createLet(classInfo.classDescriptorName), @@ -676,46 +672,33 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } // Rewrite `super` in static initializers so that we can use the correct `this`. - if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo.classSuper = factory.createUniqueName("_classSuper", GeneratedIdentifierFlags.Optimistic); + const extendsClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); + const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); + if (extendsExpression) { + classInfo.classSuper = factory.createUniqueName("_classSuper", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); // Ensure we do not give the class or function an assigned name due to the variable by prefixing it // with `0, `. - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = - isClassExpression(unwrapped) && !unwrapped.name || - isFunctionExpression(unwrapped) && !unwrapped.name || - isArrowFunction(unwrapped) ? - factory.createComma(factory.createNumericLiteral(0), extendsExpression) : - extendsExpression; - classDefinitionStatements.push(createLet(classInfo.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory.updateExpressionWithTypeArguments(extendsElement, classInfo.classSuper, /*typeArguments*/ undefined); - const updatedExtendsClause = factory.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory.createNodeArray([updatedExtendsClause]); - } - } - else { - // 2. ClassHeritage clause is evaluated outside of the private name scope of the class. - heritageClauses = visitNodes(node.heritageClauses, visitor, isHeritageClause); + const unwrapped = skipOuterExpressions(extendsExpression); + const safeExtendsExpression = + isClassExpression(unwrapped) && !unwrapped.name || + isFunctionExpression(unwrapped) && !unwrapped.name || + isArrowFunction(unwrapped) ? + factory.createComma(factory.createNumericLiteral(0), extendsExpression) : + extendsExpression; + classDefinitionStatements.push(createLet(classInfo.classSuper, safeExtendsExpression)); + const updatedExtendsElement = factory.updateExpressionWithTypeArguments(extendsElement, classInfo.classSuper, /*typeArguments*/ undefined); + const updatedExtendsClause = factory.updateHeritageClause(extendsClause, [updatedExtendsElement]); + heritageClauses = factory.createNodeArray([updatedExtendsClause]); } const renamedClassThis = classInfo.classThis ?? factory.createThis(); // 3. The name of the class is assigned. // - // If the class did not have a name, set the assigned name as if from NamedEvaluation. - // We don't need to use the assigned name if it consists of the empty string and the transformed class - // expression won't get its name from any other source (such as the variable we create to handle - // class decorators) - const needsSetNameHelper = !getOriginalNode(node, isClassLike)?.name && (classDecorators || !isStringLiteral(className) || !isEmptyStringLiteral(className)); - if (needsSetNameHelper) { - const setNameExpr = emitHelpers().createSetFunctionNameHelper(factory.createThis(), className); - leadingBlockStatements = append(leadingBlockStatements, factory.createExpressionStatement(setNameExpr)); - } + // If the class did not have a name, the caller should have performed injectClassNamedEvaluationHelperBlockIfMissing + // prior to calling this function if a name was needed. // 4. For each member: // a. Member Decorators are evaluated @@ -726,8 +709,10 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // - The second pass visits the constructor to add instance initializers. // // NOTE: If there are no constructors, but there are instance initializers, a synthetic constructor is added. - enterClass(classInfo); + + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo.metadataReference, classInfo.classSuper)); + let members = visitNodes(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { let outerThis: Identifier | undefined; @@ -841,16 +826,17 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc if (classInfo.classDescriptorName && classInfo.classDecoratorsName && classInfo.classExtraInitializersName && classInfo.classThis) { leadingBlockStatements ??= []; - // __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, _classExtraInitializers); - const valueProperty = factory.createPropertyAssignment("value", factory.createThis()); + // produces: + // __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name, metadata }, _classExtraInitializers); + const valueProperty = factory.createPropertyAssignment("value", renamedClassThis); const classDescriptor = factory.createObjectLiteralExpression([valueProperty]); const classDescriptorAssignment = factory.createAssignment(classInfo.classDescriptorName, classDescriptor); - const classNameReference = factory.createPropertyAccessExpression(factory.createThis(), "name"); + const classNameReference = factory.createPropertyAccessExpression(renamedClassThis, "name"); const esDecorateHelper = emitHelpers().createESDecorateHelper( factory.createNull(), classDescriptorAssignment, classInfo.classDecoratorsName, - { kind: "class", name: classNameReference }, + { kind: "class", name: classNameReference, metadata: classInfo.metadataReference }, factory.createNull(), classInfo.classExtraInitializersName ); @@ -858,6 +844,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc setSourceMapRange(esDecorateStatement, moveRangePastDecorators(node)); leadingBlockStatements.push(esDecorateStatement); + // produces: // C = _classThis = _classDescriptor.value; const classDescriptorValueReference = factory.createPropertyAccessExpression(classInfo.classDescriptorName, "value"); const classThisAssignment = factory.createAssignment(classInfo.classThis, classDescriptorValueReference); @@ -865,6 +852,9 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc leadingBlockStatements.push(factory.createExpressionStatement(classReferenceAssignment)); } + // if (metadata) Object.defineProperty(C, Symbol.metadata, { configurable: true, writable: true, value: metadata }); + leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo.metadataReference)); + // 11. Static extra initializers are evaluated if (classInfo.staticExtraInitializersName) { const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo.staticExtraInitializersName); @@ -889,43 +879,60 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc trailingBlockStatements = undefined; } - let newMembers: readonly ClassElement[] = members; + // prepare a leading `static {}` block, if necessary + // + // produces: + // class C { + // static { ... } + // ... + // } + const leadingStaticBlock = leadingBlockStatements && + factory.createClassStaticBlockDeclaration(factory.createBlock(leadingBlockStatements, /*multiLine*/ true)); + + if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) { + // We use `InternalEmitFlags.TransformPrivateStaticElements` as a marker on a class static block + // to inform the classFields transform that it shouldn't rename `this` to `_classThis` in the + // transformed class static block. + setInternalEmitFlags(leadingStaticBlock, InternalEmitFlags.TransformPrivateStaticElements); + } + + // prepare a trailing `static {}` block, if necessary + // + // produces: + // class C { + // ... + // static { ... } + // } + const trailingStaticBlock = trailingBlockStatements && + factory.createClassStaticBlockDeclaration(factory.createBlock(trailingBlockStatements, /*multiLine*/ true)); + + if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) { + const newMembers: ClassElement[] = []; - // insert a leading `static {}` block, if necessary - if (leadingBlockStatements) { - // class C { - // static { ... } - // ... - // } - const leadingStaticBlockBody = factory.createBlock(leadingBlockStatements, /*multiLine*/ true); - const leadingStaticBlock = factory.createClassStaticBlockDeclaration(leadingStaticBlockBody); - if (shouldTransformPrivateStaticElementsInClass) { - // We use `InternalEmitFlags.TransformPrivateStaticElements` as a marker on a class static block - // to inform the classFields transform that it shouldn't rename `this` to `_classThis` in the - // transformed class static block. - setInternalEmitFlags(leadingStaticBlock, InternalEmitFlags.TransformPrivateStaticElements); + // add the NamedEvaluation helper block, if needed + const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock); + + // add the leading `static {}` block + if (leadingStaticBlock) { + // add the `static {}` block after any existing NamedEvaluation helper block, if one exists. + addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1); + newMembers.push(leadingStaticBlock); + addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1); + } + else { + addRange(newMembers, members); } - newMembers = [leadingStaticBlock, ...newMembers]; - } - // append the synthetic constructor, if necessary - if (syntheticConstructor) { - newMembers = [...newMembers, syntheticConstructor]; - } + // append the synthetic constructor, if necessary + if (syntheticConstructor) { + newMembers.push(syntheticConstructor); + } - // append a trailing `static {}` block, if necessary - if (trailingBlockStatements) { - // class C { - // ... - // static { ... } - // } - const trailingStaticBlockBody = factory.createBlock(trailingBlockStatements, /*multiLine*/ true); - const trailingStaticBlock = factory.createClassStaticBlockDeclaration(trailingStaticBlockBody); - newMembers = [...newMembers, trailingStaticBlock]; - } + // append a trailing `static {}` block, if necessary + if (trailingStaticBlock) { + newMembers.push(trailingStaticBlock); + } - // Update members with newly added members. - if (newMembers !== members) { members = setTextRange(factory.createNodeArray(newMembers), members); } @@ -935,6 +942,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // We use `var` instead of `let` so we can leverage NamedEvaluation to define the class name // and still be able to ensure it is initialized prior to any use in `static {}`. + // produces: // (() => { // let _classDecorators = [...]; // let _classDescriptor; @@ -955,6 +963,10 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // })(); classExpression = factory.createClassExpression(/*modifiers*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, heritageClauses, members); + if (classInfo.classThis) { + classExpression = injectClassThisAssignmentIfMissing(factory, classExpression, classInfo.classThis); + } + const classReferenceDeclaration = factory.createVariableDeclaration(classReference, /*exclamationToken*/ undefined, /*type*/ undefined, classExpression); const classReferenceVarDeclList = factory.createVariableDeclarationList([classReferenceDeclaration]); const returnExpr = classInfo.classThis ? factory.createAssignment(classReference, classInfo.classThis) : classReference; @@ -964,6 +976,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc ); } else { + // produces: // return ; classExpression = factory.createClassExpression(/*modifiers*/ undefined, node.name, /*typeParameters*/ undefined, heritageClauses, members); classDefinitionStatements.push(factory.createReturnStatement(classExpression)); @@ -979,7 +992,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } setOriginalNode(classExpression, node); - getOrCreateEmitNode(classExpression).classThis = classInfo.classThis; return factory.createImmediatelyInvokedArrowFunction(factory.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment)); } @@ -990,37 +1002,64 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc function visitClassDeclaration(node: ClassDeclaration): VisitResult { if (isDecoratedClassLike(node)) { - if (hasSyntacticModifier(node, ModifierFlags.Export) && - hasSyntacticModifier(node, ModifierFlags.Default)) { - // export default (() => { ... })(); - const originalClass = getOriginalNode(node, isClassLike) ?? node; - const className = originalClass.name ? factory.createStringLiteralFromNode(originalClass.name) : factory.createStringLiteral("default"); - const iife = transformClassLike(node, className); - const statement = factory.createExportDefault(iife); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - setSourceMapRange(statement, moveRangePastDecorators(node)); - return statement; + const statements: Statement[] = []; + const originalClass = getOriginalNode(node, isClassLike) ?? node; + const className = originalClass.name ? factory.createStringLiteralFromNode(originalClass.name) : factory.createStringLiteral("default"); + const isExport = hasSyntacticModifier(node, ModifierFlags.Export); + const isDefault = hasSyntacticModifier(node, ModifierFlags.Default); + if (!node.name) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); + } + if (isExport && isDefault) { + const iife = transformClassLike(node); + if (node.name) { + // let C = (() => { ... })(); + // export default C; + const varDecl = factory.createVariableDeclaration(factory.getLocalName(node), /*exclamationToken*/ undefined, /*type*/ undefined, iife); + setOriginalNode(varDecl, node); + + const varDecls = factory.createVariableDeclarationList([varDecl], NodeFlags.Let); + const varStatement = factory.createVariableStatement(/*modifiers*/ undefined, varDecls); + statements.push(varStatement); + + const exportStatement = factory.createExportDefault(factory.getDeclarationName(node)); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } + else { + // export default (() => { ... })(); + const exportStatement = factory.createExportDefault(iife); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } } else { // let C = (() => { ... })(); Debug.assertIsDefined(node.name, "A class declaration that is not a default export must have a name."); - const iife = transformClassLike(node, factory.createStringLiteralFromNode(node.name)); - const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); - // When we transform to ES5/3 this will be moved inside an IIFE and should reference the name - // without any block-scoped variable collision handling - const declName = languageVersion <= ScriptTarget.ES2015 ? - factory.getInternalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true) : - factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); + const iife = transformClassLike(node); + const modifierVisitorNoExport = isExport ? ((node: ModifierLike) => isExportModifier(node) ? undefined : modifierVisitor(node)) : modifierVisitor; + const modifiers = visitNodes(node.modifiers, modifierVisitorNoExport, isModifier); + const declName = factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); const varDecl = factory.createVariableDeclaration(declName, /*exclamationToken*/ undefined, /*type*/ undefined, iife); setOriginalNode(varDecl, node); const varDecls = factory.createVariableDeclarationList([varDecl], NodeFlags.Let); - const statement = factory.createVariableStatement(modifiers, varDecls); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - return statement; + const varStatement = factory.createVariableStatement(modifiers, varDecls); + setOriginalNode(varStatement, node); + setCommentRange(varStatement, getCommentRange(node)); + statements.push(varStatement); + if (isExport) { + // export { C }; + const exportStatement = factory.createExternalModuleExport(declName); + setOriginalNode(exportStatement, node); + statements.push(exportStatement); + } } + return singleOrMany(statements); } else { const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); @@ -1032,10 +1071,9 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } } - function visitClassExpression(node: ClassExpression, referencedName: Expression | undefined) { + function visitClassExpression(node: ClassExpression) { if (isDecoratedClassLike(node)) { - const className = node.name ? factory.createStringLiteralFromNode(node.name) : referencedName ?? factory.createStringLiteral(""); - const iife = transformClassLike(node, className); + const iife = transformClassLike(node); setOriginalNode(iife, node); return iife; } @@ -1072,6 +1110,37 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc } } + function transformConstructorBodyWorker(statementsOut: Statement[], statementsIn: NodeArray, statementOffset: number, superPath: readonly number[], superPathDepth: number, initializerStatements: readonly Statement[]) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements: Statement[] = []; + + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ 0, + superPath, + superPathDepth + 1, + initializerStatements); + + const tryBlockStatementsArray = factory.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + + statementsOut.push(factory.updateTryStatement( + superStatement, + factory.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock))); + } + else { + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + function visitConstructorDeclaration(node: ConstructorDeclaration) { enterClassElement(node); const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); @@ -1084,11 +1153,9 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc if (initializerStatements) { const statements: Statement[] = []; const nonPrologueStart = factory.copyPrologue(node.body.statements, statements, /*ensureUseStrict*/ false, visitor); - const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart); - if (superStatementIndex >= 0) { - addRange(statements, visitNodes(node.body.statements, visitor, isStatement, nonPrologueStart, superStatementIndex + 1 - nonPrologueStart)); - addRange(statements, initializerStatements); - addRange(statements, visitNodes(node.body.statements, visitor, isStatement, superStatementIndex + 1)); + const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart); + if (superStatementIndices.length > 0) { + transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements); } else { addRange(statements, initializerStatements); @@ -1119,7 +1186,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc TNode extends MethodDeclaration | PropertyDeclaration | GetAccessorDeclaration | SetAccessorDeclaration, >( member: TNode, - useNamedEvaluation: boolean, classInfo: ClassInfo | undefined, createDescriptor?: (node: TNode & { readonly name: PrivateIdentifier }, modifiers: ModifiersArray | undefined) => Expression ) { @@ -1131,12 +1197,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc if (!classInfo) { const modifiers = visitNodes(member.modifiers, modifierVisitor, isModifier); enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } - else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); return { modifiers, referencedName, name, initializersName, descriptorName, thisArg }; } @@ -1212,11 +1273,12 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) }, + metadata: classInfo.metadataReference, }; const extraInitializers = isStatic(member) ? - classInfo.staticExtraInitializersName ??= factory.createUniqueName("_staticExtraInitializers", GeneratedIdentifierFlags.Optimistic) : - classInfo.instanceExtraInitializersName ??= factory.createUniqueName("_instanceExtraInitializers", GeneratedIdentifierFlags.Optimistic); + classInfo.staticExtraInitializersName ??= factory.createUniqueName("_staticExtraInitializers", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel) : + classInfo.instanceExtraInitializersName ??= factory.createUniqueName("_instanceExtraInitializers", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); if (isMethodOrAccessor(member)) { // __esDecorate(this, null, _static_member_decorators, { kind: "method", name: "...", static: true, private: false, access: { ... } }, _staticExtraInitializers); @@ -1278,12 +1340,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc if (name === undefined) { enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } - else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); } @@ -1298,7 +1355,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc function visitMethodDeclaration(node: MethodDeclaration) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement(node, /*useNamedEvaluation*/ false, classInfo, createMethodDescriptorObject); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); @@ -1313,7 +1370,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc function visitGetAccessorDeclaration(node: GetAccessorDeclaration) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement(node, /*useNamedEvaluation*/ false, classInfo, createGetAccessorDescriptorObject); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -1328,7 +1385,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc function visitSetAccessorDeclaration(node: SetAccessorDeclaration) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement(node, /*useNamedEvaluation*/ false, classInfo, createSetAccessorDescriptorObject); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -1344,14 +1401,30 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc function visitClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration) { enterClassElement(node); - if (classInfo) classInfo.hasStaticInitializers = true; - const result = visitEachChild(node, visitor, context); + let result: ClassStaticBlockDeclaration; + if (isClassNamedEvaluationHelperBlock(node)) { + result = visitEachChild(node, visitor, context); + } + else if (isClassThisAssignmentBlock(node)) { + const savedClassThis = classThis; + classThis = undefined; + result = visitEachChild(node, visitor, context); + classThis = savedClassThis; + } + else { + if (classInfo) classInfo.hasStaticInitializers = true; + result = visitEachChild(node, visitor, context); + } exitClassElement(); return result; } function visitPropertyDeclaration(node: PropertyDeclaration) { + if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); + } + enterClassElement(node); // TODO(rbuckton): We support decorating `declare x` fields with legacyDecorators, but we currently don't @@ -1366,15 +1439,11 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // a. Let _value_ be ? NamedEvaluation of |Initializer| with argument _functionObject_.[[ClassFieldInitializerName]]. // ... - const useNamedEvaluation = isNamedEvaluation(node, isAnonymousClassNeedingAssignedName); - const { modifiers, name, referencedName, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, useNamedEvaluation, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : undefined); + const { modifiers, name, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : undefined); startLexicalEnvironment(); - let initializer = referencedName ? - visitNode(node.initializer, node => namedEvaluationVisitor(node, referencedName), isExpression): - visitNode(node.initializer, visitor, isExpression); - + let initializer = visitNode(node.initializer, visitor, isExpression); if (initializersName) { initializer = emitHelpers().createRunInitializersHelper( thisArg ?? factory.createThis(), @@ -1542,32 +1611,20 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // i. Set _v_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. // ... - let updated: ParameterDeclaration; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - updated = factory.updateParameterDeclaration( - node, - /*modifiers*/ undefined, - /*dotDotDotToken*/ undefined, - name, - /*questionToken*/ undefined, - /*type*/ undefined, - initializer); - } - else { - updated = factory.updateParameterDeclaration( - node, - /*modifiers*/ undefined, - node.dotDotDotToken, - visitNode(node.name, visitor, isBindingName), - /*questionToken*/ undefined, - /*type*/ undefined, - visitNode(node.initializer, visitor, isExpression) - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } + const updated = factory.updateParameterDeclaration( + node, + /*modifiers*/ undefined, + node.dotDotDotToken, + visitNode(node.name, visitor, isBindingName), + /*questionToken*/ undefined, + /*type*/ undefined, + visitNode(node.initializer, visitor, isExpression) + ); + if (updated !== node) { // While we emit the source map for the node after skipping decorators and modifiers, // we need to emit the comments for the original range. @@ -1583,6 +1640,16 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc return isClassExpression(node) && !node.name && isDecoratedClassLike(node); } + function canIgnoreEmptyStringLiteralInAssignedName(node: WrappedExpression) { + // The IIFE produced for `(@dec class {})` will result in an assigned name of the form + // `var class_1 = class { };`, and thus the empty string cannot be ignored. However, The IIFE + // produced for `(class { @dec x; })` will not result in an assigned name since it + // transforms to `return class { };`, and thus the empty string *can* be ignored. + + const innerExpression = skipOuterExpressions(node); + return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated(/*useLegacyDecorators*/ false, innerExpression); + } + function visitForStatement(node: ForStatement) { return factory.updateForStatement( node, @@ -1632,10 +1699,8 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); + return visitEachChild(node, visitor, context); } if (isSuperProperty(node.left) && classThis && classSuper) { @@ -1818,9 +1883,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, referencedName), isExpression); - return factory.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); @@ -1842,10 +1905,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateVariableDeclaration(node, name, /*exclamationToken*/ undefined, /*type*/ undefined, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); @@ -1869,11 +1929,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateBindingElement(node, /*dotDotDotToken*/ undefined, propertyName, name, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); @@ -1919,15 +1975,12 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // ... if (isAssignmentExpression(node, /*excludeCompoundAssignment*/ true)) { - const assignmentTarget = visitDestructuringAssignmentTarget(node.left); - let initializer: Expression; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - initializer = visitNode(node.right, node => namedEvaluationVisitor(node, assignedName), isExpression); - } - else { - initializer = visitNode(node.right, visitor, isExpression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); } + + const assignmentTarget = visitDestructuringAssignmentTarget(node.left); + const initializer = visitNode(node.right, visitor, isExpression); return factory.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer) as ArrayAssignmentElement; } else { @@ -1989,10 +2042,7 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // ... if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const name = visitNode(node.name, visitor, isIdentifier); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, node => namedEvaluationVisitor(node, assignedName), isExpression); - return factory.updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer)); } return visitEachChild(node, visitor, context); @@ -2033,40 +2083,28 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc // a. Let _value_ be ? NamedEvaluation of |AssignmentExpression| with argument `"default"`. // ... - // NOTE: Since emit for `export =` translates to `module.exports = ...`, the assigned nameof the class - // is `""`. - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const referencedName = factory.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, node => namedEvaluationVisitor(node, referencedName), isExpression); - return factory.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression)); } return visitEachChild(node, visitor, context); } - function visitParenthesizedExpression(node: ParenthesizedExpression, discarded: boolean, referencedName: Expression | undefined) { + function visitParenthesizedExpression(node: ParenthesizedExpression, discarded: boolean) { // 8.4.5 RS: NamedEvaluation // ParenthesizedExpression : `(` Expression `)` // ... // 2. Return ? NamedEvaluation of |Expression| with argument _name_. - const visitorFunc: Visitor = - discarded ? discardedValueVisitor : - referencedName ? node => namedEvaluationVisitor(node, referencedName) : - visitor; + const visitorFunc: Visitor = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node: PartiallyEmittedExpression, discarded: boolean, referencedName: Expression | undefined) { + function visitPartiallyEmittedExpression(node: PartiallyEmittedExpression, discarded: boolean) { // Emulates 8.4.5 RS: NamedEvaluation - const visitorFunc: Visitor = - discarded ? discardedValueVisitor : - referencedName ? node => namedEvaluationVisitor(node, referencedName) : - visitor; + const visitorFunc: Visitor = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory.updatePartiallyEmittedExpression(node, expression); } @@ -2132,7 +2170,6 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc const prefix = kind === "get" || kind === "set" ? kind : undefined; const functionName = factory.createStringLiteralFromNode(name, /*isSingleQuote*/ undefined); const namedFunction = emitHelpers().createSetFunctionNameHelper(func, functionName, prefix); - const method = factory.createPropertyAssignment(factory.createIdentifier(kind), namedFunction); setOriginalNode(method, original); setSourceMapRange(method, moveRangePastDecorators(original)); @@ -2325,11 +2362,49 @@ export function transformESDecorators(context: TransformationContext): (x: Sourc ]) ); } + function createMetadata(name: Identifier, classSuper: Identifier | undefined) { + const varDecl = factory.createVariableDeclaration( + name, + /*exclamationToken*/ undefined, + /*type*/ undefined, + factory.createConditionalExpression( + factory.createLogicalAnd( + factory.createTypeCheck(factory.createIdentifier("Symbol"), "function"), + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), + ), + factory.createToken(SyntaxKind.QuestionToken), + factory.createCallExpression( + factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "create"), + /*typeArguments*/ undefined, + [classSuper ? createSymbolMetadataReference(classSuper) : factory.createNull()] + ), + factory.createToken(SyntaxKind.ColonToken), + factory.createVoidZero(), + ), + ); + return factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); + } - function getAssignedNameOfIdentifier(name: Identifier, initializer: Expression) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, ModifierFlags.Default) ? - factory.createStringLiteral("default") : - factory.createStringLiteralFromNode(name); + function createSymbolMetadata(target: Identifier | ThisExpression, value: Identifier) { + const defineProperty = factory.createObjectDefinePropertyCall( + target, + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), + factory.createPropertyDescriptor({ configurable: true, writable: true, enumerable: true, value }, /*singleLine*/ true) + ); + return setEmitFlags( + factory.createIfStatement(value, factory.createExpressionStatement(defineProperty)), + EmitFlags.SingleLine, + ); + } + + function createSymbolMetadataReference(classSuper: Identifier) { + return factory.createBinaryExpression( + factory.createElementAccessExpression( + classSuper, + factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), "metadata"), + ), + SyntaxKind.QuestionQuestionToken, + factory.createNull() + ); } } diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index 730958dae1e00..d20cdd511d9ba 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -1,33 +1,875 @@ import { + addEmitHelpers, + addRange, + append, + arrayFrom, + BindingElement, + Block, Bundle, + CaseOrDefaultClause, chainBundle, + ClassDeclaration, + Debug, + EmitFlags, + ExportAssignment, + ExportSpecifier, + Expression, + ForOfStatement, + ForStatement, + GeneratedIdentifierFlags, + getEmitFlags, + hasSyntacticModifier, + Identifier, + IdentifierNameMap, + isArray, + isBindingPattern, + isBlock, + isCaseClause, + isCustomPrologue, + isExpression, + isGeneratedIdentifier, + isIdentifier, + isLocalName, + isNamedEvaluation, + isOmittedExpression, + isPrologueDirective, + isSourceFile, + isStatement, + isVariableDeclarationList, + isVariableStatement, + ModifierFlags, Node, + NodeFlags, + setCommentRange, + setEmitFlags, + setOriginalNode, + setSourceMapRange, + setTextRange, + skipOuterExpressions, SourceFile, + Statement, + SwitchStatement, + SyntaxKind, TransformationContext, TransformFlags, + transformNamedEvaluation, + VariableDeclaration, + VariableDeclarationList, + VariableStatement, + visitArray, visitEachChild, - VisitResult, + visitNode, + visitNodes, + VisitResult } from "../_namespaces/ts"; +const enum UsingKind { + None, + Sync, + Async, +} + /** @internal */ export function transformESNext(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle { - return chainBundle(context, transformSourceFile); - - function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile) { - return node; - } - - return visitEachChild(node, visitor, context); - } - - function visitor(node: Node): VisitResult { - if ((node.transformFlags & TransformFlags.ContainsESNext) === 0) { - return node; - } - switch (node.kind) { - default: - return visitEachChild(node, visitor, context); - } - } + const { + factory, + getEmitHelperFactory: emitHelpers, + hoistVariableDeclaration, + startLexicalEnvironment, + endLexicalEnvironment, + } = context; + + let exportBindings: IdentifierNameMap; + let exportVars: VariableDeclaration[]; + let defaultExportBinding: Identifier | undefined; + let exportEqualsBinding: Identifier | undefined; + + return chainBundle(context, transformSourceFile); + + function transformSourceFile(node: SourceFile) { + if (node.isDeclarationFile) { + return node; + } + + const visited = visitNode(node, visitor, isSourceFile); + addEmitHelpers(visited, context.readEmitHelpers()); + exportVars = undefined!; + exportBindings = undefined!; + defaultExportBinding = undefined; + return visited; + } + + function visitor(node: Node): VisitResult { + if ((node.transformFlags & TransformFlags.ContainsESNext) === 0) { + return node; + } + + switch (node.kind) { + case SyntaxKind.SourceFile: + return visitSourceFile(node as SourceFile); + + case SyntaxKind.Block: + return visitBlock(node as Block); + + case SyntaxKind.ForStatement: + return visitForStatement(node as ForStatement); + + case SyntaxKind.ForOfStatement: + return visitForOfStatement(node as ForOfStatement); + + case SyntaxKind.SwitchStatement: + return visitSwitchStatement(node as SwitchStatement); + + default: + return visitEachChild(node, visitor, context); + } + } + + function visitSourceFile(node: SourceFile): SourceFile { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + // Imports and exports must stay at the top level. This means we must hoist all imports, exports, and + // top-level function declarations and bindings out of the `try` statements we generate. For example: + // + // given: + // + // import { w } from "mod"; + // const x = expr1; + // using y = expr2; + // const z = expr3; + // export function f() { + // console.log(z); + // } + // + // produces: + // + // import { x } from "mod"; // <-- preserved + // const x = expr1; // <-- preserved + // var y, z; // <-- hoisted + // export function f() { // <-- hoisted + // console.log(z); + // } + // const env_1 = { stack: [], error: void 0, hasError: false }; + // try { + // y = __addDisposableResource(env_1, expr2, false); + // z = expr3; + // } + // catch (e_1) { + // env_1.error = e_1; + // env_1.hasError = true; + // } + // finally { + // __disposeResource(env_1); + // } + // + // In this transformation, we hoist `y`, `z`, and `f` to a new outer statement list while moving all other + // statements in the source file into the `try` block, which is the same approach we use for System module + // emit. Unlike System module emit, we attempt to preserve all statements prior to the first top-level + // `using` to isolate the complexity of the transformed output to only where it is necessary. + startLexicalEnvironment(); + + exportBindings = new IdentifierNameMap(); + exportVars = []; + + const prologueCount = countPrologueStatements(node.statements); + const topLevelStatements: Statement[] = []; + addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount)); + + // Collect and transform any leading statements up to the first `using` or `await using`. This preserves + // the original statement order much as is possible. + let pos = prologueCount; + while (pos < node.statements.length) { + const statement = node.statements[pos]; + if (getUsingKind(statement) !== UsingKind.None) { + if (pos > prologueCount) { + addRange(topLevelStatements, visitNodes(node.statements, visitor, isStatement, prologueCount, pos - prologueCount)); + } + break; + } + pos++; + } + + Debug.assert(pos < node.statements.length, "Should have encountered at least one 'using' statement."); + + // transform the rest of the body + const envBinding = createEnvBinding(); + const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); + + // add `export {}` declarations for any hoisted bindings. + if (exportBindings.size) { + append(topLevelStatements, factory.createExportDeclaration( + /*modifiers*/ undefined, + /*isTypeOnly*/ false, + factory.createNamedExports(arrayFrom(exportBindings.values())) + )); + } + + addRange(topLevelStatements, endLexicalEnvironment()); + if (exportVars.length) { + topLevelStatements.push(factory.createVariableStatement( + factory.createModifiersFromModifierFlags(ModifierFlags.Export), + factory.createVariableDeclarationList( + exportVars, + NodeFlags.Let + ) + )); + } + addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === UsingKind.Async)); + + if (exportEqualsBinding) { + topLevelStatements.push(factory.createExportAssignment( + /*modifiers*/ undefined, + /*isExportEquals*/ true, + exportEqualsBinding + )); + } + + return factory.updateSourceFile(node, topLevelStatements); + } + + return visitEachChild(node, visitor, context); + } + + function visitBlock(node: Block): VisitResult { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + const prologueCount = countPrologueStatements(node.statements); + const envBinding = createEnvBinding(); + return factory.updateBlock( + node, + [ + ...visitArray(node.statements, visitor, isStatement, 0, prologueCount), + ...createDownlevelUsingStatements( + transformUsingDeclarations(node.statements, prologueCount, node.statements.length, envBinding, /*topLevelStatements*/ undefined), + envBinding, + usingKind === UsingKind.Async, + ) + ] + ); + } + return visitEachChild(node, visitor, context); + } + + function visitForStatement(node: ForStatement): VisitResult { + if (node.initializer && isUsingVariableDeclarationList(node.initializer)) { + // given: + // + // for (using x = expr; cond; incr) { ... } + // + // produces a shallow transformation to: + // + // { + // using x = expr; + // for (; cond; incr) { ... } + // } + // + // before handing the shallow transformation back to the visitor for an in-depth transformation. + return visitNode( + factory.createBlock([ + factory.createVariableStatement(/*modifiers*/ undefined, node.initializer), + factory.updateForStatement( + node, + /*initializer*/ undefined, + node.condition, + node.incrementor, + node.statement + ) + ]), + visitor, + isStatement + ); + } + + return visitEachChild(node, visitor, context); + } + + function visitForOfStatement(node: ForOfStatement) { + if (isUsingVariableDeclarationList(node.initializer)) { + // given: + // + // for (using x of y) { ... } + // + // produces a shallow transformation to: + // + // for (const x_1 of y) { + // using x = x; + // ... + // } + // + // before handing the shallow transformation back to the visitor for an in-depth transformation. + const forInitializer = node.initializer; + Debug.assertNode(forInitializer, isUsingVariableDeclarationList); + Debug.assert(forInitializer.declarations.length === 1, "ForInitializer may only have one declaration"); + + const forDecl = forInitializer.declarations[0]; + Debug.assert(!forDecl.initializer, "ForInitializer may not have an initializer"); + + const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === UsingKind.Async; + const temp = factory.getGeneratedNameForNode(forDecl.name); + const usingVar = factory.updateVariableDeclaration(forDecl, forDecl.name, /*exclamationToken*/ undefined, /*type*/ undefined, temp); + const usingVarList = factory.createVariableDeclarationList([usingVar], isAwaitUsing ? NodeFlags.AwaitUsing : NodeFlags.Using); + const usingVarStatement = factory.createVariableStatement(/*modifiers*/ undefined, usingVarList); + return visitNode( + factory.updateForOfStatement( + node, + node.awaitModifier, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration(temp) + ], NodeFlags.Const), + node.expression, + isBlock(node.statement) ? + factory.updateBlock(node.statement, [ + usingVarStatement, + ...node.statement.statements + ]) : + factory.createBlock([ + usingVarStatement, + node.statement + ], /*multiLine*/ true) + ), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + + function visitCaseOrDefaultClause(node: CaseOrDefaultClause, envBinding: Identifier) { + if (getUsingKindOfStatements(node.statements) !== UsingKind.None) { + if (isCaseClause(node)) { + return factory.updateCaseClause( + node, + visitNode(node.expression, visitor, isExpression), + transformUsingDeclarations(node.statements, /*start*/ 0, node.statements.length, envBinding, /*topLevelStatements*/ undefined) + ); + } + else { + return factory.updateDefaultClause( + node, + transformUsingDeclarations(node.statements, /*start*/ 0, node.statements.length, envBinding, /*topLevelStatements*/ undefined) + ); + } + } + return visitEachChild(node, visitor, context); + } + + function visitSwitchStatement(node: SwitchStatement) { + // given: + // + // switch (expr) { + // case expr: + // using res = expr; + // } + // + // produces: + // + // const env_1 = { stack: [], error: void 0, hasError: false }; + // try { + // switch(expr) { + // case expr: + // const res = __addDisposableResource(env_1, expr, false); + // } + // } + // catch (e_1) { + // env_1.error = e_1; + // env_1.hasError = true; + // } + // finally { + // __disposeResources(env_1); + // } + // + const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses); + if (usingKind) { + const envBinding = createEnvBinding(); + return createDownlevelUsingStatements( + [ + factory.updateSwitchStatement( + node, + visitNode(node.expression, visitor, isExpression), + factory.updateCaseBlock( + node.caseBlock, + node.caseBlock.clauses.map(clause => visitCaseOrDefaultClause(clause, envBinding)) + ) + ) + ], + envBinding, + usingKind === UsingKind.Async, + ); + } + + return visitEachChild(node, visitor, context); + } + + /** + * Transform `using` declarations in a statement list. + */ + function transformUsingDeclarations(statementsIn: readonly Statement[], start: number, end: number, envBinding: Identifier, topLevelStatements: Statement[] | undefined) { + const statements: Statement[] = []; + + for (let i = start; i < end; i++) { + const statement = statementsIn[i]; + const usingKind = getUsingKind(statement); + if (usingKind) { + Debug.assertNode(statement, isVariableStatement); + const declarations: VariableDeclaration[] = []; + for (let declaration of statement.declarationList.declarations) { + if (!isIdentifier(declaration.name)) { + // Since binding patterns are a grammar error, we reset `declarations` so we don't process this as a `using`. + declarations.length = 0; + break; + } + + // perform a shallow transform for any named evaluation + if (isNamedEvaluation(declaration)) { + declaration = transformNamedEvaluation(context, declaration); + } + + const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory.createVoidZero(); + declarations.push(factory.updateVariableDeclaration( + declaration, + declaration.name, + /*exclamationToken*/ undefined, + /*type*/ undefined, + emitHelpers().createAddDisposableResourceHelper( + envBinding, + initializer, + usingKind === UsingKind.Async + ) + )); + } + + // Only replace the statement if it was valid. + if (declarations.length) { + const varList = factory.createVariableDeclarationList(declarations, NodeFlags.Const); + setOriginalNode(varList, statement.declarationList); + setTextRange(varList, statement.declarationList); + hoistOrAppendNode(factory.updateVariableStatement(statement, /*modifiers*/ undefined, varList)); + continue; + } + } + + const result = visitor(statement); + if (isArray(result)) { + result.forEach(hoistOrAppendNode); + } + else if (result) { + hoistOrAppendNode(result); + } + } + + return statements; + + function hoistOrAppendNode(node: Node) { + Debug.assertNode(node, isStatement); + append(statements, hoist(node)); + } + + function hoist(node: Statement) { + if (!topLevelStatements) return node; + + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + case SyntaxKind.ExportDeclaration: + case SyntaxKind.FunctionDeclaration: + return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); + case SyntaxKind.ExportAssignment: + return hoistExportAssignment(node as ExportAssignment); + case SyntaxKind.ClassDeclaration: + return hoistClassDeclaration(node as ClassDeclaration); + case SyntaxKind.VariableStatement: + return hoistVariableStatement(node as VariableStatement); + } + + return node; + } + } + + function hoistImportOrExportOrHoistedDeclaration(node: Statement, topLevelStatements: Statement[]) { + // NOTE: `node` has already been visited + topLevelStatements.push(node); + return undefined; + } + + function hoistExportAssignment(node: ExportAssignment) { + return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node); + } + + function hoistExportDefault(node: ExportAssignment) { + // NOTE: `node` has already been visited + if (defaultExportBinding) { + // invalid case of multiple `export default` declarations. Don't assert here, just pass it through + return node; + } + + // given: + // + // export default expr; + // + // produces: + // + // // top level + // var default_1; + // export { default_1 as default }; + // + // // body + // default_1 = expr; + + defaultExportBinding = factory.createUniqueName("_default", GeneratedIdentifierFlags.ReservedInNestedScopes | GeneratedIdentifierFlags.FileLevel | GeneratedIdentifierFlags.Optimistic); + hoistBindingIdentifier(defaultExportBinding, /*isExport*/ true, "default", node); + + // give a class or function expression an assigned name, if needed. + let expression = node.expression; + let innerExpression = skipOuterExpressions(expression); + if (isNamedEvaluation(innerExpression)) { + innerExpression = transformNamedEvaluation(context, innerExpression, /*ignoreEmptyStringLiteral*/ false, "default"); + expression = factory.restoreOuterExpressions(expression, innerExpression); + } + + const assignment = factory.createAssignment(defaultExportBinding, expression); + return factory.createExpressionStatement(assignment); + } + + function hoistExportEquals(node: ExportAssignment) { + // NOTE: `node` has already been visited + if (exportEqualsBinding) { + // invalid case of multiple `export default` declarations. Don't assert here, just pass it through + return node; + } + + // given: + // + // export = expr; + // + // produces: + // + // // top level + // var default_1; + // + // try { + // // body + // default_1 = expr; + // } ... + // + // // top level suffix + // export = default_1; + + exportEqualsBinding = factory.createUniqueName("_default", GeneratedIdentifierFlags.ReservedInNestedScopes | GeneratedIdentifierFlags.FileLevel | GeneratedIdentifierFlags.Optimistic); + hoistVariableDeclaration(exportEqualsBinding); + + // give a class or function expression an assigned name, if needed. + const assignment = factory.createAssignment(exportEqualsBinding, node.expression); + return factory.createExpressionStatement(assignment); + } + + function hoistClassDeclaration(node: ClassDeclaration) { + // NOTE: `node` has already been visited + if (!node.name && defaultExportBinding) { + // invalid case of multiple `export default` declarations. Don't assert here, just pass it through + return node; + } + + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + const isDefault = hasSyntacticModifier(node, ModifierFlags.Default); + + // When hoisting a class declaration at the top level of a file containing a top-level `using` statement, we + // must first convert it to a class expression so that we can hoist the binding outside of the `try`. + let expression: Expression = factory.converters.convertToClassExpression(node); + if (node.name) { + // given: + // + // using x = expr; + // class C {} + // + // produces: + // + // var x, C; + // const env_1 = { ... }; + // try { + // x = __addDisposableResource(env_1, expr, false); + // C = class {}; + // } + // catch (e_1) { + // env_1.error = e_1; + // env_1.hasError = true; + // } + // finally { + // __disposeResources(env_1); + // } + // + // If the class is exported, we also produce an `export { C };` + hoistBindingIdentifier(factory.getLocalName(node), isExported && !isDefault, /*exportAlias*/ undefined, node); + expression = factory.createAssignment(factory.getDeclarationName(node), expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation(context, expression, /*ignoreEmptyStringLiteral*/ false); + } + setOriginalNode(expression, node); + setSourceMapRange(expression, node); + setCommentRange(expression, node); + } + + if (isDefault && !defaultExportBinding) { + // In the case of a default export, we create a temporary variable that we export as the default and then + // assign to that variable. + // + // given: + // + // using x = expr; + // export default class C {} + // + // produces: + // + // export { default_1 as default }; + // var x, C, default_1; + // const env_1 = { ... }; + // try { + // x = __addDisposableResource(env_1, expr, false); + // default_1 = C = class {}; + // } + // catch (e_1) { + // env_1.error = e_1; + // env_1.hasError = true; + // } + // finally { + // __disposeResources(env_1); + // } + // + // Though we will never reassign `default_1`, this most closely matches the specified runtime semantics. + defaultExportBinding = factory.createUniqueName("_default", GeneratedIdentifierFlags.ReservedInNestedScopes | GeneratedIdentifierFlags.FileLevel | GeneratedIdentifierFlags.Optimistic); + hoistBindingIdentifier(defaultExportBinding, /*isExport*/ true, "default", node); + expression = factory.createAssignment(defaultExportBinding, expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation(context, expression, /*ignoreEmptyStringLiteral*/ false, "default"); + } + setOriginalNode(expression, node); + } + + return factory.createExpressionStatement(expression); + } + + function hoistVariableStatement(node: VariableStatement) { + // NOTE: `node` has already been visited + let expressions: Expression[] | undefined; + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + for (const variable of node.declarationList.declarations) { + hoistBindingElement(variable, isExported, variable); + if (variable.initializer) { + expressions = append(expressions, hoistInitializedVariable(variable)); + } + } + if (expressions) { + const statement = factory.createExpressionStatement(factory.inlineExpressions(expressions)); + setOriginalNode(statement, node); + setCommentRange(statement, node); + setSourceMapRange(statement, node); + return statement; + } + return undefined; + } + + function hoistInitializedVariable(node: VariableDeclaration) { + // NOTE: `node` has already been visited + Debug.assertIsDefined(node.initializer); + let target: Expression; + if (isIdentifier(node.name)) { + target = factory.cloneNode(node.name); + setEmitFlags(target, getEmitFlags(target) & ~(EmitFlags.LocalName | EmitFlags.ExportName | EmitFlags.InternalName)); + } + else { + target = factory.converters.convertToAssignmentPattern(node.name); + } + + const assignment = factory.createAssignment(target, node.initializer); + setOriginalNode(assignment, node); + setCommentRange(assignment, node); + setSourceMapRange(assignment, node); + return assignment; + } + + function hoistBindingElement(node: VariableDeclaration | BindingElement, isExportedDeclaration: boolean, original: Node | undefined) { + // NOTE: `node` has already been visited + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element, isExportedDeclaration, original); + } + } + } + else { + hoistBindingIdentifier(node.name, isExportedDeclaration, /*exportAlias*/ undefined, original); + } + } + + function hoistBindingIdentifier(node: Identifier, isExport: boolean, exportAlias: string | Identifier | undefined, original: Node | undefined) { + // NOTE: `node` has already been visited + const name = isGeneratedIdentifier(node) ? node : factory.cloneNode(node); + if (isExport) { + if (exportAlias === undefined && !isLocalName(name)) { + const varDecl = factory.createVariableDeclaration(name); + if (original) { + setOriginalNode(varDecl, original); + } + exportVars.push(varDecl); + return; + } + + const localName = exportAlias !== undefined ? name : undefined; + const exportName = exportAlias !== undefined ? exportAlias : name; + const specifier = factory.createExportSpecifier(/*isTypeOnly*/ false, localName, exportName); + if (original) { + setOriginalNode(specifier, original); + } + exportBindings.set(name, specifier); + } + hoistVariableDeclaration(name); + } + + function createEnvBinding() { + return factory.createUniqueName("env"); + } + + function createDownlevelUsingStatements(bodyStatements: readonly Statement[], envBinding: Identifier, async: boolean) { + const statements: Statement[] = []; + + // produces: + // + // const env_1 = { stack: [], error: void 0, hasError: false }; + // + const envObject = factory.createObjectLiteralExpression([ + factory.createPropertyAssignment("stack", factory.createArrayLiteralExpression()), + factory.createPropertyAssignment("error", factory.createVoidZero()), + factory.createPropertyAssignment("hasError", factory.createFalse()) + ]); + const envVar = factory.createVariableDeclaration(envBinding, /*exclamationToken*/ undefined, /*type*/ undefined, envObject); + const envVarList = factory.createVariableDeclarationList([envVar], NodeFlags.Const); + const envVarStatement = factory.createVariableStatement(/*modifiers*/ undefined, envVarList); + statements.push(envVarStatement); + + // when `async` is `false`, produces: + // + // try { + // + // } + // catch (e_1) { + // env_1.error = e_1; + // env_1.hasError = true; + // } + // finally { + // __disposeResources(env_1); + // } + + // when `async` is `true`, produces: + // + // try { + // + // } + // catch (e_1) { + // env_1.error = e_1; + // env_1.hasError = true; + // } + // finally { + // const result_1 = __disposeResources(env_1); + // if (result_1) { + // await result_1; + // } + // } + + // Unfortunately, it is necessary to use two properties to indicate an error because `throw undefined` is legal + // JavaScript. + const tryBlock = factory.createBlock(bodyStatements, /*multiLine*/ true); + const bodyCatchBinding = factory.createUniqueName("e"); + const catchClause = factory.createCatchClause( + bodyCatchBinding, + factory.createBlock([ + factory.createExpressionStatement( + factory.createAssignment( + factory.createPropertyAccessExpression(envBinding, "error"), + bodyCatchBinding) + ), + factory.createExpressionStatement( + factory.createAssignment( + factory.createPropertyAccessExpression(envBinding, "hasError"), + factory.createTrue()) + ), + ], /*multiLine*/ true) + ); + + let finallyBlock: Block; + if (async) { + const result = factory.createUniqueName("result"); + finallyBlock = factory.createBlock([ + factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + result, + /*exclamationToken*/ undefined, + /*type*/ undefined, + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], NodeFlags.Const) + ), + factory.createIfStatement(result, factory.createExpressionStatement(factory.createAwaitExpression(result))) + ], /*multiLine*/ true); + } + else { + finallyBlock = factory.createBlock([ + factory.createExpressionStatement( + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], /*multiLine*/ true); + } + + const tryStatement = factory.createTryStatement(tryBlock, catchClause, finallyBlock); + statements.push(tryStatement); + + return statements; + } +} + +function countPrologueStatements(statements: readonly Statement[]) { + for (let i = 0; i < statements.length; i++) { + if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) { + return i; + } + } + return 0; +} + +function isUsingVariableDeclarationList(node: Node): node is VariableDeclarationList & { _usingBrand: any } { + return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== UsingKind.None; +} + +function getUsingKindOfVariableDeclarationList(node: VariableDeclarationList) { + return (node.flags & NodeFlags.BlockScoped) === NodeFlags.AwaitUsing ? UsingKind.Async : + (node.flags & NodeFlags.BlockScoped) === NodeFlags.Using ? UsingKind.Sync : + UsingKind.None; +} + +function getUsingKindOfVariableStatement(node: VariableStatement) { + return getUsingKindOfVariableDeclarationList(node.declarationList); +} + +function getUsingKind(statement: Statement): UsingKind { + return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : UsingKind.None; +} + +function getUsingKindOfStatements(statements: readonly Statement[]): UsingKind { + let result = UsingKind.None; + for (const statement of statements) { + const usingKind = getUsingKind(statement); + if (usingKind === UsingKind.Async) return UsingKind.Async; + if (usingKind > result) result = usingKind; + } + return result; +} + +function getUsingKindOfCaseOrDefaultClauses(clauses: readonly CaseOrDefaultClause[]): UsingKind { + let result = UsingKind.None; + for (const clause of clauses) { + const usingKind = getUsingKindOfStatements(clause.statements); + if (usingKind === UsingKind.Async) return UsingKind.Async; + if (usingKind > result) result = usingKind; + } + return result; } diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts index 52fa0bc564f74..fe3ccc883f718 100644 --- a/src/compiler/transformers/jsx.ts +++ b/src/compiler/transformers/jsx.ts @@ -472,15 +472,15 @@ export function transformJsx(context: TransformationContext): (x: SourceFile | B for (const prop of attr.expression.properties) { if (isSpreadAssignment(prop)) { finishObjectLiteralIfNeeded(); - expressions.push(prop.expression); + expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); continue; } - properties.push(prop); + properties.push(Debug.checkDefined(visitNode(prop, visitor)) as ObjectLiteralElementLike); } continue; } finishObjectLiteralIfNeeded(); - expressions.push(attr.expression); + expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression))); continue; } properties.push(transformJsxAttributeToObjectLiteralElement(attr)); diff --git a/src/compiler/transformers/legacyDecorators.ts b/src/compiler/transformers/legacyDecorators.ts index f175fe71a1951..87b3b162ca490 100644 --- a/src/compiler/transformers/legacyDecorators.ts +++ b/src/compiler/transformers/legacyDecorators.ts @@ -55,7 +55,6 @@ import { isStatic, map, MethodDeclaration, - Modifier, ModifierFlags, moveRangePastModifiers, Node, @@ -373,39 +372,29 @@ export function transformLegacyDecorators(context: TransformationContext): (x: S // let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference // or decoratedClassAlias if the class contain self-reference. - const varDecl = factory.createVariableDeclaration( - declName, - /*exclamationToken*/ undefined, - /*type*/ undefined, - classAlias && !assignClassAliasInStaticBlock ? factory.createAssignment(classAlias, classExpression) : classExpression - ); + const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory.createAssignment(classAlias, classExpression) : classExpression; + const varDecl = factory.createVariableDeclaration(declName, /*exclamationToken*/ undefined, /*type*/ undefined, varInitializer); setOriginalNode(varDecl, node); - let varModifiers: Modifier[] | undefined; - if (isExport && !isDefault) { - varModifiers = factory.createModifiersFromModifierFlags(ModifierFlags.Export); - } + const varDeclList = factory.createVariableDeclarationList([varDecl], NodeFlags.Let); + const varStatement = factory.createVariableStatement(/*modifiers*/ undefined, varDeclList); + setOriginalNode(varStatement, node); + setTextRange(varStatement, location); + setCommentRange(varStatement, node); - const statement = factory.createVariableStatement( - varModifiers, - factory.createVariableDeclarationList([ - varDecl - ], NodeFlags.Let) - ); - setOriginalNode(statement, node); - setTextRange(statement, location); - setCommentRange(statement, node); - - const statements: Statement[] = [statement]; + const statements: Statement[] = [varStatement]; addRange(statements, decorationStatements); addConstructorDecorationStatement(statements, node); - if (isExport && isDefault) { - statements.push(factory.createExportAssignment( - /*modifiers*/ undefined, - /*isExportEquals*/ false, - declName - )); + if (isExport) { + if (isDefault) { + const exportStatement = factory.createExportDefault(declName); + statements.push(exportStatement); + } + else { + const exportStatement = factory.createExternalModuleExport(factory.getDeclarationName(node)); + statements.push(exportStatement); + } } return statements; diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index fc95446ce54c2..b6339fcc15a90 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -59,6 +59,7 @@ import { hasJsonModuleEmitEnabled, hasSyntacticModifier, Identifier, + IdentifierNameMap, idText, IfStatement, ImportCall, @@ -86,6 +87,7 @@ import { isExpression, isExternalModule, isExternalModuleImportEqualsDeclaration, + isFileLevelReservedGeneratedIdentifier, isForInitializer, isFunctionExpression, isGeneratedIdentifier, @@ -224,7 +226,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile } currentSourceFile = node; - currentModuleInfo = collectExternalModuleInfo(context, node, resolver, compilerOptions); + currentModuleInfo = collectExternalModuleInfo(context, node); moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; // Perform the transformation. @@ -668,22 +670,16 @@ export function transformModule(context: TransformationContext): (x: SourceFile function topLevelVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ImportDeclaration: - return visitImportDeclaration(node as ImportDeclaration); + return visitTopLevelImportDeclaration(node as ImportDeclaration); case SyntaxKind.ImportEqualsDeclaration: - return visitImportEqualsDeclaration(node as ImportEqualsDeclaration); + return visitTopLevelImportEqualsDeclaration(node as ImportEqualsDeclaration); case SyntaxKind.ExportDeclaration: - return visitExportDeclaration(node as ExportDeclaration); + return visitTopLevelExportDeclaration(node as ExportDeclaration); case SyntaxKind.ExportAssignment: - return visitExportAssignment(node as ExportAssignment); - - case SyntaxKind.FunctionDeclaration: - return visitFunctionDeclaration(node as FunctionDeclaration); - - case SyntaxKind.ClassDeclaration: - return visitClassDeclaration(node as ClassDeclaration); + return visitTopLevelExportAssignment(node as ExportAssignment); default: return topLevelNestedVisitor(node); @@ -1358,7 +1354,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile * * @param node The node to visit. */ - function visitImportDeclaration(node: ImportDeclaration): VisitResult { + function visitTopLevelImportDeclaration(node: ImportDeclaration): VisitResult { let statements: Statement[] | undefined; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== ModuleKind.AMD) { @@ -1470,7 +1466,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile * * @param node The node to visit. */ - function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { + function visitTopLevelImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements: Statement[] | undefined; @@ -1538,7 +1534,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile * * @param The node to visit. */ - function visitExportDeclaration(node: ExportDeclaration): VisitResult { + function visitTopLevelExportDeclaration(node: ExportDeclaration): VisitResult { if (!node.moduleSpecifier) { // Elide export declarations with no module specifier as they are handled // elsewhere. @@ -1648,7 +1644,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile * * @param node The node to visit. */ - function visitExportAssignment(node: ExportAssignment): VisitResult { + function visitTopLevelExportAssignment(node: ExportAssignment): VisitResult { if (node.isExportEquals) { return undefined; } @@ -1878,20 +1874,21 @@ export function transformModule(context: TransformationContext): (x: SourceFile return statements; } + const seen = new IdentifierNameMap(); if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); + statements = appendExportsOfDeclaration(statements, seen, importClause); } const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { case SyntaxKind.NamespaceImport: - statements = appendExportsOfDeclaration(statements, namedBindings); + statements = appendExportsOfDeclaration(statements, seen, namedBindings); break; case SyntaxKind.NamedImports: for (const importBinding of namedBindings.elements) { - statements = appendExportsOfDeclaration(statements, importBinding, /*liveBinding*/ true); + statements = appendExportsOfDeclaration(statements, seen, importBinding, /*liveBinding*/ true); } break; @@ -1915,7 +1912,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile return statements; } - return appendExportsOfDeclaration(statements, decl); + return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } /** @@ -1974,7 +1971,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile } } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } return statements; @@ -1994,13 +1991,14 @@ export function transformModule(context: TransformationContext): (x: SourceFile return statements; } + const seen = new IdentifierNameMap(); if (hasSyntacticModifier(decl, ModifierFlags.Export)) { const exportName = hasSyntacticModifier(decl, ModifierFlags.Default) ? factory.createIdentifier("default") : factory.getDeclarationName(decl); - statements = appendExportStatement(statements, exportName, factory.getLocalName(decl), /*location*/ decl); + statements = appendExportStatement(statements, seen, exportName, factory.getLocalName(decl), /*location*/ decl); } if (decl.name) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, seen, decl); } return statements; @@ -2014,12 +2012,12 @@ export function transformModule(context: TransformationContext): (x: SourceFile * appended. * @param decl The declaration to export. */ - function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration, liveBinding?: boolean): Statement[] | undefined { + function appendExportsOfDeclaration(statements: Statement[] | undefined, seen: IdentifierNameMap, decl: Declaration, liveBinding?: boolean): Statement[] | undefined { const name = factory.getDeclarationName(decl); - const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { - statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /*allowComments*/ undefined, liveBinding); + statements = appendExportStatement(statements, seen, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /*allowComments*/ undefined, liveBinding); } } return statements; @@ -2037,8 +2035,11 @@ export function transformModule(context: TransformationContext): (x: SourceFile * @param location The location to use for source maps and comments for the export. * @param allowComments Whether to allow comments on the export. */ - function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean, liveBinding?: boolean): Statement[] | undefined { - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + function appendExportStatement(statements: Statement[] | undefined, seen: IdentifierNameMap, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean, liveBinding?: boolean): Statement[] | undefined { + if (!seen.has(exportName)) { + seen.set(exportName, true); + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + } return statements; } @@ -2341,12 +2342,12 @@ export function transformModule(context: TransformationContext): (x: SourceFile // When we see an assignment expression whose left-hand side is an exported symbol, // we should ensure all exports of that symbol are updated with the correct value. // - // - We do not substitute generated identifiers for any reason. + // - We do not substitute generated identifiers unless they are file-level reserved names. // - We do not substitute identifiers tagged with the LocalName flag. // - We only substitute identifiers that are exported at the top level. if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) - && !isGeneratedIdentifier(node.left) + && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { @@ -2395,6 +2396,16 @@ export function transformModule(context: TransformationContext): (x: SourceFile } } } + else if (isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = currentModuleInfo?.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames: Identifier[] = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames.push(exportSpecifier.name); + } + return exportedNames; + } + } } } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index 4e2d9b954e626..b83bf5244a7f3 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -64,6 +64,7 @@ import { isExpression, isExternalModule, isExternalModuleImportEqualsDeclaration, + isFileLevelReservedGeneratedIdentifier, isForInitializer, isGeneratedIdentifier, isHeritageClause, @@ -84,7 +85,9 @@ import { isSpreadElement, isStatement, isStringLiteral, + isVarAwaitUsing, isVariableDeclarationList, + isVarUsing, LabeledStatement, map, MetaProperty, @@ -198,7 +201,7 @@ export function transformSystemModule(context: TransformationContext): (x: Sourc // see comment to 'substitutePostfixUnaryExpression' for more details // Collect information about the external module and dependency groups. - moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node, resolver, compilerOptions); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node); // Make sure that the name of the 'exports' function does not conflict with // existing identifiers. @@ -845,20 +848,44 @@ export function transformSystemModule(context: TransformationContext): (x: Sourc return visitNode(node, visitor, isStatement); } - let expressions: Expression[] | undefined; - const isExportedDeclaration = hasSyntacticModifier(node, ModifierFlags.Export); - for (const variable of node.declarationList.declarations) { - if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); - } - else { - hoistBindingElement(variable); + let statements: Statement[] | undefined; + // `using` and `await using` declarations cannot be hoisted directly, so we will hoist the variable name + // as a normal variable, and declare it as a temp variable that remains as a `using` to ensure the correct + // lifetime. + if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) { + const modifiers = visitNodes(node.modifiers, modifierVisitor, isModifierLike); + const declarations: VariableDeclaration[] = []; + for (const variable of node.declarationList.declarations) { + declarations.push(factory.updateVariableDeclaration( + variable, + factory.getGeneratedNameForNode(variable.name), + /*exclamationToken*/ undefined, + /*type*/ undefined, + transformInitializedVariable(variable, /*isExportedDeclaration*/ false) + )); } + + const declarationList = factory.updateVariableDeclarationList( + node.declarationList, + declarations + ); + statements = append(statements, factory.updateVariableStatement(node, modifiers, declarationList)); } + else { + let expressions: Expression[] | undefined; + const isExportedDeclaration = hasSyntacticModifier(node, ModifierFlags.Export); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); + } + else { + hoistBindingElement(variable); + } + } - let statements: Statement[] | undefined; - if (expressions) { - statements = append(statements, setTextRange(factory.createExpressionStatement(factory.inlineExpressions(expressions)), node)); + if (expressions) { + statements = append(statements, setTextRange(factory.createExpressionStatement(factory.inlineExpressions(expressions)), node)); + } } statements = appendExportsOfVariableStatement(statements, node, /*exportSelf*/ false); @@ -1114,7 +1141,7 @@ export function transformSystemModule(context: TransformationContext): (x: Sourc } const name = factory.getDeclarationName(decl); - const exportSpecifiers = moduleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { if (exportSpecifier.name.escapedText !== excludeName) { @@ -1894,12 +1921,12 @@ export function transformSystemModule(context: TransformationContext): (x: Sourc // When we see an assignment expression whose left-hand side is an exported symbol, // we should ensure all exports of that symbol are updated with the correct value. // - // - We do not substitute generated identifiers for any reason. + // - We do not substitute generated identifiers unless they are file-level reserved names. // - We do not substitute identifiers tagged with the LocalName flag. // - We only substitute identifiers that are exported at the top level. if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) - && !isGeneratedIdentifier(node.left) + && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { @@ -1939,6 +1966,16 @@ export function transformSystemModule(context: TransformationContext): (x: Sourc exportedNames = addRange(exportedNames, moduleInfo?.exportedBindings[getOriginalNodeId(valueDeclaration)]); } + else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = moduleInfo?.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames: Identifier[] = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames.push(exportSpecifier.name); + } + return exportedNames; + } + } return exportedNames; } diff --git a/src/compiler/transformers/namedEvaluation.ts b/src/compiler/transformers/namedEvaluation.ts new file mode 100644 index 0000000000000..5af5d90781e63 --- /dev/null +++ b/src/compiler/transformers/namedEvaluation.ts @@ -0,0 +1,478 @@ +import { + __String, + AnonymousFunctionDefinition, + BinaryExpression, + BindingElement, + Block, + CallExpression, + cast, + ClassLikeDeclaration, + ClassStaticBlockDeclaration, + ExportAssignment, + Expression, + ExpressionStatement, + findIndex, + getOrCreateEmitNode, + getOriginalNode, + hasSyntacticModifier, + Identifier, + isCallToHelper, + isClassDeclaration, + isClassExpression, + isClassStaticBlockDeclaration, + isClassThisAssignmentBlock, + isEmptyStringLiteral, + isExpressionStatement, + isFunctionDeclaration, + isIdentifier, + isPrivateIdentifier, + isPropertyNameLiteral, + isStringLiteral, + ModifierFlags, + NamedEvaluation, + Node, + NodeArray, + NodeFactory, + ParameterDeclaration, + PropertyAssignment, + PropertyDeclaration, + PropertyName, + setSourceMapRange, + setTextRange, + ShorthandPropertyAssignment, + skipOuterExpressions, + some, + Statement, + StringLiteral, + SyntaxKind, + TransformationContext, + VariableDeclaration, + WrappedExpression +} from "../_namespaces/ts"; + +/** + * Gets a string literal to use as the assigned name of an anonymous class or function declaration. + * @internal + */ +export function getAssignedNameOfIdentifier(factory: NodeFactory, name: Identifier, expression: WrappedExpression): StringLiteral { + const original = getOriginalNode(skipOuterExpressions(expression)); + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && + !original.name && hasSyntacticModifier(original, ModifierFlags.Default)) { + return factory.createStringLiteral("default"); + } + return factory.createStringLiteralFromNode(name); +} + +function getAssignedNameOfPropertyName(context: TransformationContext, name: PropertyName, assignedNameText: string | undefined) { + const { factory } = context; + if (assignedNameText !== undefined) { + const assignedName = factory.createStringLiteral(assignedNameText); + return { assignedName, name }; + } + + if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) { + const assignedName = factory.createStringLiteralFromNode(name); + return { assignedName, name }; + } + + if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) { + const assignedName = factory.createStringLiteralFromNode(name.expression); + return { assignedName, name }; + } + + const assignedName = factory.getGeneratedNameForNode(name); + context.hoistVariableDeclaration(assignedName); + + const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression); + const assignment = factory.createAssignment(assignedName, key); + const updatedName = factory.updateComputedPropertyName(name, assignment); + return { assignedName, name: updatedName }; +} + +/** + * Creates a class `static {}` block used to dynamically set the name of a class. + * + * @param assignedName The expression used to resolve the assigned name at runtime. This expression should not produce + * side effects. + * @param thisExpression Overrides the expression to use for the actual `this` reference. This can be used to provide an + * expression that has already had its `EmitFlags` set or may have been tracked to prevent substitution. + * @internal + */ +export function createClassNamedEvaluationHelperBlock(context: TransformationContext, assignedName: Expression, thisExpression: Expression = context.factory.createThis()): ClassNamedEvaluationHelperBlock { + // produces: + // + // static { __setFunctionName(this, "C"); } + // + + const { factory } = context; + const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName); + const statement = factory.createExpressionStatement(expression); + const body = factory.createBlock([statement], /*multiLine*/ false); + const block = factory.createClassStaticBlockDeclaration(body); + + // We use `emitNode.assignedName` to indicate this is a NamedEvaluation helper block + // and to stash the expression used to resolve the assigned name. + getOrCreateEmitNode(block).assignedName = assignedName; + return block as ClassNamedEvaluationHelperBlock; +} + +/** @internal */ +export type ClassNamedEvaluationHelperBlock = ClassStaticBlockDeclaration & { + readonly body: Block & { + readonly statements: NodeArray & readonly [ + ExpressionStatement & { + readonly expression: CallExpression & { + readonly expression: Identifier; + }; + } + ]; + }; +}; + + +/** + * Gets whether a node is a `static {}` block containing only a single call to the `__setFunctionName` helper where that + * call's second argument is the value stored in the `assignedName` property of the block's `EmitNode`. + * @internal + */ +export function isClassNamedEvaluationHelperBlock(node: Node): node is ClassNamedEvaluationHelperBlock { + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && + isCallToHelper(statement.expression, "___setFunctionName" as __String) && + (statement.expression as CallExpression).arguments.length >= 2 && + (statement.expression as CallExpression).arguments[1] === node.emitNode?.assignedName; +} + +/** + * Gets whether a `ClassLikeDeclaration` has a `static {}` block containing only a single call to the + * `__setFunctionName` helper. + * @internal + */ +export function classHasExplicitlyAssignedName(node: ClassLikeDeclaration): boolean { + return !!node.emitNode?.assignedName && some(node.members, isClassNamedEvaluationHelperBlock); +} + +/** + * Gets whether a `ClassLikeDeclaration` has a declared name or contains a `static {}` block containing only a single + * call to the `__setFunctionName` helper. + * @internal + */ +export function classHasDeclaredOrExplicitlyAssignedName(node: ClassLikeDeclaration): boolean { + return !!node.name || classHasExplicitlyAssignedName(node); +} + +/** + * Injects a class `static {}` block used to dynamically set the name of a class, if one does not already exist. + * @internal + */ +export function injectClassNamedEvaluationHelperBlockIfMissing( + context: TransformationContext, + node: T, + assignedName: Expression, + thisExpression?: Expression +): Extract>; +export function injectClassNamedEvaluationHelperBlockIfMissing( + context: TransformationContext, + node: ClassLikeDeclaration, + assignedName: Expression, + thisExpression?: Expression +) { + // given: + // + // let C = class { + // }; + // + // produces: + // + // let C = class { + // static { __setFunctionName(this, "C"); } + // }; + + // NOTE: If the class has a `_classThis` assignment block, this helper will be injected after that block. + + if (classHasExplicitlyAssignedName(node)) { + return node; + } + + const { factory } = context; + const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression); + if (node.name) { + setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name); + } + + const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1; + const leading = node.members.slice(0, insertionIndex); + const trailing = node.members.slice(insertionIndex); + const members = factory.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); + setTextRange(members, node.members); + + node = isClassDeclaration(node) ? + factory.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members) : + factory.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members); + + getOrCreateEmitNode(node).assignedName = assignedName; + return node; +} + +function finishTransformNamedEvaluation( + context: TransformationContext, + expression: WrappedExpression, + assignedName: Expression, + ignoreEmptyStringLiteral?: boolean, +): Expression { + if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) { + return expression; + } + + const { factory } = context; + const innerExpression = skipOuterExpressions(expression); + + const updatedExpression = isClassExpression(innerExpression) ? + cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : + context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName); + + return factory.restoreOuterExpressions(expression, updatedExpression); +} + +function transformNamedEvaluationOfPropertyAssignment(context: TransformationContext, node: NamedEvaluation & PropertyAssignment, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 13.2.5.5 RS: PropertyDefinitionEvaluation + // PropertyAssignment : PropertyName `:` AssignmentExpression + // ... + // 5. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and _isProtoSetter_ is *false*, then + // a. Let _popValue_ be ? NamedEvaluation of |AssignmentExpression| with argument _propKey_. + // ... + + const { factory } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory.updatePropertyAssignment( + node, + name, + initializer); +} + +function transformNamedEvaluationOfShorthandAssignmentProperty(context: TransformationContext, node: NamedEvaluation & ShorthandPropertyAssignment, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 13.15.5.3 RS: PropertyDestructuringAssignmentEvaluation + // AssignmentProperty : IdentifierReference Initializer? + // ... + // 4. If |Initializer?| is present and _v_ is *undefined*, then + // a. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // i. Set _v_ to ? NamedEvaluation of |Initializer| with argument _P_. + // ... + + const { factory } = context; + const assignedName = assignedNameText !== undefined ? factory.createStringLiteral(assignedNameText) : + getAssignedNameOfIdentifier(factory, node.name, node.objectAssignmentInitializer); + const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral); + return factory.updateShorthandPropertyAssignment( + node, + node.name, + objectAssignmentInitializer); +} + +function transformNamedEvaluationOfVariableDeclaration(context: TransformationContext, node: NamedEvaluation & VariableDeclaration, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 14.3.1.2 RS: Evaluation + // LexicalBinding : BindingIdentifier Initializer + // ... + // 3. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // a. Let _value_ be ? NamedEvaluation of |Initializer| with argument _bindingId_. + // ... + // + // 14.3.2.1 RS: Evaluation + // VariableDeclaration : BindingIdentifier Initializer + // ... + // 3. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // a. Let _value_ be ? NamedEvaluation of |Initializer| with argument _bindingId_. + // ... + + const { factory } = context; + const assignedName = assignedNameText !== undefined ? factory.createStringLiteral(assignedNameText) : + getAssignedNameOfIdentifier(factory, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory.updateVariableDeclaration( + node, + node.name, + node.exclamationToken, + node.type, + initializer); +} + +function transformNamedEvaluationOfParameterDeclaration(context: TransformationContext, node: NamedEvaluation & ParameterDeclaration, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 8.6.3 RS: IteratorBindingInitialization + // SingleNameBinding : BindingIdentifier Initializer? + // ... + // 5. If |Initializer| is present and _v_ is *undefined*, then + // a. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // i. Set _v_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. + // ... + // + // 14.3.3.3 RS: KeyedBindingInitialization + // SingleNameBinding : BindingIdentifier Initializer? + // ... + // 4. If |Initializer| is present and _v_ is *undefined*, then + // a. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // i. Set _v_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. + // ... + + const { factory } = context; + const assignedName = assignedNameText !== undefined ? factory.createStringLiteral(assignedNameText) : + getAssignedNameOfIdentifier(factory, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory.updateParameterDeclaration( + node, + node.modifiers, + node.dotDotDotToken, + node.name, + node.questionToken, + node.type, + initializer); +} + +function transformNamedEvaluationOfBindingElement(context: TransformationContext, node: NamedEvaluation & BindingElement, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 8.6.3 RS: IteratorBindingInitialization + // SingleNameBinding : BindingIdentifier Initializer? + // ... + // 5. If |Initializer| is present and _v_ is *undefined*, then + // a. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // i. Set _v_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. + // ... + // + // 14.3.3.3 RS: KeyedBindingInitialization + // SingleNameBinding : BindingIdentifier Initializer? + // ... + // 4. If |Initializer| is present and _v_ is *undefined*, then + // a. If IsAnonymousFunctionDefinition(|Initializer|) is *true*, then + // i. Set _v_ to ? NamedEvaluation of |Initializer| with argument _bindingId_. + // ... + + const { factory } = context; + const assignedName = assignedNameText !== undefined ? factory.createStringLiteral(assignedNameText) : + getAssignedNameOfIdentifier(factory, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory.updateBindingElement( + node, + node.dotDotDotToken, + node.propertyName, + node.name, + initializer); +} + +function transformNamedEvaluationOfPropertyDeclaration(context: TransformationContext, node: NamedEvaluation & PropertyDeclaration, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 10.2.1.3 RS: EvaluateBody + // Initializer : `=` AssignmentExpression + // ... + // 3. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true*, then + // a. Let _value_ be ? NamedEvaluation of |Initializer| with argument _functionObject_.[[ClassFieldInitializerName]]. + // ... + + const { factory } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory.updatePropertyDeclaration( + node, + node.modifiers, + name, + node.questionToken ?? node.exclamationToken, + node.type, + initializer); +} + +function transformNamedEvaluationOfAssignmentExpression(context: TransformationContext, node: NamedEvaluation & BinaryExpression, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 13.15.2 RS: Evaluation + // AssignmentExpression : LeftHandSideExpression `=` AssignmentExpression + // 1. If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, then + // a. Let _lref_ be ? Evaluation of |LeftHandSideExpression|. + // b. If IsAnonymousFunctionDefinition(|AssignmentExpression|) and IsIdentifierRef of |LeftHandSideExpression| are both *true*, then + // i. Let _rval_ be ? NamedEvaluation of |AssignmentExpression| with argument _lref_.[[ReferencedName]]. + // ... + // + // AssignmentExpression : LeftHandSideExpression `&&=` AssignmentExpression + // ... + // 5. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then + // a. Let _rval_ be ? NamedEvaluation of |AssignmentExpression| with argument _lref_.[[ReferencedName]]. + // ... + // + // AssignmentExpression : LeftHandSideExpression `||=` AssignmentExpression + // ... + // 5. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then + // a. Let _rval_ be ? NamedEvaluation of |AssignmentExpression| with argument _lref_.[[ReferencedName]]. + // ... + // + // AssignmentExpression : LeftHandSideExpression `??=` AssignmentExpression + // ... + // 4. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true* and IsIdentifierRef of |LeftHandSideExpression| is *true*, then + // a. Let _rval_ be ? NamedEvaluation of |AssignmentExpression| with argument _lref_.[[ReferencedName]]. + // ... + + const { factory } = context; + const assignedName = assignedNameText !== undefined ? factory.createStringLiteral(assignedNameText) : + getAssignedNameOfIdentifier(factory, node.left, node.right); + const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral); + return factory.updateBinaryExpression( + node, + node.left, + node.operatorToken, + right); +} + +function transformNamedEvaluationOfExportAssignment(context: TransformationContext, node: NamedEvaluation & ExportAssignment, ignoreEmptyStringLiteral?: boolean, assignedNameText?: string) { + // 16.2.3.7 RS: Evaluation + // ExportDeclaration : `export` `default` AssignmentExpression `;` + // 1. If IsAnonymousFunctionDefinition(|AssignmentExpression|) is *true*, then + // a. Let _value_ be ? NamedEvaluation of |AssignmentExpression| with argument `"default"`. + // ... + + // NOTE: Since emit for `export =` translates to `module.exports = ...`, the assigned name of the class or function + // is `""`. + + const { factory } = context; + const assignedName = assignedNameText !== undefined ? factory.createStringLiteral(assignedNameText) : + factory.createStringLiteral(node.isExportEquals ? "" : "default"); + const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral); + return factory.updateExportAssignment( + node, + node.modifiers, + expression); +} + +/** + * Performs a shallow transformation of a `NamedEvaluation` node, such that a valid name will be assigned. + * @internal + */ +export function transformNamedEvaluation(context: TransformationContext, node: T, ignoreEmptyStringLiteral?: boolean, assignedName?: string): Extract>; +export function transformNamedEvaluation(context: TransformationContext, node: NamedEvaluation, ignoreEmptyStringLiteral?: boolean, assignedName?: string) { + switch (node.kind) { + case SyntaxKind.PropertyAssignment: + return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.ShorthandPropertyAssignment: + return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.VariableDeclaration: + return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.Parameter: + return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.BindingElement: + return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.PropertyDeclaration: + return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.BinaryExpression: + return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); + case SyntaxKind.ExportAssignment: + return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + } +} diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 6fec0b61bd294..8b97637c07722 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -41,7 +41,7 @@ import { Expression, ExpressionWithTypeArguments, filter, - findSuperStatementIndex, + findSuperStatementIndexPath, flattenDestructuringAssignment, FlattenLevel, FunctionDeclaration, @@ -79,6 +79,8 @@ import { isAssertionExpression, isBindingName, isBindingPattern, + isBlock, + isCatchClause, isClassElement, isClassLike, isComputedPropertyName, @@ -118,6 +120,7 @@ import { isSourceFile, isStatement, isTemplateLiteral, + isTryStatement, JsxOpeningElement, JsxSelfClosingElement, LeftHandSideExpression, @@ -194,7 +197,7 @@ import { visitNode, visitNodes, visitParameterList, - VisitResult, + VisitResult } from "../_namespaces/ts"; /** @@ -922,24 +925,19 @@ export function transformTypeScript(context: TransformationContext) { const iife = factory.createImmediatelyInvokedArrowFunction(statements); setInternalEmitFlags(iife, InternalEmitFlags.TypeScriptClassWrapper); - // export let C = (() => { ... })(); - const modifiers = facts & ClassFacts.IsNamedExternalExport ? - factory.createModifiersFromModifierFlags(ModifierFlags.Export) : - undefined; - // let C = (() => { ... })(); - const varStatement = factory.createVariableStatement( - modifiers, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), - /*exclamationToken*/ undefined, - /*type*/ undefined, - iife - ) - ], NodeFlags.Let) + const varDecl = factory.createVariableDeclaration( + factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ false), + /*exclamationToken*/ undefined, + /*type*/ undefined, + iife ); + setOriginalNode(varDecl, node); + const varStatement = factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList([varDecl], NodeFlags.Let) + ); setOriginalNode(varStatement, node); setCommentRange(varStatement, node); setSourceMapRange(varStatement, moveRangePastDecorators(node)); @@ -963,10 +961,10 @@ export function transformTypeScript(context: TransformationContext) { factory.createExportDefault(factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)) ]; } - if (facts & ClassFacts.IsNamedExternalExport && !promoteToIIFE) { + if (facts & ClassFacts.IsNamedExternalExport) { return [ statement, - factory.createExternalModuleExport(factory.getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)) + factory.createExternalModuleExport(factory.getDeclarationName(node, /*allowComments*/ false, /*allowSourceMaps*/ true)) ]; } } @@ -1293,6 +1291,37 @@ export function transformTypeScript(context: TransformationContext) { ); } + function transformConstructorBodyWorker(statementsOut: Statement[], statementsIn: NodeArray, statementOffset: number, superPath: readonly number[], superPathDepth: number, initializerStatements: readonly Statement[]) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements: Statement[] = []; + + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ 0, + superPath, + superPathDepth + 1, + initializerStatements); + + const tryBlockStatementsArray = factory.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + + statementsOut.push(factory.updateTryStatement( + superStatement, + factory.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock))); + } + else { + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + function transformConstructorBody(body: Block, constructor: ConstructorDeclaration) { const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, p => isParameterPropertyDeclaration(p, constructor)) as readonly ParameterPropertyDeclaration[] | undefined; @@ -1305,15 +1334,7 @@ export function transformTypeScript(context: TransformationContext) { resumeLexicalEnvironment(); const prologueStatementCount = factory.copyPrologue(body.statements, statements, /*ensureUseStrict*/ false, visitor); - const superStatementIndex = findSuperStatementIndex(body.statements, prologueStatementCount); - - // If there was a super call, visit existing statements up to and including it - if (superStatementIndex >= 0) { - addRange( - statements, - visitNodes(body.statements, visitor, isStatement, prologueStatementCount, superStatementIndex + 1 - prologueStatementCount), - ); - } + const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount); // Transform parameters into property assignments. Transforms this: // @@ -1328,24 +1349,14 @@ export function transformTypeScript(context: TransformationContext) { // } // const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); - - // If there is a super() call, the parameter properties go immediately after it - if (superStatementIndex >= 0) { - addRange(statements, parameterPropertyAssignments); + if (superPath.length) { + transformConstructorBodyWorker(statements, body.statements, prologueStatementCount, superPath, /*superPathDepth*/ 0, parameterPropertyAssignments); } - // Since there was no super() call, parameter properties are the first statements in the constructor after any prologue statements else { - statements = [ - ...statements.slice(0, prologueStatementCount), - ...parameterPropertyAssignments, - ...statements.slice(prologueStatementCount), - ]; + addRange(statements, parameterPropertyAssignments); + addRange(statements, visitNodes(body.statements, visitor, isStatement, prologueStatementCount)); } - // Add remaining statements from the body, skipping the super() call if it was found and any (already added) prologue statements - const start = superStatementIndex >= 0 ? superStatementIndex + 1 : prologueStatementCount; - addRange(statements, visitNodes(body.statements, visitor, isStatement, start)); - // End the lexical environment. statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const block = factory.createBlock(setTextRange(factory.createNodeArray(statements), body.statements), /*multiLine*/ true); diff --git a/src/compiler/transformers/utilities.ts b/src/compiler/transformers/utilities.ts index c094a8dc0e76c..d01206af9057f 100644 --- a/src/compiler/transformers/utilities.ts +++ b/src/compiler/transformers/utilities.ts @@ -12,20 +12,19 @@ import { ClassExpression, ClassLikeDeclaration, ClassStaticBlockDeclaration, - CompilerOptions, CompoundAssignmentOperator, CoreTransformationContext, createExternalHelpersImportDeclarationIfNeeded, - createMultiMap, Decorator, - EmitResolver, ExportAssignment, ExportDeclaration, ExportSpecifier, Expression, filter, + formatGeneratedName, FunctionDeclaration, FunctionLikeDeclaration, + GeneratedIdentifierFlags, getAllAccessorDeclarations, getDecorators, getFirstConstructorWithBody, @@ -53,6 +52,7 @@ import { isIdentifier, isKeyword, isLocalName, + isMemberName, isMethodOrAccessor, isNamedExports, isNamedImports, @@ -62,6 +62,7 @@ import { isStatic, isStringLiteralLike, isSuperCall, + isTryStatement, LogicalOperatorOrHigher, map, MethodDeclaration, @@ -83,8 +84,9 @@ import { SuperCall, SyntaxKind, TransformationContext, + unorderedRemoveItem, VariableDeclaration, - VariableStatement, + VariableStatement } from "../_namespaces/ts"; /** @internal */ @@ -97,7 +99,7 @@ export function getOriginalNodeId(node: Node) { export interface ExternalModuleInfo { externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; // imports of other external modules externalHelpersImportDeclaration: ImportDeclaration | undefined; // import of external helpers - exportSpecifiers: Map; // file-local export specifiers by name (no reexports) + exportSpecifiers: IdentifierNameMap; // file-local export specifiers by name (no reexports) exportedBindings: Identifier[][]; // exported names of local declarations exportedNames: Identifier[] | undefined; // all exported names in the module, both local and reexported exportEquals: ExportAssignment | undefined; // an export= declaration if one was present @@ -159,9 +161,11 @@ export function getImportNeedsImportDefaultHelper(node: ImportDeclaration): bool } /** @internal */ -export function collectExternalModuleInfo(context: TransformationContext, sourceFile: SourceFile, resolver: EmitResolver, compilerOptions: CompilerOptions): ExternalModuleInfo { +export function collectExternalModuleInfo(context: TransformationContext, sourceFile: SourceFile): ExternalModuleInfo { + const resolver = context.getEmitResolver(); + const compilerOptions = context.getCompilerOptions(); const externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[] = []; - const exportSpecifiers = createMultiMap(); + const exportSpecifiers = new IdentifierNameMultiMap(); const exportedBindings: Identifier[][] = []; const uniqueExports = new Map(); let exportedNames: Identifier[] | undefined; @@ -298,7 +302,7 @@ export function collectExternalModuleInfo(context: TransformationContext, source if (!uniqueExports.get(idText(specifier.name))) { const name = specifier.propertyName || specifier.name; if (!node.moduleSpecifier) { - exportSpecifiers.add(idText(name), specifier); + exportSpecifiers.add(name, specifier); } const decl = resolver.getReferencedImportDeclaration(name) @@ -348,6 +352,83 @@ function multiMapSparseArrayAdd(map: V[][], key: number, value: V): V[] { return values; } +/** @internal */ +export class IdentifierNameMap { + private readonly _map = new Map(); + + get size() { + return this._map.size; + } + + has(key: Identifier) { + return this._map.has(IdentifierNameMap.toKey(key)); + } + + get(key: Identifier) { + return this._map.get(IdentifierNameMap.toKey(key)); + } + + set(key: Identifier, value: V) { + this._map.set(IdentifierNameMap.toKey(key), value); + return this; + } + + delete(key: Identifier): boolean { + return this._map?.delete(IdentifierNameMap.toKey(key)) ?? false; + } + + clear(): void { + this._map.clear(); + } + + values() { + return this._map.values(); + } + + private static toKey(name: Identifier | PrivateIdentifier): string { + if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) { + const autoGenerate = name.emitNode.autoGenerate; + if ((autoGenerate.flags & GeneratedIdentifierFlags.KindMask) === GeneratedIdentifierFlags.Node) { + const node = getNodeForGeneratedName(name); + const baseName = isMemberName(node) && node !== name ? IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`; + return formatGeneratedName(/*privateName*/ false, autoGenerate.prefix, baseName, autoGenerate.suffix, IdentifierNameMap.toKey); + } + else { + const baseName = `(auto@${autoGenerate.id})`; + return formatGeneratedName(/*privateName*/ false, autoGenerate.prefix, baseName, autoGenerate.suffix, IdentifierNameMap.toKey); + } + } + if (isPrivateIdentifier(name)) { + return idText(name).slice(1); + } + return idText(name); + } +} + +/** @internal */ +export class IdentifierNameMultiMap extends IdentifierNameMap { + add(key: Identifier, value: V): V[] { + let values = this.get(key); + if (values) { + values.push(value); + } + else { + this.set(key, values = [value]); + } + return values; + } + + remove(key: Identifier, value: V) { + const values = this.get(key); + if (values) { + unorderedRemoveItem(values, value); + if (!values.length) { + this.delete(key); + } + } + } +} + /** * Used in the module transformer to check if an expression is reasonably without sideeffect, * and thus better to copy into multiple places rather than to cache in a temporary variable @@ -417,21 +498,34 @@ export function getSuperCallFromStatement(statement: Statement): SuperCall | und : undefined; } -/** - * @returns The index (after prologue statements) of a super call, or -1 if not found. - * - * @internal - */ -export function findSuperStatementIndex(statements: NodeArray, indexAfterLastPrologueStatement: number) { - for (let i = indexAfterLastPrologueStatement; i < statements.length; i += 1) { +function findSuperStatementIndexPathWorker(statements: NodeArray, start: number, indices: number[]) { + for (let i = start; i < statements.length; i += 1) { const statement = statements[i]; - if (getSuperCallFromStatement(statement)) { - return i; + indices.unshift(i); + return true; + } + else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) { + indices.unshift(i); + return true; } } - return -1; + return false; +} + +/** + * Finds a path of indices to navigate to a `super()` call, descending only through `try` statements. + * + * @returns An array of indicies to walk down through `try` statements, with the last element being the index of + * the statement containing `super()`. Otherwise, an empty array if `super()` was not found. + * + * @internal + */ +export function findSuperStatementIndexPath(statements: NodeArray, start: number) { + const indices: number[] = []; + findSuperStatementIndexPathWorker(statements, start, indices); + return indices; } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c97bbaffa2834..873554db78278 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1,5 +1,6 @@ import { BaseNodeFactory, + CheckMode, CreateSourceFileOptions, EmitHelperFactory, GetCanonicalFileName, @@ -217,6 +218,7 @@ export const enum SyntaxKind { UndefinedKeyword, UniqueKeyword, UnknownKeyword, + UsingKeyword, FromKeyword, GlobalKeyword, BigIntKeyword, @@ -662,6 +664,7 @@ export type KeywordSyntaxKind = | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword + | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword @@ -790,25 +793,27 @@ export const enum NodeFlags { None = 0, Let = 1 << 0, // Variable declaration Const = 1 << 1, // Variable declaration - NestedNamespace = 1 << 2, // Namespace declaration - Synthesized = 1 << 3, // Node was synthesized during transformation - Namespace = 1 << 4, // Namespace declaration - OptionalChain = 1 << 5, // Chained MemberExpression rooted to a pseudo-OptionalExpression - ExportContext = 1 << 6, // Export context (initialized by binding) - ContainsThis = 1 << 7, // Interface contains references to "this" - HasImplicitReturn = 1 << 8, // If function implicitly returns on one of codepaths (initialized by binding) - HasExplicitReturn = 1 << 9, // If function has explicit reachable return on one of codepaths (initialized by binding) - GlobalAugmentation = 1 << 10, // Set if module declaration is an augmentation for the global scope - HasAsyncFunctions = 1 << 11, // If the file has async functions (initialized by binding) - DisallowInContext = 1 << 12, // If node was parsed in a context where 'in-expressions' are not allowed - YieldContext = 1 << 13, // If node was parsed in the 'yield' context created when parsing a generator - DecoratorContext = 1 << 14, // If node was parsed as part of a decorator - AwaitContext = 1 << 15, // If node was parsed in the 'await' context created when parsing an async function - DisallowConditionalTypesContext = 1 << 16, // If node was parsed in a context where conditional types are not allowed - ThisNodeHasError = 1 << 17, // If the parser encountered an error when parsing the code that created this node - JavaScriptFile = 1 << 18, // If node was parsed in a JavaScript - ThisNodeOrAnySubNodesHasError = 1 << 19, // If this node or any of its children had an error - HasAggregatedChildData = 1 << 20, // If we've computed data from children and cached it in this node + Using = 1 << 2, // Variable declaration + AwaitUsing = Const | Using, // Variable declaration (NOTE: on a single node these flags would otherwise be mutually exclusive) + NestedNamespace = 1 << 3, // Namespace declaration + Synthesized = 1 << 4, // Node was synthesized during transformation + Namespace = 1 << 5, // Namespace declaration + OptionalChain = 1 << 6, // Chained MemberExpression rooted to a pseudo-OptionalExpression + ExportContext = 1 << 7, // Export context (initialized by binding) + ContainsThis = 1 << 8, // Interface contains references to "this" + HasImplicitReturn = 1 << 9, // If function implicitly returns on one of codepaths (initialized by binding) + HasExplicitReturn = 1 << 10, // If function has explicit reachable return on one of codepaths (initialized by binding) + GlobalAugmentation = 1 << 11, // Set if module declaration is an augmentation for the global scope + HasAsyncFunctions = 1 << 12, // If the file has async functions (initialized by binding) + DisallowInContext = 1 << 13, // If node was parsed in a context where 'in-expressions' are not allowed + YieldContext = 1 << 14, // If node was parsed in the 'yield' context created when parsing a generator + DecoratorContext = 1 << 15, // If node was parsed as part of a decorator + AwaitContext = 1 << 16, // If node was parsed in the 'await' context created when parsing an async function + DisallowConditionalTypesContext = 1 << 17, // If node was parsed in a context where conditional types are not allowed + ThisNodeHasError = 1 << 18, // If the parser encountered an error when parsing the code that created this node + JavaScriptFile = 1 << 19, // If node was parsed in a JavaScript + ThisNodeOrAnySubNodesHasError = 1 << 20, // If this node or any of its children had an error + HasAggregatedChildData = 1 << 21, // If we've computed data from children and cached it in this node // These flags will be set when the parser encounters a dynamic import expression or 'import.meta' to avoid // walking the tree if the flags are not set. However, these flags are just a approximation @@ -819,17 +824,18 @@ export const enum NodeFlags { // removal, it is likely that users will add the import anyway. // The advantage of this approach is its simplicity. For the case of batch compilation, // we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used. - /** @internal */ PossiblyContainsDynamicImport = 1 << 21, - /** @internal */ PossiblyContainsImportMeta = 1 << 22, + /** @internal */ PossiblyContainsDynamicImport = 1 << 22, + /** @internal */ PossiblyContainsImportMeta = 1 << 23, - JSDoc = 1 << 23, // If node was parsed inside jsdoc - /** @internal */ Ambient = 1 << 24, // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier. - /** @internal */ InWithStatement = 1 << 25, // If any ancestor of node was the `statement` of a WithStatement (not the `expression`) - JsonFile = 1 << 26, // If node was parsed in a Json - /** @internal */ TypeCached = 1 << 27, // If a type was cached for node at any point - /** @internal */ Deprecated = 1 << 28, // If has '@deprecated' JSDoc tag + JSDoc = 1 << 24, // If node was parsed inside jsdoc + /** @internal */ Ambient = 1 << 25, // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier. + /** @internal */ InWithStatement = 1 << 26, // If any ancestor of node was the `statement` of a WithStatement (not the `expression`) + JsonFile = 1 << 27, // If node was parsed in a Json + /** @internal */ TypeCached = 1 << 28, // If a type was cached for node at any point + /** @internal */ Deprecated = 1 << 29, // If has '@deprecated' JSDoc tag - BlockScoped = Let | Const, + BlockScoped = Let | Const | Using, + Constant = Const | Using, ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, ReachabilityAndEmitFlags = ReachabilityCheckFlags | HasAsyncFunctions, @@ -1335,7 +1341,7 @@ export type HasIllegalDecorators = ; // NOTE: Changing the following list requires changes to: -// - `canHaveModifiers` in factory/utilities.ts +// - `canHaveModifiers` in factory/utilitiesPublic.ts // - `updateModifiers` in factory/nodeFactory.ts export type HasModifiers = | TypeParameterDeclaration @@ -1722,11 +1728,9 @@ export type PropertyName = Identifier | StringLiteral | NumericLiteral | Compute export type MemberName = Identifier | PrivateIdentifier; export type DeclarationName = - | Identifier - | PrivateIdentifier + | PropertyName + | JsxAttributeName | StringLiteralLike - | NumericLiteral - | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression; @@ -2332,7 +2336,7 @@ export interface LiteralTypeNode extends TypeNode { export interface StringLiteral extends LiteralExpression, Declaration { readonly kind: SyntaxKind.StringLiteral; - /** @internal */ readonly textSourceNode?: Identifier | StringLiteralLike | NumericLiteral | PrivateIdentifier; // Allows a StringLiteral to get its text from another node (used by transforms). + /** @internal */ readonly textSourceNode?: Identifier | StringLiteralLike | NumericLiteral | PrivateIdentifier | JsxNamespacedName; // Allows a StringLiteral to get its text from another node (used by transforms). /** * Note: this is only set when synthesizing a node, not during parsing. * @@ -2342,7 +2346,7 @@ export interface StringLiteral extends LiteralExpression, Declaration { } export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; -export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; +export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral | JsxNamespacedName; export interface TemplateLiteralTypeNode extends TypeNode { kind: SyntaxKind.TemplateLiteralType, @@ -3191,7 +3195,7 @@ export type JsxTagNameExpression = ; export interface JsxTagNamePropertyAccess extends PropertyAccessExpression { - readonly expression: JsxTagNameExpression; + readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; } export interface JsxAttributes extends PrimaryExpression, Declaration { @@ -3200,7 +3204,7 @@ export interface JsxAttributes extends PrimaryExpression, Declaration { readonly parent: JsxOpeningLikeElement; } -export interface JsxNamespacedName extends PrimaryExpression { +export interface JsxNamespacedName extends Node { readonly kind: SyntaxKind.JsxNamespacedName; readonly name: Identifier; readonly namespace: Identifier; @@ -3260,7 +3264,6 @@ export type JsxAttributeValue = export interface JsxSpreadAttribute extends ObjectLiteralElement { readonly kind: SyntaxKind.JsxSpreadAttribute; - readonly name: PropertyName; readonly parent: JsxAttributes; readonly expression: Expression; } @@ -4559,7 +4562,7 @@ export interface ScriptReferenceHost { getCurrentDirectory(): string; } -export interface ParseConfigHost { +export interface ParseConfigHost extends ModuleResolutionHost { useCaseSensitiveFileNames: boolean; readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; @@ -4817,6 +4820,7 @@ export interface Program extends ScriptReferenceHost { * @internal */ resolvedLibReferences: Map | undefined; + /** @internal */ getCurrentPackagesMap(): Map | undefined; /** * Is the file emitted file * @@ -4952,6 +4956,9 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost { isSourceOfProjectReferenceRedirect(fileName: string): boolean; readonly redirectTargetsMap: RedirectTargetsMap; + + typesPackageExists(packageName: string): boolean; + packageBundlesTypes(packageName: string): boolean; } export interface TypeChecker { @@ -4985,7 +4992,7 @@ export interface TypeChecker { * @internal */ getParameterType(signature: Signature, parameterIndex: number): Type; - /** @internal */ getParameterIdentifierNameAtPosition(signature: Signature, parameterIndex: number): [parameterName: __String, isRestParameter: boolean] | undefined; + /** @internal */ getParameterIdentifierInfoAtPosition(signature: Signature, parameterIndex: number): { parameter: Identifier, parameterName: __String, isRestParameter: boolean } | undefined; getNullableType(type: Type, flags: TypeFlags): Type; getNonNullableType(type: Type): Type; /** @internal */ getNonOptionalType(type: Type): Type; @@ -5074,7 +5081,7 @@ export interface TypeChecker { */ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; /** @internal */ getResolvedSignatureForSignatureHelp(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; - /** @internal */ getResolvedSignatureForStringLiteralCompletions(call: CallLikeExpression, editingArgument: Node, candidatesOutArray: Signature[]): Signature | undefined; + /** @internal */ getResolvedSignatureForStringLiteralCompletions(call: CallLikeExpression, editingArgument: Node, candidatesOutArray: Signature[], checkMode?: CheckMode): Signature | undefined; /** @internal */ getExpandedParameters(sig: Signature): readonly (readonly Symbol[])[]; /** @internal */ hasEffectiveRestParameter(sig: Signature): boolean; /** @internal */ containsArgumentsReference(declaration: SignatureDeclaration): boolean; @@ -6058,6 +6065,7 @@ export interface NodeLinks { spreadIndices?: { first: number | undefined, last: number | undefined }; // Indices of first and last spread elements in array literal parameterInitializerContainsUndefined?: boolean; // True if this is a parameter declaration whose type annotation contains "undefined". fakeScopeForSignatureDeclaration?: boolean; // True if this is a fake scope injected into an enclosing declaration chain. + assertionExpressionType?: Type; // Cached type of the expression of a type assertion } /** @internal */ @@ -6426,7 +6434,7 @@ export interface TupleType extends GenericType { hasRestElement: boolean; combinedFlags: ElementFlags; readonly: boolean; - labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; + labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]; } export interface TupleTypeReference extends TypeReference { @@ -6462,6 +6470,8 @@ export interface UnionType extends UnionOrIntersectionType { keyPropertyName?: __String; // Property with unique unit type that exists in every object/intersection in union type /** @internal */ constituentMap?: Map; // Constituents keyed by unit type discriminants + /** @internal */ + arrayFallbackSignatures?: readonly Signature[]; // Special remapped signature list for unions of arrays } export interface IntersectionType extends UnionOrIntersectionType { @@ -6714,11 +6724,12 @@ export const enum SignatureFlags { IsOuterCallChain = 1 << 4, // Indicates signature comes from a CallChain that is the outermost chain of an optional expression IsUntypedSignatureInJSFile = 1 << 5, // Indicates signature is from a js file and has no types IsNonInferrable = 1 << 6, // Indicates signature comes from a non-inferrable type + IsSignatureCandidateForOverloadFailure = 1 << 7, // We do not propagate `IsInnerCallChain` or `IsOuterCallChain` 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 | Abstract | IsUntypedSignatureInJSFile, + PropagatingFlags = HasRestParameter | HasLiteralTypes | Abstract | IsUntypedSignatureInJSFile | IsSignatureCandidateForOverloadFailure, CallChainFlags = IsInnerCallChain | IsOuterCallChain, } @@ -6925,6 +6936,16 @@ export interface DiagnosticMessage { elidedInCompatabilityPyramid?: boolean; } +/** @internal */ +export interface RepopulateModuleNotFoundDiagnosticChain { + moduleReference: string; + mode: ResolutionMode; + packageName: string | undefined; +} + +/** @internal */ +export type RepopulateDiagnosticChainInfo = RepopulateModuleNotFoundDiagnosticChain; + /** * A linked list of formatted diagnostic messages to be used as part of a multiline message. * It is built from the bottom up, leaving the head to be the "main" diagnostic. @@ -6936,6 +6957,8 @@ export interface DiagnosticMessageChain { category: DiagnosticCategory; code: number; next?: DiagnosticMessageChain[]; + /** @internal */ + repopulateInfo?: () => RepopulateDiagnosticChainInfo; } export interface Diagnostic extends DiagnosticRelatedInformation { @@ -7928,10 +7951,11 @@ export interface SourceMapSource { } /** @internal */ +// NOTE: Any new properties should be accounted for in `mergeEmitNode` in factory/nodeFactory.ts export interface EmitNode { - annotatedNodes?: Node[]; // Tracks Parse-tree nodes with EmitNodes for eventual cleanup. flags: EmitFlags; // Flags that customize emit internalFlags: InternalEmitFlags; // Internal flags that customize emit + annotatedNodes?: Node[]; // Tracks Parse-tree nodes with EmitNodes for eventual cleanup. leadingComments?: SynthesizedComment[]; // Synthesized leading comments trailingComments?: SynthesizedComment[]; // Synthesized trailing comments commentRange?: TextRange; // The text range to use when emitting leading or trailing comments @@ -7944,7 +7968,8 @@ export interface EmitNode { startsOnNewLine?: boolean; // If the node should begin on a new line snippetElement?: SnippetElement; // Snippet element of the node typeNode?: TypeNode; // VariableDeclaration type - classThis?: Identifier; // Identifier that points to the final class constructor after decorators are applied + classThis?: Identifier; // Identifier that points to a captured static `this` for a class which may be updated after decorators are applied + assignedName?: Expression; // Expression used as the assigned name of a class or function identifierTypeArguments?: NodeArray; // Only defined on synthesized identifiers. Though not syntactically valid, used in emitting diagnostics, quickinfo, and signature help. autoGenerate: AutoGenerateInfo | undefined; // Used for auto-generated identifiers and private identifiers. generatedImportReference?: ImportSpecifier; // Reference to the generated import specifier this identifier refers to @@ -8076,9 +8101,10 @@ export const enum ExternalEmitHelpers { CreateBinding = 1 << 22, // __createBinding (use by the module transform for (re)exports and namespace imports) SetFunctionName = 1 << 23, // __setFunctionName (used by class fields and ECMAScript decorators) PropKey = 1 << 24, // __propKey (used by class fields and ECMAScript decorators) + AddDisposableResourceAndDisposeResources = 1 << 25, // __addDisposableResource and __disposeResources (used by ESNext transformations) FirstEmitHelper = Extends, - LastEmitHelper = PropKey, + LastEmitHelper = AddDisposableResourceAndDisposeResources, // Helpers included by ES2015 for..of ForOfIncludes = Values, @@ -8173,7 +8199,8 @@ export type WrappedExpression = | T ; -export type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; +/** @internal */ +export type TypeOfTag = "null" | "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; /** @internal */ export interface CallBinding { @@ -8220,6 +8247,7 @@ export interface ParenthesizerRules { export interface NodeConverters { convertToFunctionBlock(node: ConciseBody, multiLine?: boolean): Block; convertToFunctionExpression(node: FunctionDeclaration): FunctionExpression; + convertToClassExpression(node: ClassDeclaration): ClassExpression; convertToArrayAssignmentElement(element: ArrayBindingOrAssignmentElement): Expression; convertToObjectAssignmentElement(element: ObjectBindingOrAssignmentElement): ObjectLiteralElementLike; convertToAssignmentPattern(node: BindingOrAssignmentPattern): AssignmentPattern; @@ -8237,11 +8265,15 @@ export interface GeneratedNamePart { suffix?: string; } +export type ImmediatelyInvokedFunctionExpression = CallExpression & { readonly expression: FunctionExpression; }; +export type ImmediatelyInvokedArrowFunction = CallExpression & { readonly expression: ParenthesizedExpression & { readonly expression: ArrowFunction; }; }; + export interface NodeFactory { /** @internal */ readonly parenthesizer: ParenthesizerRules; /** @internal */ readonly converters: NodeConverters; /** @internal */ readonly baseFactory: BaseNodeFactory; /** @internal */ readonly flags: NodeFactoryFlags; + createNodeArray(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray; // @@ -8860,8 +8892,8 @@ export interface NodeFactory { createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; createVoidZero(): VoidExpression; @@ -8869,6 +8901,7 @@ export interface NodeFactory { createExternalModuleExport(exportName: Identifier): ExportDeclaration; /** @internal */ createTypeCheck(value: Expression, tag: TypeOfTag): Expression; + /** @internal */ createIsNotTypeCheck(value: Expression, tag: TypeOfTag): Expression; /** @internal */ createMethodCall(object: Expression, methodName: string | Identifier, argumentsList: readonly Expression[]): CallExpression; /** @internal */ createGlobalMethodCall(globalObjectName: string, globalMethodName: string, argumentsList: readonly Expression[]): CallExpression; /** @internal */ createFunctionBindCall(target: Expression, thisArg: Expression, argumentsList: readonly Expression[]): CallExpression; @@ -9040,6 +9073,7 @@ export interface NodeFactory { */ cloneNode(node: T): T; /** @internal */ updateModifiers(node: T, modifiers: readonly Modifier[] | ModifierFlags | undefined): T; + /** @internal */ updateModifierLike(node: T, modifierLike: readonly ModifierLike[] | undefined): T; } /** @internal */ @@ -9952,6 +9986,7 @@ export interface UserPreferences { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; readonly organizeImportsIgnoreCase?: "auto" | boolean; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index fde771ab80db5..150f3a066b9d2 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -52,6 +52,7 @@ import { ClassDeclaration, ClassElement, ClassExpression, + classHasDeclaredOrExplicitlyAssignedName, ClassLikeDeclaration, ClassStaticBlockDeclaration, combinePaths, @@ -73,6 +74,7 @@ import { ConditionalExpression, ConstructorDeclaration, ConstructSignatureDeclaration, + ContainerFlags, contains, containsPath, createGetCanonicalFileName, @@ -162,6 +164,7 @@ import { GetCanonicalFileName, getCombinedModifierFlags, getCombinedNodeFlags, + getContainerFlags, getDirectoryPath, getJSDocAugmentsTag, getJSDocDeprecatedTagNoCache, @@ -293,6 +296,7 @@ import { isJSDocTypeTag, isJsxChild, isJsxFragment, + isJsxNamespacedName, isJsxOpeningLikeElement, isJsxText, isLeftHandSideExpression, @@ -378,10 +382,12 @@ import { LiteralLikeNode, LogicalOperator, LogicalOrCoalescingAssignmentOperator, + mangleScopedPackageName, map, mapDefined, MapLike, MemberName, + MetaProperty, MethodDeclaration, MethodSignature, ModeAwareCache, @@ -410,6 +416,7 @@ import { noop, normalizePath, NoSubstitutionTemplateLiteral, + NumberLiteralType, NumericLiteral, ObjectFlags, ObjectFlagsType, @@ -488,6 +495,7 @@ import { stringContains, StringLiteral, StringLiteralLike, + StringLiteralType, stringToToken, SuperCall, SuperExpression, @@ -525,6 +533,7 @@ import { TypeAliasDeclaration, TypeAssertion, TypeChecker, + TypeCheckerHost, TypeElement, TypeFlags, TypeLiteralNode, @@ -537,6 +546,7 @@ import { TypeReferenceNode, unescapeLeadingUnderscores, UnionOrIntersectionTypeNode, + UniqueESSymbolType, UserPreferences, ValidImportTypeNode, VariableDeclaration, @@ -780,7 +790,37 @@ export function moduleResolutionIsEqualTo(oldResolution: ResolvedModuleWithFaile oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && - packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId); + packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && + oldResolution.node10Result === newResolution.node10Result; +} + +/** @internal */ +export function createModuleNotFoundChain(sourceFile: SourceFile, host: TypeCheckerHost, moduleReference: string, mode: ResolutionMode, packageName: string) { + const node10Result = sourceFile.resolvedModules?.get(moduleReference, mode)?.node10Result; + const result = node10Result + ? chainDiagnosticMessages( + /*details*/ undefined, + Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, + node10Result, + node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName) + : host.typesPackageExists(packageName) + ? chainDiagnosticMessages( + /*details*/ undefined, + Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1, + packageName, mangleScopedPackageName(packageName)) + : host.packageBundlesTypes(packageName) + ? chainDiagnosticMessages( + /*details*/ undefined, + Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1, + packageName, + moduleReference) + : chainDiagnosticMessages( + /*details*/ undefined, + 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(packageName)); + if (result) result.repopulateInfo = () => ({ moduleReference, mode, packageName: packageName === moduleReference ? undefined : packageName }); + return result; } function packageIdIsEqual(a: PackageId | undefined, b: PackageId | undefined): boolean { @@ -1824,7 +1864,7 @@ function isCommonJSContainingModuleKind(kind: ModuleKind) { /** @internal */ export function isEffectiveExternalModule(node: SourceFile, compilerOptions: CompilerOptions) { - return isExternalModule(node) || getIsolatedModules(compilerOptions) || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator); + return isExternalModule(node) || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator); } /** @@ -1989,6 +2029,11 @@ export function isAnyImportOrReExport(node: Node): node is AnyImportOrReExport { return isAnyImportSyntax(node) || isExportDeclaration(node); } +/** @internal */ +export function getEnclosingContainer(node: Node): Node | undefined { + return findAncestor(node.parent, n => !!(getContainerFlags(n) & ContainerFlags.IsContainer)); +} + // Gets the nearest enclosing block scope container that has the provided node // as a descendant, that is not the provided node. /** @internal */ @@ -2024,7 +2069,7 @@ export function isComputedNonLiteralName(name: PropertyName): boolean { } /** @internal */ -export function tryGetTextOfPropertyName(name: PropertyName | NoSubstitutionTemplateLiteral): __String | undefined { +export function tryGetTextOfPropertyName(name: PropertyName | NoSubstitutionTemplateLiteral | JsxAttributeName): __String | undefined { switch (name.kind) { case SyntaxKind.Identifier: case SyntaxKind.PrivateIdentifier: @@ -2036,13 +2081,15 @@ export function tryGetTextOfPropertyName(name: PropertyName | NoSubstitutionTemp case SyntaxKind.ComputedPropertyName: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return undefined; + case SyntaxKind.JsxNamespacedName: + return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); } } /** @internal */ -export function getTextOfPropertyName(name: PropertyName | NoSubstitutionTemplateLiteral): __String { +export function getTextOfPropertyName(name: PropertyName | NoSubstitutionTemplateLiteral | JsxAttributeName): __String { return Debug.checkDefined(tryGetTextOfPropertyName(name)); } @@ -2293,14 +2340,36 @@ export function isDeclarationReadonly(declaration: Declaration): boolean { return !!(getCombinedModifierFlags(declaration) & ModifierFlags.Readonly && !isParameterPropertyDeclaration(declaration, declaration.parent)); } -/** @internal */ +/** + * Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of an `await using` declaration. + * @internal + */ +export function isVarAwaitUsing(node: VariableDeclaration | VariableDeclarationList): boolean { + return (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === NodeFlags.AwaitUsing; +} + +/** + * Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `using` declaration. + * @internal + */ +export function isVarUsing(node: VariableDeclaration | VariableDeclarationList): boolean { + return (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === NodeFlags.Using; +} + +/** + * Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `const` declaration. + * @internal + */ export function isVarConst(node: VariableDeclaration | VariableDeclarationList): boolean { - return !!(getCombinedNodeFlags(node) & NodeFlags.Const); + return (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === NodeFlags.Const; } -/** @internal */ +/** + * Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `let` declaration. + * @internal + */ export function isLet(node: Node): boolean { - return !!(getCombinedNodeFlags(node) & NodeFlags.Let); + return (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === NodeFlags.Let; } /** @internal */ @@ -2773,6 +2842,12 @@ export function getContainingFunctionOrClassStaticBlock(node: Node): SignatureDe return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } +/** @internal */ +export function getContainingClassExcludingClassDecorators(node: Node): ClassLikeDeclaration | undefined { + const decorator = findAncestor(node.parent, n => isClassLike(n) ? "quit" : isDecorator(n)); + return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); +} + /** @internal */ export type ThisContainer = | FunctionDeclaration @@ -3074,7 +3149,7 @@ export function getEntityNameFromTypeNode(node: TypeNode): EntityNameOrEntityNam } /** @internal */ -export function getInvokedExpression(node: CallLikeExpression): Expression { +export function getInvokedExpression(node: CallLikeExpression): Expression | JsxTagNameExpression { switch (node.kind) { case SyntaxKind.TaggedTemplateExpression: return node.tag; @@ -4954,7 +5029,7 @@ export function isDynamicName(name: DeclarationName): boolean { } /** @internal */ -export function getPropertyNameForPropertyNameNode(name: PropertyName): __String | undefined { +export function getPropertyNameForPropertyNameNode(name: PropertyName | JsxAttributeName): __String | undefined { switch (name.kind) { case SyntaxKind.Identifier: case SyntaxKind.PrivateIdentifier: @@ -4974,6 +5049,8 @@ export function getPropertyNameForPropertyNameNode(name: PropertyName): __String return nameExpression.operand.text as __String; } return undefined; + case SyntaxKind.JsxNamespacedName: + return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); } @@ -4993,12 +5070,12 @@ export function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral { } /** @internal */ export function getTextOfIdentifierOrLiteral(node: PropertyNameLiteral | PrivateIdentifier): string { - return isMemberName(node) ? idText(node) : node.text; + return isMemberName(node) ? idText(node) : isJsxNamespacedName(node) ? getTextOfJsxNamespacedName(node) : node.text; } /** @internal */ export function getEscapedTextOfIdentifierOrLiteral(node: PropertyNameLiteral): __String { - return isMemberName(node) ? node.escapedText : escapeLeadingUnderscores(node.text); + return isMemberName(node) ? node.escapedText : isJsxNamespacedName(node) ? getEscapedTextOfJsxNamespacedName(node) : escapeLeadingUnderscores(node.text); } /** @internal */ @@ -5060,8 +5137,12 @@ export function isAnonymousFunctionDefinition(node: Expression, cb?: (node: Anon node = skipOuterExpressions(node); switch (node.kind) { case SyntaxKind.ClassExpression: + if (classHasDeclaredOrExplicitlyAssignedName(node as ClassExpression)) { + return false; + } + break; case SyntaxKind.FunctionExpression: - if ((node as ClassExpression | FunctionExpression).name) { + if ((node as FunctionExpression).name) { return false; } break; @@ -5127,7 +5208,8 @@ export type NamedEvaluation = | ParameterDeclaration & { readonly name: Identifier, readonly dotDotDotToken: undefined, readonly initializer: WrappedExpression } | BindingElement & { readonly name: Identifier, readonly dotDotDotToken: undefined, readonly initializer: WrappedExpression } | PropertyDeclaration & { readonly initializer: WrappedExpression } - | AssignmentExpression & { readonly left: Identifier, readonly right: WrappedExpression } + | AssignmentExpression & { readonly left: Identifier, readonly right: WrappedExpression } + | AssignmentExpression & { readonly left: Identifier, readonly right: WrappedExpression } | ExportAssignment & { readonly expression: WrappedExpression } ; @@ -7025,7 +7107,7 @@ export function isPropertyAccessEntityNameExpression(node: Node): node is Proper } /** @internal */ -export function tryGetPropertyAccessOrIdentifierToString(expr: Expression): string | undefined { +export function tryGetPropertyAccessOrIdentifierToString(expr: Expression | JsxTagNameExpression): string | undefined { if (isPropertyAccessExpression(expr)) { const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression); if (baseStr !== undefined) { @@ -7041,6 +7123,9 @@ export function tryGetPropertyAccessOrIdentifierToString(expr: Expression): stri else if (isIdentifier(expr)) { return unescapeLeadingUnderscores(expr.escapedText); } + else if (isJsxNamespacedName(expr)) { + return getTextOfJsxNamespacedName(expr); + } return undefined; } @@ -7052,7 +7137,8 @@ export function isPrototypeAccess(node: Node): node is BindableStaticAccessExpre /** @internal */ export function isRightSideOfQualifiedNameOrPropertyAccess(node: Node) { return (node.parent.kind === SyntaxKind.QualifiedName && (node.parent as QualifiedName).right === node) || - (node.parent.kind === SyntaxKind.PropertyAccessExpression && (node.parent as PropertyAccessExpression).name === node); + (node.parent.kind === SyntaxKind.PropertyAccessExpression && (node.parent as PropertyAccessExpression).name === node) || + (node.parent.kind === SyntaxKind.MetaProperty && (node.parent as MetaProperty).name === node); } /** @internal */ @@ -10230,3 +10316,25 @@ export function getTextOfJsxNamespacedName(node: JsxNamespacedName) { export function intrinsicTagNameToString(node: Identifier | JsxNamespacedName) { return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); } + +/** + * Indicates whether a type can be used as a property name. + * @internal + */ +export function isTypeUsableAsPropertyName(type: Type): type is StringLiteralType | NumberLiteralType | UniqueESSymbolType { + return !!(type.flags & TypeFlags.StringOrNumberLiteralOrUnique); +} + +/** + * Gets the symbolic name for a member from its type. + * @internal + */ +export function getPropertyNameFromType(type: StringLiteralType | NumberLiteralType | UniqueESSymbolType): __String { + if (type.flags & TypeFlags.UniqueESSymbol) { + return (type as UniqueESSymbolType).escapedName; + } + if (type.flags & (TypeFlags.StringLiteral | TypeFlags.NumberLiteral)) { + return escapeLeadingUnderscores("" + (type as StringLiteralType | NumberLiteralType).value); + } + return Debug.fail(); +} diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 3767bcc3f1118..62be656474719 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -68,6 +68,7 @@ import { FunctionLikeDeclaration, FunctionTypeNode, GeneratedIdentifier, + GeneratedIdentifierFlags, GeneratedPrivateIdentifier, GetAccessorDeclaration, getAssignmentDeclarationKind, @@ -604,7 +605,11 @@ export function getCombinedNodeFlagsAlwaysIncludeJSDoc(node: Declaration): Modif // list. By calling this function, all those flags are combined so that the client can treat // the node as if it actually had those flags. export function getCombinedNodeFlags(node: Node): NodeFlags { - return getCombinedFlags(node, n => n.flags); + return getCombinedFlags(node, getNodeFlags); +} + +function getNodeFlags(node: Node) { + return node.flags; } /** @internal */ @@ -1533,6 +1538,14 @@ export function isGeneratedPrivateIdentifier(node: Node): node is GeneratedPriva return isPrivateIdentifier(node) && node.emitNode?.autoGenerate !== undefined; } +/** @internal */ +export function isFileLevelReservedGeneratedIdentifier(node: GeneratedIdentifier) { + const flags = node.emitNode.autoGenerate.flags; + return !!(flags & GeneratedIdentifierFlags.FileLevel) + && !!(flags & GeneratedIdentifierFlags.Optimistic) + && !!(flags & GeneratedIdentifierFlags.ReservedInNestedScopes); +} + // Private Identifiers /** @internal */ export function isPrivateIdentifierClassElementDeclaration(node: Node): node is PrivateClassElementDeclaration { @@ -1941,7 +1954,6 @@ function isLeftHandSideExpressionKind(kind: SyntaxKind): boolean { case SyntaxKind.JsxElement: case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxFragment: - case SyntaxKind.JsxNamespacedName: case SyntaxKind.TaggedTemplateExpression: case SyntaxKind.ArrayLiteralExpression: case SyntaxKind.ParenthesizedExpression: diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index 1dd9ff02a2a9b..b216c8cb75de0 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -604,7 +604,6 @@ export function createWatchProgram(host: WatchCompiler if (hasChangedCompilerOptions) { newLine = updateNewLine(); if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { - debugger; resolutionCache.onChangesAffectModuleResolution(); } } @@ -724,7 +723,8 @@ export function createWatchProgram(host: WatchCompiler } // Create new source file if requested or the versions dont match - if (hostSourceFile === undefined || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile)) { + const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined; + if (hostSourceFile === undefined || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) { const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError); if (hostSourceFile) { if (sourceFile) { diff --git a/src/harness/client.ts b/src/harness/client.ts index e56cf5a206347..81ca520d9a566 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -36,6 +36,7 @@ import { ImplementationLocation, InlayHint, InlayHintKind, + InteractiveRefactorArguments, isString, JSDocTagInfo, LanguageService, @@ -52,6 +53,7 @@ import { Program, QuickInfo, RefactorEditInfo, + RefactorTriggerReason, ReferencedSymbol, ReferenceEntry, RenameInfo, @@ -757,11 +759,24 @@ export class SessionClient implements LanguageService { const request = this.processRequest(protocol.CommandTypes.ProvideInlayHints, args); const response = this.processResponse(request); - return response.body!.map(item => ({ // TODO: GH#18217 - ...item, - kind: item.kind as InlayHintKind, - position: this.lineOffsetToPosition(file, item.position), - })); + return response.body!.map(item => { + const { text, position } = item; + const hint = typeof text === "string" ? text : text.map(({ text, span }) => ({ + text, + span: span && { + start: this.lineOffsetToPosition(span.file, span.start), + length: this.lineOffsetToPosition(span.file, span.end) - this.lineOffsetToPosition(span.file, span.start), + }, + file: span && span.file + })); + + return ({ + ...item, + position: this.lineOffsetToPosition(file, position), + text: hint, + kind: item.kind as InlayHintKind + }); + }); } private createFileLocationOrRangeRequestArgs(positionOrRange: number | TextRange, fileName: string): protocol.FileLocationOrRangeRequestArgs { @@ -787,11 +802,25 @@ export class SessionClient implements LanguageService { return { file, line, offset, endLine, endOffset }; } - getApplicableRefactors(fileName: string, positionOrRange: number | TextRange): ApplicableRefactorInfo[] { - const args = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName); - + getApplicableRefactors( + fileName: string, + positionOrRange: number | TextRange, + preferences: UserPreferences | undefined, + triggerReason?: RefactorTriggerReason, + kind?: string, + includeInteractiveActions?: boolean): ApplicableRefactorInfo[] { + if (preferences) { // Temporarily set preferences + this.configure(preferences); + } + const args: protocol.GetApplicableRefactorsRequestArgs = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName); + args.triggerReason = triggerReason; + args.kind = kind; + args.includeInteractiveActions = includeInteractiveActions; const request = this.processRequest(protocol.CommandTypes.GetApplicableRefactors, args); const response = this.processResponse(request); + if (preferences) { // Restore preferences + this.configure(this.preferences || {}); + } return response.body!; // TODO: GH#18217 } @@ -808,17 +837,23 @@ export class SessionClient implements LanguageService { _formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, - actionName: string): RefactorEditInfo { - - const args = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName) as protocol.GetEditsForRefactorRequestArgs; + actionName: string, + preferences: UserPreferences | undefined, + interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo { + if (preferences) { // Temporarily set preferences + this.configure(preferences); + } + const args = + this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName) as protocol.GetEditsForRefactorRequestArgs; args.refactor = refactorName; args.action = actionName; + args.interactiveRefactorArguments = interactiveRefactorArguments; const request = this.processRequest(protocol.CommandTypes.GetEditsForRefactor, args); const response = this.processResponse(request); if (!response.body) { - return { edits: [], renameFilename: undefined, renameLocation: undefined }; + return { edits: [], renameFilename: undefined, renameLocation: undefined, notApplicableReason: undefined }; } const edits: FileTextChanges[] = this.convertCodeEditsToTextChanges(response.body.edits); @@ -829,10 +864,15 @@ export class SessionClient implements LanguageService { renameLocation = this.lineOffsetToPosition(renameFilename, response.body.renameLocation!); } + if (preferences) { // Restore preferences + this.configure(this.preferences || {}); + } + return { edits, renameFilename, - renameLocation + renameLocation, + notApplicableReason: response.body.notApplicableReason, }; } diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts index f72526fb4a129..00a4d80e90c73 100644 --- a/src/harness/evaluatorImpl.ts +++ b/src/harness/evaluatorImpl.ts @@ -16,8 +16,22 @@ for (const key of Object.getOwnPropertyNames(Symbol)) { Object.defineProperty(FakeSymbol, key, Object.getOwnPropertyDescriptor(Symbol, key)!); } -// Add "asyncIterator" if missing -if (!ts.hasProperty(FakeSymbol, "asyncIterator")) Object.defineProperty(FakeSymbol, "asyncIterator", { value: Symbol.for("Symbol.asyncIterator"), configurable: true }); +// Add symbols if missing +const symbolNames = [ + "asyncIterator", + "dispose", + "asyncDispose", + "metadata", +]; + +for (const symbolName of symbolNames) { + if (!ts.hasProperty(FakeSymbol, symbolName)) { + Object.defineProperty(FakeSymbol, symbolName, { + value: Symbol.for(`Symbol.${symbolName}`), + configurable: true, + }); + } +} export function evaluateTypeScript(source: string | { files: vfs.FileSet, rootFiles: string[], main: string }, options?: ts.CompilerOptions, globals?: Record) { if (typeof source === "string") source = { files: { [sourceFile]: source }, rootFiles: [sourceFile], main: sourceFile }; @@ -60,6 +74,7 @@ function getLoader(compilerOptions: ts.CompilerOptions, fs: vfs.FileSystem, glob case ts.ModuleKind.System: return new SystemLoader(fs, globals); case ts.ModuleKind.AMD: + return new AmdLoader(fs, globals); case ts.ModuleKind.None: default: throw new Error(`ModuleKind '${ts.ModuleKind[moduleKind]}' not supported by evaluator.`); @@ -171,7 +186,7 @@ class CommonJsLoader extends Loader { } const base = vpath.dirname(file); const localRequire = (id: string) => this.import(id, base); - const evaluateText = `(function (module, exports, require, __dirname, __filename, ${globalNames.join(", ")}) { ${text} })`; + const evaluateText = `(function (module, exports, require, __dirname, __filename, ${globalNames.join(", ")}) { ${text}\n})`; // eslint-disable-next-line no-eval const evaluateThunk = (void 0, eval)(evaluateText) as (module: any, exports: any, require: (id: string) => any, dirname: string, filename: string, ...globalArgs: any[]) => void; evaluateThunk.call(this.globals, module, module.exports, localRequire, vpath.dirname(file), file, ...globalArgs); @@ -281,7 +296,7 @@ class SystemLoader extends Loader { const localSystem: SystemGlobal = { register: (dependencies, declare) => this.instantiateModule(module, dependencies, declare) }; - const evaluateText = `(function (System, ${globalNames.join(", ")}) { ${text} })`; + const evaluateText = `(function (System, ${globalNames.join(", ")}) { ${text}\n})`; try { // eslint-disable-next-line no-eval const evaluateThunk = (void 0, eval)(evaluateText) as (System: any, ...globalArgs: any[]) => void; @@ -460,3 +475,278 @@ class SystemLoader extends Loader { } } } + +interface AmdModule { + file: string; + state: AmdModuleState; + dependencies: (AmdModule | "require" | "module" | "exports")[]; + dependers: AmdModule[]; + require: (id: string) => any; + requestedDependencies?: string[]; + declaration?: AmdModuleDefineCallback; + hasError?: boolean; + module: { exports: any; }; + error?: any; +} + +type AmdModuleDefineCallback = (...args: any[]) => any; +type AmdModuleDeclaration = AmdModuleDefineCallback | Record; + +const enum AmdModuleState { + // Instantiation phases: + Uninstantiated, + Instantiated, + + // Linker phases: + AddingDependencies, + AllDependenciesAdded, + AllDependenciesInstantiated, + Linked, + + // Evaluation phases: + Evaluating, + Ready, +} + +type AmdDefineArgsUnnamedModuleNoDependencies = [declare: AmdModuleDeclaration]; +type AmdDefineArgsUnnamedModule = [dependencies: string[], declare: AmdModuleDeclaration]; +type AmdDefineArgsNamedModuleNoDependencies = [id: string, declare: AmdModuleDeclaration]; +type AmdDefineArgsNamedModule = [id: string, dependencies: string[], declare: AmdModuleDeclaration]; +type AmdDefineArgs = AmdDefineArgsUnnamedModuleNoDependencies | AmdDefineArgsUnnamedModule | AmdDefineArgsNamedModuleNoDependencies | AmdDefineArgsNamedModule; + +function isAmdDefineArgsUnnamedModuleNoDependencies(args: AmdDefineArgs): args is AmdDefineArgsUnnamedModuleNoDependencies { + return args.length === 1; +} + +function isAmdDefineArgsUnnamedModule(args: AmdDefineArgs): args is AmdDefineArgsUnnamedModule { + return args.length === 2 && Array.isArray(args[0]); +} + +function isAmdDefineArgsNamedModuleNoDependencies(args: AmdDefineArgs): args is AmdDefineArgsNamedModuleNoDependencies { + return args.length === 2 && typeof args[0] === "string"; +} + +function isAmdDefineArgsNamedModule(args: AmdDefineArgs): args is AmdDefineArgsNamedModule { + return args.length === 3 && typeof args[0] === "string"; +} + +class AmdLoader extends Loader { + protected createModule(file: string): AmdModule { + const base = vpath.dirname(file); + return { + file, + state: AmdModuleState.Uninstantiated, + dependencies: [], + dependers: [], + module: { exports: {} }, + require: (id: string) => this.import(id, base), + }; + } + + protected getExports(module: AmdModule) { + if (module.state < AmdModuleState.Ready) { + this.resetDependers(module, []); + this.evaluateModule(module, []); + if (module.state < AmdModuleState.Ready) { + const error = new Error("Module graph could not be loaded"); + this.handleError(module, error); + throw error; + } + } + if (module.hasError) { + throw module.error; + } + return module.module.exports; + } + + private handleError(module: AmdModule, error: any) { + if (!module.hasError) { + module.hasError = true; + module.error = error; + module.state = AmdModuleState.Ready; + } + } + + protected evaluate(text: string, _file: string, module: AmdModule): void { + const globalNames: string[] = []; + const globalArgs: any[] = []; + for (const name in this.globals) { + if (ts.hasProperty(this.globals, name)) { + globalNames.push(name); + globalArgs.push(this.globals[name]); + } + } + const localDefine = (...args: AmdDefineArgs) => { + if (isAmdDefineArgsUnnamedModuleNoDependencies(args)) { + const [declare] = args; + this.instantiateModule(module, [], declare); + } + else if (isAmdDefineArgsUnnamedModule(args)) { + const [dependencies, declare] = args; + this.instantiateModule(module, dependencies, declare); + } + else if (isAmdDefineArgsNamedModuleNoDependencies(args) || isAmdDefineArgsNamedModule(args)) { + throw new Error("Named modules not supported"); + } + else { + throw new Error("Unsupported arguments"); + } + }; + localDefine.amd = true; + const evaluateText = `(function (define, ${globalNames.join(", ")}) { ${text}\n})`; + try { + // eslint-disable-next-line no-eval + const evaluateThunk = (void 0, eval)(evaluateText) as (define: any, ...globalArgs: any[]) => void; + evaluateThunk.call(this.globals, localDefine, ...globalArgs); + } + catch (e) { + this.handleError(module, e); + throw e; + } + } + + private instantiateModule(module: AmdModule, dependencies: string[], callback?: AmdModuleDeclaration) { + try { + module.requestedDependencies = dependencies; + module.declaration = typeof callback === "function" ? callback as AmdModuleDefineCallback : () => callback; + module.state = AmdModuleState.Instantiated; + + for (const depender of module.dependers) { + this.linkModule(depender); + } + + this.linkModule(module); + } + catch (e) { + this.handleError(module, e); + throw e; + } + } + + private linkModule(module: AmdModule) { + try { + for (;;) { + switch (module.state) { + case AmdModuleState.Uninstantiated: { + throw new Error("Module not yet instantiated"); + } + case AmdModuleState.Instantiated: { + // Module has been instantiated, start requesting dependencies. + // Set state so that re-entry while adding dependencies does nothing. + module.state = AmdModuleState.AddingDependencies; + const base = vpath.dirname(module.file); + const dependencies = module.requestedDependencies || []; + + for (const dependencyId of dependencies) { + if (dependencyId === "require" || dependencyId === "exports" || dependencyId === "module") { + module.dependencies.push(dependencyId); + } + else { + const dependency = this.load(this.resolve(dependencyId, base)); + module.dependencies.push(dependency); + dependency.dependers.push(module); + } + } + + // All dependencies have been added, switch state + // to check whether all dependencies are instantiated + module.state = AmdModuleState.AllDependenciesAdded; + continue; + } + case AmdModuleState.AddingDependencies: { + // in the middle of adding dependencies for this module, do nothing + return; + } + case AmdModuleState.AllDependenciesAdded: { + // all dependencies have been added, advance state if all dependencies are instantiated. + for (const dependency of module.dependencies) { + if (typeof dependency === "object" && dependency.state === AmdModuleState.Uninstantiated) { + return; + } + } + + // indicate all dependencies are instantiated for this module. + module.state = AmdModuleState.AllDependenciesInstantiated; + + // trigger links for dependers of this module. + for (const depender of module.dependers) { + this.linkModule(depender); + } + continue; + } + case AmdModuleState.AllDependenciesInstantiated: { + module.state = AmdModuleState.Linked; + + // ensure graph is fully linked + for (const depender of module.dependers) { + this.linkModule(depender); + } + continue; + } + + case AmdModuleState.Linked: // module has already been linked, nothing to do + case AmdModuleState.Evaluating: // module is currently evaluating, nothing to do + case AmdModuleState.Ready: // module is done evaluating, nothing to do + return; + } + } + } + catch (e) { + this.handleError(module, e); + throw e; + } + } + + private resetDependers(module: AmdModule, stack: AmdModule[]) { + if (stack.lastIndexOf(module) !== -1) { + return; + } + + stack.push(module); + module.dependers.length = 0; + for (const dependency of module.dependencies) { + if (typeof dependency === "object") { + this.resetDependers(dependency, stack); + } + } + stack.pop(); + } + + private evaluateModule(module: AmdModule, stack: AmdModule[]) { + if (module.state < AmdModuleState.Linked) throw new Error("Invalid state for evaluation."); + if (module.state !== AmdModuleState.Linked) return; + + if (stack.lastIndexOf(module) !== -1) { + // we are already evaluating this module + return; + } + + stack.push(module); + module.state = AmdModuleState.Evaluating; + try { + const args: any[] = []; + for (const dependency of module.dependencies) { + if (dependency === "require") { + args.push(module.require); + } + else if (dependency === "exports") { + args.push(module.module.exports); + } + else if (dependency === "module") { + args.push(module.module); + } + else { + this.evaluateModule(dependency, stack); + args.push(dependency.module.exports); + } + } + + module.module.exports = module.declaration?.(...args) ?? module.module.exports; + module.state = AmdModuleState.Ready; + } + catch (e) { + this.handleError(module, e); + throw e; + } + } +} diff --git a/src/harness/fakesHosts.ts b/src/harness/fakesHosts.ts index 25706a1dde66a..6155a2622b13f 100644 --- a/src/harness/fakesHosts.ts +++ b/src/harness/fakesHosts.ts @@ -221,6 +221,18 @@ export class ParseConfigHost implements ts.ParseConfigHost { public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] { return this.sys.readDirectory(path, extensions, excludes, includes, depth); } + + public realpath(path: string): string { + return this.sys.realpath(path); + } + + public getDirectories(path: string): string[] { + return this.sys.getDirectories(path); + } + + public getCurrentDirectory(): string { + return this.sys.getCurrentDirectory(); + } } /** diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 2b6b93dffcdeb..6927acdbd3afa 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -442,11 +442,11 @@ export class TestState { for (const k of keys) { const key = k as keyof typeof ls; if (cacheableMembers.indexOf(key) === -1) { - proxy[key] = (...args: any[]) => (ls[key] as Function)(...args); + proxy[key] = (...args: any[]) => (ls[key] as (...args: any[]) => any)(...args); continue; } const memo = Utils.memoize( - (_version: number, _active: string, _caret: number, _selectEnd: number, _marker: string | undefined, ...args: any[]) => (ls[key] as Function)(...args), + (_version: number, _active: string, _caret: number, _selectEnd: number, _marker: string | undefined, ...args: any[]) => (ls[key] as (...args: any[]) => any)(...args), (...args) => args.map(a => a && typeof a === "object" ? JSON.stringify(a) : a).join("|,|") ); proxy[key] = (...args: any[]) => memo( @@ -822,21 +822,29 @@ export class TestState { }); } - public verifyInlayHints(expected: readonly FourSlashInterface.VerifyInlayHintsOptions[], span: ts.TextSpan = { start: 0, length: this.activeFile.content.length }, preference?: ts.UserPreferences) { - const hints = this.languageService.provideInlayHints(this.activeFile.fileName, span, preference); - assert.equal(hints.length, expected.length, "Number of hints"); - + public baselineInlayHints(span: ts.TextSpan = { start: 0, length: this.activeFile.content.length }, preferences?: ts.UserPreferences): void{ interface HasPosition { position: number; } const sortHints = (a: HasPosition, b: HasPosition) => { return a.position - b.position; }; - ts.zipWith(hints.sort(sortHints), [...expected].sort(sortHints), (actual, expected) => { - assert.equal(actual.text, expected.text, "Text"); - assert.equal(actual.position, expected.position, "Position"); - assert.equal(actual.kind, expected.kind, "Kind"); - assert.equal(actual.whitespaceBefore, expected.whitespaceBefore, "whitespaceBefore"); - assert.equal(actual.whitespaceAfter, expected.whitespaceAfter, "whitespaceAfter"); + + const baselineFile = this.getBaselineFileNameForContainingTestFile(); + const fileName = this.activeFile.fileName; + const hints = this.languageService.provideInlayHints(fileName, span, preferences); + const annotations = ts.map(hints.sort(sortHints), hint => { + const span = { start: hint.position, length: hint.text.length }; + const { character, line } = this.languageServiceAdapterHost.positionToLineAndCharacter(fileName, span.start); + const underline = " ".repeat(character) + "^"; + let annotation = this.getFileContent(fileName).split(/\r?\n/)[line]; + annotation += "\n" + underline + "\n" + JSON.stringify(hint, undefined, " "); + return annotation; }); + + if (annotations.length === 0) { + annotations.push("=== No inlay hints ==="); + } + + Harness.Baseline.runBaseline(baselineFile, annotations.join("\n\n")); } public verifyCompletions(options: FourSlashInterface.VerifyCompletionsOptions) { @@ -1009,8 +1017,18 @@ export class TestState { assert.equal(actual.isPackageJsonImport, expected.isPackageJsonImport, `At entry ${actual.name}: Expected 'isPackageJsonImport' properties to match`); } - assert.equal(actual.labelDetails?.description, expected.labelDetails?.description, `At entry ${actual.name}: Expected 'labelDetails.description' properties to match`); - assert.equal(actual.labelDetails?.detail, expected.labelDetails?.detail, `At entry ${actual.name}: Expected 'labelDetails.detail' properties to match`); + assert.equal( + actual.filterText, + expected.filterText, + `At entry ${actual.name}: Completion 'filterText' not match: ${showTextDiff(expected.filterText || "", actual.filterText || "")}`); + assert.equal( + actual.labelDetails?.description, + expected.labelDetails?.description, + `At entry ${actual.name}: Completion 'labelDetails.description' did not match: ${showTextDiff(expected.labelDetails?.description || "", actual.labelDetails?.description || "")}`); + assert.equal( + actual.labelDetails?.detail, + expected.labelDetails?.detail, + `At entry ${actual.name}: Completion 'labelDetails.detail' did not match: ${showTextDiff(expected.labelDetails?.detail || "", actual.labelDetails?.detail || "")}`); assert.equal(actual.hasAction, expected.hasAction, `At entry ${actual.name}: Expected 'hasAction' properties to match`); assert.equal(actual.isRecommended, expected.isRecommended, `At entry ${actual.name}: Expected 'isRecommended' properties to match'`); assert.equal(actual.isSnippet, expected.isSnippet, `At entry ${actual.name}: Expected 'isSnippet' properties to match`); @@ -1435,6 +1453,7 @@ export class TestState { }: BaselineDocumentSpansWithFileContentsOptions, spanToContextId: Map, ) { + const isLibFile = /lib(?:.*)\.d\.ts$/.test(fileName); let readableContents = `// === ${fileName} ===`; let newContent = ""; interface Detail { @@ -1609,12 +1628,12 @@ export class TestState { if (locationLine - posLine > nLines) { if (newContent) { readableContents = readableContents + "\n" + readableJsoncBaseline(newContent + content.slice(pos, lineStarts[posLine + TestState.nLinesContext]) + - `--- (line: ${posLine + TestState.nLinesContext + 1}) skipped ---`); + `--- (line: ${isLibFile ? "--" : posLine + TestState.nLinesContext + 1}) skipped ---`); if (location !== undefined) readableContents += "\n"; newContent = ""; } if (location !== undefined) { - newContent += `--- (line: ${locationLine - TestState.nLinesContext + 1}) skipped ---\n` + + newContent += `--- (line: ${isLibFile ? "--" : locationLine - TestState.nLinesContext + 1}) skipped ---\n` + content.slice(lineStarts[locationLine - TestState.nLinesContext + 1], location); } return; @@ -2392,7 +2411,7 @@ export class TestState { q1.marker.fileName === q1.marker.fileName ? (q1.marker.position > q2.marker.position ? -1 : 1) : (q1.marker.fileName > q1.marker.fileName ? 1 : -1)); - const files: Map = new Map(); + const files = new Map(); let previous: T | undefined; for (const { marker, item } of sorted) { const span = (item ? getSpan(item) : undefined) ?? { start: marker.position, length: 1 }; @@ -3576,6 +3595,73 @@ export class TestState { } } + public baselineLinkedEditing(): void { + const baselineFile = this.getBaselineFileNameForContainingTestFile(".linkedEditing.txt"); + const files = this.testData.files; + + let baselineContent = ""; + let offset = 0; + for (const f of files) { + const result = getLinkedEditingBaselineWorker(f, offset, this.languageService); + baselineContent += result.baselineContent + `\n\n\n`; + offset = result.offset; + } + + Harness.Baseline.runBaseline(baselineFile, baselineContent); + + function getLinkedEditingBaselineWorker(activeFile: FourSlashFile, offset: number, languageService: ts.LanguageService) { + const fileName = activeFile.fileName; + let baselineContent = `=== ${fileName} ===\n`; + + // get linkedEdit at every position in the file, then group positions by their linkedEdit + const linkedEditsInFile = new Map(); + for(let pos = 0; pos < activeFile.content.length; pos++) { + const linkedEditAtPosition = languageService.getLinkedEditingRangeAtPosition(fileName, pos); + if (!linkedEditAtPosition) continue; + + const linkedEditString = JSON.stringify(linkedEditAtPosition); + const existingPositions = linkedEditsInFile.get(linkedEditString) ?? []; + linkedEditsInFile.set(linkedEditString, [...existingPositions, pos]); + } + + const linkedEditsByRange = [...linkedEditsInFile.entries()].sort((a, b) => a[1][0] - b[1][0]); + if (linkedEditsByRange.length === 0) { + return { baselineContent: baselineContent + activeFile.content + `\n\n--No linked edits found--`, offset }; + } + + let inlineLinkedEditBaselines: { start: number, end: number, index: number }[] = []; + let linkedEditInfoBaseline = ""; + for (const edit of linkedEditsByRange) { + const [linkedEdit, positions] = edit; + let rangeStart = 0; + for (let j = 0; j < positions.length - 1; j++) { + // for each distinct range in the list of positions, add an entry to the list of places that need to be annotated in the baseline + if (positions[j] + 1 !== positions[j + 1]) { + inlineLinkedEditBaselines.push({ start: positions[rangeStart], end: positions[j], index: offset }); + rangeStart = j + 1; + } + } + inlineLinkedEditBaselines.push({ start: positions[rangeStart], end: positions[positions.length - 1], index: offset }); + + // add the LinkedEditInfo with its index to the baseline + linkedEditInfoBaseline += `\n\n=== ${offset} ===\n` + linkedEdit; + offset++; + } + + inlineLinkedEditBaselines = inlineLinkedEditBaselines.sort((a, b) => a.start - b.start); + const fileText = activeFile.content; + baselineContent += fileText.slice(0, inlineLinkedEditBaselines[0].start); + for (let i = 0; i < inlineLinkedEditBaselines.length; i++) { + const e = inlineLinkedEditBaselines[i]; + const sliceEnd = inlineLinkedEditBaselines[i + 1]?.start; + baselineContent += `[|/*${e.index}*/` + fileText.slice(e.start, e.end) + `|]` + fileText.slice(e.end, sliceEnd); + } + + baselineContent += linkedEditInfoBaseline; + return { baselineContent, offset }; + } + } + public verifyMatchingBracePosition(bracePosition: number, expectedMatchPosition: number) { const actual = this.languageService.getBraceMatchingAtPosition(this.activeFile.fileName, bracePosition); diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index ae83c034f9ff8..a97341d5eeecb 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -181,6 +181,10 @@ export class VerifyNegatable { this.state.verifyLinkedEditingRange(map); } + public baselineLinkedEditing(): void { + this.state.baselineLinkedEditing(); + } + public isInCommentAtPosition(onlyMultiLineDiverges?: boolean) { this.state.verifySpanOfEnclosingComment(this.negative, onlyMultiLineDiverges); } @@ -257,8 +261,8 @@ export class Verify extends VerifyNegatable { }; } - public getInlayHints(expected: readonly VerifyInlayHintsOptions[], span: ts.TextSpan, preference?: ts.UserPreferences) { - this.state.verifyInlayHints(expected, span, preference); + public baselineInlayHints(span: ts.TextSpan, preference?: ts.UserPreferences) { + this.state.baselineInlayHints(span, preference); } public quickInfoIs(expectedText: string, expectedDocumentation?: string, expectedTags?: { name: string; text: string; }[]) { @@ -1164,6 +1168,8 @@ export namespace Completion { typeEntry("ParameterDecorator"), typeEntry("ClassMemberDecoratorContext"), typeEntry("DecoratorContext"), + typeEntry("DecoratorMetadata"), + typeEntry("DecoratorMetadataObject"), interfaceEntry("ClassDecoratorContext"), interfaceEntry("ClassMethodDecoratorContext"), interfaceEntry("ClassGetterDecoratorContext"), @@ -1221,6 +1227,8 @@ export namespace Completion { varEntry("Float64Array"), interfaceEntry("Float64ArrayConstructor"), moduleEntry("Intl"), + typeEntry("WeakKey"), + interfaceEntry("WeakKeyTypes"), ]; export const globalThisEntry: ExpectedCompletionEntry = { @@ -1738,6 +1746,7 @@ export interface ExpectedCompletionEntryObject { readonly name: string; readonly source?: string; readonly insertText?: string; + readonly filterText?: string; readonly replacementSpan?: FourSlash.Range; readonly hasAction?: boolean; // If not specified, will assert that this is false. readonly isRecommended?: boolean; // If not specified, will assert that this is false. @@ -1943,4 +1952,4 @@ export type BaselineCommand = BaselineCommandWithMarkerOrRange | { } | { type: "customWork"; work: () => string | undefined; -}; \ No newline at end of file +}; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index f49eda407ffec..48ed765f86246 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -424,12 +424,12 @@ export namespace Compiler { typeScriptVersion = harnessSettings.typeScriptVersion; } } - if (options.rootDirs) { - options.rootDirs = ts.map(options.rootDirs, d => ts.getNormalizedAbsolutePath(d, currentDirectory)); - } const useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : true; - const programFileNames = inputFiles.map(file => file.unitName).filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json)); + // When a tsconfig is present, root names passed to createProgram should already be absolute + const programFileNames = inputFiles + .map(file => options.configFile ? ts.getNormalizedAbsolutePath(file.unitName, currentDirectory) : file.unitName) + .filter(fileName => !ts.fileExtensionIs(fileName, ts.Extension.Json)); // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. // Treat them as library files, so include them in build, but not in baselines. @@ -449,6 +449,8 @@ export namespace Compiler { if (symlinks) { fs.apply(symlinks); } + + ts.assign(options, ts.convertToOptionsWithAbsolutePaths(options, path => ts.getNormalizedAbsolutePath(path, currentDirectory))); const host = new fakes.CompilerHost(fs, options); const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion); result.symlinks = symlinks; @@ -499,7 +501,10 @@ export namespace Compiler { 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) }); + dtsFiles.push({ + unitName: declFile.file, + content: Utils.removeByteOrderMark(declFile.text) + }); } } } @@ -556,7 +561,7 @@ export namespace Compiler { outputLines += content; } if (pretty) { - outputLines += ts.getErrorSummaryText(ts.getErrorCountForSummary(diagnostics), ts.getFilesInErrorForSummary(diagnostics), IO.newLine(), { getCurrentDirectory: () => "" }); + outputLines += Utils.removeTestPathPrefixes(ts.getErrorSummaryText(ts.getErrorCountForSummary(diagnostics), ts.getFilesInErrorForSummary(diagnostics), IO.newLine(), { getCurrentDirectory: () => "" })); } return outputLines; } @@ -597,6 +602,7 @@ export namespace Compiler { if (error.relatedInformation) { for (const info of error.relatedInformation) { let location = info.file ? " " + ts.formatLocation(info.file, info.start!, formatDiagnsoticHost, ts.identity) : ""; + location = Utils.removeTestPathPrefixes(location); if (location && isDefaultLibraryFile(info.file!.fileName)) { location = location.replace(/(lib(?:.*)\.d\.ts):\d+:\d+/i, "$1:--:--"); } @@ -641,7 +647,7 @@ export namespace Compiler { // Header - outputLines += (newLine() + "==== " + inputFile.unitName + " (" + fileErrors.length + " errors) ===="); + outputLines += (newLine() + "==== " + Utils.removeTestPathPrefixes(inputFile.unitName) + " (" + fileErrors.length + " errors) ===="); // Make sure we emit something for every error let markedErrorCount = 0; @@ -728,7 +734,7 @@ export namespace Compiler { !errors || (errors.length === 0) ? null : getErrorBaseline(inputFiles, errors, pretty)); // eslint-disable-line no-null/no-null } - export function doTypeAndSymbolBaseline(baselinePath: string, program: ts.Program, allFiles: {unitName: string, content: string}[], opts?: Baseline.BaselineOptions, multifile?: boolean, skipTypeBaselines?: boolean, skipSymbolBaselines?: boolean, hasErrorBaseline?: boolean) { + export function doTypeAndSymbolBaseline(baselinePath: string, header: string, program: ts.Program, allFiles: {unitName: string, content: string}[], opts?: Baseline.BaselineOptions, multifile?: boolean, skipTypeBaselines?: boolean, skipSymbolBaselines?: boolean, hasErrorBaseline?: boolean) { // The full walker simulates the types that you would get from doing a full // compile. The pull walker simulates the types you get when you just do // a type query for a random node (like how the LS would do it). Most of the @@ -803,7 +809,7 @@ export namespace Compiler { const [, content] = value; result += content; } - return result || null; // eslint-disable-line no-null/no-null + return result ? (`//// [${header}] ////\r\n\r\n` + result) : null; // eslint-disable-line no-null/no-null } function *iterateBaseLine(isSymbolBaseline: boolean, skipBaseline?: boolean): IterableIterator<[string, string]> { @@ -904,9 +910,8 @@ export namespace Compiler { // check js output let tsCode = ""; const tsSources = otherFiles.concat(toBeCompiled); - if (tsSources.length > 1) { - tsCode += "//// [" + header + "] ////\r\n\r\n"; - } + tsCode += "//// [" + header + "] ////\r\n\r\n"; + for (let i = 0; i < tsSources.length; i++) { tsCode += "//// [" + ts.getBaseFileName(tsSources[i].unitName) + "]\r\n"; tsCode += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); @@ -1171,13 +1176,13 @@ export namespace TestCaseParser { const optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines const linkRegex = /^[\/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines - export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined) { + export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined, absoluteRootDir?: string) { const linkMetaData = linkRegex.exec(line); linkRegex.lastIndex = 0; if (!linkMetaData) return undefined; if (!symlinks) symlinks = {}; - symlinks[linkMetaData[2].trim()] = new vfs.Symlink(linkMetaData[1].trim()); + symlinks[ts.getNormalizedAbsolutePath(linkMetaData[2].trim(), absoluteRootDir)] = new vfs.Symlink(ts.getNormalizedAbsolutePath(linkMetaData[1].trim(), absoluteRootDir)); return symlinks; } @@ -1201,7 +1206,7 @@ export namespace TestCaseParser { } /** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ - export function makeUnitsFromTest(code: string, fileName: string, rootDir?: string, settings = extractCompilerSettings(code)): TestCaseContent { + export function makeUnitsFromTest(code: string, fileName: string, settings = extractCompilerSettings(code)): TestCaseContent { // List of all the subfiles we've parsed out const testUnitData: TestUnitData[] = []; @@ -1216,7 +1221,7 @@ export namespace TestCaseParser { for (const line of lines) { let testMetaData: RegExpExecArray | null; - const possiblySymlinks = parseSymlinkFromTest(line, symlinks); + const possiblySymlinks = parseSymlinkFromTest(line, symlinks, vfs.srcFolder); if (possiblySymlinks) { symlinks = possiblySymlinks; } @@ -1282,8 +1287,31 @@ export namespace TestCaseParser { // unit tests always list files explicitly const parseConfigHost: ts.ParseConfigHost = { useCaseSensitiveFileNames: false, - readDirectory: () => [], - fileExists: () => true, + readDirectory: (directory, extensions, excludes, includes, depth) => { + return ts.matchFiles(directory, extensions, excludes, includes, /*useCaseSensitiveFileNames*/ false, "", depth, dir => { + const files: string[] = []; + const directories = new Set(); + for (const unit of testUnitData) { + const fileName = ts.getNormalizedAbsolutePath(unit.name, vfs.srcFolder); + if (fileName.toLowerCase().startsWith(dir.toLowerCase())) { + let path = fileName.substring(dir.length); + if (path.startsWith("/")) { + path = path.substring(1); + } + if (path.includes("/")) { + const directoryName = path.substring(0, path.indexOf("/")); + directories.add(directoryName); + } + else { + files.push(path); + } + } + } + return { files, directories: ts.arrayFrom(directories) }; + + }, ts.identity); + }, + fileExists: fileName => testUnitData.some(data => data.name.toLowerCase() === fileName.toLowerCase()), readFile: (name) => ts.forEach(testUnitData, data => data.name.toLowerCase() === name.toLowerCase() ? data.content : undefined) }; @@ -1295,12 +1323,9 @@ export namespace TestCaseParser { if (getConfigNameFromFileName(data.name)) { const configJson = ts.parseJsonText(data.name, data.content); assert.isTrue(configJson.endOfFileToken !== undefined); - let baseDir = ts.normalizePath(ts.getDirectoryPath(data.name)); - if (rootDir) { - baseDir = ts.getNormalizedAbsolutePath(baseDir, rootDir); - } - tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, baseDir); - tsConfig.options.configFilePath = data.name; + const configFileName = ts.getNormalizedAbsolutePath(data.name, vfs.srcFolder); + const configDir = ts.getDirectoryPath(configFileName); + tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, configDir, /*existingOptions*/ undefined, configFileName); tsConfigFileUnitData = data; // delete entry from the list diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 369ac5183a0f1..26682df5cdf1e 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -9,6 +9,7 @@ import * as ts from "./_namespaces/ts"; import { getNewLineCharacter } from "./_namespaces/ts"; import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; +import { incrementalVerifier } from "./incrementalUtils"; export function makeDefaultProxy(info: ts.server.PluginCreateInfo): ts.LanguageService { const proxy = Object.create(/*o*/ null); // eslint-disable-line no-null/no-null @@ -1016,7 +1017,8 @@ export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: serverHost, - canUseEvents: true + canUseEvents: true, + incrementalVerifier, }; this.server = new FourslashSession(opts); diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts new file mode 100644 index 0000000000000..b1f517b2fd89f --- /dev/null +++ b/src/harness/incrementalUtils.ts @@ -0,0 +1,100 @@ +import * as ts from "./_namespaces/ts"; + +export function reportDocumentRegistryStats(documentRegistry: ts.DocumentRegistry) { + const str: string[] = []; + documentRegistry.getBuckets().forEach((bucketEntries, key) => { + str.push(` Key:: ${key}`); + bucketEntries.forEach((entry, path) => { + if (ts.isDocumentRegistryEntry(entry)) { + str.push(` ${path}: ${ts.Debug.formatScriptKind(entry.sourceFile.scriptKind)} ${entry.languageServiceRefCount}`); + } + else { + entry.forEach((real, kind) => str.push(` ${path}: ${ts.Debug.formatScriptKind(kind)} ${real.languageServiceRefCount}`)); + } + }); + }); + return str; +} + +type DocumentRegistryExpectedStats = Map>>; +function verifyDocumentRegistryStats( + documentRegistry: ts.DocumentRegistry, + stats: DocumentRegistryExpectedStats, +) { + documentRegistry.getBuckets().forEach((bucketEntries, key) => { + const statsByPath = stats.get(key); + bucketEntries.forEach((entry, path) => { + const expected = statsByPath?.get(path); + if (ts.isDocumentRegistryEntry(entry)) { + ts.Debug.assert( + expected?.size === 1 && expected.has(entry.sourceFile.scriptKind) && expected.get(entry.sourceFile.scriptKind) === entry.languageServiceRefCount, + `Document registry has unexpected language service ref count for ${key} ${path} ${ts.Debug.formatScriptKind(entry.sourceFile.scriptKind)} ${entry.languageServiceRefCount}`, + reportStats, + ); + } + else { + entry.forEach((real, kind) => ts.Debug.assert( + real.languageServiceRefCount === expected?.get(kind), + `Document registry has unexpected language service ref count for ${key} ${path} ${ts.Debug.formatScriptKind(kind)} ${real.languageServiceRefCount}`, + reportStats, + )); + expected?.forEach((value, kind) => ts.Debug.assert( + entry.has(kind), + `Document registry expected language service ref count for ${key} ${path} ${ts.Debug.formatScriptKind(kind)} ${value}`, + reportStats, + )); + } + }); + statsByPath?.forEach((_value, path) => ts.Debug.assert( + bucketEntries.has(path), + `Document registry does not contain entry for ${key}, ${path}`, + reportStats, + )); + }); + stats.forEach((_value, key) => ts.Debug.assert( + documentRegistry.getBuckets().has(key), + `Document registry does not contain entry for key: ${key}`, + reportStats, + )); + + function reportStats() { + const str: string[] = ["", "Actual::", ...reportDocumentRegistryStats(documentRegistry)]; + str.push("Expected::"); + stats?.forEach((statsByPath, key) => { + str.push(` Key:: ${key}`); + statsByPath.forEach((entry, path) => entry.forEach((refCount, kind) => str.push(` ${path}: ${ts.Debug.formatScriptKind(kind)} ${refCount}`))); + }); + return str.join("\n"); + } +} + +function verifyDocumentRegistry(service: ts.server.ProjectService) { + const stats: DocumentRegistryExpectedStats = new Map(); + const collectStats = (project: ts.server.Project) => { + if (project.autoImportProviderHost) collectStats(project.autoImportProviderHost); + if (project.noDtsResolutionProject) collectStats(project.noDtsResolutionProject); + const program = project.getCurrentProgram(); + if (!program) return; + const key = service.documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()); + program.getSourceFiles().forEach(f => { + const keyWithMode = service.documentRegistry.getDocumentRegistryBucketKeyWithMode(key, f.impliedNodeFormat); + let mapForKeyWithMode = stats.get(keyWithMode); + let result: Map | undefined; + if (mapForKeyWithMode === undefined) { + stats.set(keyWithMode, mapForKeyWithMode = new Map()); + mapForKeyWithMode.set(f.resolvedPath, result = new Map()); + } + else { + result = mapForKeyWithMode.get(f.resolvedPath); + if (!result) mapForKeyWithMode.set(f.resolvedPath, result = new Map()); + } + result.set(f.scriptKind, (result.get(f.scriptKind) || 0) + 1); + }); + }; + service.forEachProject(collectStats); + verifyDocumentRegistryStats(service.documentRegistry, stats); +} + +export function incrementalVerifier(service: ts.server.ProjectService) { + service.verifyDocumentRegistry = () => verifyDocumentRegistry(service); +} \ No newline at end of file diff --git a/src/harness/util.ts b/src/harness/util.ts index 2dac1835f1293..607e527459173 100644 --- a/src/harness/util.ts +++ b/src/harness/util.ts @@ -21,7 +21,7 @@ const replaceTypesVersionsMessage = createDiagnosticMessageReplacer( ([entry, , moduleName], compilerVersion) => [entry, compilerVersion, moduleName]); export function sanitizeTraceResolutionLogEntry(text: string) { - return text && removeTestPathPrefixes(replaceTypesVersionsMessage(text, "3.1.0-dev")); + return text && replaceTypesVersionsMessage(text, "3.1.0-dev"); } /** @@ -126,4 +126,4 @@ export function defer(): Deferred { reject = _reject; }); return { resolve, reject, promise }; -} \ No newline at end of file +} diff --git a/src/lib/decorators.d.ts b/src/lib/decorators.d.ts index 6c4173bc1cac8..977fa5fc5deb0 100644 --- a/src/lib/decorators.d.ts +++ b/src/lib/decorators.d.ts @@ -17,6 +17,11 @@ type DecoratorContext = | ClassMemberDecoratorContext ; +type DecoratorMetadataObject = Record & object; + +type DecoratorMetadata = + typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined; + /** * Context provided to a class decorator. * @template Class The type of the decorated class associated with this context. @@ -48,6 +53,8 @@ interface ClassDecoratorContext< * ``` */ addInitializer(initializer: (this: Class) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -112,6 +119,8 @@ interface ClassMethodDecoratorContext< * ``` */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -157,6 +166,8 @@ interface ClassGetterDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -202,6 +213,8 @@ interface ClassSetterDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -256,6 +269,8 @@ interface ClassAccessorDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -351,4 +366,6 @@ interface ClassFieldDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 0535ea6e70fb8..3088bc65e311b 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -732,6 +732,7 @@ interface Keyframe { interface KeyframeAnimationOptions extends KeyframeEffectOptions { id?: string; + timeline?: AnimationTimeline | null; } interface KeyframeEffectOptions extends EffectTiming { @@ -1016,7 +1017,7 @@ interface NotificationOptions { lang?: string; renotify?: boolean; requireInteraction?: boolean; - silent?: boolean; + silent?: boolean | null; tag?: string; timestamp?: EpochTimeStamp; vibrate?: VibratePattern; @@ -1333,7 +1334,6 @@ interface RTCEncodedAudioFrameMetadata { } interface RTCEncodedVideoFrameMetadata { - contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; @@ -1853,8 +1853,13 @@ interface TextDecoderOptions { } interface TextEncoderEncodeIntoResult { - read?: number; - written?: number; + read: number; + written: number; +} + +interface ToggleEventInit extends EventInit { + newState?: string; + oldState?: string; } interface TouchEventInit extends EventModifierInit { @@ -2087,6 +2092,32 @@ interface WebGLContextEventInit extends EventInit { statusMessage?: string; } +interface WebTransportCloseInfo { + closeCode?: number; + reason?: string; +} + +interface WebTransportErrorOptions { + source?: WebTransportErrorSource; + streamErrorCode?: number | null; +} + +interface WebTransportHash { + algorithm?: string; + value?: BufferSource; +} + +interface WebTransportOptions { + allowPooling?: boolean; + congestionControl?: WebTransportCongestionControl; + requireUnreliable?: boolean; + serverCertificateHashes?: WebTransportHash[]; +} + +interface WebTransportSendStreamOptions { + sendOrder?: number | null; +} + interface WheelEventInit extends MouseEventInit { deltaMode?: number; deltaX?: number; @@ -2286,9 +2317,9 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */ abort(reason?: any): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */ timeout(milliseconds: number): AbortSignal; }; @@ -3326,7 +3357,7 @@ interface CSSImportRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/media) */ readonly media: MediaList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet) */ - readonly styleSheet: CSSStyleSheet; + readonly styleSheet: CSSStyleSheet | null; } declare var CSSImportRule: { @@ -3359,6 +3390,7 @@ declare var CSSKeyframeRule: { interface CSSKeyframesRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/cssRules) */ readonly cssRules: CSSRuleList; + readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/name) */ name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/appendRule) */ @@ -3579,7 +3611,7 @@ interface CSSNumericValue extends CSSStyleValue { declare var CSSNumericValue: { prototype: CSSNumericValue; new(): CSSNumericValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/parse) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/parse_static) */ parse(cssText: string): CSSNumericValue; }; @@ -4090,8 +4122,11 @@ interface CSSStyleDeclaration { fontStyle: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) */ fontSynthesis: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) */ fontSynthesisSmallCaps: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) */ fontSynthesisStyle: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) */ fontSynthesisWeight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-variant) */ fontVariant: string; @@ -4111,6 +4146,8 @@ interface CSSStyleDeclaration { fontVariationSettings: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-weight) */ fontWeight: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) */ + forcedColorAdjust: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/gap) */ gap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/grid) */ @@ -4978,12 +5015,15 @@ declare var CSSStyleDeclaration: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule) */ interface CSSStyleRule extends CSSRule { + readonly cssRules: CSSRuleList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/selectorText) */ selectorText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style) */ readonly style: CSSStyleDeclaration; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/styleMap) */ readonly styleMap: StylePropertyMap; + deleteRule(index: number): void; + insertRule(rule: string, index?: number): number; } declare var CSSStyleRule: { @@ -5042,9 +5082,9 @@ interface CSSStyleValue { declare var CSSStyleValue: { prototype: CSSStyleValue; new(): CSSStyleValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parse) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parse_static) */ parse(property: string, cssText: string): CSSStyleValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parseAll) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parseAll_static) */ parseAll(property: string, cssText: string): CSSStyleValue[]; }; @@ -5420,6 +5460,8 @@ interface CanvasShadowStyles { } interface CanvasState { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */ + reset(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */ restore(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */ @@ -5605,8 +5647,6 @@ declare var ClipboardEvent: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem) */ interface ClipboardItem { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/presentationStyle) */ - readonly presentationStyle: PresentationStyle; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/types) */ readonly types: ReadonlyArray; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/getType) */ @@ -6156,7 +6196,7 @@ interface DOMPoint extends DOMPointReadOnly { declare var DOMPoint: { prototype: DOMPoint; new(x?: number, y?: number, z?: number, w?: number): DOMPoint; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPoint; }; @@ -6182,7 +6222,7 @@ interface DOMPointReadOnly { declare var DOMPointReadOnly: { prototype: DOMPointReadOnly; new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; @@ -6260,7 +6300,7 @@ interface DOMRectReadOnly { declare var DOMRectReadOnly: { prototype: DOMRectReadOnly; new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */ fromRect(other?: DOMRectInit): DOMRectReadOnly; }; @@ -7100,6 +7140,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; createEvent(eventInterface: "SubmitEvent"): SubmitEvent; + createEvent(eventInterface: "ToggleEvent"): ToggleEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; createEvent(eventInterface: "TransitionEvent"): TransitionEvent; @@ -8847,6 +8888,7 @@ interface GlobalEventHandlersEventMap { "reset": Event; "resize": UIEvent; "scroll": Event; + "scrollend": Event; "securitypolicyviolation": SecurityPolicyViolationEvent; "seeked": Event; "seeking": Event; @@ -9019,7 +9061,7 @@ interface GlobalEventHandlers { * Fires when an error occurs during object loading. * @param ev The event. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/error_event) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */ onerror: OnErrorEventHandler; /** @@ -9197,6 +9239,8 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scroll_event) */ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollend_event) */ + onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/securitypolicyviolation_event) */ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; /** @@ -9618,7 +9662,7 @@ declare var HTMLBodyElement: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement) */ -interface HTMLButtonElement extends HTMLElement { +interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/disabled) */ disabled: boolean; /** @@ -10014,6 +10058,8 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit readonly offsetWidth: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) */ outerText: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) */ + popover: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) */ spellcheck: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) */ @@ -10023,6 +10069,12 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit attachInternals(): ElementInternals; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click) */ click(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidePopover) */ + hidePopover(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover) */ + showPopover(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover) */ + togglePopover(force?: boolean): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -10214,7 +10266,7 @@ interface HTMLFormElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFillBase; /** * Retrieves a collection, in source order, of all controls in a given form. * @@ -10867,7 +10919,7 @@ declare var HTMLImageElement: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement) */ -interface HTMLInputElement extends HTMLElement { +interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { /** Sets or retrieves a comma-separated list of content types. */ accept: string; /** @@ -10882,7 +10934,7 @@ interface HTMLInputElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFill; capture: string; /** Sets or retrieves the state of the check box or radio button. */ checked: boolean; @@ -12252,7 +12304,7 @@ interface HTMLScriptElement extends HTMLElement { declare var HTMLScriptElement: { prototype: HTMLScriptElement; new(): HTMLScriptElement; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/supports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/supports_static) */ supports(type: string): boolean; }; @@ -12263,7 +12315,7 @@ declare var HTMLScriptElement: { */ interface HTMLSelectElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFill; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/disabled) */ disabled: boolean; /** @@ -13065,7 +13117,7 @@ declare var HTMLTemplateElement: { */ interface HTMLTextAreaElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFill; /** Sets or retrieves the width of the object. */ cols: number; /** Sets or retrieves the initial contents of the object. */ @@ -13373,6 +13425,8 @@ interface Headers { delete(name: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */ get(name: string): string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */ + getSetCookie(): string[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */ has(name: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */ @@ -13750,25 +13804,25 @@ declare var IDBKeyRange: { /** * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static) */ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static) */ lowerBound(lower: any, open?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange spanning only key. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static) */ only(value: any): IDBKeyRange; /** * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static) */ upperBound(upper: any, open?: boolean): IDBKeyRange; }; @@ -14211,6 +14265,8 @@ interface InnerHTML { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InputDeviceInfo) */ interface InputDeviceInfo extends MediaDeviceInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/InputDeviceInfo/getCapabilities) */ + getCapabilities(): MediaTrackCapabilities; } declare var InputDeviceInfo: { @@ -15093,7 +15149,7 @@ interface MediaRecorder extends EventTarget { declare var MediaRecorder: { prototype: MediaRecorder; new(stream: MediaStream, options?: MediaRecorderOptions): MediaRecorder; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/isTypeSupported) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/isTypeSupported_static) */ isTypeSupported(type: string): boolean; }; @@ -15159,7 +15215,7 @@ interface MediaSource extends EventTarget { declare var MediaSource: { prototype: MediaSource; new(): MediaSource; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported_static) */ isTypeSupported(type: string): boolean; }; @@ -16324,6 +16380,8 @@ interface Notification extends EventTarget { onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ + readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ readonly tag: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */ @@ -16339,9 +16397,9 @@ interface Notification extends EventTarget { declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */ readonly permission: NotificationPermission; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission_static) */ requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise; }; @@ -17081,7 +17139,7 @@ interface PerformanceObserver { declare var PerformanceObserver: { prototype: PerformanceObserver; new(callback: PerformanceObserverCallback): PerformanceObserver; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */ readonly supportedEntryTypes: ReadonlyArray; }; @@ -17559,6 +17617,13 @@ declare var PopStateEvent: { new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent; }; +interface PopoverInvokerElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetAction) */ + popoverTargetAction: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetElement) */ + popoverTargetElement: Element | null; +} + /** * A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. * @@ -17627,7 +17692,7 @@ declare var PublicKeyCredential: { prototype: PublicKeyCredential; new(): PublicKeyCredential; isConditionalMediationAvailable(): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static) */ isUserVerifyingPlatformAuthenticatorAvailable(): Promise; }; @@ -17649,7 +17714,7 @@ interface PushManager { declare var PushManager: { prototype: PushManager; new(): PushManager; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */ readonly supportedContentEncodings: ReadonlyArray; }; @@ -18094,7 +18159,7 @@ interface RTCPeerConnection extends EventTarget { declare var RTCPeerConnection: { prototype: RTCPeerConnection; new(configuration?: RTCConfiguration): RTCPeerConnection; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/generateCertificate) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/generateCertificate_static) */ generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise; }; @@ -18154,7 +18219,7 @@ interface RTCRtpReceiver { declare var RTCRtpReceiver: { prototype: RTCRtpReceiver; new(): RTCRtpReceiver; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getCapabilities) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getCapabilities_static) */ getCapabilities(kind: string): RTCRtpCapabilities | null; }; @@ -18185,7 +18250,7 @@ interface RTCRtpSender { declare var RTCRtpSender: { prototype: RTCRtpSender; new(): RTCRtpSender; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getCapabilities) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getCapabilities_static) */ getCapabilities(kind: string): RTCRtpCapabilities | null; }; @@ -18730,9 +18795,11 @@ interface Response extends Body { declare var Response: { prototype: Response; new(body?: BodyInit | null, init?: ResponseInit): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */ error(): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */ + json(data: any, init?: ResponseInit): Response; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */ redirect(url: string | URL, status?: number): Response; }; @@ -20897,8 +20964,6 @@ interface ScreenOrientation extends EventTarget { onchange: ((this: ScreenOrientation, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/type) */ readonly type: OrientationType; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/lock) */ - lock(orientation: OrientationLockType): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) */ unlock(): void; addEventListener(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -21092,7 +21157,6 @@ interface ServiceWorkerContainer extends EventTarget { oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */ readonly ready: Promise; @@ -21829,7 +21893,7 @@ interface TextDecoder extends TextDecoderCommon { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode) */ - decode(input?: BufferSource, options?: TextDecodeOptions): string; + decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string; } declare var TextDecoder: { @@ -22211,6 +22275,19 @@ declare var TimeRanges: { new(): TimeRanges; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */ +interface ToggleEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */ + readonly newState: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */ + readonly oldState: string; +} + +declare var ToggleEvent: { + prototype: ToggleEvent; + new(type: string, eventInitDict?: ToggleEventInit): ToggleEvent; +}; + /** * A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. * @@ -22463,9 +22540,11 @@ interface URL { declare var URL: { prototype: URL; new(url: string | URL, base?: string | URL): URL; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ + canParse(url: string | URL, base?: string): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */ createObjectURL(obj: Blob | MediaSource): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */ revokeObjectURL(url: string): void; }; @@ -22474,6 +22553,8 @@ declare var webkitURL: typeof URL; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */ interface URLSearchParams { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */ + readonly size: number; /** * Appends a specified key/value pair as a new search parameter. * @@ -22485,7 +22566,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete) */ - delete(name: string): void; + delete(name: string, value?: string): void; /** * Returns the first value associated to the given search parameter. * @@ -22503,7 +22584,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) */ - has(name: string): boolean; + has(name: string, value?: string): boolean; /** * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. * @@ -22603,6 +22684,7 @@ declare var VTTRegion: { interface ValidityState { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/badInput) */ readonly badInput: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/customError) */ readonly customError: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/patternMismatch) */ readonly patternMismatch: boolean; @@ -22618,7 +22700,9 @@ interface ValidityState { readonly tooShort: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/typeMismatch) */ readonly typeMismatch: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valid) */ readonly valid: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valueMissing) */ readonly valueMissing: boolean; } @@ -25333,6 +25417,96 @@ declare var WebSocket: { readonly CLOSED: 3; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport) + */ +interface WebTransport { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */ + readonly closed: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */ + readonly datagrams: WebTransportDatagramDuplexStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */ + readonly incomingBidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */ + readonly incomingUnidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */ + readonly ready: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */ + close(closeInfo?: WebTransportCloseInfo): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */ + createBidirectionalStream(options?: WebTransportSendStreamOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */ + createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise; +} + +declare var WebTransport: { + prototype: WebTransport; + new(url: string | URL, options?: WebTransportOptions): WebTransport; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream) + */ +interface WebTransportBidirectionalStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportBidirectionalStream: { + prototype: WebTransportBidirectionalStream; + new(): WebTransportBidirectionalStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream) + */ +interface WebTransportDatagramDuplexStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */ + incomingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */ + incomingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */ + readonly maxDatagramSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */ + outgoingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */ + outgoingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportDatagramDuplexStream: { + prototype: WebTransportDatagramDuplexStream; + new(): WebTransportDatagramDuplexStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError) + */ +interface WebTransportError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */ + readonly source: WebTransportErrorSource; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */ + readonly streamErrorCode: number | null; +} + +declare var WebTransportError: { + prototype: WebTransportError; + new(message?: string, options?: WebTransportErrorOptions): WebTransportError; +}; + /** * Events that occur due to the user moving a mouse wheel or similar input device. * @@ -26276,96 +26450,120 @@ declare var console: Console; /** Holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface. */ declare namespace CSS { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/Hz) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function Hz(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/Q) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function Q(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ch) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ch(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/cm) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cm(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/deg) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function deg(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dpcm) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dpcm(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dpi) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dpi(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dppx) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dppx(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/em) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function em(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/escape) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/escape_static) */ function escape(ident: string): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ex) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ex(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/fr) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function fr(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/grad) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function grad(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/kHz) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function kHz(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/mm) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function mm(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ms) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ms(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/number) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function number(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/pc) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function pc(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/percent) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function percent(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/pt) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function pt(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/px) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function px(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/rad) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function rad(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty_static) */ function registerProperty(definition: PropertyDefinition): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/rem) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function rem(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/s) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function s(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports_static) */ function supports(property: string, value: string): boolean; function supports(conditionText: string): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/turn) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function turn(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vb) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vb(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vh) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vh(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vi) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vi(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vmax) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vmax(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vmin) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vmin(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vw) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vw(value: number): CSSUnitValue; } @@ -26380,16 +26578,16 @@ declare namespace WebAssembly { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */ - interface Global { + interface Global { /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */ - value: any; + value: ValueTypeMap[T]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */ - valueOf(): any; + valueOf(): ValueTypeMap[T]; } var Global: { prototype: Global; - new(descriptor: GlobalDescriptor, v?: any): Global; + new(descriptor: GlobalDescriptor, v?: ValueTypeMap[T]): Global; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */ @@ -26466,9 +26664,9 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; - interface GlobalDescriptor { + interface GlobalDescriptor { mutable?: boolean; - value: ValueType; + value: T; } interface MemoryDescriptor { @@ -26494,6 +26692,16 @@ declare namespace WebAssembly { maximum?: number; } + interface ValueTypeMap { + anyfunc: Function; + externref: any; + f32: number; + f64: number; + i32: number; + i64: bigint; + v128: never; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; @@ -26501,12 +26709,12 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "global" | "memory" | "table"; type TableKind = "anyfunc" | "externref"; - type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; + type ValueType = keyof ValueTypeMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */ function compile(bytes: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */ @@ -27350,7 +27558,7 @@ declare var onended: ((this: Window, ev: Event) => any) | null; * Fires when an error occurs during object loading. * @param ev The event. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/error_event) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */ declare var onerror: OnErrorEventHandler; /** @@ -27528,6 +27736,8 @@ declare var onresize: ((this: Window, ev: UIEvent) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scroll_event) */ declare var onscroll: ((this: Window, ev: Event) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollend_event) */ +declare var onscrollend: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/securitypolicyviolation_event) */ declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null; /** @@ -27724,6 +27934,10 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi declare function removeEventListener(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; type AlgorithmIdentifier = Algorithm | string; +type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; +type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; +type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; +type AutoFillSection = `section-${string}`; type BigInteger = Uint8Array; type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; @@ -27774,6 +27988,8 @@ type NamedCurve = string; type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; +type OptionalPostfixToken = ` ${T}` | ""; +type OptionalPrefixToken = `${T} ` | ""; type PerformanceEntryList = PerformanceEntry[]; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; @@ -27798,6 +28014,12 @@ type AudioContextLatencyCategory = "balanced" | "interactive" | "playback"; type AudioContextState = "closed" | "running" | "suspended"; type AuthenticatorAttachment = "cross-platform" | "platform"; type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb"; +type AutoFillAddressKind = "billing" | "shipping"; +type AutoFillBase = "" | "off" | "on"; +type AutoFillContactField = "email" | "tel" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-local-prefix" | "tel-local-suffix" | "tel-national"; +type AutoFillContactKind = "home" | "mobile" | "work"; +type AutoFillCredentialField = "webauthn"; +type AutoFillNormalField = "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday-day" | "bday-month" | "bday-year" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "new-password" | "one-time-code" | "organization" | "postal-code" | "street-address" | "transaction-amount" | "transaction-currency" | "username"; type AutoKeyword = "auto"; type AutomationRate = "a-rate" | "k-rate"; type AvcBitstreamFormat = "annexb" | "avc"; @@ -27880,7 +28102,6 @@ type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload" type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; -type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary"; type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary"; type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; @@ -27918,7 +28139,7 @@ type RTCSctpTransportState = "closed" | "connected" | "connecting"; type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback"; type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable"; type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting"; -type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "track" | "transport"; +type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; type ReadyState = "closed" | "ended" | "open"; @@ -27958,6 +28179,8 @@ type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | " type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m"; type WakeLockType = "screen"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; +type WebTransportCongestionControl = "default" | "low-latency" | "throughput"; +type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; diff --git a/src/lib/es2015.collection.d.ts b/src/lib/es2015.collection.d.ts index fd4a752cd57e9..122e30666ab27 100644 --- a/src/lib/es2015.collection.d.ts +++ b/src/lib/es2015.collection.d.ts @@ -42,7 +42,7 @@ interface ReadonlyMap { readonly size: number; } -interface WeakMap { +interface WeakMap { /** * Removes the specified element from the WeakMap. * @returns true if the element was successfully removed, or false if it was not present. @@ -58,14 +58,14 @@ interface WeakMap { has(key: K): boolean; /** * Adds a new element with a specified key and value. - * @param key Must be an object. + * @param key Must be an object or symbol. */ set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; @@ -107,9 +107,9 @@ interface ReadonlySet { readonly size: number; } -interface WeakSet { +interface WeakSet { /** - * Appends a new object to the end of the WeakSet. + * Appends a new value to the end of the WeakSet. */ add(value: T): this; /** @@ -118,13 +118,13 @@ interface WeakSet { */ delete(value: T): boolean; /** - * @returns a boolean indicating whether an object exists in the WeakSet or not. + * @returns a boolean indicating whether a value exists in the WeakSet or not. */ has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + new (values?: readonly T[] | null): WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index f1fb454f980b1..c7b7afa72119d 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -141,10 +141,10 @@ interface MapConstructor { new (iterable?: Iterable | null): Map; } -interface WeakMap { } +interface WeakMap { } interface WeakMapConstructor { - new (iterable: Iterable): WeakMap; + new (iterable: Iterable): WeakMap; } interface Set { @@ -189,10 +189,10 @@ interface SetConstructor { new (iterable?: Iterable | null): Set; } -interface WeakSet { } +interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface Promise { } diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index 2c1cfb67b2c6d..cf6ccef52b89f 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -119,7 +119,7 @@ interface Map { readonly [Symbol.toStringTag]: string; } -interface WeakMap { +interface WeakMap { readonly [Symbol.toStringTag]: string; } @@ -127,7 +127,7 @@ interface Set { readonly [Symbol.toStringTag]: string; } -interface WeakSet { +interface WeakSet { readonly [Symbol.toStringTag]: string; } diff --git a/src/lib/es2017.d.ts b/src/lib/es2017.d.ts index 74e5bea1180e9..293dd0dd2d64a 100644 --- a/src/lib/es2017.d.ts +++ b/src/lib/es2017.d.ts @@ -4,3 +4,4 @@ /// /// /// +/// diff --git a/src/lib/es2017.date.d.ts b/src/lib/es2017.date.d.ts new file mode 100644 index 0000000000000..0d3434964b64c --- /dev/null +++ b/src/lib/es2017.date.d.ts @@ -0,0 +1,13 @@ +interface DateConstructor { + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; +} diff --git a/src/lib/es2021.weakref.d.ts b/src/lib/es2021.weakref.d.ts index d36ddb6a19cfd..b8aac14ae51f9 100644 --- a/src/lib/es2021.weakref.d.ts +++ b/src/lib/es2021.weakref.d.ts @@ -1,9 +1,10 @@ -interface WeakRef { +interface WeakRef { readonly [Symbol.toStringTag]: "WeakRef"; /** - * Returns the WeakRef instance's target object, or undefined if the target object has been + * Returns the WeakRef instance's target value, or undefined if the target value has been * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. */ deref(): T | undefined; } @@ -12,10 +13,11 @@ interface WeakRefConstructor { readonly prototype: WeakRef; /** - * Creates a WeakRef instance for the given target object. - * @param target The target object for the WeakRef instance. + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. */ - new(target: T): WeakRef; + new(target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; @@ -24,22 +26,23 @@ interface FinalizationRegistry { readonly [Symbol.toStringTag]: "FinalizationRegistry"; /** - * Registers an object with the registry. - * @param target The target object to register. - * @param heldValue The value to pass to the finalizer for this object. This cannot be the - * target object. + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. * @param unregisterToken The token to pass to the unregister method to unregister the target - * object. If provided (and not undefined), this must be an object. If not provided, the target - * cannot be unregistered. + * value. If not provided, the target cannot be unregistered. */ - register(target: object, heldValue: T, unregisterToken?: object): void; + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; /** - * Unregisters an object from the registry. + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target object. + * register to register the target value. */ - unregister(unregisterToken: object): void; + unregister(unregisterToken: WeakKey): void; } interface FinalizationRegistryConstructor { @@ -47,7 +50,7 @@ interface FinalizationRegistryConstructor { /** * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after an object in the registry has been reclaimed. + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. */ new(cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } diff --git a/src/lib/es2023.array.d.ts b/src/lib/es2023.array.d.ts index 1f90ae3396164..a5cc73ae0f963 100644 --- a/src/lib/es2023.array.d.ts +++ b/src/lib/es2023.array.d.ts @@ -21,6 +21,50 @@ interface Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + + /** + * Returns a copy of an array with its elements reversed. + */ + toReversed(): T[]; + + /** + * Returns a copy of an array with its elements sorted. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; + + /** + * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns The copied array. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; + + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to write into the copied array. + * @returns The copied array with the updated value. + */ + with(index: number, value: T): T[]; } interface ReadonlyArray { @@ -33,8 +77,14 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined; + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any + ): T | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -45,7 +95,54 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copied array with all of its elements reversed. + */ + toReversed(): T[]; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; + + /** + * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; + + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: T): T[]; } interface Int8Array { @@ -58,8 +155,18 @@ interface Int8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Int8Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Int8Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -70,7 +177,36 @@ interface Int8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Int8Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8Array { @@ -83,8 +219,18 @@ interface Uint8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint8Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Uint8Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -95,7 +241,36 @@ interface Uint8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Uint8Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8ClampedArray { @@ -108,8 +283,22 @@ interface Uint8ClampedArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint8ClampedArray + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint8ClampedArray + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -120,7 +309,40 @@ interface Uint8ClampedArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Uint8ClampedArray + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8ClampedArray; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8ClampedArray; } interface Int16Array { @@ -133,8 +355,18 @@ interface Int16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Int16Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Int16Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -145,7 +377,36 @@ interface Int16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Int16Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int16Array; } interface Uint16Array { @@ -158,8 +419,22 @@ interface Uint16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint16Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint16Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -170,7 +445,40 @@ interface Uint16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Uint16Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint16Array; } interface Int32Array { @@ -183,8 +491,18 @@ interface Int32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Int32Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Int32Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -195,7 +513,36 @@ interface Int32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Int32Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int32Array; } interface Uint32Array { @@ -208,8 +555,22 @@ interface Uint32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint32Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint32Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -220,7 +581,40 @@ interface Uint32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Uint32Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint32Array; } interface Float32Array { @@ -233,8 +627,22 @@ interface Float32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float32Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float32Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -245,7 +653,40 @@ interface Float32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Float32Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float32Array; } interface Float64Array { @@ -258,8 +699,22 @@ interface Float64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float64Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float64Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -270,7 +725,40 @@ interface Float64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Float64Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float64Array; } interface BigInt64Array { @@ -283,8 +771,22 @@ interface BigInt64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigInt64Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigInt64Array + ) => unknown, + thisArg?: any + ): bigint | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -295,7 +797,40 @@ interface BigInt64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: BigInt64Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigInt64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigInt64Array; } interface BigUint64Array { @@ -308,8 +843,22 @@ interface BigUint64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigUint64Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigUint64Array + ) => unknown, + thisArg?: any + ): bigint | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -320,5 +869,38 @@ interface BigUint64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: BigUint64Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigUint64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigUint64Array; } diff --git a/src/lib/es2023.collection.d.ts b/src/lib/es2023.collection.d.ts new file mode 100644 index 0000000000000..77545a0a415c3 --- /dev/null +++ b/src/lib/es2023.collection.d.ts @@ -0,0 +1,3 @@ +interface WeakKeyTypes { + symbol: symbol; +} diff --git a/src/lib/es2023.d.ts b/src/lib/es2023.d.ts index 02292dc39546f..5c45f807e08a8 100644 --- a/src/lib/es2023.d.ts +++ b/src/lib/es2023.d.ts @@ -1,2 +1,3 @@ /// /// +/// diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 0e7c3e18077bc..24ee15cd9dedd 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1647,6 +1647,15 @@ type Uncapitalize = intrinsic; */ interface ThisType { } +/** + * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry + */ +interface WeakKeyTypes { + object: object; +} + +type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; + /** * Represents a raw buffer of binary data, which is used to store data for the * different typed arrays. ArrayBuffers cannot be read from or written to directly, diff --git a/src/lib/esnext.d.ts b/src/lib/esnext.d.ts index 30eaf070bfb96..cf34802c0e250 100644 --- a/src/lib/esnext.d.ts +++ b/src/lib/esnext.d.ts @@ -1,2 +1,4 @@ /// /// +/// +/// diff --git a/src/lib/esnext.decorators.d.ts b/src/lib/esnext.decorators.d.ts new file mode 100644 index 0000000000000..d5e6cb910daa0 --- /dev/null +++ b/src/lib/esnext.decorators.d.ts @@ -0,0 +1,10 @@ +/// +/// + +interface SymbolConstructor { + readonly metadata: unique symbol; +} + +interface Function { + [Symbol.metadata]: DecoratorMetadata | null; +} diff --git a/src/lib/esnext.disposable.d.ts b/src/lib/esnext.disposable.d.ts new file mode 100644 index 0000000000000..318b7395ac28a --- /dev/null +++ b/src/lib/esnext.disposable.d.ts @@ -0,0 +1,167 @@ +/// + +interface SymbolConstructor { + /** + * A method that is used to release resources held by an object. Called by the semantics of the `using` statement. + */ + readonly dispose: unique symbol; + + /** + * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement. + */ + readonly asyncDispose: unique symbol; +} + +interface Disposable { + [Symbol.dispose](): void; +} + +interface AsyncDisposable { + [Symbol.asyncDispose](): PromiseLike; +} + +interface SuppressedError extends Error { + error: any; + suppressed: any; +} + +interface SuppressedErrorConstructor extends ErrorConstructor { + new (error: any, suppressed: any, message?: string): SuppressedError; + (error: any, suppressed: any, message?: string): SuppressedError; + readonly prototype: SuppressedError; +} +declare var SuppressedError: SuppressedErrorConstructor; + +interface DisposableStack { + /** + * Returns a value indicating whether this stack has been disposed. + */ + readonly disposed: boolean; + /** + * Disposes each resource in the stack in the reverse order that they were added. + */ + dispose(): void; + /** + * Adds a disposable resource to the stack, returning the resource. + * @param value The resource to add. `null` and `undefined` will not be added, but will be returned. + * @returns The provided {@link value}. + */ + use(value: T): T; + /** + * Adds a value and associated disposal callback as a resource to the stack. + * @param value The value to add. + * @param onDispose The callback to use in place of a `[Symbol.dispose]()` method. Will be invoked with `value` + * as the first parameter. + * @returns The provided {@link value}. + */ + adopt(value: T, onDispose: (value: T) => void): T; + /** + * Adds a callback to be invoked when the stack is disposed. + */ + defer(onDispose: () => void): void; + /** + * Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed. + * @example + * ```ts + * class C { + * #res1: Disposable; + * #res2: Disposable; + * #disposables: DisposableStack; + * constructor() { + * // stack will be disposed when exiting constructor for any reason + * using stack = new DisposableStack(); + * + * // get first resource + * this.#res1 = stack.use(getResource1()); + * + * // get second resource. If this fails, both `stack` and `#res1` will be disposed. + * this.#res2 = stack.use(getResource2()); + * + * // all operations succeeded, move resources out of `stack` so that they aren't disposed + * // when constructor exits + * this.#disposables = stack.move(); + * } + * + * [Symbol.dispose]() { + * this.#disposables.dispose(); + * } + * } + * ``` + */ + move(): DisposableStack; + [Symbol.dispose](): void; + readonly [Symbol.toStringTag]: string; +} + +interface DisposableStackConstructor { + new(): DisposableStack; + readonly prototype: DisposableStack; +} +declare var DisposableStack: DisposableStackConstructor; + +interface AsyncDisposableStack { + /** + * Returns a value indicating whether this stack has been disposed. + */ + readonly disposed: boolean; + /** + * Disposes each resource in the stack in the reverse order that they were added. + */ + disposeAsync(): Promise; + /** + * Adds a disposable resource to the stack, returning the resource. + * @param value The resource to add. `null` and `undefined` will not be added, but will be returned. + * @returns The provided {@link value}. + */ + use(value: T): T; + /** + * Adds a value and associated disposal callback as a resource to the stack. + * @param value The value to add. + * @param onDisposeAsync The callback to use in place of a `[Symbol.asyncDispose]()` method. Will be invoked with `value` + * as the first parameter. + * @returns The provided {@link value}. + */ + adopt(value: T, onDisposeAsync: (value: T) => PromiseLike | void): T; + /** + * Adds a callback to be invoked when the stack is disposed. + */ + defer(onDisposeAsync: () => PromiseLike | void): void; + /** + * Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed. + * @example + * ```ts + * class C { + * #res1: Disposable; + * #res2: Disposable; + * #disposables: DisposableStack; + * constructor() { + * // stack will be disposed when exiting constructor for any reason + * using stack = new DisposableStack(); + * + * // get first resource + * this.#res1 = stack.use(getResource1()); + * + * // get second resource. If this fails, both `stack` and `#res1` will be disposed. + * this.#res2 = stack.use(getResource2()); + * + * // all operations succeeded, move resources out of `stack` so that they aren't disposed + * // when constructor exits + * this.#disposables = stack.move(); + * } + * + * [Symbol.dispose]() { + * this.#disposables.dispose(); + * } + * } + * ``` + */ + move(): AsyncDisposableStack; + [Symbol.asyncDispose](): Promise; + readonly [Symbol.toStringTag]: string; +} + +interface AsyncDisposableStackConstructor { + new(): AsyncDisposableStack; + readonly prototype: AsyncDisposableStack; +} +declare var AsyncDisposableStack: AsyncDisposableStackConstructor; diff --git a/src/lib/libs.json b/src/lib/libs.json index 82ba97aa35fb8..ab55507cbb63c 100644 --- a/src/lib/libs.json +++ b/src/lib/libs.json @@ -30,6 +30,7 @@ "es2015.symbol", "es2015.symbol.wellknown", "es2016.array.include", + "es2017.date", "es2017.object", "es2017.sharedmemory", "es2017.string", @@ -65,7 +66,10 @@ "es2022.string", "es2022.regexp", "es2023.array", + "es2023.collection", + "esnext.decorators", "esnext.intl", + "esnext.disposable", "decorators", "decorators.legacy", // Default libraries diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index c5092cdf4c75f..db20199b6724f 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -436,7 +436,7 @@ interface NotificationOptions { lang?: string; renotify?: boolean; requireInteraction?: boolean; - silent?: boolean; + silent?: boolean | null; tag?: string; timestamp?: EpochTimeStamp; vibrate?: VibratePattern; @@ -521,7 +521,6 @@ interface RTCEncodedAudioFrameMetadata { } interface RTCEncodedVideoFrameMetadata { - contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; @@ -691,8 +690,8 @@ interface TextDecoderOptions { } interface TextEncoderEncodeIntoResult { - read?: number; - written?: number; + read: number; + written: number; } interface Transformer { @@ -848,6 +847,32 @@ interface WebGLContextEventInit extends EventInit { statusMessage?: string; } +interface WebTransportCloseInfo { + closeCode?: number; + reason?: string; +} + +interface WebTransportErrorOptions { + source?: WebTransportErrorSource; + streamErrorCode?: number | null; +} + +interface WebTransportHash { + algorithm?: string; + value?: BufferSource; +} + +interface WebTransportOptions { + allowPooling?: boolean; + congestionControl?: WebTransportCongestionControl; + requireUnreliable?: boolean; + serverCertificateHashes?: WebTransportHash[]; +} + +interface WebTransportSendStreamOptions { + sendOrder?: number | null; +} + interface WorkerOptions { credentials?: RequestCredentials; name?: string; @@ -932,9 +957,9 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */ abort(reason?: any): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */ timeout(milliseconds: number): AbortSignal; }; @@ -1615,6 +1640,8 @@ interface CanvasShadowStyles { } interface CanvasState { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */ + reset(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */ restore(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */ @@ -2065,7 +2092,7 @@ interface DOMPoint extends DOMPointReadOnly { declare var DOMPoint: { prototype: DOMPoint; new(x?: number, y?: number, z?: number, w?: number): DOMPoint; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPoint; }; @@ -2088,7 +2115,7 @@ interface DOMPointReadOnly { declare var DOMPointReadOnly: { prototype: DOMPointReadOnly; new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; @@ -2152,7 +2179,7 @@ interface DOMRectReadOnly { declare var DOMRectReadOnly: { prototype: DOMRectReadOnly; new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */ fromRect(other?: DOMRectInit): DOMRectReadOnly; }; @@ -2860,11 +2887,11 @@ interface FileSystemSyncAccessHandle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */ getSize(): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */ - read(buffer: BufferSource, options?: FileSystemReadWriteOptions): number; + read(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */ truncate(newSize: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */ - write(buffer: BufferSource, options?: FileSystemReadWriteOptions): number; + write(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number; } declare var FileSystemSyncAccessHandle: { @@ -3027,6 +3054,8 @@ interface Headers { delete(name: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */ get(name: string): string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */ + getSetCookie(): string[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */ has(name: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */ @@ -3375,25 +3404,25 @@ declare var IDBKeyRange: { /** * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static) */ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static) */ lowerBound(lower: any, open?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange spanning only key. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static) */ only(value: any): IDBKeyRange; /** * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static) */ upperBound(upper: any, open?: boolean): IDBKeyRange; }; @@ -4093,6 +4122,8 @@ interface Notification extends EventTarget { onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ + readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ readonly tag: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */ @@ -4108,7 +4139,7 @@ interface Notification extends EventTarget { declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */ readonly permission: NotificationPermission; }; @@ -4432,7 +4463,7 @@ interface PerformanceObserver { declare var PerformanceObserver: { prototype: PerformanceObserver; new(callback: PerformanceObserverCallback): PerformanceObserver; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */ readonly supportedEntryTypes: ReadonlyArray; }; @@ -4620,7 +4651,7 @@ interface PushManager { declare var PushManager: { prototype: PushManager; new(): PushManager; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */ readonly supportedContentEncodings: ReadonlyArray; }; @@ -4986,9 +5017,11 @@ interface Response extends Body { declare var Response: { prototype: Response; new(body?: BodyInit | null, init?: ResponseInit): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */ error(): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */ + json(data: any, init?: ResponseInit): Response; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */ redirect(url: string | URL, status?: number): Response; }; @@ -5079,7 +5112,6 @@ interface ServiceWorkerContainer extends EventTarget { oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */ readonly ready: Promise; @@ -5333,7 +5365,7 @@ interface TextDecoder extends TextDecoderCommon { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode) */ - decode(input?: BufferSource, options?: TextDecodeOptions): string; + decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string; } declare var TextDecoder: { @@ -5541,14 +5573,18 @@ interface URL { declare var URL: { prototype: URL; new(url: string | URL, base?: string | URL): URL; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ + canParse(url: string | URL, base?: string): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */ createObjectURL(obj: Blob): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */ revokeObjectURL(url: string): void; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */ interface URLSearchParams { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */ + readonly size: number; /** * Appends a specified key/value pair as a new search parameter. * @@ -5560,7 +5596,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete) */ - delete(name: string): void; + delete(name: string, value?: string): void; /** * Returns the first value associated to the given search parameter. * @@ -5578,7 +5614,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) */ - has(name: string): boolean; + has(name: string, value?: string): boolean; /** * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. * @@ -8179,6 +8215,96 @@ declare var WebSocket: { readonly CLOSED: 3; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport) + */ +interface WebTransport { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */ + readonly closed: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */ + readonly datagrams: WebTransportDatagramDuplexStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */ + readonly incomingBidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */ + readonly incomingUnidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */ + readonly ready: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */ + close(closeInfo?: WebTransportCloseInfo): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */ + createBidirectionalStream(options?: WebTransportSendStreamOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */ + createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise; +} + +declare var WebTransport: { + prototype: WebTransport; + new(url: string | URL, options?: WebTransportOptions): WebTransport; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream) + */ +interface WebTransportBidirectionalStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportBidirectionalStream: { + prototype: WebTransportBidirectionalStream; + new(): WebTransportBidirectionalStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream) + */ +interface WebTransportDatagramDuplexStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */ + incomingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */ + incomingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */ + readonly maxDatagramSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */ + outgoingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */ + outgoingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportDatagramDuplexStream: { + prototype: WebTransportDatagramDuplexStream; + new(): WebTransportDatagramDuplexStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError) + */ +interface WebTransportError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */ + readonly source: WebTransportErrorSource; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */ + readonly streamErrorCode: number | null; +} + +declare var WebTransportError: { + prototype: WebTransportError; + new(message?: string, options?: WebTransportErrorOptions): WebTransportError; +}; + /** * This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. * @@ -8700,16 +8826,16 @@ declare namespace WebAssembly { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */ - interface Global { + interface Global { /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */ - value: any; + value: ValueTypeMap[T]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */ - valueOf(): any; + valueOf(): ValueTypeMap[T]; } var Global: { prototype: Global; - new(descriptor: GlobalDescriptor, v?: any): Global; + new(descriptor: GlobalDescriptor, v?: ValueTypeMap[T]): Global; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */ @@ -8786,9 +8912,9 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; - interface GlobalDescriptor { + interface GlobalDescriptor { mutable?: boolean; - value: ValueType; + value: T; } interface MemoryDescriptor { @@ -8814,6 +8940,16 @@ declare namespace WebAssembly { maximum?: number; } + interface ValueTypeMap { + anyfunc: Function; + externref: any; + f32: number; + f64: number; + i32: number; + i64: bigint; + v128: never; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; @@ -8821,12 +8957,12 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "global" | "memory" | "table"; type TableKind = "anyfunc" | "externref"; - type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; + type ValueType = keyof ValueTypeMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */ function compile(bytes: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */ @@ -9039,6 +9175,7 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi declare function removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; type AlgorithmIdentifier = Algorithm | string; +type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; type BigInteger = Uint8Array; type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; @@ -9162,6 +9299,8 @@ type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m"; type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | "NV12" | "RGBA" | "RGBX"; type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; +type WebTransportCongestionControl = "default" | "low-latency" | "throughput"; +type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 5335620429851..3c53534bb7594 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -590,6 +590,7 @@ export interface ProjectServiceOptions { typesMapLocation?: string; serverMode?: LanguageServiceMode; session: Session | undefined; + /** @internal */ incrementalVerifier?: (service: ProjectService) => void; } interface OriginalFileInfo { fileName: NormalizedPath; path: Path; } @@ -909,7 +910,7 @@ export class ProjectService { */ readonly openFiles: Map = new Map(); /** @internal */ - readonly configFileForOpenFiles: Map = new Map(); + readonly configFileForOpenFiles = new Map(); /** * Map of open files that are opened without complete path but have projectRoot as current directory */ @@ -989,12 +990,13 @@ export class ProjectService { /** @internal */ readonly session: Session | undefined; - private performanceEventHandler?: PerformanceEventHandler; private pendingPluginEnablements?: Map[]>; private currentPluginEnablementPromise?: Promise; + /** @internal */ verifyDocumentRegistry = noop; + constructor(opts: ProjectServiceOptions) { this.host = opts.host; this.logger = opts.logger; @@ -1057,6 +1059,7 @@ export class ProjectService { watchDirectory: returnNoopFileWatcher, } : getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); + opts.incrementalVerifier?.(this); } toPath(fileName: string) { @@ -1334,7 +1337,7 @@ export class ProjectService { } /** @internal */ - private forEachProject(cb: (project: Project) => void) { + forEachProject(cb: (project: Project) => void) { this.externalProjects.forEach(cb); this.configuredProjects.forEach(cb); this.inferredProjects.forEach(cb); @@ -2640,6 +2643,7 @@ export class ProjectService { private clearSemanticCache(project: Project) { project.resolutionCache.clear(); project.getLanguageService(/*ensureSynchronized*/ false).cleanupSemanticCache(); + project.cleanupProgram(); project.markAsDirty(); } diff --git a/src/server/project.ts b/src/server/project.ts index 129d18a2dc1d7..13bd6e1246ed7 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -60,6 +60,7 @@ import { getEntrypointsFromPackageJsonInfo, getNormalizedAbsolutePath, getOrUpdate, + GetPackageJsonEntrypointsHost, getStringComparer, HasInvalidatedLibResolutions, HasInvalidatedResolutions, @@ -393,7 +394,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo private packageJsonsForAutoImport: Set | undefined; /** @internal */ - private noDtsResolutionProject?: AuxiliaryProject | undefined; + noDtsResolutionProject?: AuxiliaryProject | undefined; /** @internal */ getResolvedProjectReferenceToRedirect(_fileName: string): ResolvedProjectReference | undefined { @@ -969,6 +970,19 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo this.projectService.onUpdateLanguageServiceStateForProject(this, /*languageServiceEnabled*/ true); } + /** @internal */ + cleanupProgram() { + if (this.program) { + // Root files are always attached to the project irrespective of program + for (const f of this.program.getSourceFiles()) { + this.detachScriptInfoIfNotRoot(f.fileName); + } + this.program.forEachResolvedProjectReference(ref => + this.detachScriptInfoFromProject(ref.sourceFile.fileName)); + this.program = undefined; + } + } + disableLanguageService(lastFileExceededProgramSize?: string) { if (!this.languageServiceEnabled) { return; @@ -976,6 +990,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo Debug.assert(this.projectService.serverMode !== LanguageServiceMode.Syntactic); this.languageService.cleanupSemanticCache(); this.languageServiceEnabled = false; + this.cleanupProgram(); this.lastFileExceededProgramSize = lastFileExceededProgramSize; this.builderState = undefined; if (this.autoImportProviderHost) { @@ -984,6 +999,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo this.autoImportProviderHost = undefined; this.resolutionCache.closeTypeRootsWatch(); this.clearGeneratedFileWatch(); + this.projectService.verifyDocumentRegistry(); this.projectService.onUpdateLanguageServiceStateForProject(this, /*languageServiceEnabled*/ false); } @@ -1030,17 +1046,10 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo close() { this.projectService.typingsCache.onProjectClosed(this); this.closeWatchingTypingLocations(); - if (this.program) { - // if we have a program - release all files that are enlisted in program but arent root - // The releasing of the roots happens later - // The project could have pending update remaining and hence the info could be in the files but not in program graph - for (const f of this.program.getSourceFiles()) { - this.detachScriptInfoIfNotRoot(f.fileName); - } - this.program.forEachResolvedProjectReference(ref => - this.detachScriptInfoFromProject(ref.sourceFile.fileName)); - } - + // if we have a program - release all files that are enlisted in program but arent root + // The releasing of the roots happens later + // The project could have pending update remaining and hence the info could be in the files but not in program graph + this.cleanupProgram(); // Release external files forEach(this.externalFiles, externalFile => this.detachScriptInfoIfNotRoot(externalFile)); // Always remove root files from the project @@ -1492,6 +1501,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo private updateGraphWorker() { const oldProgram = this.languageService.getCurrentProgram(); + Debug.assert(oldProgram === this.program); Debug.assert(!this.isClosed(), "Called update graph worker of closed project"); this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); const start = timestamp(); @@ -1633,6 +1643,8 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo else if (this.program !== oldProgram) { this.writeLog(`Different program with same set of files`); } + // Verify the document registry count + this.projectService.verifyDocumentRegistry(); return hasNewProgram; } @@ -2082,7 +2094,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo } /** @internal */ - getModuleResolutionHostForAutoImportProvider(): ModuleResolutionHost { + getHostForAutoImportProvider(): GetPackageJsonEntrypointsHost { if (this.program) { return { fileExists: this.program.fileExists, @@ -2093,6 +2105,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), trace: this.projectService.host.trace?.bind(this.projectService.host), useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), + readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host), }; } return this.projectService.host; @@ -2121,7 +2134,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo if (dependencySelection) { tracing?.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider"); const start = timestamp(); - this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getModuleResolutionHostForAutoImportProvider(), this.documentRegistry); + this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry); if (this.autoImportProviderHost) { updateProjectIfDirty(this.autoImportProviderHost); this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start); @@ -2342,7 +2355,8 @@ export class InferredProject extends Project { } } -class AuxiliaryProject extends Project { +/** @internal */ +export class AuxiliaryProject extends Project { constructor(projectService: ProjectService, documentRegistry: DocumentRegistry, compilerOptions: CompilerOptions, currentDirectory: string) { super(projectService.newAuxiliaryProjectName(), ProjectKind.Auxiliary, @@ -2361,7 +2375,6 @@ class AuxiliaryProject extends Project { return true; } - /** @internal */ override scheduleInvalidateResolutionsOfFailedLookupLocations(): void { // Invalidation will happen on-demand as part of updateGraph return; @@ -2373,7 +2386,7 @@ export class AutoImportProviderProject extends Project { private static readonly maxDependencies = 10; /** @internal */ - static getRootFileNames(dependencySelection: PackageJsonAutoImportPreference, hostProject: Project, moduleResolutionHost: ModuleResolutionHost, compilerOptions: CompilerOptions): string[] { + static getRootFileNames(dependencySelection: PackageJsonAutoImportPreference, hostProject: Project, host: GetPackageJsonEntrypointsHost, compilerOptions: CompilerOptions): string[] { if (!dependencySelection) { return ts.emptyArray; } @@ -2411,7 +2424,7 @@ export class AutoImportProviderProject extends Project { name, hostProject.currentDirectory, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache()); if (packageJson) { const entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache); @@ -2430,7 +2443,7 @@ export class AutoImportProviderProject extends Project { `@types/${name}`, directory, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache()); if (typesPackageJson) { const entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache); @@ -2469,11 +2482,11 @@ export class AutoImportProviderProject extends Project { const entrypoints = getEntrypointsFromPackageJsonInfo( packageJson, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache(), resolveJs); if (entrypoints) { - const real = moduleResolutionHost.realpath?.(packageJson.packageDirectory); + const real = host.realpath?.(packageJson.packageDirectory); const isSymlink = real && real !== packageJson.packageDirectory; if (isSymlink) { symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, { @@ -2503,7 +2516,7 @@ export class AutoImportProviderProject extends Project { }; /** @internal */ - static create(dependencySelection: PackageJsonAutoImportPreference, hostProject: Project, moduleResolutionHost: ModuleResolutionHost, documentRegistry: DocumentRegistry): AutoImportProviderProject | undefined { + static create(dependencySelection: PackageJsonAutoImportPreference, hostProject: Project, host: GetPackageJsonEntrypointsHost, documentRegistry: DocumentRegistry): AutoImportProviderProject | undefined { if (dependencySelection === PackageJsonAutoImportPreference.Off) { return undefined; } @@ -2513,7 +2526,7 @@ export class AutoImportProviderProject extends Project { ...this.compilerOptionsOverrides, }; - const rootNames = this.getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions); + const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions); if (!rootNames.length) { return undefined; } @@ -2562,7 +2575,7 @@ export class AutoImportProviderProject extends Project { rootFileNames = AutoImportProviderProject.getRootFileNames( this.hostProject.includePackageJsonAutoImports(), this.hostProject, - this.hostProject.getModuleResolutionHostForAutoImportProvider(), + this.hostProject.getHostForAutoImportProvider(), this.getCompilationSettings()); } @@ -2609,7 +2622,7 @@ export class AutoImportProviderProject extends Project { throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); } - override getModuleResolutionHostForAutoImportProvider(): never { + override getHostForAutoImportProvider(): never { throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); } diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 4e4432d0bc2e7..227a50fd3fb29 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -721,6 +721,7 @@ export interface RefactorEditInfo { */ renameLocation?: Location; renameFilename?: string; + notApplicableReason?: string; } /** @@ -2335,6 +2336,11 @@ export interface CompletionEntry { * coupled with `replacementSpan` to replace a dotted access with a bracket access. */ insertText?: string; + /** + * A string that should be used when filtering a set of + * completion items. + */ + filterText?: string; /** * `insertText` should be interpreted as a snippet if true. */ @@ -2669,13 +2675,18 @@ export interface InlayHintsRequest extends Request { } export interface InlayHintItem { - text: string; + text: string | InlayHintItemDisplayPart[]; position: Location; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; } +export interface InlayHintItemDisplayPart { + text: string; + span?: FileSpan; +} + export interface InlayHintsResponse extends Response { body?: InlayHintItem[]; } @@ -3530,6 +3541,8 @@ export interface UserPreferences { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; + readonly autoImportFileExcludePatterns?: string[]; /** diff --git a/src/server/session.ts b/src/server/session.ts index 5d6eb52337748..7ffca99351804 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -946,6 +946,7 @@ export interface SessionOptions { pluginProbeLocations?: readonly string[]; allowLocalPluginLoads?: boolean; typesMapLocation?: string; + /** @internal */ incrementalVerifier?: (service: ProjectService) => void; } export class Session implements EventSender { @@ -1010,7 +1011,8 @@ export class Session implements EventSender { allowLocalPluginLoads: opts.allowLocalPluginLoads, typesMapLocation: opts.typesMapLocation, serverMode: opts.serverMode, - session: this + session: this, + incrementalVerifier: opts.incrementalVerifier, }; this.projectService = new ProjectService(settings); this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); @@ -1339,6 +1341,7 @@ export class Session implements EventSender { this.logger.info(`cleaning ${caption}`); for (const p of projects) { p.getLanguageService(/*ensureSynchronized*/ false).cleanupSemanticCache(); + p.cleanupProgram(); } } @@ -1841,10 +1844,23 @@ export class Session implements EventSender { const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file)!; const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file)); - return hints.map(hint => ({ - ...hint, - position: scriptInfo.positionToLineOffset(hint.position), - })); + return hints.map(hint => { + const { text, position } = hint; + const hintText = typeof text === "string" ? text : text.map(({ text, span, file }) => ({ + text, + span: span && { + start: scriptInfo.positionToLineOffset(span.start), + end: scriptInfo.positionToLineOffset(span.start + span.length), + file: file! + } + })); + + return { + ...hint, + position: scriptInfo.positionToLineOffset(position), + text: hintText + }; + }); } private setCompilerOptionsForInferredProjects(args: protocol.SetCompilerOptionsForInferredProjectsArgs): void { @@ -2267,6 +2283,7 @@ export class Session implements EventSender { kindModifiers, sortText, insertText, + filterText, replacementSpan, hasAction, source, @@ -2285,6 +2302,7 @@ export class Session implements EventSender { kindModifiers, sortText, insertText, + filterText, replacementSpan: convertedSpan, isSnippet, hasAction: hasAction || undefined, @@ -2707,7 +2725,8 @@ export class Session implements EventSender { return { renameLocation: mappedRenameLocation, renameFilename, - edits: this.mapTextChangesToCodeEdits(edits) + edits: this.mapTextChangesToCodeEdits(edits), + notApplicableReason: result.notApplicableReason, }; } return result; diff --git a/src/services/_namespaces/ts.refactor.ts b/src/services/_namespaces/ts.refactor.ts index 2edf81a5b8caa..e397f484766ba 100644 --- a/src/services/_namespaces/ts.refactor.ts +++ b/src/services/_namespaces/ts.refactor.ts @@ -5,6 +5,7 @@ export * from "../refactors/convertExport"; export * from "../refactors/convertImport"; export * from "../refactors/extractType"; export * from "../refactors/helpers"; +export * from "../refactors/inlineVariable"; export * from "../refactors/moveToNewFile"; export * from "../refactors/moveToFile"; import * as addOrRemoveBracesToArrowFunction from "./ts.refactor.addOrRemoveBracesToArrowFunction"; diff --git a/src/services/codefixes/addEmptyExportDeclaration.ts b/src/services/codefixes/addEmptyExportDeclaration.ts index d4020fea83f7f..b490c66af5ecd 100644 --- a/src/services/codefixes/addEmptyExportDeclaration.ts +++ b/src/services/codefixes/addEmptyExportDeclaration.ts @@ -11,6 +11,7 @@ import { registerCodeFix({ errorCodes: [ Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, + Diagnostics.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, ], getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) { diff --git a/src/services/codefixes/convertToTypeOnlyImport.ts b/src/services/codefixes/convertToTypeOnlyImport.ts index 5b553bb33d0e5..fd5cd3cc2eefc 100644 --- a/src/services/codefixes/convertToTypeOnlyImport.ts +++ b/src/services/codefixes/convertToTypeOnlyImport.ts @@ -1,6 +1,7 @@ import { Diagnostics, factory, + FindAllReferences, getSynthesizedDeepClone, getSynthesizedDeepClones, getTokenAtPosition, @@ -9,12 +10,18 @@ import { ImportSpecifier, isImportDeclaration, isImportSpecifier, + isValidTypeOnlyAliasUseSite, + Program, + sameMap, + some, SourceFile, + SyntaxKind, textChanges, } from "../_namespaces/ts"; import { codeFixAll, createCodeFixAction, + createCodeFixActionWithoutFixAll, registerCodeFix, } from "../_namespaces/ts.codefix"; @@ -30,16 +37,46 @@ registerCodeFix({ const declaration = getDeclaration(context.sourceFile, context.span.start); if (declaration) { const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, declaration)); - return [createCodeFixAction(fixId, changes, Diagnostics.Convert_to_type_only_import, fixId, Diagnostics.Convert_all_imports_not_used_as_a_value_to_type_only_imports)]; + const importDeclarationChanges = declaration.kind === SyntaxKind.ImportSpecifier && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) + ? textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, declaration.parent.parent.parent)) + : undefined; + const mainAction = createCodeFixAction( + fixId, + changes, + declaration.kind === SyntaxKind.ImportSpecifier + ? [Diagnostics.Use_type_0, declaration.propertyName?.text ?? declaration.name.text] + : Diagnostics.Use_import_type, + fixId, + Diagnostics.Fix_all_with_type_only_imports); + + if (some(importDeclarationChanges)) { + return [ + createCodeFixActionWithoutFixAll(fixId, importDeclarationChanges, Diagnostics.Use_import_type), + mainAction + ]; + } + return [mainAction]; } return undefined; }, fixIds: [fixId], getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) { + const fixedImportDeclarations = new Set(); return codeFixAll(context, errorCodes, (changes, diag) => { - const declaration = getDeclaration(diag.file, diag.start); - if (declaration) { - doChange(changes, diag.file, declaration); + const errorDeclaration = getDeclaration(diag.file, diag.start); + if (errorDeclaration?.kind === SyntaxKind.ImportDeclaration && !fixedImportDeclarations.has(errorDeclaration)) { + doChange(changes, diag.file, errorDeclaration); + fixedImportDeclarations.add(errorDeclaration); + } + else if (errorDeclaration?.kind === SyntaxKind.ImportSpecifier + && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) + && canConvertImportDeclarationForSpecifier(errorDeclaration, diag.file, context.program) + ) { + doChange(changes, diag.file, errorDeclaration.parent.parent.parent); + fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); + } + else if (errorDeclaration?.kind === SyntaxKind.ImportSpecifier) { + doChange(changes, diag.file, errorDeclaration); } }); } @@ -50,6 +87,31 @@ function getDeclaration(sourceFile: SourceFile, pos: number) { return isImportSpecifier(parent) || isImportDeclaration(parent) && parent.importClause ? parent : undefined; } + +function canConvertImportDeclarationForSpecifier(specifier: ImportSpecifier, sourceFile: SourceFile, program: Program): boolean { + if (specifier.parent.parent.name) { + // An import declaration with a default import and named bindings can't be type-only + return false; + } + const nonTypeOnlySpecifiers = specifier.parent.elements.filter(e => !e.isTypeOnly); + if (nonTypeOnlySpecifiers.length === 1) { + // If the error specifier is on the only non-type-only specifier, we can convert the whole import + return true; + } + // Otherwise, we need to check the usage of the other specifiers + const checker = program.getTypeChecker(); + for (const specifier of nonTypeOnlySpecifiers) { + const isUsedAsValue = FindAllReferences.Core.eachSymbolReferenceInFile(specifier.name, checker, sourceFile, usage => { + return !isValidTypeOnlyAliasUseSite(usage); + }); + if (isUsedAsValue) { + return false; + } + } + // No other specifiers are used as values, so we can convert the whole import + return true; +} + function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, declaration: ImportDeclaration | ImportSpecifier) { if (isImportSpecifier(declaration)) { changes.replaceNode(sourceFile, declaration, factory.updateImportSpecifier(declaration, /*isTypeOnly*/ true, declaration.propertyName, declaration.name)); @@ -73,8 +135,13 @@ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, de ]); } else { + const newNamedBindings = importClause.namedBindings?.kind === SyntaxKind.NamedImports + ? factory.updateNamedImports( + importClause.namedBindings, + sameMap(importClause.namedBindings.elements, e => factory.updateImportSpecifier(e, /*isTypeOnly*/ false, e.propertyName, e.name))) + : importClause.namedBindings; const importDeclaration = factory.updateImportDeclaration(declaration, declaration.modifiers, - factory.updateImportClause(importClause, /*isTypeOnly*/ true, importClause.name, importClause.namedBindings), declaration.moduleSpecifier, declaration.assertClause); + factory.updateImportClause(importClause, /*isTypeOnly*/ true, importClause.name, newNamedBindings), declaration.moduleSpecifier, declaration.assertClause); changes.replaceNode(sourceFile, declaration, importDeclaration); } } diff --git a/src/services/codefixes/convertTypedefToType.ts b/src/services/codefixes/convertTypedefToType.ts index 5cf04b1aaa82f..fb6016d1cab41 100644 --- a/src/services/codefixes/convertTypedefToType.ts +++ b/src/services/codefixes/convertTypedefToType.ts @@ -1,14 +1,17 @@ import { Diagnostics, factory, - forEach, + flatMap, + getNewLineOrDefaultFromHost, getSynthesizedDeepClone, getTokenAtPosition, hasJSDocNodes, InterfaceDeclaration, isJSDocTypedefTag, isJSDocTypeLiteral, + JSDoc, JSDocPropertyLikeTag, + JSDocTag, JSDocTypedefTag, JSDocTypeExpression, JSDocTypeLiteral, @@ -29,12 +32,14 @@ registerCodeFix({ fixIds: [fixId], errorCodes, getCodeActions(context) { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); const node = getTokenAtPosition( context.sourceFile, context.span.start ); if (!node) return; - const changes = textChanges.ChangeTracker.with(context, t => doChange(t, node, context.sourceFile)); + + const changes = textChanges.ChangeTracker.with(context, t => doChange(t, node, context.sourceFile, newLineCharacter)); if (changes.length > 0) { return [ @@ -48,35 +53,102 @@ registerCodeFix({ ]; } }, - getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { - const node = getTokenAtPosition(diag.file, diag.start); - if (node) doChange(changes, node, diag.file); - }) + getAllCodeActions: context => codeFixAll( + context, + errorCodes, + (changes, diag) => { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); + const node = getTokenAtPosition(diag.file, diag.start); + const fixAll = true; + if (node) doChange(changes, node, diag.file, newLineCharacter, fixAll); + } + ) }); -function doChange(changes: textChanges.ChangeTracker, node: Node, sourceFile: SourceFile) { - if (isJSDocTypedefTag(node)) { - fixSingleTypeDef(changes, node, sourceFile); - } -} - -function fixSingleTypeDef( +function doChange( changes: textChanges.ChangeTracker, - typeDefNode: JSDocTypedefTag | undefined, + node: Node, sourceFile: SourceFile, + newLine: string, + fixAll = false ) { - if (!typeDefNode) return; + if (!isJSDocTypedefTag(node)) return; - const declaration = createDeclaration(typeDefNode); + const declaration = createDeclaration(node); if (!declaration) return; - const comment = typeDefNode.parent; + const commentNode = node.parent; + + const { leftSibling, rightSibling } = getLeftAndRightSiblings(node); + + let pos = commentNode.getStart(); + let prefix = ""; + + // the first @typedef is the comment block with a text comment above + if (!leftSibling && commentNode.comment) { + pos = findEndOfTextBetween(commentNode, commentNode.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + + if (leftSibling) { + if (fixAll && isJSDocTypedefTag(leftSibling)) { + // Don't need to keep empty comment clock between created interfaces + pos = node.getStart(); + prefix = ""; + } + else { + pos = findEndOfTextBetween(commentNode, leftSibling.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + } + + let end = commentNode.getEnd(); + let suffix = ""; + + if (rightSibling) { + if (fixAll && isJSDocTypedefTag(rightSibling)) { + // Don't need to keep empty comment clock between created interfaces + end = rightSibling.getStart(); + suffix = `${newLine}${newLine}`; + } + else { + end = rightSibling.getStart(); + suffix = `${newLine}/**${newLine} * `; + } + } - changes.replaceNode( - sourceFile, - comment, - declaration + changes.replaceRange(sourceFile, { pos, end }, declaration, { prefix, suffix }); +} + +function getLeftAndRightSiblings(typedefNode: JSDocTypedefTag): { leftSibling?: Node, rightSibling?: Node } { + + const commentNode = typedefNode.parent; + const maxChildIndex = commentNode.getChildCount() - 1; + + const currentNodeIndex = commentNode.getChildren().findIndex( + (n) => n.getStart() === typedefNode.getStart() && n.getEnd() === typedefNode.getEnd() ); + + const leftSibling = currentNodeIndex > 0 ? commentNode.getChildAt(currentNodeIndex - 1) : undefined; + const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : undefined; + + return { leftSibling, rightSibling }; +} + +/** + * Finds the index of the last meaningful symbol (except empty spaces, * and /) in the comment + * between start and end positions + */ +function findEndOfTextBetween(jsDocComment: JSDoc, from: number, to: number): number { + const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); + + for (let i = comment.length; i > 0; i--) { + if(!/[*\/\s]/g.test(comment.substring(i - 1, i))) { + return from + i; + } + } + + return to; } function createDeclaration(tag: JSDocTypedefTag): InterfaceDeclaration | TypeAliasDeclaration | undefined { @@ -86,7 +158,7 @@ function createDeclaration(tag: JSDocTypedefTag): InterfaceDeclaration | TypeAli if (!typeName) return; // For use case @typedef {object}Foo @property{bar}number - // But object type can be nested, meaning the value in the k/v pair can be object itself + // But object type can be nested, meaning the value in the k/v pair can be the object itself if (typeExpression.kind === SyntaxKind.JSDocTypeLiteral) { return createInterfaceForTypeLiteral(typeName, typeExpression); } @@ -103,14 +175,14 @@ function createInterfaceForTypeLiteral( ): InterfaceDeclaration | undefined { const propertySignatures = createSignatureFromTypeLiteral(typeLiteral); if (!some(propertySignatures)) return; - const interfaceDeclaration = factory.createInterfaceDeclaration( + + return factory.createInterfaceDeclaration( /*modifiers*/ undefined, typeName, /*typeParameters*/ undefined, /*heritageClauses*/ undefined, propertySignatures, ); - return interfaceDeclaration; } function createTypeAliasForTypeExpression( @@ -119,13 +191,13 @@ function createTypeAliasForTypeExpression( ): TypeAliasDeclaration | undefined { const typeReference = getSynthesizedDeepClone(typeExpression.type); if (!typeReference) return; - const declaration = factory.createTypeAliasDeclaration( + + return factory.createTypeAliasDeclaration( /*modifiers*/ undefined, factory.createIdentifier(typeName), /*typeParameters*/ undefined, typeReference ); - return declaration; } function createSignatureFromTypeLiteral(typeLiteral: JSDocTypeLiteral): PropertySignature[] | undefined { @@ -150,19 +222,17 @@ function createSignatureFromTypeLiteral(typeLiteral: JSDocTypeLiteral): Property if (typeReference && name) { const questionToken = isOptional ? factory.createToken(SyntaxKind.QuestionToken) : undefined; - const prop = factory.createPropertySignature( + + return factory.createPropertySignature( /*modifiers*/ undefined, name, questionToken, typeReference ); - - return prop; } }; - const props = mapDefined(propertyTags, getSignature); - return props; + return mapDefined(propertyTags, getSignature); } function getPropertyName(tag: JSDocPropertyLikeTag): string | undefined { @@ -170,9 +240,10 @@ function getPropertyName(tag: JSDocPropertyLikeTag): string | undefined { } /** @internal */ -export function getJSDocTypedefNode(node: Node): JSDocTypedefTag | undefined { +export function getJSDocTypedefNodes(node: Node): readonly JSDocTag[] { if (hasJSDocNodes(node)) { - return forEach(node.jsDoc, (node) => node.tags?.find(isJSDocTypedefTag)); + return flatMap(node.jsDoc, (doc) => doc.tags?.filter((tag) => isJSDocTypedefTag(tag))); } - return undefined; + + return []; } diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 2231cd0509a9b..5c9efb68258fe 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -538,11 +538,6 @@ function getActionsForMissingMethodDeclaration(context: CodeFixContext, info: Ty return undefined; } - // Private methods are not implemented yet. - if (isPrivateIdentifier(token)) { - return undefined; - } - const methodName = token.text; const addMethodDeclarationChanges = (modifierFlags: ModifierFlags) => textChanges.ChangeTracker.with(context, t => addMethodDeclaration(context, t, call, token, modifierFlags, parentDeclaration, declSourceFile)); const actions = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & ModifierFlags.Static), [modifierFlags & ModifierFlags.Static ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; @@ -556,7 +551,7 @@ function addMethodDeclaration( context: CodeFixContextBase, changes: textChanges.ChangeTracker, callExpression: CallExpression, - name: Identifier, + name: Identifier | PrivateIdentifier, modifierFlags: ModifierFlags, parentDeclaration: ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode, sourceFile: SourceFile, diff --git a/src/services/codefixes/fixAwaitInSyncFunction.ts b/src/services/codefixes/fixAwaitInSyncFunction.ts index f12ba12e3f0fc..ee1f5f73a4c31 100644 --- a/src/services/codefixes/fixAwaitInSyncFunction.ts +++ b/src/services/codefixes/fixAwaitInSyncFunction.ts @@ -29,6 +29,7 @@ import { const fixId = "fixAwaitInSyncFunction"; const errorCodes = [ Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code ]; diff --git a/src/services/codefixes/fixModuleAndTargetOptions.ts b/src/services/codefixes/fixModuleAndTargetOptions.ts index 9a223fa10d829..0cc3e489ab25d 100644 --- a/src/services/codefixes/fixModuleAndTargetOptions.ts +++ b/src/services/codefixes/fixModuleAndTargetOptions.ts @@ -20,6 +20,7 @@ import { registerCodeFix({ errorCodes: [ Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, ], getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { diff --git a/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts b/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts index ec5b5e6e3ca90..4c35ee6b9629a 100644 --- a/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts +++ b/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts @@ -44,7 +44,7 @@ registerCodeFix({ actions = append(actions, createCodeFixActionWithoutFixAll(fixId, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); } if (typeOnlyChanges.length) { - actions = append(actions, createCodeFixActionWithoutFixAll(fixId, typeOnlyChanges, Diagnostics.Convert_to_type_only_import)); + actions = append(actions, createCodeFixActionWithoutFixAll(fixId, typeOnlyChanges, Diagnostics.Use_import_type)); } return actions; }, diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index e47e4c99777a2..1116d70c19ccf 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -6,27 +6,32 @@ import { Block, CallExpression, CharacterCodes, + CheckFlags, ClassLikeDeclaration, CodeFixContextBase, combine, Debug, + Declaration, Diagnostics, emptyArray, EntityName, Expression, factory, find, + firstOrUndefined, flatMap, FunctionDeclaration, FunctionExpression, GetAccessorDeclaration, getAllAccessorDeclarations, + getCheckFlags, getEffectiveModifierFlags, getEmitScriptTarget, getFirstIdentifier, getModuleSpecifierResolverHost, getNameForExportedSymbol, getNameOfDeclaration, + getPropertyNameFromType, getQuotePreference, getSetAccessorValueParameter, getSynthesizedDeepClone, @@ -52,6 +57,7 @@ import { isSetAccessorDeclaration, isStringLiteral, isTypeNode, + isTypeUsableAsPropertyName, isYieldExpression, LanguageServiceHost, length, @@ -69,6 +75,7 @@ import { ObjectLiteralExpression, ObjectType, ParameterDeclaration, + PrivateIdentifier, Program, PropertyAssignment, PropertyDeclaration, @@ -90,6 +97,7 @@ import { textChanges, TextSpan, textSpanEnd, + TransientSymbol, tryCast, TsConfigSourceFile, Type, @@ -97,6 +105,7 @@ import { TypeFlags, TypeNode, TypeParameterDeclaration, + unescapeLeadingUnderscores, UnionType, UserPreferences, visitEachChild, @@ -173,7 +182,7 @@ export function addNewNodeForMemberSymbol( isAmbient = false, ): void { const declarations = symbol.getDeclarations(); - const declaration = declarations?.[0]; + const declaration = firstOrUndefined(declarations); const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); @@ -192,9 +201,10 @@ export function addNewNodeForMemberSymbol( * In such cases, we assume the declaration to be a `PropertySignature`. */ const kind = declaration?.kind ?? SyntaxKind.PropertySignature; - const declarationName = getSynthesizedDeepClone(getNameOfDeclaration(declaration), /*includeTrivia*/ false) as PropertyName; + const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : ModifierFlags.None; - let modifierFlags = + let modifierFlags = effectiveModifierFlags & ModifierFlags.Static; + modifierFlags |= effectiveModifierFlags & ModifierFlags.Public ? ModifierFlags.Public : effectiveModifierFlags & ModifierFlags.Protected ? ModifierFlags.Protected : ModifierFlags.None; @@ -308,7 +318,6 @@ export function addNewNodeForMemberSymbol( if (method) addClassElement(method); } - function createModifiers(): NodeArray | undefined { let modifiers: Modifier[] | undefined; @@ -342,6 +351,16 @@ export function addNewNodeForMemberSymbol( function createTypeNode(typeNode: TypeNode | undefined) { return getSynthesizedDeepClone(typeNode, /*includeTrivia*/ false); } + + function createDeclarationName(symbol: Symbol, declaration: Declaration | undefined): PropertyName { + if (getCheckFlags(symbol) & CheckFlags.Mapped) { + const nameType = (symbol as TransientSymbol).links.nameType; + if (nameType && isTypeUsableAsPropertyName(nameType)) { + return factory.createIdentifier(unescapeLeadingUnderscores(getPropertyNameFromType(nameType))); + } + } + return getSynthesizedDeepClone(getNameOfDeclaration(declaration), /*includeTrivia*/ false) as PropertyName; + } } /** @internal */ @@ -463,7 +482,7 @@ export function createSignatureDeclarationFromCallExpression( context: CodeFixContextBase, importAdder: ImportAdder, call: CallExpression, - name: Identifier | string, + name: Identifier | PrivateIdentifier | string, modifierFlags: ModifierFlags, contextNode: Node ): MethodDeclaration | FunctionDeclaration | MethodSignature { @@ -479,7 +498,7 @@ export function createSignatureDeclarationFromCallExpression( isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : undefined); const instanceTypes = isJs ? [] : map(args, arg => checker.getTypeAtLocation(arg)); const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters( - checker, importAdder, instanceTypes, contextNode, scriptTarget, /*flags*/ undefined, tracker + checker, importAdder, instanceTypes, contextNode, scriptTarget, NodeBuilderFlags.NoTruncation, tracker ); const modifiers = modifierFlags @@ -516,6 +535,7 @@ export function createSignatureDeclarationFromCallExpression( type === undefined ? factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword) : type ); case SyntaxKind.FunctionDeclaration: + Debug.assert(typeof name === "string" || isIdentifier(name), "Unexpected name"); return factory.createFunctionDeclaration( modifiers, asteriskToken, diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 6e7f9916748b7..e6f0eb91405e3 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -5,6 +5,7 @@ import { arrayFrom, CancellationToken, cast, + changeAnyExtension, CodeAction, CodeFixAction, CodeFixContextBase, @@ -42,10 +43,13 @@ import { getExportInfoMap, getMeaningFromDeclaration, getMeaningFromLocation, + getModeForUsageLocation, getNameForExportedSymbol, getNodeId, + getOutputExtension, getQuoteFromPreference, getQuotePreference, + getResolvedModule, getSourceFileOfNode, getSymbolId, getTokenAtPosition, @@ -194,7 +198,7 @@ export interface ImportAdder { hasFixes(): boolean; addImportFromDiagnostic: (diagnostic: DiagnosticWithLocation, context: CodeFixContextBase) => void; addImportFromExportedSymbol: (exportedSymbol: Symbol, isValidTypeOnlyUseSite?: boolean) => void; - writeFixes: (changeTracker: textChanges.ChangeTracker) => void; + writeFixes: (changeTracker: textChanges.ChangeTracker, oldFileQuotePreference?: QuotePreference) => void; } /** @internal */ @@ -345,8 +349,15 @@ function createImportAdderWorker(sourceFile: SourceFile, program: Program, useAu } } - function writeFixes(changeTracker: textChanges.ChangeTracker) { - const quotePreference = getQuotePreference(sourceFile, preferences); + function writeFixes(changeTracker: textChanges.ChangeTracker, oldFileQuotePreference?: QuotePreference) { + let quotePreference: QuotePreference; + if (sourceFile.imports.length === 0 && oldFileQuotePreference !== undefined) { + // If the target file has no imports, we must use the same quote preference as the file we are importing from. + quotePreference = oldFileQuotePreference; + } + else { + quotePreference = getQuotePreference(sourceFile, preferences); + } for (const fix of addToNamespace) { addNamespaceQualifier(changeTracker, sourceFile, fix); } @@ -803,14 +814,19 @@ function shouldUseRequire(sourceFile: SourceFile, program: Program): boolean { return getEmitModuleKind(compilerOptions) < ModuleKind.ES2015; } - // 4. Match the first other JS file in the program that's unambiguously CJS or ESM + // 4. In --module nodenext, assume we're not emitting JS -> JS, so use + // whatever syntax Node expects based on the detected module kind + if (sourceFile.impliedNodeFormat === ModuleKind.CommonJS) return true; + if (sourceFile.impliedNodeFormat === ModuleKind.ESNext) return false; + + // 5. Match the first other JS file in the program that's unambiguously CJS or ESM for (const otherFile of program.getSourceFiles()) { if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) continue; if (otherFile.commonJsModuleIndicator && !otherFile.externalModuleIndicator) return true; if (otherFile.externalModuleIndicator && !otherFile.commonJsModuleIndicator) return false; } - // 5. Literally nothing to go on + // 6. Literally nothing to go on return true; } @@ -1344,6 +1360,15 @@ function promoteFromTypeOnly(changes: textChanges.ChangeTracker, aliasDeclaratio function promoteImportClause(importClause: ImportClause) { changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); + // Change .ts extension to .js if necessary + if (!compilerOptions.allowImportingTsExtensions) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); + const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + if (resolvedModule?.resolvedUsingTsExtension) { + const changedExtension = changeAnyExtension(moduleSpecifier!.text, getOutputExtension(moduleSpecifier!.text, compilerOptions)); + changes.replaceNode(sourceFile, moduleSpecifier!, factory.createStringLiteral(changedExtension)); + } + } if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { diff --git a/src/services/codefixes/returnValueCorrect.ts b/src/services/codefixes/returnValueCorrect.ts index 2c16bfa5b2143..5bca2c5788b91 100644 --- a/src/services/codefixes/returnValueCorrect.ts +++ b/src/services/codefixes/returnValueCorrect.ts @@ -219,6 +219,7 @@ function getInfo(checker: TypeChecker, sourceFile: SourceFile, position: number, case Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code: if (!declaration || !isCallExpression(declaration.parent) || !declaration.body) return undefined; const pos = declaration.parent.arguments.indexOf(declaration as Expression); + if (pos === -1) return undefined; const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos); if (!type) return undefined; return getFixInfo(checker, declaration, type, /*isFunctionType*/ true); diff --git a/src/services/completions.ts b/src/services/completions.ts index 75ec22e3528e4..2ff43467979c1 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -7,6 +7,7 @@ import { BindingPattern, BreakOrContinueStatement, CancellationToken, + canHaveDecorators, canUsePropertyAccess, CaseBlock, cast, @@ -44,6 +45,7 @@ import { createTextSpanFromRange, Debug, Declaration, + Decorator, Diagnostics, diagnosticToString, displayPart, @@ -91,6 +93,7 @@ import { getLineAndCharacterOfPosition, getLineStartPositionForPosition, getLocalSymbolForExportDefault, + getModifiers, getNameOfDeclaration, getNameTable, getNewLineCharacter, @@ -145,6 +148,7 @@ import { isConstructorDeclaration, isContextualKeyword, isDeclarationName, + isDecorator, isDeprecatedDeclaration, isEntityName, isEnumMember, @@ -160,6 +164,7 @@ import { isFunctionLikeDeclaration, isFunctionLikeKind, isFunctionTypeNode, + isGetAccessorDeclaration, isIdentifier, isIdentifierText, isImportableFile, @@ -203,6 +208,7 @@ import { isNamedImportsOrExports, isNamespaceImport, isNodeDescendantOf, + isNonContextualKeyword, isObjectBindingPattern, isObjectLiteralExpression, isObjectTypeDeclaration, @@ -213,9 +219,11 @@ import { isPrivateIdentifier, isPrivateIdentifierClassElementDeclaration, isPropertyAccessExpression, + isPropertyAssignment, isPropertyDeclaration, isPropertyNameLiteral, isRegularExpressionLiteral, + isSetAccessorDeclaration, isShorthandPropertyAssignment, isSingleOrDoubleQuote, isSourceFile, @@ -276,6 +284,7 @@ import { memoizeOne, MethodDeclaration, ModifierFlags, + ModifierLike, modifiersToFlags, ModifierSyntaxKind, modifierToFlag, @@ -438,6 +447,8 @@ export enum CompletionSource { ObjectLiteralMethodSnippet = "ObjectLiteralMethodSnippet/", /** Case completions for switch statements */ SwitchCases = "SwitchCases/", + /** Completions for an Object literal expression */ + ObjectLiteralMemberWithComma = "ObjectLiteralMemberWithComma/", } /** @internal */ @@ -1609,6 +1620,7 @@ function createCompletionEntry( includeSymbol: boolean ): CompletionEntry | undefined { let insertText: string | undefined; + let filterText: string | undefined; let replacementSpan = getReplacementSpanForContextToken(replacementToken); let data: CompletionEntryData | undefined; let isSnippet: true | undefined; @@ -1677,17 +1689,45 @@ function createCompletionEntry( hasAction = true; } + // Provide object member completions when missing commas, and insert missing commas. + // For example: + // + // interface I { + // a: string; + // b: number + // } + // + // const cc: I = { a: "red" | } + // + // Completion should add a comma after "red" and provide completions for b + if (completionKind === CompletionKind.ObjectPropertyDeclaration && contextToken && findPrecedingToken(contextToken.pos, sourceFile, contextToken)?.kind !== SyntaxKind.CommaToken) { + if (isMethodDeclaration(contextToken.parent.parent) || + isGetAccessorDeclaration(contextToken.parent.parent) || + isSetAccessorDeclaration(contextToken.parent.parent) || + isSpreadAssignment(contextToken.parent) || + findAncestor(contextToken.parent, isPropertyAssignment)?.getLastToken(sourceFile) === contextToken || + isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + + source = CompletionSource.ObjectLiteralMemberWithComma; + hasAction = true; + } + } + if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) { let importAdder; - ({ insertText, isSnippet, importAdder, replacementSpan } = - getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext)); - sortText = SortText.ClassMemberSnippets; // sortText has to be lower priority than the sortText for keywords. See #47852. - if (importAdder?.hasFixes()) { - hasAction = true; - source = CompletionSource.ClassMemberSnippet; + const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext); + if (memberCompletionEntry) { + ({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry); + if (importAdder?.hasFixes()) { + hasAction = true; + source = CompletionSource.ClassMemberSnippet; + } + } + else { + return undefined; // Skip this entry } } @@ -1738,6 +1778,14 @@ function createCompletionEntry( hasAction = !importStatementCompletion; } + const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports); + if (parentNamedImportOrExport?.kind === SyntaxKind.NamedImports) { + const possibleToken = stringToToken(name); + if (parentNamedImportOrExport && possibleToken && (possibleToken === SyntaxKind.AwaitKeyword || isNonContextualKeyword(possibleToken))) { + insertText = `${name} as ${name}_`; + } + } + // TODO(drosen): Right now we just permit *all* semantic meanings when calling // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report @@ -1755,6 +1803,7 @@ function createCompletionEntry( hasAction: hasAction ? true : undefined, isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || undefined, insertText, + filterText, replacementSpan, sourceDisplay, labelDetails, @@ -1826,15 +1875,15 @@ function getEntryForMemberCompletion( position: number, contextToken: Node | undefined, formatContext: formatting.FormatContext | undefined, -): { insertText: string, isSnippet?: true, importAdder?: codefix.ImportAdder, replacementSpan?: TextSpan } { +): { insertText: string, filterText?: string, isSnippet?: true, importAdder?: codefix.ImportAdder, eraseRange?: TextRange } | undefined { const classLikeDeclaration = findAncestor(location, isClassLike); if (!classLikeDeclaration) { - return { insertText: name }; + return undefined; // This should never happen. } let isSnippet: true | undefined; - let replacementSpan: TextSpan | undefined; let insertText: string = name; + const filterText: string = name; const checker = program.getTypeChecker(); const sourceFile = location.getSourceFile(); @@ -1863,11 +1912,11 @@ function getEntryForMemberCompletion( } let modifiers = ModifierFlags.None; + const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); // Whether the suggested member should be abstract. // e.g. in `abstract class C { abstract | }`, we should offer abstract method signatures at position `|`. - const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = !!(presentModifiers & ModifierFlags.Abstract); - const completionNodes: Node[] = []; + const isAbstract = presentModifiers & ModifierFlags.Abstract && classLikeDeclaration.modifierFlagsCache & ModifierFlags.Abstract; + let completionNodes: codefix.AddNode[] = []; codefix.addNewNodeForMemberSymbol( symbol, classLikeDeclaration, @@ -1896,20 +1945,49 @@ function getEntryForMemberCompletion( // This is needed when we have overloaded signatures, // so this callback will be called for multiple nodes/signatures, // and we need to make sure the modifiers are uniform for all nodes/signatures. - modifiers = node.modifierFlagsCache | requiredModifiers | presentModifiers; + modifiers = node.modifierFlagsCache | requiredModifiers; } node = factory.updateModifiers(node, modifiers); completionNodes.push(node); }, body, codefix.PreserveOptionalFlags.Property, - isAbstract); + !!isAbstract); if (completionNodes.length) { + const isMethod = symbol.flags & SymbolFlags.Method; + let allowedModifiers = modifiers | ModifierFlags.Override | ModifierFlags.Public; + if (!isMethod) { + allowedModifiers |= ModifierFlags.Ambient | ModifierFlags.Readonly; + } + else { + allowedModifiers |= ModifierFlags.Async; + } + const allowedAndPresent = presentModifiers & allowedModifiers; + if (presentModifiers & (~allowedModifiers)) { + return undefined; // This completion entry will be filtered out. + } + // If the original member is protected, we allow it to change to public. + if (modifiers & ModifierFlags.Protected && allowedAndPresent & ModifierFlags.Public) { + modifiers &= ~ModifierFlags.Protected; + } + // `public` modifier is optional and can be dropped. + if (allowedAndPresent !== ModifierFlags.None && !(allowedAndPresent & ModifierFlags.Public)) { + modifiers &= ~ModifierFlags.Public; + } + modifiers |= allowedAndPresent; + completionNodes = completionNodes.map(node => factory.updateModifiers(node, modifiers)); + // Add back the decorators that were already present. + if (presentDecorators?.length) { + const lastNode = completionNodes[completionNodes.length - 1]; + if (canHaveDecorators(lastNode)) { + completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, (presentDecorators as ModifierLike[]).concat(getModifiers(lastNode) || [])); + } + } + const format = ListFormat.MultiLine | ListFormat.NoTrailingNewLine; - replacementSpan = modifiersSpan; - // If we have access to formatting settings, we print the nodes using the emitter, - // and then format the printed text. + // If we have access to formatting settings, we print the nodes using the emitter, + // and then format the printed text. if (formatContext) { insertText = printer.printAndFormatSnippetList( format, @@ -1925,21 +2003,22 @@ function getEntryForMemberCompletion( } } - return { insertText, isSnippet, importAdder, replacementSpan }; + return { insertText, filterText, isSnippet, importAdder, eraseRange }; } function getPresentModifiers( contextToken: Node | undefined, sourceFile: SourceFile, - position: number): { modifiers: ModifierFlags, span?: TextSpan } { + position: number): { modifiers: ModifierFlags, decorators?: Decorator[], range?: TextRange } { if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) { return { modifiers: ModifierFlags.None }; } let modifiers = ModifierFlags.None; - let span; + let decorators: Decorator[] | undefined; let contextMod; + const range: TextRange = { pos: position, end: position }; /* Cases supported: In @@ -1959,15 +2038,19 @@ function getPresentModifiers( `location.parent` is property declaration ``protected override m``, `location.parent.parent` is class declaration ``class C { ... }``. */ - if (contextMod = isModifierLike(contextToken)) { - modifiers |= modifierToFlag(contextMod); - span = createTextSpanFromNode(contextToken); - } - if (isPropertyDeclaration(contextToken.parent)) { + if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { modifiers |= modifiersToFlags(contextToken.parent.modifiers) & ModifierFlags.Modifier; - span = createTextSpanFromNode(contextToken.parent); + decorators = contextToken.parent.modifiers.filter(isDecorator) || []; + range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); + } + if (contextMod = isModifierLike(contextToken)) { + const contextModifierFlag = modifierToFlag(contextMod); + if (!(modifiers & contextModifierFlag)) { + modifiers |= contextModifierFlag; + range.pos = Math.min(range.pos, contextToken.pos); + } } - return { modifiers, span }; + return { modifiers, decorators, range: range.pos !== position ? range : undefined }; } function isModifierLike(node: Node): ModifierSyntaxKind | undefined { @@ -2394,7 +2477,7 @@ export function getCompletionEntriesFromSymbols( includeSymbol = false ): UniqueNameSet { const start = timestamp(); - const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken); + const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location); const useSemicolons = probablyUsesSemicolons(sourceFile); const typeChecker = program.getTypeChecker(); // Tracks unique names. @@ -2619,7 +2702,8 @@ function getSymbolCompletionFromEntryId( return info && info.name === entryId.name && ( entryId.source === CompletionSource.ClassMemberSnippet && symbol.flags & SymbolFlags.ClassMember || entryId.source === CompletionSource.ObjectLiteralMethodSnippet && symbol.flags & (SymbolFlags.Property | SymbolFlags.Method) - || getSourceFromOrigin(origin) === entryId.source) + || getSourceFromOrigin(origin) === entryId.source + || entryId.source === CompletionSource.ObjectLiteralMemberWithComma) ? { type: "symbol" as const, symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : undefined; }) || { type: "none" }; @@ -2763,14 +2847,14 @@ function getCompletionEntryCodeActionsAndSourceDisplay( cancellationToken: CancellationToken, ): CodeActionsAndSourceDisplay { if (data?.moduleSpecifier) { - if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken).replacementSpan) { + if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) { // Import statement completion: 'import c|' return { codeActions: undefined, sourceDisplay: [textPart(data.moduleSpecifier)] }; } } if (source === CompletionSource.ClassMemberSnippet) { - const { importAdder } = getEntryForMemberCompletion( + const { importAdder, eraseRange } = getEntryForMemberCompletion( host, program, compilerOptions, @@ -2780,11 +2864,18 @@ function getCompletionEntryCodeActionsAndSourceDisplay( location, position, contextToken, - formatContext); - if (importAdder) { + formatContext)!; + if (importAdder || eraseRange) { const changes = textChanges.ChangeTracker.with( { host, formatContext, preferences }, - importAdder.writeFixes); + tracker => { + if (importAdder) { + importAdder.writeFixes(tracker); + } + if (eraseRange) { + tracker.deleteRange(sourceFile, eraseRange); + } + }); return { sourceDisplay: undefined, codeActions: [{ @@ -2808,6 +2899,23 @@ function getCompletionEntryCodeActionsAndSourceDisplay( return { codeActions: [codeAction], sourceDisplay: undefined }; } + if (source === CompletionSource.ObjectLiteralMemberWithComma && contextToken) { + const changes = textChanges.ChangeTracker.with( + { host, formatContext, preferences }, + tracker => tracker.insertText(sourceFile, contextToken.end, ",") + ); + + if (changes) { + return { + sourceDisplay: undefined, + codeActions: [{ + changes, + description: diagnosticToString([Diagnostics.Add_missing_comma_for_object_member_completion_0, name]), + }], + }; + } + } + if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) { return { codeActions: undefined, sourceDisplay: undefined }; } @@ -3068,7 +3176,7 @@ function getCompletionData( let flags = CompletionInfoFlags.None; if (contextToken) { - const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken); + const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile); if (importStatementCompletionInfo.keywordCompletion) { if (importStatementCompletionInfo.isKeywordOnlyCompletion) { return { @@ -3477,7 +3585,8 @@ function getCompletionData( const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName); // If this is nested like for `namespace N { export const sym = Symbol(); }`, we'll add the completion for `N`. const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker); - if (firstAccessibleSymbol && addToSeen(seenPropertySymbols, getSymbolId(firstAccessibleSymbol))) { + const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol); + if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) { const index = symbols.length; symbols.push(firstAccessibleSymbol); const moduleSymbol = firstAccessibleSymbol.parent; @@ -3513,6 +3622,9 @@ function getCompletionData( } } else if (preferences.includeCompletionsWithInsertText) { + if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) { + return; + } addSymbolOriginInfo(symbol); addSymbolSortInfo(symbol); symbols.push(symbol); @@ -4085,7 +4197,7 @@ function getCompletionData( const members = getPropertiesForCompletion(containerExpectedType, typeChecker); const existingMembers = getPropertiesForCompletion(containerActualType, typeChecker); - const existingMemberEscapedNames: Set<__String> = new Set(); + const existingMemberEscapedNames = new Set<__String>(); existingMembers.forEach(s => existingMemberEscapedNames.add(s.escapedName)); symbols = concatenate(symbols, filter(members, s => !existingMemberEscapedNames.has(s.escapedName))); @@ -4104,7 +4216,7 @@ function getCompletionData( */ function tryGetObjectLikeCompletionSymbols(): GlobalsSearch | undefined { const symbolsStartIndex = symbols.length; - const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken); + const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile); if (!objectLikeContainer) return GlobalsSearch.Continue; // We're looking up possible property names from contextual/inferred/declared type. @@ -4832,7 +4944,7 @@ function getCompletionData( * Returns the immediate owning object literal or binding pattern of a context token, * on the condition that one exists and that the context implies completion should be given. */ -function tryGetObjectLikeCompletionContainer(contextToken: Node | undefined): ObjectLiteralExpression | ObjectBindingPattern | undefined { +function tryGetObjectLikeCompletionContainer(contextToken: Node | undefined, position: number, sourceFile: SourceFile): ObjectLiteralExpression | ObjectBindingPattern | undefined { if (contextToken) { const { parent } = contextToken; switch (contextToken.kind) { @@ -4847,8 +4959,33 @@ function tryGetObjectLikeCompletionContainer(contextToken: Node | undefined): Ob case SyntaxKind.AsyncKeyword: return tryCast(parent.parent, isObjectLiteralExpression); case SyntaxKind.Identifier: - return (contextToken as Identifier).text === "async" && isShorthandPropertyAssignment(contextToken.parent) - ? contextToken.parent.parent : undefined; + if ((contextToken as Identifier).text === "async" && isShorthandPropertyAssignment(contextToken.parent)) { + return contextToken.parent.parent; + } + else { + if (isObjectLiteralExpression(contextToken.parent.parent) && + (isSpreadAssignment(contextToken.parent) || isShorthandPropertyAssignment(contextToken.parent) && + (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line))) { + return contextToken.parent.parent; + } + const ancestorNode = findAncestor(parent, isPropertyAssignment); + if (ancestorNode?.getLastToken(sourceFile) === contextToken && isObjectLiteralExpression(ancestorNode.parent)) { + return ancestorNode.parent; + } + } + break; + default: + if (parent.parent?.parent && (isMethodDeclaration(parent.parent) || isGetAccessorDeclaration(parent.parent) || isSetAccessorDeclaration(parent.parent)) && isObjectLiteralExpression(parent.parent.parent)) { + return parent.parent.parent; + } + if (isSpreadAssignment(parent) && isObjectLiteralExpression(parent.parent)) { + return parent.parent; + } + const ancestorNode = findAncestor(parent, isPropertyAssignment); + if (contextToken.kind !== SyntaxKind.ColonToken && ancestorNode?.getLastToken(sourceFile) === contextToken && + isObjectLiteralExpression(ancestorNode.parent)) { + return ancestorNode.parent; + } } } @@ -5336,7 +5473,7 @@ export interface ImportStatementCompletionInfo { replacementSpan: TextSpan | undefined; } -function getImportStatementCompletionInfo(contextToken: Node): ImportStatementCompletionInfo { +function getImportStatementCompletionInfo(contextToken: Node, sourceFile: SourceFile): ImportStatementCompletionInfo { let keywordCompletion: TokenSyntaxKind | undefined; let isKeywordOnlyCompletion = false; const candidate = getCandidate(); @@ -5352,6 +5489,15 @@ function getImportStatementCompletionInfo(contextToken: Node): ImportStatementCo function getCandidate() { const parent = contextToken.parent; if (isImportEqualsDeclaration(parent)) { + // import Foo | + // import Foo f| + const lastToken = parent.getLastToken(sourceFile); + if (isIdentifier(contextToken) && lastToken !== contextToken) { + keywordCompletion = SyntaxKind.FromKeyword; + isKeywordOnlyCompletion = true; + return undefined; + } + keywordCompletion = contextToken.kind === SyntaxKind.TypeKeyword ? undefined : SyntaxKind.TypeKeyword; return isModuleSpecifierMissingOrEmpty(parent.moduleReference) ? parent : undefined; } @@ -5464,14 +5610,20 @@ function isModuleSpecifierMissingOrEmpty(specifier: ModuleReference | Expression return !tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)?.text; } -function getVariableOrParameterDeclaration(contextToken: Node | undefined) { +function getVariableOrParameterDeclaration(contextToken: Node | undefined, location: Node) { if (!contextToken) return; - const declaration = findAncestor(contextToken, node => + const possiblyParameterDeclaration = findAncestor(contextToken, node => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" - : isVariableDeclaration(node) || ((isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent))); - return declaration as ParameterDeclaration | TypeParameterDeclaration | VariableDeclaration | undefined; + : ((isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent))); + + const possiblyVariableDeclaration = findAncestor(location, node => + isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) + ? "quit" + : isVariableDeclaration(node)); + + return (possiblyParameterDeclaration || possiblyVariableDeclaration) as ParameterDeclaration | TypeParameterDeclaration | VariableDeclaration | undefined; } function isArrowFunctionBody(node: Node) { diff --git a/src/services/documentRegistry.ts b/src/services/documentRegistry.ts index 50f660d6bf746..b8ef0757b7700 100644 --- a/src/services/documentRegistry.ts +++ b/src/services/documentRegistry.ts @@ -117,6 +117,8 @@ export interface DocumentRegistry { ): SourceFile; getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; + /** @internal */ + getDocumentRegistryBucketKeyWithMode(key: DocumentRegistryBucketKey, mode: ResolutionMode): DocumentRegistryBucketKeyWithMode; /** * Informs the DocumentRegistry that a file is not needed any longer. * @@ -147,10 +149,8 @@ export interface DocumentRegistry { releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void; releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void; // eslint-disable-line @typescript-eslint/unified-signatures - /** @internal */ - getLanguageServiceRefCounts(path: Path, scriptKind: ScriptKind): [string, number | undefined][]; - reportStats(): string; + /** @internal */ getBuckets(): Map>; } /** @internal */ @@ -161,7 +161,8 @@ export interface ExternalDocumentCache { export type DocumentRegistryBucketKey = string & { __bucketKey: any }; -interface DocumentRegistryEntry { +/** @internal */ +export interface DocumentRegistryEntry { sourceFile: SourceFile; // The number of language services that this source file is referenced in. When no more @@ -170,8 +171,10 @@ interface DocumentRegistryEntry { languageServiceRefCount: number; } -type BucketEntry = DocumentRegistryEntry | Map; -function isDocumentRegistryEntry(entry: BucketEntry): entry is DocumentRegistryEntry { +/** @internal */ +export type BucketEntry = DocumentRegistryEntry | Map; +/** @internal */ +export function isDocumentRegistryEntry(entry: BucketEntry): entry is DocumentRegistryEntry { return !!(entry as DocumentRegistryEntry).sourceFile; } @@ -383,14 +386,6 @@ export function createDocumentRegistryInternal(useCaseSensitiveFileNames?: boole } } - function getLanguageServiceRefCounts(path: Path, scriptKind: ScriptKind) { - return arrayFrom(buckets.entries(), ([key, bucket]): [string, number | undefined] => { - const bucketEntry = bucket.get(path); - const entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind); - return [key, entry && entry.languageServiceRefCount]; - }); - } - return { acquireDocument, acquireDocumentWithKey, @@ -398,9 +393,10 @@ export function createDocumentRegistryInternal(useCaseSensitiveFileNames?: boole updateDocumentWithKey, releaseDocument, releaseDocumentWithKey, - getLanguageServiceRefCounts, + getKeyForCompilationSettings, + getDocumentRegistryBucketKeyWithMode, reportStats, - getKeyForCompilationSettings + getBuckets: () => buckets, }; } diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 5f3eb98656546..1aa55a6cbc2cf 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -198,6 +198,7 @@ import { nodeSeenTracker, NumericLiteral, ObjectLiteralExpression, + or, ParameterDeclaration, ParenthesizedExpression, Path, @@ -848,8 +849,12 @@ export function getTextSpanOfEntry(entry: Entry) { getTextSpan(entry.node, entry.node.getSourceFile()); } -/** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */ -function isWriteAccessForReference(node: Node): boolean { +/** + * A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment. + * + * @internal + */ +export function isWriteAccessForReference(node: Node): boolean { const decl = getDeclarationFromName(node); return !!decl && declarationIsWriteAccess(decl) || node.kind === SyntaxKind.DefaultKeyword || isWriteAccess(node); } @@ -1724,7 +1729,10 @@ export namespace Core { } function getPossibleSymbolReferenceNodes(sourceFile: SourceFile, symbolName: string, container: Node = sourceFile): readonly Node[] { - return getPossibleSymbolReferencePositions(sourceFile, symbolName, container).map(pos => getTouchingPropertyName(sourceFile, pos)); + return mapDefined(getPossibleSymbolReferencePositions(sourceFile, symbolName, container), pos => { + const referenceLocation = getTouchingPropertyName(sourceFile, pos); + return referenceLocation === sourceFile ? undefined : referenceLocation; + }); } function getPossibleSymbolReferencePositions(sourceFile: SourceFile, symbolName: string, container: Node = sourceFile): readonly number[] { @@ -2177,9 +2185,9 @@ export namespace Core { } // Check if the node is within an extends or implements clause - const containingClass = getContainingClassIfInHeritageClause(refNode); - if (containingClass) { - addReference(containingClass); + const containingNode = getContainingNodeIfInHeritageClause(refNode); + if (containingNode) { + addReference(containingNode); return; } @@ -2212,9 +2220,9 @@ export namespace Core { } } - function getContainingClassIfInHeritageClause(node: Node): ClassLikeDeclaration | InterfaceDeclaration | undefined { - return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingClassIfInHeritageClause(node.parent) - : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, isClassLike) : undefined; + function getContainingNodeIfInHeritageClause(node: Node): ClassLikeDeclaration | InterfaceDeclaration | undefined { + return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingNodeIfInHeritageClause(node.parent) + : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration)) : undefined; } /** diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index cce023cc0e5fd..0f066e4807ebe 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -515,17 +515,22 @@ function formatSpanWorker( processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); } - if (!formattingScanner.isOnToken()) { + // Leading trivia items get attached to and processed with the token that proceeds them. If the + // range ends in the middle of some leading trivia, the token that proceeds them won't be in the + // range and thus won't get processed. So we process those remaining trivia items here. + const remainingTrivia = formattingScanner.getCurrentLeadingTrivia(); + if (remainingTrivia) { const indentation = SmartIndenter.nodeWillIndentChild(options, enclosingNode, /*child*/ undefined, sourceFile, /*indentByDefault*/ false) ? initialIndentation + options.indentSize! : initialIndentation; - const leadingTrivia = formattingScanner.getCurrentLeadingTrivia(); - if (leadingTrivia) { - indentTriviaItems(leadingTrivia, indentation, /*indentNextTokenOrTrivia*/ false, - item => processRange(item, sourceFile.getLineAndCharacterOfPosition(item.pos), enclosingNode, enclosingNode, /*dynamicIndentation*/ undefined!)); - if (options.trimTrailingWhitespace !== false) { - trimTrailingWhitespacesForRemainingRange(leadingTrivia); + indentTriviaItems(remainingTrivia, indentation, /*indentNextTokenOrTrivia*/ true, + item => { + processRange(item, sourceFile.getLineAndCharacterOfPosition(item.pos), enclosingNode, enclosingNode, /*dynamicIndentation*/ undefined!); + insertIndentation(item.pos, indentation, /*lineAdded*/ false); } + ); + if (options.trimTrailingWhitespace !== false) { + trimTrailingWhitespacesForRemainingRange(remainingTrivia); } } diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index 7282903299f4d..3688a688c53d8 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -31,6 +31,7 @@ import { getModeForUsageLocation, getNameFromPropertyName, getNameOfDeclaration, + getObjectFlags, getPropertySymbolsFromContextualType, getTargetLabel, getTextOfPropertyName, @@ -67,14 +68,18 @@ import { isPropertyName, isRightSideOfPropertyAccess, isStaticModifier, + isTypeAliasDeclaration, + isTypeReferenceNode, isVariableDeclaration, last, map, mapDefined, + MappedType, ModifierFlags, moveRangePastModifiers, Node, NodeFlags, + ObjectFlags, Program, resolvePath, ScriptElementKind, @@ -95,6 +100,7 @@ import { Type, TypeChecker, TypeFlags, + TypeReference, unescapeLeadingUnderscores, } from "./_namespaces/ts"; @@ -346,6 +352,72 @@ export function getReferenceAtPosition(sourceFile: SourceFile, position: number, return undefined; } +const typesWithUnwrappedTypeArguments = new Set([ + "Array", + "ArrayLike", + "ReadonlyArray", + "Promise", + "PromiseLike", + "Iterable", + "IterableIterator", + "AsyncIterable", + "Set", + "WeakSet", + "ReadonlySet", + "Map", + "WeakMap", + "ReadonlyMap", + "Partial", + "Required", + "Readonly", + "Pick", + "Omit", +]); + +function shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker: TypeChecker, type: TypeReference): boolean { + const referenceName = type.symbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName(referenceName, /*location*/ undefined, SymbolFlags.Type, /*excludeGlobals*/ false); + return !!globalType && globalType === type.target.symbol; +} + +function shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker: TypeChecker, type: Type): boolean { + if (!type.aliasSymbol) { + return false; + } + const referenceName = type.aliasSymbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName(referenceName, /*location*/ undefined, SymbolFlags.Type, /*excludeGlobals*/ false); + return !!globalType && globalType === type.aliasSymbol; +} + +function getFirstTypeArgumentDefinitions(typeChecker: TypeChecker, type: Type, node: Node, failedAliasResolution: boolean | undefined): readonly DefinitionInfo[] { + if (!!(getObjectFlags(type) & ObjectFlags.Reference) && shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type as TypeReference)) { + return definitionFromType(typeChecker.getTypeArguments(type as TypeReference)[0], typeChecker, node, failedAliasResolution); + } + if (shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) && type.aliasTypeArguments) { + return definitionFromType(type.aliasTypeArguments[0], typeChecker, node, failedAliasResolution); + } + + if ( + (getObjectFlags(type) & ObjectFlags.Mapped) && + (type as MappedType).target && + shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, (type as MappedType).target!) + ) { + const declaration = type.aliasSymbol?.declarations?.[0]; + + if (declaration && isTypeAliasDeclaration(declaration) && isTypeReferenceNode(declaration.type) && declaration.type.typeArguments) { + return definitionFromType(typeChecker.getTypeAtLocation(declaration.type.typeArguments[0]), typeChecker, node, failedAliasResolution); + } + } + + return []; +} + /// Goto type /** @internal */ export function getTypeDefinitionAtPosition(typeChecker: TypeChecker, sourceFile: SourceFile, position: number): readonly DefinitionInfo[] | undefined { @@ -357,16 +429,19 @@ export function getTypeDefinitionAtPosition(typeChecker: TypeChecker, sourceFile if (isImportMeta(node.parent) && node.parent.name === node) { return definitionFromType(typeChecker.getTypeAtLocation(node.parent), typeChecker, node.parent, /*failedAliasResolution*/ false); } - const { symbol, failedAliasResolution } = getSymbol(node, typeChecker, /*stopAtAlias*/ false); if (!symbol) return undefined; const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker); const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution); + // If a function returns 'void' or some other type with no definition, just return the function definition. - const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution); - return typeDefinitions.length ? typeDefinitions + const [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? + [returnType, fromReturnType] : + [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)]; + + return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & SymbolFlags.Value) && symbol.flags & SymbolFlags.Type ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : undefined; } diff --git a/src/services/inlayHints.ts b/src/services/inlayHints.ts index 49b113e927554..9eb3d7aa4ea56 100644 --- a/src/services/inlayHints.ts +++ b/src/services/inlayHints.ts @@ -3,12 +3,15 @@ import { ArrowFunction, CallExpression, createPrinterWithRemoveComments, + createTextSpanFromNode, Debug, + ElementFlags, EmitHint, EnumMember, equateStringsCaseInsensitive, Expression, findChildOfKind, + findIndex, forEachChild, FunctionDeclaration, FunctionExpression, @@ -21,6 +24,7 @@ import { hasContextSensitiveParameters, Identifier, InlayHint, + InlayHintDisplayPart, InlayHintKind, InlayHintsContext, isArrowFunction, @@ -44,6 +48,7 @@ import { isParameterDeclaration, isPropertyAccessExpression, isPropertyDeclaration, + isSpreadElement, isTypeNode, isVarConst, isVariableDeclaration, @@ -57,10 +62,12 @@ import { Signature, skipParentheses, some, + SourceFile, Symbol, SymbolFlags, SyntaxKind, textSpanIntersectsWith, + TupleTypeReference, Type, TypeFormatFlags, unescapeLeadingUnderscores, @@ -69,7 +76,7 @@ import { VariableDeclaration, } from "./_namespaces/ts"; -const maxHintsLength = 30; +const maxTypeHintLength = 30; const leadingParameterNameCommentRegexFactory = (name: string) => { return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); @@ -83,6 +90,10 @@ function shouldShowLiteralParameterNameHintsOnly(preferences: UserPreferences) { return preferences.includeInlayParameterNameHints === "literals"; } +function shouldUseInteractiveInlayHints(preferences: UserPreferences) { + return preferences.interactiveInlayHints === true; +} + /** @internal */ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { const { file, program, span, cancellationToken, preferences } = context; @@ -147,9 +158,17 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); } - function addParameterHints(text: string, position: number, isFirstVariadicArgument: boolean) { + function addParameterHints(text: string, parameter: Identifier, position: number, isFirstVariadicArgument: boolean, sourceFile: SourceFile | undefined) { + let hintText: string | InlayHintDisplayPart[] = `${isFirstVariadicArgument ? "..." : ""}${text}`; + if (shouldUseInteractiveInlayHints(preferences)) { + hintText = [getNodeDisplayPart(hintText, parameter, sourceFile!), { text: ":" }]; + } + else { + hintText += ":"; + } + result.push({ - text: `${isFirstVariadicArgument ? "..." : ""}${truncation(text, maxHintsLength)}:`, + text: hintText, position, kind: InlayHintKind.Parameter, whitespaceAfter: true, @@ -158,7 +177,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { function addTypeHints(text: string, position: number) { result.push({ - text: `: ${truncation(text, maxHintsLength)}`, + text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, position, kind: InlayHintKind.Type, whitespaceBefore: true, @@ -167,7 +186,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { function addEnumMemberValueHints(text: string, position: number) { result.push({ - text: `= ${truncation(text, maxHintsLength)}`, + text: `= ${text}`, position, kind: InlayHintKind.Enum, whitespaceBefore: true, @@ -226,16 +245,34 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { return; } - for (let i = 0; i < args.length; ++i) { - const originalArg = args[i]; + let signatureParamPos = 0; + const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : undefined; + for (const originalArg of args) { const arg = skipParentheses(originalArg); if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { continue; } - const identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i); - if (identifierNameInfo) { - const [parameterName, isFirstVariadicArgument] = identifierNameInfo; + let spreadArgs = 0; + if (isSpreadElement(arg)) { + const spreadType = checker.getTypeAtLocation(arg.expression); + if (checker.isTupleType(spreadType)) { + const { elementFlags, fixedLength } = (spreadType as TupleTypeReference).target; + if (fixedLength === 0) { + continue; + } + const firstOptionalIndex = findIndex(elementFlags, f => !(f & ElementFlags.Required)); + const requiredArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + if (requiredArgs > 0) { + spreadArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + } + } + } + + const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos); + signatureParamPos = signatureParamPos + (spreadArgs || 1); + if (identifierInfo) { + const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo; const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName); if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) { continue; @@ -246,7 +283,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { continue; } - addParameterHints(name, originalArg.getStart(), isFirstVariadicArgument); + addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument, sourceFile); } } } @@ -373,13 +410,6 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { return printTypeInSingleLine(signatureParamType); } - function truncation(text: string, maxLength: number) { - if (text.length > maxLength) { - return text.substr(0, maxLength - "...".length) + "..."; - } - return text; - } - function printTypeInSingleLine(type: Type) { const flags = NodeBuilderFlags.IgnoreErrors | TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope; const printer = createPrinterWithRemoveComments(); @@ -402,4 +432,12 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] { } return true; } + + function getNodeDisplayPart(text: string, node: Node, sourceFile: SourceFile): InlayHintDisplayPart { + return { + text, + span: createTextSpanFromNode(node, sourceFile), + file: sourceFile.fileName + }; + } } diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 263ab35b200cf..6d23f64be662a 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -492,9 +492,7 @@ export function getDocCommentTemplateAtPosition(newLine: string, sourceFile: Sou // * if the caret was directly in front of the object, then we add an extra line and indentation. const openComment = "/**"; const closeComment = " */"; - - // If any of the existing jsDoc has tags, ignore adding new ones. - const hasTag = (commentOwnerJsDoc || []).some(jsDoc => !!jsDoc.tags); + const hasTag = length(getJSDocTags(commentOwner)) > 0; if (tags && !hasTag) { const preamble = openComment + newLine + indentationStr + " * "; diff --git a/src/services/organizeImports.ts b/src/services/organizeImports.ts index c972649deaeb7..573f908abf974 100644 --- a/src/services/organizeImports.ts +++ b/src/services/organizeImports.ts @@ -60,7 +60,6 @@ import { SortKind, SourceFile, stableSort, - suppressLeadingTrivia, SyntaxKind, textChanges, TransformFlags, @@ -137,7 +136,7 @@ export function organizeImports( // on the first import because it is probably the header comment for the file. // Consider: we could do a more careful check that this trivia is actually a header, // but the consequences of being wrong are very minor. - suppressLeadingTrivia(oldImportDecls[0]); + setEmitFlags(oldImportDecls[0], EmitFlags.NoLeadingComments); const oldImportGroups = shouldCombine ? group(oldImportDecls, importDecl => getExternalModuleName(importDecl.moduleSpecifier)!) diff --git a/src/services/refactors/addOrRemoveBracesToArrowFunction.ts b/src/services/refactors/addOrRemoveBracesToArrowFunction.ts index 930a1b42d443f..40640dc73ef55 100644 --- a/src/services/refactors/addOrRemoveBracesToArrowFunction.ts +++ b/src/services/refactors/addOrRemoveBracesToArrowFunction.ts @@ -35,16 +35,16 @@ import { } from "../_namespaces/ts.refactor"; const refactorName = "Add or remove braces in an arrow function"; -const refactorDescription = Diagnostics.Add_or_remove_braces_in_an_arrow_function.message; +const refactorDescription = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function); const addBracesAction = { name: "Add braces to arrow function", - description: Diagnostics.Add_braces_to_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Add_braces_to_arrow_function), kind: "refactor.rewrite.arrow.braces.add", }; const removeBracesAction = { name: "Remove braces from arrow function", - description: Diagnostics.Remove_braces_from_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Remove_braces_from_arrow_function), kind: "refactor.rewrite.arrow.braces.remove" }; registerRefactor(refactorName, { diff --git a/src/services/refactors/convertExport.ts b/src/services/refactors/convertExport.ts index 3760cd8b31321..0509e1e0c512b 100644 --- a/src/services/refactors/convertExport.ts +++ b/src/services/refactors/convertExport.ts @@ -61,12 +61,12 @@ const refactorName = "Convert export"; const defaultToNamedAction = { name: "Convert default export to named export", - description: Diagnostics.Convert_default_export_to_named_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), kind: "refactor.rewrite.export.named" }; const namedToDefaultAction = { name: "Convert named export to default export", - description: Diagnostics.Convert_named_export_to_default_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_export_to_default_export), kind: "refactor.rewrite.export.default" }; @@ -86,7 +86,7 @@ registerRefactor(refactorName, { if (context.preferences.provideRefactorNotApplicableReason) { return [ - { name: refactorName, description: Diagnostics.Convert_default_export_to_named_export.message, actions: [ + { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ { ...defaultToNamedAction, notApplicableReason: info.error }, { ...namedToDefaultAction, notApplicableReason: info.error }, ]} diff --git a/src/services/refactors/convertImport.ts b/src/services/refactors/convertImport.ts index da3a66107def6..319487ddb1968 100644 --- a/src/services/refactors/convertImport.ts +++ b/src/services/refactors/convertImport.ts @@ -55,17 +55,17 @@ const refactorName = "Convert import"; const actions = { [ImportKind.Named]: { name: "Convert namespace import to named imports", - description: Diagnostics.Convert_namespace_import_to_named_imports.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_namespace_import_to_named_imports), kind: "refactor.rewrite.import.named", }, [ImportKind.Namespace]: { name: "Convert named imports to namespace import", - description: Diagnostics.Convert_named_imports_to_namespace_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_namespace_import), kind: "refactor.rewrite.import.namespace", }, [ImportKind.Default]: { name: "Convert named imports to default import", - description: Diagnostics.Convert_named_imports_to_default_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_default_import), kind: "refactor.rewrite.import.default", }, }; @@ -212,7 +212,7 @@ export function doChangeNamedToNamespaceOrDefault(sourceFile: SourceFile, progra const importDecl = toConvert.parent.parent; const { moduleSpecifier } = importDecl; - const toConvertSymbols: Set = new Set(); + const toConvertSymbols = new Set(); toConvert.elements.forEach(namedImport => { const symbol = checker.getSymbolAtLocation(namedImport.name); if (symbol) { @@ -241,7 +241,7 @@ export function doChangeNamedToNamespaceOrDefault(sourceFile: SourceFile, progra // Imports that need to be kept as named imports in the refactored code, to avoid changing the semantics. // More specifically, those are named imports that appear in named exports in the original code, e.g. `a` in `import { a } from "m"; export { a }`. - const neededNamedImports: Set = new Set(); + const neededNamedImports = new Set(); for (const element of toConvert.elements) { const propertyName = (element.propertyName || element.name).text; diff --git a/src/services/refactors/convertOverloadListToSingleSignature.ts b/src/services/refactors/convertOverloadListToSingleSignature.ts index c0ad2970a6138..1a54a297eb772 100644 --- a/src/services/refactors/convertOverloadListToSingleSignature.ts +++ b/src/services/refactors/convertOverloadListToSingleSignature.ts @@ -12,6 +12,7 @@ import { factory, findAncestor, FunctionDeclaration, + getLocaleSpecificMessage, getSourceFileOfNode, getSyntheticLeadingComments, getTokenAtPosition, @@ -42,7 +43,7 @@ import { import { registerRefactor } from "../_namespaces/ts.refactor"; const refactorName = "Convert overload list to single signature"; -const refactorDescription = Diagnostics.Convert_overload_list_to_single_signature.message; +const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature); const functionOverloadAction = { name: refactorName, diff --git a/src/services/refactors/convertStringOrTemplateLiteral.ts b/src/services/refactors/convertStringOrTemplateLiteral.ts index 53ac3c4bb5628..9611151953769 100644 --- a/src/services/refactors/convertStringOrTemplateLiteral.ts +++ b/src/services/refactors/convertStringOrTemplateLiteral.ts @@ -122,7 +122,7 @@ function getEditsForToTemplateLiteral(context: RefactorContext, node: Node) { } function isNotEqualsOperator(node: BinaryExpression) { - return node.operatorToken.kind !== SyntaxKind.EqualsToken; + return !(node.operatorToken.kind === SyntaxKind.EqualsToken || node.operatorToken.kind === SyntaxKind.PlusEqualsToken); } function getParentBinaryExpression(expr: Node) { diff --git a/src/services/refactors/generateGetAccessorAndSetAccessor.ts b/src/services/refactors/generateGetAccessorAndSetAccessor.ts index 2982cacd8af7c..86ca118d2c935 100644 --- a/src/services/refactors/generateGetAccessorAndSetAccessor.ts +++ b/src/services/refactors/generateGetAccessorAndSetAccessor.ts @@ -4,6 +4,7 @@ import { Debug, Diagnostics, emptyArray, + getLocaleSpecificMessage, getRenameLocation, isIdentifier, isParameter, @@ -15,7 +16,7 @@ import { } from "../_namespaces/ts.refactor"; const actionName = "Generate 'get' and 'set' accessors"; -const actionDescription = Diagnostics.Generate_get_and_set_accessors.message; +const actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors); const generateGetSetAction = { name: actionName, diff --git a/src/services/refactors/inferFunctionReturnType.ts b/src/services/refactors/inferFunctionReturnType.ts index ccce34a8a14ac..1e54133c1ff61 100644 --- a/src/services/refactors/inferFunctionReturnType.ts +++ b/src/services/refactors/inferFunctionReturnType.ts @@ -35,7 +35,7 @@ import { } from "../_namespaces/ts.refactor"; const refactorName = "Infer function return type"; -const refactorDescription = Diagnostics.Infer_function_return_type.message; +const refactorDescription = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type); const inferReturnTypeAction = { name: refactorName, diff --git a/src/services/refactors/inlineVariable.ts b/src/services/refactors/inlineVariable.ts new file mode 100644 index 0000000000000..c5e8660462eba --- /dev/null +++ b/src/services/refactors/inlineVariable.ts @@ -0,0 +1,245 @@ +import { + cast, + Debug, + Diagnostics, + emptyArray, + Expression, + factory, + FindAllReferences, + getExpressionPrecedence, + getLocaleSpecificMessage, + getSynthesizedDeepClone, + getTouchingPropertyName, + Identifier, + InitializedVariableDeclaration, + isCallLikeExpression, + isExportAssignment, + isExportModifier, + isExportSpecifier, + isExpression, + isFunctionLike, + isIdentifier, + isInitializedVariable, + isNumericLiteral, + isObjectLiteralExpression, + isPropertyAccessExpression, + isTypeQueryNode, + isVariableDeclarationInVariableStatement, + isVariableStatement, + needsParentheses, + Node, + Program, + refactor, + some, + SourceFile, + SymbolFlags, + textChanges, + textRangeContainsPositionInclusive, + TypeChecker, + VariableDeclaration, +} from "../_namespaces/ts"; +import { RefactorErrorInfo, registerRefactor } from "../_namespaces/ts.refactor"; + +const refactorName = "Inline variable"; +const refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable); + +const inlineVariableAction = { + name: refactorName, + description: refactorDescription, + kind: "refactor.inline.variable" +}; + +interface InliningInfo { + references: Node[]; + declaration: VariableDeclaration; + replacement: Expression; +} + +registerRefactor(refactorName, { + kinds: [inlineVariableAction.kind], + + getAvailableActions(context) { + const { + file, + program, + preferences, + startPosition, + triggerReason + } = context; + + // tryWithReferenceToken is true below when triggerReason === "invoked", since we want to + // always provide the refactor in the declaration site but only show it in references when + // the refactor is explicitly invoked. + const info = getInliningInfo(file, startPosition, triggerReason === "invoked", program); + if (!info) { + return emptyArray; + } + + if (!refactor.isRefactorErrorInfo(info)) { + return [{ + name: refactorName, + description: refactorDescription, + actions: [inlineVariableAction] + }]; + } + + if (preferences.provideRefactorNotApplicableReason) { + return [{ + name: refactorName, + description: refactorDescription, + actions: [{ + ...inlineVariableAction, + notApplicableReason: info.error + }] + }]; + } + + return emptyArray; + }, + + getEditsForAction(context, actionName) { + Debug.assert(actionName === refactorName, "Unexpected refactor invoked"); + + const { file, program, startPosition } = context; + + // tryWithReferenceToken is true below since here we're already performing the refactor. + // The trigger kind was only relevant when checking the availability of the refactor. + const info = getInliningInfo(file, startPosition, /*tryWithReferenceToken*/ true, program); + if (!info || refactor.isRefactorErrorInfo(info)) { + return undefined; + } + + const { references, declaration, replacement } = info; + const edits = textChanges.ChangeTracker.with(context, tracker => { + for (const node of references) { + tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + } + tracker.delete(file, declaration); + }); + + return { edits }; + } +}); + +function getInliningInfo(file: SourceFile, startPosition: number, tryWithReferenceToken: boolean, program: Program): InliningInfo | RefactorErrorInfo | undefined { + const checker = program.getTypeChecker(); + const token = getTouchingPropertyName(file, startPosition); + const parent = token.parent; + + if (!isIdentifier(token)) { + return undefined; + } + + // If triggered in a variable declaration, make sure it's not in a catch clause or for-loop + // and that it has a value. + if (isInitializedVariable(parent) && isVariableDeclarationInVariableStatement(parent) && isIdentifier(parent.name)) { + // Don't inline the variable if it has multiple declarations. + if (checker.getMergedSymbol(parent.symbol).declarations?.length !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + + // Do not inline if the variable is exported. + if (isDeclarationExported(parent)) { + return undefined; + } + + // Find all references to the variable in the current file. + const references = getReferenceNodes(parent, checker, file); + return references && { references, declaration: parent, replacement: parent.initializer }; + } + + // Try finding the declaration and nodes to replace via the reference token. + if (tryWithReferenceToken) { + let definition = checker.resolveName(token.text, token, SymbolFlags.Value, /*excludeGlobals*/ false); + definition = definition && checker.getMergedSymbol(definition); + + // Don't inline the variable if it has multiple declarations. + if (definition?.declarations?.length !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + + // Make sure we're not inlining something like "let foo;" or "for (let i = 0; i < 5; i++) {}". + const declaration = definition.declarations[0]; + if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier(declaration.name)) { + return undefined; + } + + // Do not inline if the variable is exported. + if (isDeclarationExported(declaration)) { + return undefined; + } + + const references = getReferenceNodes(declaration, checker, file); + return references && { references, declaration, replacement: declaration.initializer }; + } + + return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) }; +} + +function isDeclarationExported(declaration: InitializedVariableDeclaration): boolean { + // We use this function after isVariableDeclarationInVariableStatement, which ensures + // that the cast below succeeds. + const variableStatement = cast(declaration.parent.parent, isVariableStatement); + return some(variableStatement.modifiers, isExportModifier); +} + +function getReferenceNodes(declaration: InitializedVariableDeclaration, checker: TypeChecker, file: SourceFile): Identifier[] | undefined { + const references: Identifier[] = []; + const cannotInline = FindAllReferences.Core.eachSymbolReferenceInFile(declaration.name as Identifier, checker, file, ref => { + // Only inline if all references are reads. Else we might end up with an invalid scenario like: + // const y = x++ + 1 -> const y = 2++ + 1 + if (FindAllReferences.isWriteAccessForReference(ref)) { + return true; + } + + // We cannot inline exported variables like "export { x as y }" or "export default foo". + if (isExportSpecifier(ref.parent) || isExportAssignment(ref.parent)) { + return true; + } + + // typeof needs an identifier, so we can't inline a value in there. + if (isTypeQueryNode(ref.parent)) { + return true; + } + + // Cannot inline recursive declarations (e.g. const foo = () => foo();) + if (textRangeContainsPositionInclusive(declaration, ref.pos)) { + return true; + } + + references.push(ref); + }); + + return references.length === 0 || cannotInline ? undefined : references; +} + +function getReplacementExpression(reference: Node, replacement: Expression): Expression { + // Make sure each reference site gets its own copy of the replacement node. + replacement = getSynthesizedDeepClone(replacement); + const { parent } = reference; + + // Logic from binaryOperandNeedsParentheses: "If the operand has lower precedence, + // then it needs to be parenthesized to preserve the intent of the expression. + // If the operand has higher precedence, then it does not need to be parenthesized." + // + // Note that binaryOperandNeedsParentheses has further logic when the precedences + // are equal, but for the purposes of this refactor we keep things simple and + // instead just check for special cases with needsParentheses. + if (isExpression(parent) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent) || needsParentheses(parent))) { + return factory.createParenthesizedExpression(replacement); + } + + // Functions also need to be parenthesized. + // E.g.: const f = () => {}; f(); -> (() => {})(); + if (isFunctionLike(replacement) && (isCallLikeExpression(parent) || isPropertyAccessExpression(parent))) { + return factory.createParenthesizedExpression(replacement); + } + + // Property access of numeric literals and objects need parentheses. + // E.g.: const x = 1; x.toString(); -> (1).toString(); + if (isPropertyAccessExpression(parent) && (isNumericLiteral(replacement) || isObjectLiteralExpression(replacement))) { + return factory.createParenthesizedExpression(replacement); + } + + return replacement; +} diff --git a/src/services/refactors/moveToFile.ts b/src/services/refactors/moveToFile.ts index 20ee5c05647d1..6bc5670e2cf20 100644 --- a/src/services/refactors/moveToFile.ts +++ b/src/services/refactors/moveToFile.ts @@ -1,8 +1,10 @@ import { getModuleSpecifier } from "../../compiler/moduleSpecifiers"; import { + __String, AnyImportOrRequireStatement, append, ApplicableRefactorInfo, + arrayFrom, AssignmentDeclarationKind, BinaryExpression, BindingElement, @@ -26,15 +28,19 @@ import { emptyArray, EnumDeclaration, escapeLeadingUnderscores, + ExportDeclaration, Expression, ExpressionStatement, extensionFromPath, ExternalModuleReference, factory, fileShouldUseJavaScriptRequire, + filter, find, FindAllReferences, findIndex, + findLast, + findLastIndex, firstDefined, flatMap, forEachKey, @@ -51,9 +57,12 @@ import { getRangesWhere, getRefactorContextSpan, getRelativePathFromFile, + getSourceFileOfNode, getSynthesizedDeepClone, getUniqueName, + hasJSFileExtension, hasSyntacticModifier, + hasTSFileExtension, hostGetCanonicalFileName, Identifier, ImportDeclaration, @@ -65,12 +74,16 @@ import { isBinaryExpression, isBindingElement, isDeclarationName, + isExportDeclaration, + isExportSpecifier, isExpressionStatement, isExternalModuleReference, + isFunctionLikeDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isNamedDeclaration, + isNamedExports, isObjectLiteralExpression, isOmittedExpression, isPrologueDirective, @@ -78,6 +91,7 @@ import { isPropertyAssignment, isRequireCall, isSourceFile, + isStatement, isStringLiteral, isStringLiteralLike, isValidTypeOnlyAliasUseSite, @@ -161,17 +175,29 @@ registerRefactor(refactorNameForMoveToFile, { getEditsForAction: function getRefactorEditsToMoveToFile(context, actionName, interactiveRefactorArguments): RefactorEditInfo | undefined { Debug.assert(actionName === refactorNameForMoveToFile, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); + const { host, program } = context; Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available"); - const edits = textChanges.ChangeTracker.with(context, t => doChange(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences)); - return { edits, renameFilename: undefined, renameLocation: undefined }; + const targetFile = interactiveRefactorArguments.targetFile; + if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) { + if (host.fileExists(targetFile) && program.getSourceFile(targetFile) === undefined) { + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_statements_to_the_selected_file)); + } + const edits = textChanges.ChangeTracker.with(context, t => doChange(context, context.file, interactiveRefactorArguments.targetFile, program, statements, t, context.host, context.preferences)); + return { edits, renameFilename: undefined, renameLocation: undefined }; + } + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid)); } }); +function error(notApplicableReason: string) { + return { edits: [], renameFilename: undefined, renameLocation: undefined, notApplicableReason }; +} + function doChange(context: RefactorContext, oldFile: SourceFile, targetFile: string, program: Program, toMove: ToMove, changes: textChanges.ChangeTracker, host: LanguageServiceHost, preferences: UserPreferences): void { const checker = program.getTypeChecker(); const usage = getUsageInfo(oldFile, toMove.all, checker); - //For a new file or an existing blank target file - if (!host.fileExists(targetFile) || host.fileExists(targetFile) && program.getSourceFile(targetFile)?.statements.length === 0) { + // For a new file + if (!host.fileExists(targetFile)) { changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile(oldFile, targetFile, usage, changes, toMove, program, host, preferences)); addNewFileToTsconfig(program, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host)); } @@ -183,7 +209,15 @@ function doChange(context: RefactorContext, oldFile: SourceFile, targetFile: str } function getNewStatementsAndRemoveFromOldFile( - oldFile: SourceFile, targetFile: string | SourceFile, usage: UsageInfo, changes: textChanges.ChangeTracker, toMove: ToMove, program: Program, host: LanguageServiceHost, preferences: UserPreferences, importAdder?: codefix.ImportAdder + oldFile: SourceFile, + targetFile: string | SourceFile, + usage: UsageInfo, + changes: textChanges.ChangeTracker, + toMove: ToMove, + program: Program, + host: LanguageServiceHost, + preferences: UserPreferences, + importAdder?: codefix.ImportAdder ) { const checker = program.getTypeChecker(); const prologueDirectives = takeWhile(oldFile.statements, isPrologueDirective); @@ -210,14 +244,17 @@ function getNewStatementsAndRemoveFromOldFile( const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax); if (typeof targetFile !== "string") { if (targetFile.statements.length > 0) { - changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], body); + moveStatementsToTargetFile(changes, program, body, targetFile, toMove); + } + else { + changes.insertNodesAtEndOfFile(targetFile, body, /*blankLineBetween*/ false); } if (imports.length > 0) { insertImports(changes, targetFile, imports, /*blankLineBetween*/ true, preferences); } } if (importAdder) { - importAdder.writeFixes(changes); + importAdder.writeFixes(changes, quotePreference); } if (imports.length && body.length) { return [ @@ -884,6 +921,11 @@ function getRangeToMove(context: RefactorContext): RangeToMove | undefined { return { toMove: [statements[startNodeIndex]], afterLast: statements[startNodeIndex + 1] }; } + const overloadRangeToMove = getOverloadRangeToMove(file, startStatement); + if (overloadRangeToMove) { + return overloadRangeToMove; + } + // Can't only partially include the start node or be partially into the next node if (range.pos > startStatement.getStart(file)) return undefined; const afterEndNodeIndex = findIndex(statements, s => s.end > range.end, startNodeIndex); @@ -1103,4 +1145,69 @@ function isNonVariableTopLevelDeclaration(node: Node): node is NonVariableTopLev } } +function moveStatementsToTargetFile(changes: textChanges.ChangeTracker, program: Program, statements: readonly Statement[], targetFile: SourceFile, toMove: ToMove) { + const removedExports = new Set(); + const targetExports = targetFile.symbol?.exports; + if (targetExports) { + const checker = program.getTypeChecker(); + const targetToSourceExports = new Map>(); + + for (const node of toMove.all) { + if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, ModifierFlags.Export)) { + forEachTopLevelDeclaration(node, declaration => { + const targetDeclarations = canHaveSymbol(declaration) ? targetExports.get(declaration.symbol.escapedName)?.declarations : undefined; + const exportDeclaration = firstDefined(targetDeclarations, d => + isExportDeclaration(d) ? d : + isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : undefined); + if (exportDeclaration && exportDeclaration.moduleSpecifier) { + targetToSourceExports.set(exportDeclaration, + (targetToSourceExports.get(exportDeclaration) || new Set()).add(declaration)); + } + }); + } + } + + for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) { + if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { + const elements = exportDeclaration.exportClause.elements; + const updatedElements = filter(elements, elem => + find(skipAlias(elem.symbol, checker).declarations, d => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === undefined); + if (length(updatedElements) === 0) { + changes.deleteNode(targetFile, exportDeclaration); + removedExports.add(exportDeclaration); + continue; + } + + if (length(updatedElements) < length(elements)) { + changes.replaceNode(targetFile, exportDeclaration, + factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, + factory.updateNamedExports(exportDeclaration.exportClause , factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.assertClause)); + } + } + } + } + + const lastReExport = findLast(targetFile.statements, n => + isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n)); + if (lastReExport) { + changes.insertNodesBefore(targetFile, lastReExport, statements, /*blankLineBetween*/ true); + } + else { + changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements); + } +} + +function getOverloadRangeToMove(sourceFile: SourceFile, statement: Statement) { + if (isFunctionLikeDeclaration(statement)) { + const declarations = statement.symbol.declarations; + if (declarations === undefined || length(declarations) <= 1 || !contains(declarations, statement)) { + return undefined; + } + const lastDecl = declarations[length(declarations) - 1]; + const statementsToMove = mapDefined(declarations, d => getSourceFileOfNode(d) === sourceFile && isStatement(d) ? d : undefined); + const end = findLastIndex(sourceFile.statements, s => s.end > lastDecl.end); + return { toMove: statementsToMove, afterLast: end >= 0 ? sourceFile.statements[end] : undefined }; + } + return undefined; +} diff --git a/src/services/services.ts b/src/services/services.ts index f0518d0b1ee67..2c00aaafeb894 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1703,6 +1703,9 @@ export function createLanguageService( useCaseSensitiveFileNames, fileExists: fileName => compilerHost!.fileExists(fileName), readFile: fileName => compilerHost!.readFile(fileName), + directoryExists: f => compilerHost!.directoryExists!(f), + getDirectories: f => compilerHost!.getDirectories!(f), + realpath: compilerHost.realpath, readDirectory: (...args) => compilerHost!.readDirectory!(...args), trace: compilerHost.trace, getCurrentDirectory: compilerHost.getCurrentDirectory, @@ -1713,9 +1716,13 @@ export function createLanguageService( // calculate this early so it's not undefined if downleveled to a var (or, if emitted // as a const variable without downleveling, doesn't crash). const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings); + let releasedScriptKinds: Set | undefined = new Set(); // If the program is already up-to-date, we can reuse it if (isProgramUptoDate(program, rootFileNames, newSettings, (_path, fileName) => host.getScriptVersion(fileName), fileName => compilerHost!.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + compilerHost = undefined; + parsedCommandLines = undefined; + releasedScriptKinds = undefined; return; } @@ -1738,6 +1745,7 @@ export function createLanguageService( // After this point, the cache needs to be cleared to allow all collected snapshots to be released compilerHost = undefined; parsedCommandLines = undefined; + releasedScriptKinds = undefined; // We reset this cache on structure invalidation so we don't hold on to outdated files for long; however we can't use the `compilerHost` above, // Because it only functions until `hostCache` is cleared, while we'll potentially need the functionality to lazily read sourcemap files during @@ -1841,12 +1849,13 @@ export function createLanguageService( // We do not support the scenario where a host can modify a registered // file's script kind, i.e. in one project some file is treated as ".ts" // and in another as ".js" - if (scriptKind === oldSourceFile.scriptKind) { + if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds!.has(oldSourceFile.resolvedPath)) { return documentRegistry.updateDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions); } else { // Release old source file and fall through to aquire new file with new script kind documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat); + releasedScriptKinds!.add(oldSourceFile.resolvedPath); } } @@ -1931,10 +1940,6 @@ export function createLanguageService( } function cleanupSemanticCache(): void { - program = undefined!; // TODO: GH#18217 - } - - function dispose(): void { if (program) { // Use paths to ensure we are using correct key and paths as document registry could be created with different current directory than host const key = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()); @@ -1942,6 +1947,10 @@ export function createLanguageService( documentRegistry.releaseDocumentWithKey(f.resolvedPath, key, f.scriptKind, f.impliedNodeFormat)); program = undefined!; // TODO: GH#18217 } + } + + function dispose(): void { + cleanupSemanticCache(); host = undefined!; } diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts index e5a48acc64076..9d3c350943987 100644 --- a/src/services/signatureHelp.ts +++ b/src/services/signatureHelp.ts @@ -55,6 +55,7 @@ import { isTemplateSpan, isTemplateTail, isTransientSymbol, + JsxTagNameExpression, last, lastOrUndefined, ListFormat, @@ -599,7 +600,7 @@ function getChildListThatStartsWithOpenerToken(parent: Node, openerToken: Node, return children[indexOfOpenerToken + 1]; } -function getExpressionFromInvocation(invocation: CallInvocation | TypeArgsInvocation): Expression { +function getExpressionFromInvocation(invocation: CallInvocation | TypeArgsInvocation): Expression | JsxTagNameExpression { return invocation.kind === InvocationKind.Call ? getInvokedExpression(invocation.node) : invocation.called; } diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index 61c23266701fa..bb41bf4d594bc 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -7,6 +7,7 @@ import { CaseClause, changeExtension, CharacterCodes, + CheckMode, combinePaths, comparePaths, comparePatternKeys, @@ -44,7 +45,9 @@ import { flatten, forEachAncestorDirectory, getBaseFileName, + getConditions, getContextualTypeFromParent, + getDeclarationEmitExtensionForPath, getDirectoryPath, getEffectiveTypeRoots, getEmitModuleResolutionKind, @@ -387,7 +390,7 @@ function getStringLiteralCompletionEntries(sourceFile: SourceFile, node: StringL // Get string literal completions from specialized signatures of the target // i.e. declare function f(a: 'A'); // f("/*completion position*/") - return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(); + return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, CheckMode.Normal)) || fromContextualType(ContextFlags.None); } // falls through (is `require("")` or `require(""` or `import("")`) @@ -478,12 +481,12 @@ function getAlreadyUsedTypesInStringLiteralUnion(union: UnionTypeNode, current: type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : undefined); } -function getStringLiteralCompletionsFromSignature(call: CallLikeExpression, arg: StringLiteralLike, argumentInfo: SignatureHelp.ArgumentInfoForCompletions, checker: TypeChecker): StringLiteralCompletionsFromTypes | undefined { +function getStringLiteralCompletionsFromSignature(call: CallLikeExpression, arg: StringLiteralLike, argumentInfo: SignatureHelp.ArgumentInfoForCompletions, checker: TypeChecker, checkMode = CheckMode.IsForStringLiteralArgumentCompletions): StringLiteralCompletionsFromTypes | undefined { let isNewIdentifier = false; const uniques = new Map(); const candidates: Signature[] = []; const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates); + checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); const types = flatMap(candidates, candidate => { if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; let type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex); @@ -596,7 +599,7 @@ function getCompletionEntriesForRelativeModules(literalValue: string, scriptDire compilerOptions.rootDirs, literalValue, scriptDirectory, extensionOptions, compilerOptions, host, scriptPath); } else { - return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, host, /*moduleSpecifierIsRelative*/ false, scriptPath).values()); + return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, host, /*moduleSpecifierIsRelative*/ true, scriptPath).values()); } } @@ -924,7 +927,7 @@ function getCompletionEntriesForNonRelativeModules( } const keys = getOwnKeys(exports); const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = mode === ModuleKind.ESNext ? ["node", "import", "types"] : ["node", "require", "types"]; + const conditions = getConditions(compilerOptions, mode === ModuleKind.ESNext); addCompletionEntriesFromPathsOrExports( result, fragmentSubpath, @@ -1021,6 +1024,8 @@ function getModulesForPathsPattern( const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; const normalizedSuffix = normalizePath(parsed.suffix); + const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); + const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; // Need to normalize after combining: If we combinePaths("a", "../b"), we want "b" and not "a/../b". const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; @@ -1033,9 +1038,11 @@ function getModulesForPathsPattern( // interpreted as "any character" can only return *too many* results as compared to the literal // interpretation, so we can filter those superfluous results out via `trimPrefixAndSuffix` as we've always // done. - const includeGlob = normalizedSuffix ? "**/*" + normalizedSuffix : "./*"; + const includeGlobs = normalizedSuffix + ? matchingSuffixes.map(suffix => "**/*" + suffix) + : ["./*"]; - const matches = mapDefined(tryReadDirectory(host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, [includeGlob]), match => { + const matches = mapDefined(tryReadDirectory(host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ undefined, includeGlobs), match => { const trimmedWithPattern = trimPrefixAndSuffix(match); if (trimmedWithPattern) { if (containsSlash(trimmedWithPattern)) { @@ -1055,8 +1062,10 @@ function getModulesForPathsPattern( return [...matches, ...directories]; function trimPrefixAndSuffix(path: string): string | undefined { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, normalizedSuffix); - return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner); + return firstDefined(matchingSuffixes, suffix => { + const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); + return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner); + }); } } diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts index 3aa4a2d10966d..4e425a1a32d0d 100644 --- a/src/services/suggestionDiagnostics.ts +++ b/src/services/suggestionDiagnostics.ts @@ -116,8 +116,8 @@ export function computeSuggestionDiagnostics(sourceFile: SourceFile, program: Pr } } - const jsdocTypedefNode = codefix.getJSDocTypedefNode(node); - if (jsdocTypedefNode) { + const jsdocTypedefNodes = codefix.getJSDocTypedefNodes(node); + for (const jsdocTypedefNode of jsdocTypedefNodes) { diags.push(createDiagnosticForNode(jsdocTypedefNode, Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type)); } diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts index 25c04c712f5b6..e77a2647f4884 100644 --- a/src/services/symbolDisplay.ts +++ b/src/services/symbolDisplay.ts @@ -60,7 +60,9 @@ import { isThisInTypeQuery, isTransientSymbol, isTypeAliasDeclaration, + isVarAwaitUsing, isVarConst, + isVarUsing, JSDocTagInfo, JsxOpeningLikeElement, keywordPart, @@ -161,6 +163,12 @@ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeCheck else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration as VariableDeclaration)) { return ScriptElementKind.constElement; } + else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration as VariableDeclaration)) { + return ScriptElementKind.variableUsingElement; + } + else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration as VariableDeclaration)) { + return ScriptElementKind.variableAwaitUsingElement; + } else if (forEach(symbol.declarations, isLet)) { return ScriptElementKind.letElement; } @@ -246,10 +254,8 @@ export interface SymbolDisplayPartsDocumentationAndSymbolKind { tags: JSDocTagInfo[] | undefined; } -// TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location -/** @internal */ -export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node | undefined, - location: Node, semanticMeaning = getMeaningFromLocation(location), alias?: Symbol): SymbolDisplayPartsDocumentationAndSymbolKind { +function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node | undefined, + location: Node, type: Type | undefined, semanticMeaning: SemanticMeaning, alias?: Symbol): SymbolDisplayPartsDocumentationAndSymbolKind { const displayParts: SymbolDisplayPart[] = []; let documentation: SymbolDisplayPart[] = []; let tags: JSDocTagInfo[] = []; @@ -257,7 +263,6 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ let symbolKind = semanticMeaning & SemanticMeaning.Value ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : ScriptElementKind.unknown; let hasAddedSymbolInfo = false; const isThisExpression = location.kind === SyntaxKind.ThisKeyword && isInExpressionContext(location) || isThisInTypeQuery(location); - let type: Type | undefined; let documentationFromAlias: SymbolDisplayPart[] | undefined; let tagsFromAlias: JSDocTagInfo[] | undefined; let hasMultipleSignatures = false; @@ -292,7 +297,7 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ } let signature: Signature | undefined; - type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); + type ??= isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (location.parent && location.parent.kind === SyntaxKind.PropertyAccessExpression) { const right = (location.parent as PropertyAccessExpression).name; @@ -535,22 +540,23 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ // don't use symbolFlags since getAliasedSymbol requires the flag on the symbol itself if (symbol.flags & SymbolFlags.Alias) { prefixNextMeaning(); - if (!hasAddedSymbolInfo) { + if (!hasAddedSymbolInfo || documentation.length === 0 && tags.length === 0) { const resolvedSymbol = typeChecker.getAliasedSymbol(symbol); if (resolvedSymbol !== symbol && resolvedSymbol.declarations && resolvedSymbol.declarations.length > 0) { const resolvedNode = resolvedSymbol.declarations[0]; const declarationName = getNameOfDeclaration(resolvedNode); - if (declarationName) { + if (declarationName && !hasAddedSymbolInfo) { const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, ModifierFlags.Ambient); const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; - const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKind( + const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, resolvedSymbol, getSourceFileOfNode(resolvedNode), resolvedNode, declarationName, + type, semanticMeaning, shouldUseAliasName ? symbol : resolvedSymbol); displayParts.push(...resolvedInfo.displayParts); @@ -630,6 +636,8 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ symbolFlags & SymbolFlags.Variable || symbolKind === ScriptElementKind.localVariableElement || symbolKind === ScriptElementKind.indexSignatureElement || + symbolKind === ScriptElementKind.variableUsingElement || + symbolKind === ScriptElementKind.variableAwaitUsingElement || isThisExpression) { displayParts.push(punctuationPart(SyntaxKind.ColonToken)); displayParts.push(spacePart()); @@ -807,6 +815,8 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ case ScriptElementKind.letElement: case ScriptElementKind.constElement: case ScriptElementKind.constructorImplementationElement: + case ScriptElementKind.variableUsingElement: + case ScriptElementKind.variableAwaitUsingElement: displayParts.push(textOrKeywordPart(symbolKind)); return; default: @@ -835,7 +845,6 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ documentation = allSignatures[0].getDocumentationComment(typeChecker); tags = allSignatures[0].getJsDocTags().filter(tag => tag.name !== "deprecated"); // should only include @deprecated JSDoc tag on the first overload (#49368) } - } function writeTypeParametersOfSymbol(symbol: Symbol, enclosingDeclaration: Node | undefined) { @@ -847,6 +856,13 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ } } +// TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location +/** @internal */ +export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node | undefined, + location: Node, semanticMeaning = getMeaningFromLocation(location), alias?: Symbol): SymbolDisplayPartsDocumentationAndSymbolKind { + return getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, /*type*/ undefined, semanticMeaning, alias); +} + function isLocalVariableOrFunction(symbol: Symbol) { if (symbol.parent) { return false; // This is exported symbol diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index aac18cce972ed..fbfdba0f59bc3 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -52,9 +52,11 @@ import { getNewLineKind, getNewLineOrDefaultFromHost, getNodeId, + getOriginalNode, getPrecedingNonSpaceCharacterPosition, getScriptKindFromFileName, getShebang, + getSourceFileOfNode, getStartPositionOfLine, getTokenAtPosition, getTouchingToken, @@ -629,6 +631,25 @@ export class ChangeTracker { } } + public insertNodesAtEndOfFile( + sourceFile: SourceFile, + newNodes: readonly Statement[], + blankLineBetween: boolean): void { + this.insertAtEndOfFile(sourceFile, newNodes, blankLineBetween); + } + + private insertAtEndOfFile( + sourceFile: SourceFile, + insert: readonly Statement[], + blankLineBetween: boolean): void { + const pos = sourceFile.end + 1; + const options = { + prefix: this.newLineCharacter, + suffix: this.newLineCharacter + (blankLineBetween ? this.newLineCharacter : ""), + }; + this.insertNodesAt(sourceFile, pos, insert, options); + } + private insertStatementsInNewFile(fileName: string, statements: readonly (Statement | SyntaxKind.NewLineTrivia)[], oldFile?: SourceFile): void { if (!this.newFileChanges) { this.newFileChanges = createMultiMap(); @@ -650,6 +671,10 @@ export class ChangeTracker { this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); } + public insertNodesBefore(sourceFile: SourceFile, before: Node, newNodes: readonly Node[], blankLineBetween = false, options: ConfigurableStartEnd = {}): void { + this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween)); + } + public insertModifierAt(sourceFile: SourceFile, pos: number, modifier: SyntaxKind, options: InsertNodeOptions = {}): void { this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options); } @@ -1238,9 +1263,12 @@ namespace changesToText { const textChanges = mapDefined(normalized, c => { const span = createTextSpanFromRange(c.range); - const newText = computeNewText(c, sourceFile, newLineCharacter, formatContext, validate); + const targetSourceFile = c.kind === ChangeKind.ReplaceWithSingleNode ? getSourceFileOfNode(getOriginalNode(c.node)) ?? c.sourceFile : + c.kind === ChangeKind.ReplaceWithMultipleNodes ? getSourceFileOfNode(getOriginalNode(c.nodes[0])) ?? c.sourceFile : + c.sourceFile; + const newText = computeNewText(c, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate); // Filter out redundant changes. - if (span.length === newText.length && stringContainsAt(sourceFile.text, newText, span.start)) { + if (span.length === newText.length && stringContainsAt(targetSourceFile.text, newText, span.start)) { return undefined; } @@ -1264,7 +1292,7 @@ namespace changesToText { return applyChanges(nonFormattedText, changes) + newLineCharacter; } - function computeNewText(change: Change, sourceFile: SourceFile, newLineCharacter: string, formatContext: formatting.FormatContext, validate: ValidateNonFormattedText | undefined): string { + function computeNewText(change: Change, targetSourceFile: SourceFile, sourceFile: SourceFile, newLineCharacter: string, formatContext: formatting.FormatContext, validate: ValidateNonFormattedText | undefined): string { if (change.kind === ChangeKind.Remove) { return ""; } @@ -1273,26 +1301,26 @@ namespace changesToText { } const { options = {}, range: { pos } } = change; - const format = (n: Node) => getFormattedTextOfNode(n, sourceFile, pos, options, newLineCharacter, formatContext, validate); + const format = (n: Node) => getFormattedTextOfNode(n, targetSourceFile, sourceFile, pos, options, newLineCharacter, formatContext, validate); const text = change.kind === ChangeKind.ReplaceWithMultipleNodes ? change.nodes.map(n => removeSuffix(format(n), newLineCharacter)).join(change.options?.joiner || newLineCharacter) : format(change.node); // strip initial indentation (spaces or tabs) if text will be inserted in the middle of the line - const noIndent = (options.indentation !== undefined || getLineStartPositionForPosition(pos, sourceFile) === pos) ? text : text.replace(/^\s+/, ""); + const noIndent = (options.indentation !== undefined || getLineStartPositionForPosition(pos, targetSourceFile) === pos) ? text : text.replace(/^\s+/, ""); return (options.prefix || "") + noIndent + ((!options.suffix || endsWith(noIndent, options.suffix)) ? "" : options.suffix); } /** Note: this may mutate `nodeIn`. */ - function getFormattedTextOfNode(nodeIn: Node, sourceFile: SourceFile, pos: number, { indentation, prefix, delta }: InsertNodeOptions, newLineCharacter: string, formatContext: formatting.FormatContext, validate: ValidateNonFormattedText | undefined): string { - const { node, text } = getNonformattedText(nodeIn, sourceFile, newLineCharacter); + function getFormattedTextOfNode(nodeIn: Node, targetSourceFile: SourceFile, sourceFile: SourceFile, pos: number, { indentation, prefix, delta }: InsertNodeOptions, newLineCharacter: string, formatContext: formatting.FormatContext, validate: ValidateNonFormattedText | undefined): string { + const { node, text } = getNonformattedText(nodeIn, targetSourceFile, newLineCharacter); if (validate) validate(node, text); - const formatOptions = getFormatCodeSettingsForWriting(formatContext, sourceFile); + const formatOptions = getFormatCodeSettingsForWriting(formatContext, targetSourceFile); const initialIndentation = indentation !== undefined ? indentation - : formatting.SmartIndenter.getIndentation(pos, sourceFile, formatOptions, prefix === newLineCharacter || getLineStartPositionForPosition(pos, sourceFile) === pos); + : formatting.SmartIndenter.getIndentation(pos, sourceFile, formatOptions, prefix === newLineCharacter || getLineStartPositionForPosition(pos, targetSourceFile) === pos); if (delta === undefined) { delta = formatting.SmartIndenter.shouldIndentChildNode(formatOptions, nodeIn) ? (formatOptions.indentSize || 0) : 0; } @@ -1303,7 +1331,7 @@ namespace changesToText { return getLineAndCharacterOfPosition(this, pos); } }; - const changes = formatting.formatNodeGivenIndentation(node, file, sourceFile.languageVariant, initialIndentation, delta, { ...formatContext, options: formatOptions }); + const changes = formatting.formatNodeGivenIndentation(node, file, targetSourceFile.languageVariant, initialIndentation, delta, { ...formatContext, options: formatOptions }); return applyChanges(text, changes); } diff --git a/src/services/types.ts b/src/services/types.ts index beccf81d1f109..571e677b208f2 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -652,7 +652,7 @@ export interface LanguageService { * arguments for any interactive action before offering it. */ getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string, includeInteractiveActions?: boolean): ApplicableRefactorInfo[]; - getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, includeInteractiveActions?: InteractiveRefactorArguments): RefactorEditInfo | undefined; + getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo | undefined; getMoveToRefactoringFileSuggestions(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): { newFileName: string, files: string[] }; organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; @@ -866,13 +866,19 @@ export const enum InlayHintKind { } export interface InlayHint { - text: string; + text: string | InlayHintDisplayPart[]; position: number; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; } +export interface InlayHintDisplayPart { + text: string; + span?: TextSpan; + file?: string; +} + export interface TodoCommentDescriptor { text: string; priority: number; @@ -1002,6 +1008,7 @@ export interface RefactorEditInfo { renameFilename?: string; renameLocation?: number; commands?: CodeActionCommand[]; + notApplicableReason?: string; } export type RefactorTriggerReason = "implicit" | "invoked"; @@ -1406,6 +1413,7 @@ export interface CompletionEntry { kindModifiers?: string; // see ScriptElementKindModifier, comma separated sortText: string; insertText?: string; + filterText?: string; isSnippet?: true; /** * An optional span that indicates the text to be replaced by this completion item. @@ -1594,6 +1602,12 @@ export const enum ScriptElementKind { /** Inside function */ localVariableElement = "local var", + /** using foo = ... */ + variableUsingElement = "using", + + /** await using foo = ... */ + variableAwaitUsingElement = "await using", + /** * Inside module and script only * function f() { } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index d7c8149609b0c..4d94041411e8b 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -261,6 +261,7 @@ import { JsTyping, JsxEmit, JsxOpeningLikeElement, + JsxTagNameExpression, LabeledStatement, LanguageServiceHost, last, @@ -617,7 +618,7 @@ function selectTagNameOfJsxOpeningLikeElement(node: JsxOpeningLikeElement) { return node.tagName; } -function isCalleeWorker(node: Node, pred: (node: Node) => node is T, calleeSelector: (node: T) => Expression, includeElementAccess: boolean, skipPastOuterExpressions: boolean) { +function isCalleeWorker(node: Node, pred: (node: Node) => node is T, calleeSelector: (node: T) => Expression | JsxTagNameExpression, includeElementAccess: boolean, skipPastOuterExpressions: boolean) { let target = includeElementAccess ? climbPastPropertyOrElementAccess(node) : climbPastPropertyAccess(node); if (skipPastOuterExpressions) { target = skipOuterExpressions(target); @@ -3970,12 +3971,14 @@ export function getNamesForExportedSymbol(symbol: Symbol, scriptTarget: ScriptTa /** @internal */ export function getNameForExportedSymbol(symbol: Symbol, scriptTarget: ScriptTarget | undefined, preferCapitalized?: boolean) { if (needsNameFromDeclaration(symbol)) { - // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. + // Names for default exports: + // - export default foo => foo + // - export { foo as default } => foo + // - export default 0 => filename converted to camelCase return getDefaultLikeExportNameFromDeclaration(symbol) || codefix.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, !!preferCapitalized); } return symbol.name; - } function needsNameFromDeclaration(symbol: Symbol) { @@ -3983,11 +3986,18 @@ function needsNameFromDeclaration(symbol: Symbol) { } function getDefaultLikeExportNameFromDeclaration(symbol: Symbol): string | undefined { - return firstDefined(symbol.declarations, d => - isExportAssignment(d) - ? tryCast(skipOuterExpressions(d.expression), isIdentifier)?.text - : tryCast(getNameOfDeclaration(d), isIdentifier)?.text - ); + return firstDefined(symbol.declarations, d => { + // "export default" in this case. See `ExportAssignment`for more details. + if (isExportAssignment(d)) { + return tryCast(skipOuterExpressions(d.expression), isIdentifier)?.text; + } + // "export { ~ as default }" + if (isExportSpecifier(d) && d.symbol.flags === SymbolFlags.Alias) { + return tryCast(d.propertyName, isIdentifier)?.text; + } + // GH#52694 + return tryCast(getNameOfDeclaration(d), isIdentifier)?.text; + }); } function getSymbolParentOrFail(symbol: Symbol) { @@ -4218,4 +4228,4 @@ export function fileShouldUseJavaScriptRequire(file: SourceFile | string, progra } } return preferRequire; -} \ No newline at end of file +} diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 7e6f5bdf73406..c11c2645b02b4 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -13,6 +13,7 @@ import { } from "./_namespaces/Harness"; import * as ts from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; +import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; export const enum CompilerTestType { @@ -92,8 +93,7 @@ export class CompilerBaselineRunner extends RunnerBase { before(() => { let payload; if (test && test.content) { - const rootDir = test.file.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(test.file) + "/"; - payload = TestCaseParser.makeUnitsFromTest(test.content, test.file, rootDir); + payload = TestCaseParser.makeUnitsFromTest(test.content, test.file); } compilerTest = new CompilerTest(fileName, payload, configuration); }); @@ -167,7 +167,6 @@ class CompilerTest { private fileName: string; private justName: string; private configuredName: string; - private lastUnit: TestCaseParser.TestUnitData; private harnessSettings: TestCaseParser.CompilerSettings; private hasNonDtsFiles: boolean; private result: compiler.CompilationResult; @@ -179,6 +178,7 @@ class CompilerTest { private otherFiles: Compiler.TestFile[]; constructor(fileName: string, testCaseContent?: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { + const absoluteRootDir = vfs.srcFolder; this.fileName = fileName; this.justName = vpath.basename(fileName); this.configuredName = this.justName; @@ -200,10 +200,8 @@ class CompilerTest { } } - const rootDir = fileName.indexOf("conformance") === -1 ? "tests/cases/compiler/" : ts.getDirectoryPath(fileName) + "/"; - if (testCaseContent === undefined) { - testCaseContent = TestCaseParser.makeUnitsFromTest(IO.readFile(fileName)!, fileName, rootDir); + testCaseContent = TestCaseParser.makeUnitsFromTest(IO.readFile(fileName)!, fileName); } if (configurationOverrides) { @@ -211,47 +209,51 @@ class CompilerTest { } const units = testCaseContent.testUnitData; + this.toBeCompiled = []; + this.otherFiles = []; + this.hasNonDtsFiles = units.some(unit => !ts.fileExtensionIs(unit.name, ts.Extension.Dts)); this.harnessSettings = testCaseContent.settings; let tsConfigOptions: ts.CompilerOptions | undefined; this.tsConfigFiles = []; if (testCaseContent.tsConfig) { - assert.equal(testCaseContent.tsConfig.fileNames.length, 0, `list of files in tsconfig is not currently supported`); - assert.equal(testCaseContent.tsConfig.raw.exclude, undefined, `exclude in tsconfig is not currently supported`); - tsConfigOptions = ts.cloneCompilerOptions(testCaseContent.tsConfig.options); - this.tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!, rootDir, ts.combinePaths(rootDir, tsConfigOptions.configFilePath))); + this.tsConfigFiles.push(this.createHarnessTestFile(testCaseContent.tsConfigFileUnitData!)); + for (const unit of units) { + if (testCaseContent.tsConfig.fileNames.includes(ts.getNormalizedAbsolutePath(unit.name, absoluteRootDir))) { + this.toBeCompiled.push(this.createHarnessTestFile(unit)); + } + else { + this.otherFiles.push(this.createHarnessTestFile(unit)); + } + } } else { const baseUrl = this.harnessSettings.baseUrl; if (baseUrl !== undefined && !ts.isRootedDiskPath(baseUrl)) { - this.harnessSettings.baseUrl = ts.getNormalizedAbsolutePath(baseUrl, rootDir); + this.harnessSettings.baseUrl = ts.getNormalizedAbsolutePath(baseUrl, absoluteRootDir); } - } - - this.lastUnit = units[units.length - 1]; - this.hasNonDtsFiles = units.some(unit => !ts.fileExtensionIs(unit.name, ts.Extension.Dts)); - // We need to assemble the list of input files for the compiler and other related files on the 'filesystem' (ie in a multi-file test) - // If the last file in a test uses require or a triple slash reference we'll assume all other files will be brought in via references, - // otherwise, assume all files are just meant to be in the same compilation session without explicit references to one another. - this.toBeCompiled = []; - this.otherFiles = []; - if (testCaseContent.settings.noImplicitReferences || /require\(/.test(this.lastUnit.content) || /reference\spath/.test(this.lastUnit.content)) { - this.toBeCompiled.push(this.createHarnessTestFile(this.lastUnit, rootDir)); - units.forEach(unit => { - if (unit.name !== this.lastUnit.name) { - this.otherFiles.push(this.createHarnessTestFile(unit, rootDir)); - } - }); - } - else { - this.toBeCompiled = units.map(unit => { - return this.createHarnessTestFile(unit, rootDir); - }); + const lastUnit = units[units.length - 1]; + // We need to assemble the list of input files for the compiler and other related files on the 'filesystem' (ie in a multi-file test) + // If the last file in a test uses require or a triple slash reference we'll assume all other files will be brought in via references, + // otherwise, assume all files are just meant to be in the same compilation session without explicit references to one another. + + if (testCaseContent.settings.noImplicitReferences || /require\(/.test(lastUnit.content) || /reference\spath/.test(lastUnit.content)) { + this.toBeCompiled.push(this.createHarnessTestFile(lastUnit)); + units.forEach(unit => { + if (unit.name !== lastUnit.name) { + this.otherFiles.push(this.createHarnessTestFile(unit)); + } + }); + } + else { + this.toBeCompiled = units.map(unit => { + return this.createHarnessTestFile(unit); + }); + } } if (tsConfigOptions && tsConfigOptions.configFilePath !== undefined) { - tsConfigOptions.configFilePath = ts.combinePaths(rootDir, tsConfigOptions.configFilePath); tsConfigOptions.configFile!.fileName = tsConfigOptions.configFilePath; } @@ -338,6 +340,7 @@ class CompilerTest { Compiler.doTypeAndSymbolBaseline( this.configuredName, + this.fileName, this.result.program!, this.toBeCompiled.concat(this.otherFiles).filter(file => !!this.result.program!.getSourceFile(file.unitName)), /*opts*/ undefined, @@ -348,13 +351,11 @@ class CompilerTest { ); } - private makeUnitName(name: string, root: string) { - const path = ts.toPath(name, root, ts.identity); - const pathStart = ts.toPath(IO.getCurrentDirectory(), "", ts.identity); - return pathStart ? path.replace(pathStart, "/") : path; - } - - private createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData, rootDir: string, unitName?: string): Compiler.TestFile { - return { unitName: unitName || this.makeUnitName(lastUnit.name, rootDir), content: lastUnit.content, fileOptions: lastUnit.fileOptions }; + private createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { + return { + unitName: unit.name, + content: unit.content, + fileOptions: unit.fileOptions + }; } } diff --git a/src/testRunner/tests.ts b/src/testRunner/tests.ts index d02d93c8bc2ac..19474a4f4bea0 100644 --- a/src/testRunner/tests.ts +++ b/src/testRunner/tests.ts @@ -37,6 +37,7 @@ import "./unittests/evaluation/awaiter"; import "./unittests/evaluation/destructuring"; import "./unittests/evaluation/externalModules"; import "./unittests/evaluation/esDecorators"; +import "./unittests/evaluation/esDecoratorsMetadata"; import "./unittests/evaluation/forAwaitOf"; import "./unittests/evaluation/forOf"; import "./unittests/evaluation/generator"; @@ -45,6 +46,8 @@ import "./unittests/evaluation/objectRest"; import "./unittests/evaluation/superInStaticInitializer"; import "./unittests/evaluation/templateLiteral"; import "./unittests/evaluation/updateExpressionInModule"; +import "./unittests/evaluation/usingDeclarations"; +import "./unittests/evaluation/awaitUsingDeclarations"; import "./unittests/services/cancellableLanguageServiceOperations"; import "./unittests/services/colorization"; import "./unittests/services/convertToAsyncFunction"; @@ -53,7 +56,6 @@ import "./unittests/services/extract/constants"; import "./unittests/services/extract/functions"; import "./unittests/services/extract/symbolWalker"; import "./unittests/services/extract/ranges"; -import "./unittests/services/findAllReferences"; import "./unittests/services/hostNewLineSupport"; import "./unittests/services/languageService"; import "./unittests/services/organizeImports"; @@ -73,6 +75,7 @@ import "./unittests/tsbuild/demo"; import "./unittests/tsbuild/emitDeclarationOnly"; import "./unittests/tsbuild/emptyFiles"; import "./unittests/tsbuild/exitCodeOnBogusFile"; +import "./unittests/tsbuild/extends"; import "./unittests/tsbuild/fileDelete"; import "./unittests/tsbuild/graphOrdering"; import "./unittests/tsbuild/inferredTypeFromTransitiveModule"; @@ -105,10 +108,12 @@ import "./unittests/tsbuildWatch/watchEnvironment"; import "./unittests/tsc/cancellationToken"; import "./unittests/tsc/composite"; import "./unittests/tsc/declarationEmit"; +import "./unittests/tsc/extends"; import "./unittests/tsc/forceConsistentCasingInFileNames"; import "./unittests/tsc/incremental"; import "./unittests/tsc/libraryResolution"; import "./unittests/tsc/listFilesOnly"; +import "./unittests/tsc/moduleResolution"; import "./unittests/tsc/projectReferences"; import "./unittests/tsc/projectReferencesConfig"; import "./unittests/tsc/redirect"; @@ -117,6 +122,7 @@ import "./unittests/tscWatch/consoleClearing"; import "./unittests/tscWatch/emit"; import "./unittests/tscWatch/nodeNextWatch"; import "./unittests/tscWatch/emitAndErrorUpdates"; +import "./unittests/tscWatch/extends"; import "./unittests/tscWatch/forceConsistentCasingInFileNames"; import "./unittests/tscWatch/incremental"; import "./unittests/tscWatch/libraryResolution"; @@ -147,13 +153,16 @@ import "./unittests/tsserver/events/projectLanguageServiceState"; import "./unittests/tsserver/events/projectLoading"; import "./unittests/tsserver/events/projectUpdatedInBackground"; import "./unittests/tsserver/exportMapCache"; +import "./unittests/tsserver/extends"; import "./unittests/tsserver/externalProjects"; +import "./unittests/tsserver/findAllReferences"; import "./unittests/tsserver/forceConsistentCasingInFileNames"; import "./unittests/tsserver/formatSettings"; import "./unittests/tsserver/getApplicableRefactors"; import "./unittests/tsserver/getEditsForFileRename"; import "./unittests/tsserver/getExportReferences"; import "./unittests/tsserver/getFileReferences"; +import "./unittests/tsserver/goToDefinition"; import "./unittests/tsserver/importHelpers"; import "./unittests/tsserver/inlayHints"; import "./unittests/tsserver/inferredProjects"; diff --git a/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts b/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts new file mode 100644 index 0000000000000..c3e5c7e999637 --- /dev/null +++ b/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts @@ -0,0 +1,1672 @@ +import * as evaluator from "../../_namespaces/evaluator"; +import * as ts from "../../_namespaces/ts"; + +function FakeSuppressedError(error: any, suppressed: any) { + return { error, suppressed }; +} + +describe("unittests:: evaluation:: awaitUsingDeclarations", () => { + it("'await using' in Block, normal completion (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _ = disposable; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "disposed", + "after block" + ]); + }); + + it("'await using' in Block, 'throw' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + throw "error"; + } + + export async function main() { + output.push("before try"); + try { + output.push("enter try"); + await using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "disposed", + "error", + "after try" + ]); + }); + + it("'await using' in Block, 'throw' in dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + throw "error"; + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before try"); + try { + output.push("enter try"); + await using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "exit try", + "disposed", + "error", + "after try" + ]); + }); + + it("'await using' in Block, 'throw' in body and dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + throw "dispose error"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export async function main() { + output.push("before try"); + try { + output.push("enter try"); + await using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + await main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after try" + ]); + }); + + it("'await using' in Block, 'throw' in body and dispose, no global SuppressedError (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + throw "dispose error"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export async function main() { + output.push("before try"); + try { + output.push("enter try"); + await using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output.slice(0, 4), [ + "before try", + "enter try", + "body", + "disposed"]); + assert.instanceOf(output[4], Error); + assert.strictEqual(output[4].name, "SuppressedError"); + assert.strictEqual(output[4].error, "dispose error"); + assert.strictEqual(output[4].suppressed, "body error"); + assert.deepEqual(output.slice(5), [ + "after try" + ]); + }); + + it("'await using' in Block, 'return' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _ = disposable; + body(); + return; + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "disposed" + ]); + }); + + it("'await using' in Block, 'break' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + for (let i = 0; i < 2; i++) { + output.push("enter block"); + await using _ = disposable; + body(); + break; + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "disposed", + "after block" + ]); + }); + + it("'await using' in Block, 'continue' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + for (let i = 0; i < 2; i++) { + output.push("enter block"); + await using _ = disposable; + body(); + continue; + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "disposed", + "enter block", + "body", + "disposed", + "after block" + ]); + }); + + it("'await using' in head of 'for', normal completion (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + let i = 0; + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "enter loop", + "body", + "exit loop", + "disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for', 'throw' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + throw "error"; + } + + export async function main() { + output.push("before loop"); + let i = 0; + try { + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed", + "error", + "after loop" + ]); + }); + + it("'await using' in head of 'for', 'throw' in dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + throw "error"; + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + let i = 0; + try { + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "enter loop", + "body", + "exit loop", + "disposed", + "error", + "after loop" + ]); + }); + + it("'await using' in head of 'for', 'throw' in body and dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + throw "dispose error"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export async function main() { + output.push("before loop"); + let i = 0; + try { + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after loop" + ]); + }); + + it("'await using' in head of 'for', 'return' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + let i = 0; + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + return; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed" + ]); + }); + + it("'await using' in head of 'for', 'break' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + let i = 0; + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + break; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for', 'continue' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + let i = 0; + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + continue; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "enter loop", + "body", + "disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for', multiple iterations (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + let i = 0; + for (await using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "enter loop", + "body", + "exit loop", + "disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for-of', normal completion (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "enter loop", + "body", + "exit loop", + "b disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for-of', 'throw' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "error"; + } + + export async function main() { + output.push("before loop"); + try { + for (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'await using' in head of 'for-of', 'throw' in dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + throw "error"; + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + try { + for (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'await using' in head of 'for-of', 'throw' in body and dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + throw "dispose error"; + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "body error"; + } + + export async function main() { + output.push("before loop"); + try { + for (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after loop", + ]); + }); + + it("'await using' in head of 'for-of', 'return' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for (await using _ of g()) { + output.push("enter loop"); + body(); + return; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + ]); + }); + + it("'await using' in head of 'for-of', 'break' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for (await using _ of g()) { + output.push("enter loop"); + body(); + break; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for-of', 'continue' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for (await using _ of g()) { + output.push("enter loop"); + body(); + continue; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "enter loop", + "body", + "b disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for-await-of', normal completion (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "enter loop", + "body", + "exit loop", + "b disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for-await-of', 'throw' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "error"; + } + + export async function main() { + output.push("before loop"); + try { + for await (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'await using' in head of 'for-await-of', 'throw' in dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + throw "error"; + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + try { + for await (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'await using' in head of 'for-await-of', 'throw' in body and dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + throw "dispose error"; + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "body error"; + } + + export async function main() { + output.push("before loop"); + try { + for await (await using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after loop", + ]); + }); + + it("'await using' in head of 'for-await-of', 'return' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (await using _ of g()) { + output.push("enter loop"); + body(); + return; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + ]); + }); + + it("'await using' in head of 'for-await-of', 'break' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (await using _ of g()) { + output.push("enter loop"); + body(); + break; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "after loop" + ]); + }); + + it("'await using' in head of 'for-await-of', 'continue' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + async [Symbol.asyncDispose]() { + output.push("a disposed"); + } + }; + yield { + async [Symbol.asyncDispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (await using _ of g()) { + output.push("enter loop"); + body(); + continue; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "enter loop", + "body", + "b disposed", + "after loop" + ]); + }); + + it("'await using' at top level of module (System)", async () => { + const { output, x, y } = await evaluator.evaluateTypeScript(` + export const output: any[] = []; + output.push("before export x"); + export const x = 1; + output.push("before using"); + await using _ = { + async [Symbol.asyncDispose]() { + output.push("disposed"); + } + }; + output.push("after using"); + export const y = 2; + output.push("after export y"); + `, { target: ts.ScriptTarget.ES2018, module: ts.ModuleKind.System }); + + assert.strictEqual(x, 1); + assert.strictEqual(y, 2); + assert.deepEqual(output, [ + "before export x", + "before using", + "after using", + "after export y", + "disposed" + ]); + }); + + it("'await using' for 'null' value", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _ = null; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "after block" + ]); + }); + + it("'await using' for 'undefined' value", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _ = undefined; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "after block" + ]); + }); + + it("'await using' for sync disposable value", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _ = disposable; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "disposed", + "after block" + ]); + }); + + it("'await using' for non-disposable value", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _ = {} as any; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + try { + await main(); + assert.fail("Expected 'main' to throw an error"); + } + catch { + // ignore + } + + assert.deepEqual(output, [ + "before block", + "enter block", + ]); + }); + + it("'await using' disposes in reverse order", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable_1 = { + async [Symbol.asyncDispose]() { + output.push("disposed_1"); + } + }; + const disposable_2 = { + async [Symbol.asyncDispose]() { + output.push("disposed_2"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _1 = disposable_1, _2 = disposable_2; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "disposed_2", + "disposed_1", + "after block" + ]); + }); + + it("'await using' + 'using' disposes in reverse order", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable_1 = { + async [Symbol.asyncDispose]() { + output.push("disposed_1"); + } + }; + + const disposable_2 = { + [Symbol.dispose]() { + output.push("disposed_2"); + } + }; + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before block"); + { + output.push("enter block"); + await using _1 = disposable_1; + using _2 = disposable_2; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "disposed_2", + "disposed_1", + "after block" + ]); + }); + + it("'await using' forces await if null and evaluated", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + async function a() { + output.push("before block"); + { + output.push("enter block"); + await using _ = null; + body(); + output.push("exit block"); + } + output.push("after block"); + } + + function b() { + output.push("interleave"); + } + + export async function main() { + const p = a(); + b(); + await p; + } + + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "interleave", + "after block" + ]); + }); + + it("'await using' does not force await if null and not evaluated", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + async function a(exitEarly: boolean) { + output.push("before block"); + block: { + output.push("enter block"); + if (exitEarly) break block; + await using _ = null; + body(); + output.push("exit block"); + } + output.push("after block"); + } + + function b() { + output.push("no interleave"); + } + + export async function main() { + const p = a(true); + b(); + await p; + } + + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "after block", + "no interleave", + ]); + }); +}); diff --git a/src/testRunner/unittests/evaluation/esDecorators.ts b/src/testRunner/unittests/evaluation/esDecorators.ts index 0a73c43c5b59f..35be87f5a5c41 100644 --- a/src/testRunner/unittests/evaluation/esDecorators.ts +++ b/src/testRunner/unittests/evaluation/esDecorators.ts @@ -1729,12 +1729,11 @@ describe("unittests:: evaluation:: esDecorators", () => { `; assert.strictEqual(C.x, 2); }); - it("multiple initializer pipe-throughs applied in reverse order", () => { + it("multiple initializer pipe-throughs applied in order", () => { const { C } = exec` - function initializer(x) { return x + 1; } export class C { - @((t, c) => x => [...x, 3]) @((t, c) => x => [...x, 2]) + @((t, c) => x => [...x, 3]) static x: number[] = [1]; } `; @@ -1797,12 +1796,11 @@ describe("unittests:: evaluation:: esDecorators", () => { `; assert.strictEqual(C.x, 2); }); - it("multiple initializer pipe-throughs applied in reverse order", () => { + it("multiple init pipe-throughs applied in order", () => { const { C } = exec` - function initializer(x) { return x + 1; } export class C { - @((t, c) => ({ init: x => [...x, 3] })) @((t, c) => ({ init: x => [...x, 2] })) + @((t, c) => ({ init: x => [...x, 3] })) static accessor x: number[] = [1]; } `; @@ -1861,6 +1859,38 @@ describe("unittests:: evaluation:: esDecorators", () => { assert.throws(() => main("abc")); }); }); + it("accessor 'init' evaluation order (#54267)", () => { + const { main } = exec` + function minusTwo({ set }: any, ctx: any) { + return { + set(v) { set.call(this, v - 2); }, + init(v) { return v - 2; }, + }; + } + + function timesFour({ set }: any, ctx: any) { + return { + set(v) { set.call(this, v * 4); }, + init(v) { return v * 4; } + }; + } + + class C { + @minusTwo @timesFour accessor x = 5; + } + + export const main = () => { + const obj = new C(); + const afterInit = obj.x; + obj.x = 5; + const afterSet = obj.x; + return { afterInit, afterSet }; + }; + `; + const { afterInit, afterSet } = main(); + assert.strictEqual(afterInit, 12); + assert.strictEqual(afterSet, 12); + }); }); const nodeVersion = new ts.Version(process.versions.node); @@ -2162,11 +2192,11 @@ describe("unittests:: evaluation:: esDecorators", () => { // order and applied to the replacement class: "static block evaluation", "static field initializer evaluation", - "static field injected initializer evaluation 2", "static field injected initializer evaluation 1", + "static field injected initializer evaluation 2", "static auto-accessor initializer evaluation", - "static auto-accessor injected initializer evaluation 2", "static auto-accessor injected initializer evaluation 1", + "static auto-accessor injected initializer evaluation 2", // NOTE: at this point, static private fields will be installed (TODO: on the replacement class) // finally, class extra initializers are applied in the order they were added (i.e., methods before fields, @@ -2208,11 +2238,11 @@ describe("unittests:: evaluation:: esDecorators", () => { // next, instance initializers (i.e., fields, auto-accessors, and static blocks) are evaluated in document // order: "instance field initializer evaluation", - "instance field injected initializer evaluation 2", "instance field injected initializer evaluation 1", + "instance field injected initializer evaluation 2", "instance auto-accessor initializer evaluation", - "instance auto-accessor injected initializer evaluation 2", "instance auto-accessor injected initializer evaluation 1", + "instance auto-accessor injected initializer evaluation 2", // NOTE: at this point, instance private fields will be installed. // finally, statements in the constructor after the call to `super()` are evaluated: diff --git a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts new file mode 100644 index 0000000000000..3a5a979d4895d --- /dev/null +++ b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts @@ -0,0 +1,141 @@ +import * as evaluator from "../../_namespaces/evaluator"; +import * as ts from "../../_namespaces/ts"; +import { ScriptTarget } from "../../_namespaces/ts"; + +describe("unittests:: evaluation:: esDecoratorsMetadata", () => { + const nodeVersion = new ts.Version(process.versions.node); + const supportsClassStaticBlock = nodeVersion.major >= 16; + + const targets = [ + // NOTE: Class static blocks weren't supported in Node v14 + ...(supportsClassStaticBlock ? [ScriptTarget.ES2022] : []), + ScriptTarget.ES2021, + ScriptTarget.ES2015, + ]; + + for (const target of targets) { + const targetName = ts.Debug.formatEnum(target, (ts as any).ScriptTarget); + const options: ts.CompilerOptions = { target }; + const exec = (array: TemplateStringsArray) => evaluator.evaluateTypeScript(array[0], options); + + describe("examples", () => { + // see https://github.com/tc39/proposal-decorator-metadata + it(`@meta (${targetName})`, () => { + const { output } = exec` + export const output: unknown[] = []; + + function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; + } + + @meta('a', 'x') + class C { + @meta('b', 'y') + m() { } + } + + output.push(C[Symbol.metadata].a); + output.push(C[Symbol.metadata].b); + `; + assert.deepEqual(output, ["x", "y"]); + }); + + // see https://github.com/tc39/proposal-decorator-metadata#inheritance + it(`inheritance (${targetName})`, () => { + const { output } = exec` + export const output: unknown[] = []; + + function meta(key: string, value: string) { + return (_, context) => { + context.metadata[key] = value; + }; + } + + @meta('a', 'x') + class C { + @meta('b', 'y') + m() {} + } + + output.push(C[Symbol.metadata].a); + output.push(C[Symbol.metadata].b); + + class D extends C { + @meta('b', 'z') + m() {} + } + + output.push(D[Symbol.metadata].a); + output.push(D[Symbol.metadata].b); + `; + assert.deepEqual(output, [ + "x", + "y", + "x", + "z", + ]); + }); + + // see https://github.com/tc39/proposal-decorator-metadata#inheritance + it(`inheritance append(${targetName})`, () => { + const { output } = exec` + export const output: unknown[] = []; + + function appendMeta(key: string, value: string) { + return (_, context) => { + const existing = context.metadata[key] ?? []; + context.metadata[key] = [...existing, value]; + }; + } + + @appendMeta('a', 'x') + class C { } + + @appendMeta('a', 'z') + class D extends C { } + + output.push(C[Symbol.metadata].a); + output.push(D[Symbol.metadata].a); + `; + assert.deepEqual(output, [ + ["x"], + ["x", "z"], + ]); + }); + + // see https://github.com/tc39/proposal-decorator-metadata#private-metadata + it(`private metadata (${targetName})`, () => { + const { output } = exec` + export const output: unknown[] = []; + + const PRIVATE_METADATA = new WeakMap(); + function meta(key: string, value: string) { + return (_, context) => { + let metadata = PRIVATE_METADATA.get(context.metadata); + if (!metadata) { + metadata = {}; + PRIVATE_METADATA.set(context.metadata, metadata); + } + metadata[key] = value; + }; + } + + @meta('a', 'x') + class C { + @meta('b', 'y') + m() { } + } + + output.push(PRIVATE_METADATA.get(C[Symbol.metadata]).a); + output.push(PRIVATE_METADATA.get(C[Symbol.metadata]).b); + `; + assert.deepEqual(output, [ + "x", + "y", + ]); + }); + }); + } +}); diff --git a/src/testRunner/unittests/evaluation/usingDeclarations.ts b/src/testRunner/unittests/evaluation/usingDeclarations.ts new file mode 100644 index 0000000000000..701daf7208f3c --- /dev/null +++ b/src/testRunner/unittests/evaluation/usingDeclarations.ts @@ -0,0 +1,1686 @@ +import * as evaluator from "../../_namespaces/evaluator"; +import * as ts from "../../_namespaces/ts"; + +function FakeSuppressedError(error: any, suppressed: any) { + return { error, suppressed }; +} + +describe("unittests:: evaluation:: usingDeclarations", () => { + it("'using' in Block, normal completion (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + { + output.push("enter block"); + using _ = disposable; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "disposed", + "after block" + ]); + }); + + it("'using' in Block, 'throw' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + throw "error"; + } + + export function main() { + output.push("before try"); + try { + output.push("enter try"); + using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "disposed", + "error", + "after try" + ]); + }); + + it("'using' in Block, 'throw' in dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + throw "error"; + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before try"); + try { + output.push("enter try"); + using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "exit try", + "disposed", + "error", + "after try" + ]); + }); + + it("'using' in Block, 'throw' in multiple dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable_1 = { + [Symbol.dispose]() { + output.push("disposed 1"); + throw "error 1"; + } + }; + + const disposable_2 = { + [Symbol.dispose]() { + output.push("disposed 2"); + throw "error 2"; + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before try"); + try { + output.push("enter try"); + using _1 = disposable_1, _2 = disposable_2; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "exit try", + "disposed 2", + "disposed 1", + { + error: "error 1", + suppressed: "error 2" + }, + "after try" + ]); + }); + + it("'using' in Block, 'throw' in body and dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + throw "dispose error"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export function main() { + output.push("before try"); + try { + output.push("enter try"); + using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after try" + ]); + }); + + it("'using' in Block, 'throw' in body and multiple dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable_1 = { + [Symbol.dispose]() { + output.push("disposed 1"); + throw "dispose error 1"; + } + }; + + const disposable_2 = { + [Symbol.dispose]() { + output.push("disposed 2"); + throw "dispose error 2"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export function main() { + output.push("before try"); + try { + output.push("enter try"); + using _1 = disposable_1, _2 = disposable_2; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + main(); + + assert.deepEqual(output, [ + "before try", + "enter try", + "body", + "disposed 2", + "disposed 1", + { + error: "dispose error 1", + suppressed: { + error: "dispose error 2", + suppressed: "body error" + } + }, + "after try" + ]); + }); + + it("'using' in Block, 'throw' in body and dispose, no global SuppressedError (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + throw "dispose error"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export function main() { + output.push("before try"); + try { + output.push("enter try"); + using _ = disposable; + body(); + output.push("exit try"); + } + catch (e) { + output.push(e); + } + output.push("after try"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output.slice(0, 4), [ + "before try", + "enter try", + "body", + "disposed"]); + assert.instanceOf(output[4], Error); + assert.strictEqual(output[4].name, "SuppressedError"); + assert.strictEqual(output[4].error, "dispose error"); + assert.strictEqual(output[4].suppressed, "body error"); + assert.deepEqual(output.slice(5), [ + "after try" + ]); + }); + + it("'using' in Block, 'return' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + { + output.push("enter block"); + using _ = disposable; + body(); + return; + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "disposed" + ]); + }); + + it("'using' in Block, 'break' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + for (let i = 0; i < 2; i++) { + output.push("enter block"); + using _ = disposable; + body(); + break; + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "disposed", + "after block" + ]); + }); + + it("'using' in Block, 'continue' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + for (let i = 0; i < 2; i++) { + output.push("enter block"); + using _ = disposable; + body(); + continue; + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "disposed", + "enter block", + "body", + "disposed", + "after block" + ]); + }); + + it("'using' in head of 'for', normal completion (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + let i = 0; + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "enter loop", + "body", + "exit loop", + "disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for', 'throw' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + throw "error"; + } + + export function main() { + output.push("before loop"); + let i = 0; + try { + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed", + "error", + "after loop" + ]); + }); + + it("'using' in head of 'for', 'throw' in dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + throw "error"; + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + let i = 0; + try { + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "enter loop", + "body", + "exit loop", + "disposed", + "error", + "after loop" + ]); + }); + + it("'using' in head of 'for', 'throw' in body and dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + throw "dispose error"; + } + }; + + function body() { + output.push("body"); + throw "body error"; + } + + export function main() { + output.push("before loop"); + let i = 0; + try { + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after loop" + ]); + }); + + it("'using' in head of 'for', 'return' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + let i = 0; + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + return; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed" + ]); + }); + + it("'using' in head of 'for', 'break' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + let i = 0; + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + break; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for', 'continue' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + let i = 0; + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + continue; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "enter loop", + "body", + "disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for', multiple iterations (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + let i = 0; + for (using _ = disposable; i < 2; i++) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "enter loop", + "body", + "exit loop", + "disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for-of', normal completion (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + for (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "enter loop", + "body", + "exit loop", + "b disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for-of', 'throw' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "error"; + } + + export function main() { + output.push("before loop"); + try { + for (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'using' in head of 'for-of', 'throw' in dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + throw "error"; + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + try { + for (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'using' in head of 'for-of', 'throw' in body and dispose (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + throw "dispose error"; + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "body error"; + } + + export function main() { + output.push("before loop"); + try { + for (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after loop", + ]); + }); + + it("'using' in head of 'for-of', 'return' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + for (using _ of g()) { + output.push("enter loop"); + body(); + return; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + ]); + }); + + it("'using' in head of 'for-of', 'break' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + for (using _ of g()) { + output.push("enter loop"); + body(); + break; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for-of', 'continue' in body (es2018)", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export function main() { + output.push("before loop"); + for (using _ of g()) { + output.push("enter loop"); + body(); + continue; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "enter loop", + "body", + "b disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for-await-of', normal completion (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "enter loop", + "body", + "exit loop", + "b disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for-await-of', 'throw' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "error"; + } + + export async function main() { + output.push("before loop"); + try { + for await (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'using' in head of 'for-await-of', 'throw' in dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + throw "error"; + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + try { + for await (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "exit loop", + "a disposed", + "error", + "after loop", + ]); + }); + + it("'using' in head of 'for-await-of', 'throw' in body and dispose (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + throw "dispose error"; + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + throw "body error"; + } + + export async function main() { + output.push("before loop"); + try { + for await (using _ of g()) { + output.push("enter loop"); + body(); + output.push("exit loop"); + } + } + catch (e) { + output.push(e); + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }, { SuppressedError: FakeSuppressedError }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + { + error: "dispose error", + suppressed: "body error" + }, + "after loop", + ]); + }); + + it("'using' in head of 'for-await-of', 'return' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (using _ of g()) { + output.push("enter loop"); + body(); + return; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + ]); + }); + + it("'using' in head of 'for-await-of', 'break' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (using _ of g()) { + output.push("enter loop"); + body(); + break; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "after loop" + ]); + }); + + it("'using' in head of 'for-await-of', 'continue' in body (es2018)", async () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function* g() { + yield { + [Symbol.dispose]() { + output.push("a disposed"); + } + }; + yield { + [Symbol.dispose]() { + output.push("b disposed"); + } + }; + } + + function body() { + output.push("body"); + } + + export async function main() { + output.push("before loop"); + for await (using _ of g()) { + output.push("enter loop"); + body(); + continue; + } + output.push("after loop"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + await main(); + + assert.deepEqual(output, [ + "before loop", + "enter loop", + "body", + "a disposed", + "enter loop", + "body", + "b disposed", + "after loop" + ]); + }); + + it("'using' at top level of module (CommonJS)", () => { + const { output, x, y } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + output.push("before export x"); + export const x = 1; + output.push("before using"); + using _ = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + output.push("after using"); + export const y = 2; + output.push("after export y"); + `, { target: ts.ScriptTarget.ES2018, module: ts.ModuleKind.CommonJS }); + + assert.strictEqual(x, 1); + assert.strictEqual(y, 2); + assert.deepEqual(output, [ + "before export x", + "before using", + "after using", + "after export y", + "disposed" + ]); + }); + + it("'using' at top level of module (AMD)", () => { + const { output, x, y } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + output.push("before export x"); + export const x = 1; + output.push("before using"); + using _ = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + output.push("after using"); + export const y = 2; + output.push("after export y"); + `, { target: ts.ScriptTarget.ES2018, module: ts.ModuleKind.AMD }); + + assert.strictEqual(x, 1); + assert.strictEqual(y, 2); + assert.deepEqual(output, [ + "before export x", + "before using", + "after using", + "after export y", + "disposed" + ]); + }); + + it("'using' at top level of module (System)", () => { + const { output, x, y } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + output.push("before export x"); + export const x = 1; + output.push("before using"); + using _ = { + [Symbol.dispose]() { + output.push("disposed"); + } + }; + output.push("after using"); + export const y = 2; + output.push("after export y"); + `, { target: ts.ScriptTarget.ES2018, module: ts.ModuleKind.System }); + + assert.strictEqual(x, 1); + assert.strictEqual(y, 2); + assert.deepEqual(output, [ + "before export x", + "before using", + "after using", + "after export y", + "disposed" + ]); + }); + + it("'using' for 'null' value", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + { + output.push("enter block"); + using _ = null; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "after block" + ]); + }); + + it("'using' for 'undefined' value", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + { + output.push("enter block"); + using _ = undefined; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "after block" + ]); + }); + + it("'using' for non-disposable value", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + { + output.push("enter block"); + using _ = {} as any; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + assert.throws(main); + assert.deepEqual(output, [ + "before block", + "enter block", + ]); + }); + + it("'using' disposes in reverse order", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + const disposable_1 = { + [Symbol.dispose]() { + output.push("disposed 1"); + } + }; + const disposable_2 = { + [Symbol.dispose]() { + output.push("disposed 2"); + } + }; + + function body() { + output.push("body"); + } + + export function main() { + output.push("before block"); + { + output.push("enter block"); + using _ = disposable_1, __ = disposable_2; + body(); + output.push("exit block"); + } + output.push("after block"); + } + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "before block", + "enter block", + "body", + "exit block", + "disposed 2", + "disposed 1", + "after block" + ]); + }); + + it("'using' for 'function' disposable resource ", () => { + const { main, output } = evaluator.evaluateTypeScript(` + export const output: any[] = []; + + function disposable() { + const f = () => output.push("enter"); + const d = () => output.push("exit"); + return Object.assign(f, { [Symbol.dispose]: d }); + } + + export function main() { + using run = disposable(); + run(); + } + + `, { target: ts.ScriptTarget.ES2018 }); + + main(); + + assert.deepEqual(output, [ + "enter", + "exit", + ]); + }); +}); diff --git a/src/testRunner/unittests/helpers/extends.ts b/src/testRunner/unittests/helpers/extends.ts new file mode 100644 index 0000000000000..397d4821047d5 --- /dev/null +++ b/src/testRunner/unittests/helpers/extends.ts @@ -0,0 +1,32 @@ +import { dedent } from "../../_namespaces/Utils"; +import { + createServerHost, + createWatchedSystem, + libFile, + TestServerHost, +} from "./virtualFileSystemWithWatch"; + +export function getSymlinkedExtendsSys(forTsserver?: true): TestServerHost { + return (!forTsserver ? createWatchedSystem : createServerHost)({ + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-node/tsconfig.json": JSON.stringify({ + extends: "@something/tsconfig-base/tsconfig.json", + compilerOptions: { + removeComments: true, + } + }), + "/users/user/projects/myconfigs/node_modules/@something/tsconfig-base/tsconfig.json": JSON.stringify({ + compilerOptions: { composite: true }, + }), + "/users/user/projects/myproject/src/index.ts": dedent` + // some comment + export const x = 10; + `, + "/users/user/projects/myproject/src/tsconfig.json": JSON.stringify({ + extends: "@something/tsconfig-node/tsconfig.json", + }), + "/users/user/projects/myproject/node_modules/@something/tsconfig-node": { + symLink: "/users/user/projects/myconfigs/node_modules/@something/tsconfig-node", + }, + [libFile.path]: libFile.content, + }, { currentDirectory: "/users/user/projects/myproject" }); +} \ No newline at end of file diff --git a/src/testRunner/unittests/helpers/node10Result.ts b/src/testRunner/unittests/helpers/node10Result.ts new file mode 100644 index 0000000000000..5961d211f3f94 --- /dev/null +++ b/src/testRunner/unittests/helpers/node10Result.ts @@ -0,0 +1,85 @@ +import { dedent } from "../../_namespaces/Utils"; +import { FsContents } from "./contents"; +import { libFile } from "./virtualFileSystemWithWatch"; + +export function getFsConentsForNode10ResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) { + return JSON.stringify({ + name: `@types/${packageName}`, + version: "1.0.0", + types: "index.d.ts", + exports: { + ".": { + ...(addTypesCondition ? { types: "./index.d.ts" } : {}), + require: "./index.d.ts" + } + } + }, undefined, " "); +} + +export function getFsContentsForNode10ResultPackageJson(packageName: string, addTypes: boolean, addTypesCondition: boolean) { + return JSON.stringify({ + name: packageName, + version: "1.0.0", + main: "index.js", + ...(addTypes ? { types: "index.d.ts" } : {}), + exports: { + ".": { + ...(addTypesCondition ? { types: "./index.d.ts" } : {}), + import: "./index.mjs", + require: "./index.js" + } + } + }, undefined, " "); +} + +export function getFsContentsForNode10ResultDts(packageName: string) { + return `export declare const ${packageName}: number;`; +} + +function js(packageName: string) { + return `module.exports = { ${packageName}: 1 };`; +} + +function mjs(packageName: string) { + return `export const ${packageName} = 1;`; +} + +export function getFsContentsForNode10Result(): FsContents { + return { + "/home/src/projects/project/node_modules/@types/bar/package.json": getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ false), + "/home/src/projects/project/node_modules/@types/bar/index.d.ts": getFsContentsForNode10ResultDts("bar"), + "/home/src/projects/project/node_modules/bar/package.json": getFsContentsForNode10ResultPackageJson("bar", /*addTypes*/ false, /*addTypesCondition*/ false), + "/home/src/projects/project/node_modules/bar/index.js": js("bar"), + "/home/src/projects/project/node_modules/bar/index.mjs": mjs("bar"), + "/home/src/projects/project/node_modules/foo/package.json": getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ false), + "/home/src/projects/project/node_modules/foo/index.js": js("foo"), + "/home/src/projects/project/node_modules/foo/index.mjs": mjs("foo"), + "/home/src/projects/project/node_modules/foo/index.d.ts": getFsContentsForNode10ResultDts("foo"), + "/home/src/projects/project/node_modules/@types/bar2/package.json": getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ true), + "/home/src/projects/project/node_modules/@types/bar2/index.d.ts": getFsContentsForNode10ResultDts("bar2"), + "/home/src/projects/project/node_modules/bar2/package.json": getFsContentsForNode10ResultPackageJson("bar2", /*addTypes*/ false, /*addTypesCondition*/ false), + "/home/src/projects/project/node_modules/bar2/index.js": js("bar2"), + "/home/src/projects/project/node_modules/bar2/index.mjs": mjs("bar2"), + "/home/src/projects/project/node_modules/foo2/package.json": getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ true), + "/home/src/projects/project/node_modules/foo2/index.js": js("foo2"), + "/home/src/projects/project/node_modules/foo2/index.mjs": mjs("foo2"), + "/home/src/projects/project/node_modules/foo2/index.d.ts": getFsContentsForNode10ResultDts("foo2"), + "/home/src/projects/project/index.mts": dedent` + import { foo } from "foo"; + import { bar } from "bar"; + import { foo2 } from "foo2"; + import { bar2 } from "bar2"; + `, + "/home/src/projects/project/tsconfig.json": JSON.stringify({ + compilerOptions: { + moduleResolution: "node16", + traceResolution: true, + incremental: true, + strict: true, + types: [], + }, + files: ["index.mts"] + }), + [libFile.path]: libFile.content, + }; +} \ No newline at end of file diff --git a/src/testRunner/unittests/helpers/tsserver.ts b/src/testRunner/unittests/helpers/tsserver.ts index a4707cab4dcc3..0192fa5388b86 100644 --- a/src/testRunner/unittests/helpers/tsserver.ts +++ b/src/testRunner/unittests/helpers/tsserver.ts @@ -1,3 +1,4 @@ +import { incrementalVerifier } from "../../../harness/incrementalUtils"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { ActionWatchTypingLocations } from "../../_namespaces/ts.server"; @@ -36,6 +37,29 @@ export const customTypesMap = { }` }; +function replaceAll(source: string, searchValue: string, replaceValue: string): string { + let result: string | undefined = + (source as string & { replaceAll: typeof source.replace }).replaceAll?.(searchValue, replaceValue); + + if (result !== undefined) { + return result; + } + + result = ""; + const searchLength = searchValue.length; + while (true) { + const index = source.indexOf(searchValue); + if (index < 0) { + break; + } + result += source.slice(0, index); + result += replaceValue; + source = source.slice(index + searchLength); + } + result += source; + return result; +} + export interface PostExecAction { readonly success: boolean; requestId: number; @@ -115,23 +139,24 @@ export function createLoggerWritingToConsole(host: TestServerHost): Logger { }, host); } -function sanitizeLog(s: string) { - return s.replace(/Elapsed::?\s*\d+(?:\.\d+)?ms/g, "Elapsed:: *ms") - .replace(/\"updateGraphDurationMs\"\:\s*\d+(?:\.\d+)?/g, `"updateGraphDurationMs": *`) - .replace(/\"createAutoImportProviderProgramDurationMs\"\:\s*\d+(?:\.\d+)?/g, `"createAutoImportProviderProgramDurationMs": *`) - .replace(versionRegExp, `FakeVersion`) - .replace(/getCompletionData: Get current token: \d+(?:\.\d+)?/g, `getCompletionData: Get current token: *`) - .replace(/getCompletionData: Is inside comment: \d+(?:\.\d+)?/g, `getCompletionData: Is inside comment: *`) - .replace(/getCompletionData: Get previous token: \d+(?:\.\d+)?/g, `getCompletionData: Get previous token: *`) - .replace(/getCompletionsAtPosition: isCompletionListBlocker: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: isCompletionListBlocker: *`) - .replace(/getCompletionData: Semantic work: \d+(?:\.\d+)?/g, `getCompletionData: Semantic work: *`) - .replace(/getCompletionsAtPosition: getCompletionEntriesFromSymbols: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: getCompletionEntriesFromSymbols: *`) - .replace(/forEachExternalModuleToImportFrom autoImportProvider: \d+(?:\.\d+)?/g, `forEachExternalModuleToImportFrom autoImportProvider: *`) - .replace(/getExportInfoMap: done in \d+(?:\.\d+)?/g, `getExportInfoMap: done in *`) - .replace(/collectAutoImports: \d+(?:\.\d+)?/g, `collectAutoImports: *`) - .replace(/continuePreviousIncompleteResponse: \d+(?:\.\d+)?/g, `continuePreviousIncompleteResponse: *`) - .replace(/dependencies in \d+(?:\.\d+)?/g, `dependencies in *`) - .replace(/\"exportMapKey\"\:\s*\"[_$a-zA-Z][_$_$a-zA-Z0-9]*\|\d+\|/g, match => match.replace(/\|\d+\|/, `|*|`)); +function sanitizeLog(s: string): string { + s = s.replace(/Elapsed::?\s*\d+(?:\.\d+)?ms/g, "Elapsed:: *ms"); + s = s.replace(/\"updateGraphDurationMs\"\:\s*\d+(?:\.\d+)?/g, `"updateGraphDurationMs": *`); + s = s.replace(/\"createAutoImportProviderProgramDurationMs\"\:\s*\d+(?:\.\d+)?/g, `"createAutoImportProviderProgramDurationMs": *`); + s = replaceAll(s, ts.version, "FakeVersion"); + s = s.replace(/getCompletionData: Get current token: \d+(?:\.\d+)?/g, `getCompletionData: Get current token: *`); + s = s.replace(/getCompletionData: Is inside comment: \d+(?:\.\d+)?/g, `getCompletionData: Is inside comment: *`); + s = s.replace(/getCompletionData: Get previous token: \d+(?:\.\d+)?/g, `getCompletionData: Get previous token: *`); + s = s.replace(/getCompletionsAtPosition: isCompletionListBlocker: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: isCompletionListBlocker: *`); + s = s.replace(/getCompletionData: Semantic work: \d+(?:\.\d+)?/g, `getCompletionData: Semantic work: *`); + s = s.replace(/getCompletionsAtPosition: getCompletionEntriesFromSymbols: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: getCompletionEntriesFromSymbols: *`); + s = s.replace(/forEachExternalModuleToImportFrom autoImportProvider: \d+(?:\.\d+)?/g, `forEachExternalModuleToImportFrom autoImportProvider: *`); + s = s.replace(/getExportInfoMap: done in \d+(?:\.\d+)?/g, `getExportInfoMap: done in *`); + s = s.replace(/collectAutoImports: \d+(?:\.\d+)?/g, `collectAutoImports: *`); + s = s.replace(/continuePreviousIncompleteResponse: \d+(?:\.\d+)?/g, `continuePreviousIncompleteResponse: *`); + s = s.replace(/dependencies in \d+(?:\.\d+)?/g, `dependencies in *`); + s = s.replace(/\"exportMapKey\"\:\s*\"[_$a-zA-Z][_$_$a-zA-Z0-9]*\|\d+\|/g, match => match.replace(/\|\d+\|/, `|*|`)); + return s; } export function createLoggerWithInMemoryLogs(host: TestServerHost): Logger { @@ -159,14 +184,22 @@ export function appendAllScriptInfos(session: TestSession) { session.logger.log(""); } -const versionRegExp = new RegExp(ts.version, "g"); -const tsMajorMinorVersion = new RegExp(`@ts${ts.versionMajorMinor}`, "g"); function loggerToTypingsInstallerLog(logger: Logger): ts.server.typingsInstaller.Log | undefined { return logger?.loggingEnabled() ? { isEnabled: ts.returnTrue, - writeLine: s => logger.log(`TI:: [${nowString(logger.host!)}] ${sanitizeLog(s).replace(versionRegExp, "FakeVersion") - .replace(tsMajorMinorVersion, `@tsFakeMajor.Minor`) - }`), + writeLine: s => { + // This is a VERY VERY NAIVE sanitization strategy. + // If a substring containing the exact TypeScript version is found, + // even if it's unrelated to TypeScript itself, then it will be replaced, + // leaving us with two options: + // + // 1. Deal with flip-flopping baselines. + // 2. Change the TypeScript version until no matching substring is found. + // + const initialLog = sanitizeLog(s); + const pseudoSanitizedLog = replaceAll(initialLog, `@ts${ts.versionMajorMinor}`, `@tsFakeMajor.Minor`); + return logger.log(`TI:: [${nowString(logger.host!)}] ${pseudoSanitizedLog}`); + }, } : undefined; } @@ -521,7 +554,8 @@ export function createSession(host: TestServerHost, opts: Partial = new Map(); + private fs = new Map(); private time = timeIncrements; getCanonicalFileName: (s: string) => string; private toPath: (f: string) => Path; @@ -979,7 +980,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, } writtenFiles?: Map; - diff(baseline: string[], base: Map = new Map()) { + diff(baseline: string[], base = new Map()) { this.fs.forEach((newFsEntry, path) => { diffFsEntry(baseline, base.get(path), newFsEntry, this.inodes?.get(path), this.writtenFiles); }); @@ -1123,20 +1124,23 @@ function diffMap( let captionAdded = false; let baselineChanged = false; let hasChange = false; - map?.forEach((values, key) => { - const existing = old?.get(key); - let addedKey = false; - for (const value of values) { - const hasExisting = contains(existing, value); - if (deleted && hasExisting) continue; - if (!hasExisting) hasChange = true; - if (!addedKey) { - addBaseline(`${key}:${deleted || existing ? "" : " *new*"}`); - addedKey = true; + if (map) { + for (const key of arrayFrom(map.keys()).sort(compareStringsCaseSensitive)) { + const existing = old?.get(key); + let addedKey = false; + const values = map.get(key)!; + for (const value of values) { + const hasExisting = contains(existing, value); + if (deleted && hasExisting) continue; + if (!hasExisting) hasChange = true; + if (!addedKey) { + addBaseline(`${key}:${deleted || existing ? "" : " *new*"}`); + addedKey = true; + } + addBaseline(` ${JSON.stringify(value)}${deleted || hasExisting || !existing ? "" : " *new*"}`); } - addBaseline(` ${JSON.stringify(value)}${deleted || hasExisting || !existing ? "" : " *new*"}`); } - }); + } if (baselineChanged) baseline.push(""); return hasChange; diff --git a/src/testRunner/unittests/publicApi.ts b/src/testRunner/unittests/publicApi.ts index a794e71c05352..3afe25d4e9709 100644 --- a/src/testRunner/unittests/publicApi.ts +++ b/src/testRunner/unittests/publicApi.ts @@ -222,7 +222,7 @@ var x const sourceFile = ts.createSourceFile("/file.ts", content, ts.ScriptTarget.ESNext, /*setParentNodes*/ true); const paramTag = sourceFile.getChildren()[0].getChildren()[0].getChildren()[0].getChildren()[0]; const kids = paramTag.getChildren(); - const seen: Set = new Set(); + const seen = new Set(); ts.forEachChild(paramTag, n => { assert.strictEqual(/*actual*/ false, seen.has(n), "Found a duplicate-added child"); seen.add(n); diff --git a/src/testRunner/unittests/services/transpile.ts b/src/testRunner/unittests/services/transpile.ts index b9f8bc915eca2..cd6414bdf3360 100644 --- a/src/testRunner/unittests/services/transpile.ts +++ b/src/testRunner/unittests/services/transpile.ts @@ -130,7 +130,7 @@ var x = 0;`, { testVerbatimModuleSyntax: true }); - transpilesCorrectly("Generates module output", `var x = 0;`, { + transpilesCorrectly("Generates module output", `var x = 0; export {};`, { options: { compilerOptions: { module: ts.ModuleKind.AMD } } }); @@ -139,7 +139,7 @@ var x = 0;`, { testVerbatimModuleSyntax: true }); - transpilesCorrectly("Sets module name", "var x = 1;", { + transpilesCorrectly("Sets module name", "var x = 1; export {};", { options: { compilerOptions: { module: ts.ModuleKind.System, newLine: ts.NewLineKind.LineFeed }, moduleName: "NamedModule" } }); diff --git a/src/testRunner/unittests/transform.ts b/src/testRunner/unittests/transform.ts index 08b705d445695..aa277bd21f536 100644 --- a/src/testRunner/unittests/transform.ts +++ b/src/testRunner/unittests/transform.ts @@ -304,6 +304,7 @@ describe("unittests:: TransformAPI", () => { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.System, newLine: ts.NewLineKind.CarriageReturnLineFeed, + moduleDetection: ts.ModuleDetectionKind.Force, } }).outputText; diff --git a/src/testRunner/unittests/tsbuild/extends.ts b/src/testRunner/unittests/tsbuild/extends.ts new file mode 100644 index 0000000000000..196561d58b00e --- /dev/null +++ b/src/testRunner/unittests/tsbuild/extends.ts @@ -0,0 +1,11 @@ +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { verifyTscWatch } from "../helpers/tscWatch"; + +describe("unittests:: tsbuild:: extends::", () => { + verifyTscWatch({ + scenario: "extends", + subScenario: "resolves the symlink path", + sys: getSymlinkedExtendsSys, + commandLineArgs: ["-b", "src", "--extendedDiagnostics"], + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index 49815d6375066..3eb0f4595bb2f 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -161,7 +161,10 @@ describe("unittests:: tsbuild:: on 'sample1' project", () => { }, { caption: "rebuilds when tsconfig changes", - edit: fs => replaceText(fs, "/src/tests/tsconfig.json", `"composite": true`, `"composite": true, "target": "es3"`), + edit: fs => { + replaceText(fs, "/src/tests/tsconfig.json", `"composite": true`, `"composite": true, "target": "es2020"`); + fs.writeFileSync("/lib/lib.es2020.full.d.ts", libContent); + }, }, ] }); diff --git a/src/testRunner/unittests/tsc/extends.ts b/src/testRunner/unittests/tsc/extends.ts new file mode 100644 index 0000000000000..9fb78d0384073 --- /dev/null +++ b/src/testRunner/unittests/tsc/extends.ts @@ -0,0 +1,11 @@ +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { verifyTscWatch } from "../helpers/tscWatch"; + +describe("unittests:: tsc:: extends::", () => { + verifyTscWatch({ + scenario: "extends", + subScenario: "resolves the symlink path", + sys: getSymlinkedExtendsSys, + commandLineArgs: ["-p", "src", "--extendedDiagnostics"], + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tsc/moduleResolution.ts b/src/testRunner/unittests/tsc/moduleResolution.ts new file mode 100644 index 0000000000000..7be319098fcdc --- /dev/null +++ b/src/testRunner/unittests/tsc/moduleResolution.ts @@ -0,0 +1,63 @@ +import { getFsConentsForNode10ResultAtTypesPackageJson, getFsContentsForNode10Result, getFsContentsForNode10ResultDts, getFsContentsForNode10ResultPackageJson } from "../helpers/node10Result"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; + +describe("unittests:: tsc:: moduleResolution::", () => { + verifyTsc({ + scenario: "moduleResolution", + subScenario: "node10Result", + fs: () => loadProjectFromFiles(getFsContentsForNode10Result()), + commandLineArgs: ["-p", "/home/src/projects/project"], + baselinePrograms: true, + edits: [ + { + caption: "delete the node10Result in @types", + edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/@types/bar/index.d.ts"), + }, + { + caption: "delete the ndoe10Result in package/types", + edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/foo/index.d.ts"), + }, + { + caption: "add the node10Result in @types", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForNode10ResultDts("bar")), + }, + { + caption: "add the ndoe10Result in package/types", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForNode10ResultDts("foo")), + }, + { + caption: "update package.json from @types so error is fixed", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)), + }, + { + caption: "update package.json so error is fixed", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)), + }, + { + caption: "update package.json from @types so error is introduced", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)), + }, + { + caption: "update package.json so error is introduced", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)), + }, + { + caption: "delete the node10Result in @types", + edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/@types/bar2/index.d.ts"), + }, + { + caption: "delete the ndoe10Result in package/types", + edit: fs => fs.unlinkSync("/home/src/projects/project/node_modules/foo2/index.d.ts"), + }, + { + caption: "add the node10Result in @types", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForNode10ResultDts("bar2")), + }, + { + caption: "add the ndoe10Result in package/types", + edit: fs => fs.writeFileSync("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForNode10ResultDts("foo2")), + }, + ] + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tscWatch/extends.ts b/src/testRunner/unittests/tscWatch/extends.ts new file mode 100644 index 0000000000000..d70f05d9830a9 --- /dev/null +++ b/src/testRunner/unittests/tscWatch/extends.ts @@ -0,0 +1,11 @@ +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { verifyTscWatch } from "../helpers/tscWatch"; + +describe("unittests:: tsc-watch:: extends::", () => { + verifyTscWatch({ + scenario: "extends", + subScenario: "resolves the symlink path", + sys: getSymlinkedExtendsSys, + commandLineArgs: ["-w", "-p", "src", "--extendedDiagnostics"], + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tscWatch/moduleResolution.ts b/src/testRunner/unittests/tscWatch/moduleResolution.ts index 4837e7763be53..2512116a46ab1 100644 --- a/src/testRunner/unittests/tscWatch/moduleResolution.ts +++ b/src/testRunner/unittests/tscWatch/moduleResolution.ts @@ -1,4 +1,5 @@ import * as Utils from "../../_namespaces/Utils"; +import { getFsConentsForNode10ResultAtTypesPackageJson, getFsContentsForNode10Result, getFsContentsForNode10ResultDts, getFsContentsForNode10ResultPackageJson } from "../helpers/node10Result"; import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, @@ -432,4 +433,109 @@ describe("unittests:: tsc-watch:: moduleResolution", () => { } ] }); + + verifyTscWatch({ + scenario: "moduleResolution", + subScenario: "node10Result", + sys: () => createWatchedSystem(getFsContentsForNode10Result(), { currentDirectory: "/home/src/projects/project" }), + commandLineArgs: ["-w", "--extendedDiagnostics"], + edits: [ + { + caption: "delete the node10Result in @types", + edit: sys => sys.deleteFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts"), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "delete the ndoe10Result in package/types", + edit: sys => sys.deleteFile("/home/src/projects/project/node_modules/foo/index.d.ts"), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "add the node10Result in @types", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForNode10ResultDts("bar")), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "add the ndoe10Result in package/types", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForNode10ResultDts("foo")), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "update package.json from @types so error is fixed", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "update package.json so error is fixed", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "update package.json from @types so error is introduced", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "update package.json so error is introduced", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "delete the node10Result in @types", + edit: sys => sys.deleteFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts"), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "delete the ndoe10Result in package/types", + edit: sys => sys.deleteFile("/home/src/projects/project/node_modules/foo2/index.d.ts"), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "add the node10Result in @types", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForNode10ResultDts("bar2")), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + { + caption: "add the ndoe10Result in package/types", + edit: sys => sys.writeFile("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForNode10ResultDts("foo2")), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }, + ] + }); }); \ No newline at end of file diff --git a/src/testRunner/unittests/tsserver/configuredProjects.ts b/src/testRunner/unittests/tsserver/configuredProjects.ts index bd461d7056e41..a496d5612849c 100644 --- a/src/testRunner/unittests/tsserver/configuredProjects.ts +++ b/src/testRunner/unittests/tsserver/configuredProjects.ts @@ -1139,4 +1139,4 @@ describe("unittests:: tsserver:: ConfiguredProjects:: when reading tsconfig file baselineTsserverLogs("configuredProjects", "should be tolerated without crashing the server when reading tsconfig file fails", session); }); -}); \ No newline at end of file +}); diff --git a/src/testRunner/unittests/tsserver/documentRegistry.ts b/src/testRunner/unittests/tsserver/documentRegistry.ts index f3b679bb7367f..3b3a5b63150dd 100644 --- a/src/testRunner/unittests/tsserver/documentRegistry.ts +++ b/src/testRunner/unittests/tsserver/documentRegistry.ts @@ -1,8 +1,12 @@ +import { reportDocumentRegistryStats } from "../../../harness/incrementalUtils"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, + closeFilesForSession, createLoggerWithInMemoryLogs, createProjectService, + createSession, + openFilesForSession, TestProjectService, } from "../helpers/tsserver"; import { @@ -37,8 +41,8 @@ describe("unittests:: tsserver:: documentRegistry:: document registry in project const moduleInfo = service.getScriptInfo(moduleFile.path)!; assert.isDefined(moduleInfo); assert.equal(moduleInfo.isOrphan(), moduleIsOrphan); - const key = service.documentRegistry.getKeyForCompilationSettings(project.getCompilationSettings()); - assert.deepEqual(service.documentRegistry.getLanguageServiceRefCounts(moduleInfo.path, moduleInfo.scriptKind), [[key, moduleIsOrphan ? undefined : 1]]); + service.logger.log("DocumentRegistry::"); + service.logger.log(reportDocumentRegistryStats(service.documentRegistry).join("\n")); } function createServiceAndHost() { @@ -103,3 +107,39 @@ describe("unittests:: tsserver:: documentRegistry:: document registry in project baselineTsserverLogs("documentRegistry", "Caches the source file if script info is orphan, and orphan script info changes", service); }); }); + +describe("unittests:: tsserver:: documentRegistry:: works when reusing orphan script info with different scriptKind", () => { + it("works when reusing orphan script info with different scriptKind", () => { + const host = createServerHost({}); + const session = createSession(host, { useInferredProjectPerProjectRoot: true, logger: createLoggerWithInMemoryLogs(host) }); + const newText = "exrpot const x = 10;"; + const content = `import x from 'react';\n${newText}`; + openFilesForSession([ + { file: "^/inmemory/model/6", content, scriptKindName: "TSX", projectRootPath: "/users/user/projects/san" }, + { file: "^/inmemory/model/4", content, scriptKindName: "TSX", projectRootPath: "/users/user/projects/san" }, + ], session); + closeFilesForSession(["^/inmemory/model/4"], session); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.UpdateOpen, + arguments: { + changedFiles: [{ + fileName: "^/inmemory/model/6", + textChanges: [{ + newText, + start: { line: 1, offset: 1 }, + end: { line: 2, offset: newText.length + 1 } // Remove the import so that structure is not reused + }] + }], + openFiles: [ + { + file: "^/inmemory/model/4", + fileContent: newText, + projectRootPath: "/users/user/projects/san", // Add same document with different script kind + scriptKindName: "TS" + }, + ] + } + }); + baselineTsserverLogs("documentRegistry", "works when reusing orphan script info with different scriptKind", session); + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/tsserver/extends.ts b/src/testRunner/unittests/tsserver/extends.ts new file mode 100644 index 0000000000000..da16b435cd1d8 --- /dev/null +++ b/src/testRunner/unittests/tsserver/extends.ts @@ -0,0 +1,16 @@ +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { + baselineTsserverLogs, + createLoggerWithInMemoryLogs, + createSession, + openFilesForSession, +} from "../helpers/tsserver"; + +describe("unittests:: tsserver:: extends::", () => { + it("resolves the symlink path", () => { + const host = getSymlinkedExtendsSys(/*forTsserver*/ true); + const session = createSession(host, { canUseEvents: true, logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession(["/users/user/projects/myproject/src/index.ts"], session); + baselineTsserverLogs("tsserver", "resolves the symlink path", session); + }); +}); \ No newline at end of file diff --git a/src/testRunner/unittests/services/findAllReferences.ts b/src/testRunner/unittests/tsserver/findAllReferences.ts similarity index 100% rename from src/testRunner/unittests/services/findAllReferences.ts rename to src/testRunner/unittests/tsserver/findAllReferences.ts diff --git a/src/testRunner/unittests/tsserver/goToDefinition.ts b/src/testRunner/unittests/tsserver/goToDefinition.ts new file mode 100644 index 0000000000000..852fc7d5588b3 --- /dev/null +++ b/src/testRunner/unittests/tsserver/goToDefinition.ts @@ -0,0 +1,140 @@ +import { protocol } from "../../_namespaces/ts.server"; +import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createSession } from "../helpers/tsserver"; +import { createServerHost, File } from "../helpers/virtualFileSystemWithWatch"; + +describe("unittests:: services:: goToDefinition", () => { + it("does not issue errors on jsdoc in TS", () => { + const files: File[] = [ + { + path: "/packages/babel-loader/tsconfig.json", + content: + ` +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], +} +` + }, + { + path: "/packages/babel-loader/src/index.ts", + content: + ` +declare class Stuff { + /** For more thorough tests, use {@link checkFooIs} */ + checkFooLengthIs(len: number): void; + + checkFooIs(value: object): void; +} +` + }, + ]; + const host = createServerHost(files); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + // Open files in the two configured projects + session.executeCommandSeq({ + command: protocol.CommandTypes.UpdateOpen, + arguments: { + openFiles: [ + { + file: files[1].path, // babel-loader/src/index.ts + fileContent: files[1].content, + } + ] + } + }); + session.executeCommandSeq({ + command: protocol.CommandTypes.Definition, + arguments: { + line: 3, + offset: 45, + file: "/packages/babel-loader/src/index.ts", + }, + }); + // Now change `babel-loader` project to no longer import `core` project + session.executeCommandSeq({ + command: protocol.CommandTypes.SemanticDiagnosticsSync, + arguments: { + file: "/packages/babel-loader/src/index.ts", + } + }); + baselineTsserverLogs("goToDefinition", "does not issue errors on jsdoc in TS", session); + + }); + it("does not issue errors on jsdoc in TS", () => { + const files: File[] = [ + { + path: "/packages/babel-loader/tsconfig.json", + content: + ` +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "strict": true, + "esModuleInterop": true, + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], +} +` + }, + { + path: "/packages/babel-loader/src/index.ts", + content: + ` +declare class Stuff { + /** + * Register a function to be run on mod initialization... + * + * {@link https://lua-api.factorio.com/latest/LuaBootstrap.html#LuaBootstrap.on_init View documentation} + * @param f The handler for this event. Passing nil will unregister it. + * @remarks For more context, refer to the {@link https://lua-api.factorio.com/latest/Data-Lifecycle.html Data Lifecycle} page. + * @example Initialize a players table in global for later use. + * + */ + on_init(f: (() => void) | undefined): void +} +` + }, + ]; + const host = createServerHost(files); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + // Open files in the two configured projects + session.executeCommandSeq({ + command: protocol.CommandTypes.UpdateOpen, + arguments: { + openFiles: [ + { + file: files[1].path, // babel-loader/src/index.ts + fileContent: files[1].content, + } + ] + } + }); + session.executeCommandSeq({ + command: protocol.CommandTypes.Definition, + arguments: { + line: 6, + offset: 13, + file: "/packages/babel-loader/src/index.ts", + }, + }); + // Now change `babel-loader` project to no longer import `core` project + session.executeCommandSeq({ + command: protocol.CommandTypes.SemanticDiagnosticsSync, + arguments: { + file: "/packages/babel-loader/src/index.ts", + } + }); + baselineTsserverLogs("goToDefinition", "does not issue errors on jsdoc in TS2", session); + + }); +}); diff --git a/src/testRunner/unittests/tsserver/moduleResolution.ts b/src/testRunner/unittests/tsserver/moduleResolution.ts index 7dca1d93bfcbe..f0ff49c993cfb 100644 --- a/src/testRunner/unittests/tsserver/moduleResolution.ts +++ b/src/testRunner/unittests/tsserver/moduleResolution.ts @@ -1,4 +1,5 @@ import * as Utils from "../../_namespaces/Utils"; +import { getFsConentsForNode10ResultAtTypesPackageJson, getFsContentsForNode10Result, getFsContentsForNode10ResultDts, getFsContentsForNode10ResultPackageJson } from "../helpers/node10Result"; import { baselineTsserverLogs, createLoggerWithInMemoryLogs, @@ -130,4 +131,49 @@ describe("unittests:: tsserver:: moduleResolution", () => { baselineTsserverLogs("moduleResolution", "package json file is edited when package json with type module exists", session); }); }); + + it("node10Result", () => { + const host = createServerHost(getFsContentsForNode10Result()); + const session = createSession(host, { canUseEvents: true, logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession(["/home/src/projects/project/index.mts"], session); + verifyGetErrRequest({ + files: ["/home/src/projects/project/index.mts"], + session, + }); + host.deleteFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts"); + verifyErrors(); + host.deleteFile("/home/src/projects/project/node_modules/foo/index.d.ts"); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/@types/bar/index.d.ts", getFsContentsForNode10ResultDts("bar")); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/foo/index.d.ts", getFsContentsForNode10ResultDts("foo")); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/@types/bar/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar", /*addTypesCondition*/ true)); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/foo/package.json", getFsContentsForNode10ResultPackageJson("foo", /*addTypes*/ true, /*addTypesCondition*/ true)); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/@types/bar2/package.json", getFsConentsForNode10ResultAtTypesPackageJson("bar2", /*addTypesCondition*/ false)); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/foo2/package.json", getFsContentsForNode10ResultPackageJson("foo2", /*addTypes*/ true, /*addTypesCondition*/ false)); + verifyErrors(); + host.deleteFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts"); + verifyErrors(); + host.deleteFile("/home/src/projects/project/node_modules/foo2/index.d.ts"); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/@types/bar2/index.d.ts", getFsContentsForNode10ResultDts("bar2")); + verifyErrors(); + host.writeFile("/home/src/projects/project/node_modules/foo2/index.d.ts", getFsContentsForNode10ResultDts("foo2")); + verifyErrors(); + + baselineTsserverLogs("moduleResolution", "node10Result", session); + + function verifyErrors() { + host.runQueuedTimeoutCallbacks(); + host.runQueuedImmediateCallbacks(); + verifyGetErrRequest({ + files: ["/home/src/projects/project/index.mts"], + session, + }); + } + }); }); \ No newline at end of file diff --git a/src/testRunner/unittests/tsserver/refactors.ts b/src/testRunner/unittests/tsserver/refactors.ts index 49ae2f77aeb57..f27d828a93ec9 100644 --- a/src/testRunner/unittests/tsserver/refactors.ts +++ b/src/testRunner/unittests/tsserver/refactors.ts @@ -96,28 +96,103 @@ describe("unittests:: tsserver:: refactors", () => { }); it("handles moving statement to an existing file", () => { - const aTs: File = { path: "/Foo/a.ts", content: "const x = 0;" }; - const bTs: File = { - path: "/Foo/b.ts", content: `import {} from "./bar"; -const a = 1;`}; - const tsconfig: File = { path: "/Foo/tsconfig.json", content: `{ "files": ["./a.ts", "./b.ts"] }` }; - const host = createServerHost([aTs, bTs, tsconfig]); - const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); - openFilesForSession([aTs], session); + const aTs: File = { path: "/Foo/a.ts", content: "const x = 0;" }; + const bTs: File = { + path: "/Foo/b.ts", content: `import {} from "./bar"; + const a = 1;`}; + const tsconfig: File = { path: "/Foo/tsconfig.json", content: `{ "files": ["./a.ts", "./b.ts"] }` }; + const host = createServerHost([aTs, bTs, tsconfig]); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession([aTs], session); - session.executeCommandSeq({ - command: ts.server.protocol.CommandTypes.GetEditsForRefactor, - arguments: { - file: aTs.path, - startLine: 1, - startOffset: 1, - endLine: 2, - endOffset: aTs.content.length, - refactor: "Move to file", - action: "Move to file", - interactiveRefactorArguments: { targetFile: "/Foo/b.ts" }, - } + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.GetEditsForRefactor, + arguments: { + file: aTs.path, + startLine: 1, + startOffset: 1, + endLine: 2, + endOffset: aTs.content.length, + refactor: "Move to file", + action: "Move to file", + interactiveRefactorArguments: { targetFile: "/Foo/b.ts" }, + } + }); + baselineTsserverLogs("refactors", "handles moving statement to an existing file", session); }); - baselineTsserverLogs("refactors", "handles moving statement to an existing file", session); + + it("handles moving statements to a non-TS file", () => { + const aTs: File = { + path: "/Foo/a.ts", + content: "const x = 0;" + }; + const bTxt: File = { + path: "/Foo/b.txt", + content: "" + }; + const tsconfig: File = { + path: "/Foo/tsconfig.json", + content: `{ "files": ["./a.ts"] }` + }; + const host = createServerHost([aTs, bTxt, tsconfig]); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession([aTs], session); + + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.GetEditsForRefactor, + arguments: { + file: aTs.path, + startLine: 1, + startOffset: 1, + endLine: 2, + endOffset: aTs.content.length, + refactor: "Move to file", + action: "Move to file", + interactiveRefactorArguments: { targetFile: "/Foo/b.txt" }, + } + }); + baselineTsserverLogs("refactors", "handles moving statements to a non-TS file", session); + }); + + it("handles moving statements to a TS file that is not included in the TS project", () => { + const fooATs: File = { + path: "/Foo/a.ts", + content: "" + }; + const fooTsconfig: File = { + path: "/Foo/tsconfig.json", + content: `{ "files": ["./a.ts"] }` + }; + + const barATs: File = { + path: "/Bar/a.ts", + content: [ + "const a = 1;", + "const b = 2;", + "console.log(a, b);", + ].join("\n") + }; + const barTsconfig: File = { + path: "/Bar/tsconfig.json", + content: `{ "files": ["./a.ts"] }` + }; + const host = createServerHost([fooATs, fooTsconfig, barATs, barTsconfig]); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession([barATs], session); + + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.GetEditsForRefactor, + arguments: { + file: barATs.path, + startLine: 1, + startOffset: 1, + endLine: 1, + endOffset: 13, + refactor: "Move to file", + action: "Move to file", + interactiveRefactorArguments: { targetFile: "/Foo/a.ts" }, + } + }); + baselineTsserverLogs("refactors", "handles moving statements to a TS file that is not included in the TS project", session); }); }); diff --git a/src/testRunner/unittests/tsserver/session.ts b/src/testRunner/unittests/tsserver/session.ts index 21b76867d54a8..572ee1974b300 100644 --- a/src/testRunner/unittests/tsserver/session.ts +++ b/src/testRunner/unittests/tsserver/session.ts @@ -1,5 +1,6 @@ import { expect } from "chai"; +import { incrementalVerifier } from "../../../harness/incrementalUtils"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { @@ -55,7 +56,8 @@ describe("unittests:: tsserver:: Session:: General functionality", () => { byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: nullLogger(), - canUseEvents: true + canUseEvents: true, + incrementalVerifier, }; return new TestSession(opts); } @@ -387,7 +389,8 @@ describe("unittests:: tsserver:: Session:: exceptions", () => { byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: nullLogger(), - canUseEvents: true + canUseEvents: true, + incrementalVerifier, }); this.addProtocolHandler(command, this.exceptionRaisingHandler); } @@ -434,7 +437,8 @@ describe("unittests:: tsserver:: Session:: how Session is extendable via subclas byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: createHasErrorMessageLogger(), - canUseEvents: true + canUseEvents: true, + incrementalVerifier, }); this.addProtocolHandler(this.customHandler, () => { return { response: undefined, responseRequired: true }; @@ -502,7 +506,8 @@ describe("unittests:: tsserver:: Session:: an example of using the Session API t byteLength: Buffer.byteLength, hrtime: process.hrtime, logger: createHasErrorMessageLogger(), - canUseEvents: true + canUseEvents: true, + incrementalVerifier, }); this.addProtocolHandler("echo", (req: ts.server.protocol.Request) => ({ response: req.arguments, diff --git a/tests/baselines/reference/1.0lib-noErrors.js b/tests/baselines/reference/1.0lib-noErrors.js index 3dac98d9e5647..66019df885349 100644 --- a/tests/baselines/reference/1.0lib-noErrors.js +++ b/tests/baselines/reference/1.0lib-noErrors.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/decorators/1.0lib-noErrors.ts] //// + //// [1.0lib-noErrors.ts] /* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/tests/baselines/reference/1.0lib-noErrors.symbols b/tests/baselines/reference/1.0lib-noErrors.symbols index d67952e201c98..5fa9f82ee6de7 100644 --- a/tests/baselines/reference/1.0lib-noErrors.symbols +++ b/tests/baselines/reference/1.0lib-noErrors.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/decorators/1.0lib-noErrors.ts === +//// [tests/cases/conformance/decorators/1.0lib-noErrors.ts] //// + +=== 1.0lib-noErrors.ts === /* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use diff --git a/tests/baselines/reference/1.0lib-noErrors.types b/tests/baselines/reference/1.0lib-noErrors.types index 7d3633e01a8c3..fd3a96640ca39 100644 --- a/tests/baselines/reference/1.0lib-noErrors.types +++ b/tests/baselines/reference/1.0lib-noErrors.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/decorators/1.0lib-noErrors.ts === +//// [tests/cases/conformance/decorators/1.0lib-noErrors.ts] //// + +=== 1.0lib-noErrors.ts === /* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use diff --git a/tests/baselines/reference/2dArrays.js b/tests/baselines/reference/2dArrays.js index cb98b231e88e8..67ca55be5f1e1 100644 --- a/tests/baselines/reference/2dArrays.js +++ b/tests/baselines/reference/2dArrays.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/2dArrays.ts] //// + //// [2dArrays.ts] class Cell { } diff --git a/tests/baselines/reference/2dArrays.symbols b/tests/baselines/reference/2dArrays.symbols index 27826349a25e7..3974e5e803d82 100644 --- a/tests/baselines/reference/2dArrays.symbols +++ b/tests/baselines/reference/2dArrays.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/2dArrays.ts === +//// [tests/cases/compiler/2dArrays.ts] //// + +=== 2dArrays.ts === class Cell { >Cell : Symbol(Cell, Decl(2dArrays.ts, 0, 0)) } diff --git a/tests/baselines/reference/2dArrays.types b/tests/baselines/reference/2dArrays.types index 341a8234bded4..388b956520fcc 100644 --- a/tests/baselines/reference/2dArrays.types +++ b/tests/baselines/reference/2dArrays.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/2dArrays.ts === +//// [tests/cases/compiler/2dArrays.ts] //// + +=== 2dArrays.ts === class Cell { >Cell : Cell } diff --git a/tests/baselines/reference/APILibCheck.symbols b/tests/baselines/reference/APILibCheck.symbols index 73bfb529ba365..e17d57d72f16a 100644 --- a/tests/baselines/reference/APILibCheck.symbols +++ b/tests/baselines/reference/APILibCheck.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/index.ts === +//// [tests/cases/compiler/APILibCheck.ts] //// + +=== index.ts === import ts = require("typescript"); >ts : Symbol(ts, Decl(index.ts, 0, 0)) diff --git a/tests/baselines/reference/APILibCheck.types b/tests/baselines/reference/APILibCheck.types index 5b06711a8022c..6c30c99d7c432 100644 --- a/tests/baselines/reference/APILibCheck.types +++ b/tests/baselines/reference/APILibCheck.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/index.ts === +//// [tests/cases/compiler/APILibCheck.ts] //// + +=== index.ts === import ts = require("typescript"); >ts : typeof ts diff --git a/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.symbols b/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.symbols index cc0e8c5e74632..b82453bb26fb3 100644 --- a/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module Point { >Point : Symbol(Point, Decl(module.d.ts, 0, 0), Decl(function.d.ts, 0, 0)) @@ -8,13 +10,13 @@ declare module Point { >y : Symbol(y, Decl(module.d.ts, 1, 35)) } -=== tests/cases/conformance/internalModules/DeclarationMerging/function.d.ts === +=== function.d.ts === declare function Point(): { x: number; y: number; } >Point : Symbol(Point, Decl(module.d.ts, 0, 0), Decl(function.d.ts, 0, 0)) >x : Symbol(x, Decl(function.d.ts, 0, 27)) >y : Symbol(y, Decl(function.d.ts, 0, 38)) -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var cl: { x: number; y: number; } >cl : Symbol(cl, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) >x : Symbol(x, Decl(test.ts, 0, 9)) diff --git a/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.types b/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.types index da82a2ff6621a..533d89c17fd5c 100644 --- a/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.types +++ b/tests/baselines/reference/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module Point { >Point : typeof Point @@ -8,13 +10,13 @@ declare module Point { >y : number } -=== tests/cases/conformance/internalModules/DeclarationMerging/function.d.ts === +=== function.d.ts === declare function Point(): { x: number; y: number; } >Point : typeof Point >x : number >y : number -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var cl: { x: number; y: number; } >cl : { x: number; y: number; } >x : number diff --git a/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.symbols index 3db6d644d988b..4df1fa7203ecc 100644 --- a/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module A { >A : Symbol(A, Decl(module.d.ts, 0, 0), Decl(class.d.ts, 0, 0)) @@ -17,7 +19,7 @@ declare module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/class.d.ts === +=== class.d.ts === declare module A { >A : Symbol(A, Decl(module.d.ts, 0, 0), Decl(class.d.ts, 0, 0)) @@ -36,7 +38,7 @@ declare module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var p: { x: number; y: number; } >p : Symbol(p, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) >x : Symbol(x, Decl(test.ts, 0, 8)) diff --git a/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.types b/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.types index 92612490eb4c0..6bf75cf28edbe 100644 --- a/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndAmbientWithSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module A { >A : typeof A @@ -17,7 +19,7 @@ declare module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/class.d.ts === +=== class.d.ts === declare module A { >A : typeof A @@ -36,7 +38,7 @@ declare module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var p: { x: number; y: number; } >p : { x: number; y: number; } >x : number diff --git a/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.symbols index 8a776358b4cf2..274a46b665e06 100644 --- a/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module A { >A : Symbol(A, Decl(module.d.ts, 0, 0), Decl(classPoint.ts, 0, 0)) @@ -17,7 +19,7 @@ declare module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts === +=== classPoint.ts === module A { >A : Symbol(A, Decl(module.d.ts, 0, 0), Decl(classPoint.ts, 0, 0)) @@ -30,7 +32,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var p: { x: number; y: number; } >p : Symbol(p, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) >x : Symbol(x, Decl(test.ts, 0, 8)) diff --git a/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.types b/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.types index 83359d5ae2792..850dc4d2b57c2 100644 --- a/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module A { >A : typeof A @@ -17,7 +19,7 @@ declare module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts === +=== classPoint.ts === module A { >A : typeof A @@ -30,7 +32,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var p: { x: number; y: number; } >p : { x: number; y: number; } >x : number diff --git a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.symbols b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.symbols index ccb8662712faa..b24ae8c7471fe 100644 --- a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module Point { >Point : Symbol(Point, Decl(module.d.ts, 0, 0), Decl(function.ts, 0, 0)) @@ -8,7 +10,7 @@ declare module Point { >y : Symbol(y, Decl(module.d.ts, 1, 35)) } -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +=== function.ts === function Point() { >Point : Symbol(Point, Decl(module.d.ts, 0, 0), Decl(function.ts, 0, 0)) @@ -17,7 +19,7 @@ function Point() { >y : Symbol(y, Decl(function.ts, 1, 18)) } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var cl: { x: number; y: number; } >cl : Symbol(cl, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) >x : Symbol(x, Decl(test.ts, 0, 9)) diff --git a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.types b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.types index f8525c4e426c8..a621681f76614 100644 --- a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.types +++ b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.d.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts] //// + +=== module.d.ts === declare module Point { >Point : typeof Point @@ -8,7 +10,7 @@ declare module Point { >y : number } -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +=== function.ts === function Point() { >Point : typeof Point @@ -20,7 +22,7 @@ function Point() { >0 : 0 } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var cl: { x: number; y: number; } >cl : { x: number; y: number; } >x : number diff --git a/tests/baselines/reference/ArrowFunction1.errors.txt b/tests/baselines/reference/ArrowFunction1.errors.txt index 96f77039224a1..d630191bd0a9d 100644 --- a/tests/baselines/reference/ArrowFunction1.errors.txt +++ b/tests/baselines/reference/ArrowFunction1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts(1,13): error TS1110: Type expected. +ArrowFunction1.ts(1,13): error TS1110: Type expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts (1 errors) ==== +==== ArrowFunction1.ts (1 errors) ==== var v = (a: ) => { ~ !!! error TS1110: Type expected. diff --git a/tests/baselines/reference/ArrowFunction1.js b/tests/baselines/reference/ArrowFunction1.js index 1923c3a1d8e4a..a29e21b1fb9c4 100644 --- a/tests/baselines/reference/ArrowFunction1.js +++ b/tests/baselines/reference/ArrowFunction1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts] //// + //// [ArrowFunction1.ts] var v = (a: ) => { diff --git a/tests/baselines/reference/ArrowFunction1.symbols b/tests/baselines/reference/ArrowFunction1.symbols index f0f7b6fe4102d..a83b66425da7c 100644 --- a/tests/baselines/reference/ArrowFunction1.symbols +++ b/tests/baselines/reference/ArrowFunction1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts] //// + +=== ArrowFunction1.ts === var v = (a: ) => { >v : Symbol(v, Decl(ArrowFunction1.ts, 0, 3)) >a : Symbol(a, Decl(ArrowFunction1.ts, 0, 9)) diff --git a/tests/baselines/reference/ArrowFunction1.types b/tests/baselines/reference/ArrowFunction1.types index eb7da8cb6e4c2..90b0ebd304f3c 100644 --- a/tests/baselines/reference/ArrowFunction1.types +++ b/tests/baselines/reference/ArrowFunction1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts] //// + +=== ArrowFunction1.ts === var v = (a: ) => { >v : (a: any) => void >(a: ) => { } : (a: any) => void diff --git a/tests/baselines/reference/ArrowFunction3.errors.txt b/tests/baselines/reference/ArrowFunction3.errors.txt index 8fd4bb742f552..f9db1c60bb17e 100644 --- a/tests/baselines/reference/ArrowFunction3.errors.txt +++ b/tests/baselines/reference/ArrowFunction3.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,10): error TS2304: Cannot find name 'a'. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,12): error TS1005: ',' expected. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts(1,14): error TS1005: ';' expected. +ArrowFunction3.ts(1,10): error TS2304: Cannot find name 'a'. +ArrowFunction3.ts(1,12): error TS1005: ',' expected. +ArrowFunction3.ts(1,14): error TS1005: ';' expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts (3 errors) ==== +==== ArrowFunction3.ts (3 errors) ==== var v = (a): => { ~ !!! error TS2304: Cannot find name 'a'. diff --git a/tests/baselines/reference/ArrowFunction3.js b/tests/baselines/reference/ArrowFunction3.js index 41182da2eeddb..eb6b8614e2fec 100644 --- a/tests/baselines/reference/ArrowFunction3.js +++ b/tests/baselines/reference/ArrowFunction3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts] //// + //// [ArrowFunction3.ts] var v = (a): => { diff --git a/tests/baselines/reference/ArrowFunction3.symbols b/tests/baselines/reference/ArrowFunction3.symbols index 3eb9c6c895b01..9d854cf614214 100644 --- a/tests/baselines/reference/ArrowFunction3.symbols +++ b/tests/baselines/reference/ArrowFunction3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts] //// + +=== ArrowFunction3.ts === var v = (a): => { >v : Symbol(v, Decl(ArrowFunction3.ts, 0, 3)) diff --git a/tests/baselines/reference/ArrowFunction3.types b/tests/baselines/reference/ArrowFunction3.types index c168b835875d1..52036bcd95b32 100644 --- a/tests/baselines/reference/ArrowFunction3.types +++ b/tests/baselines/reference/ArrowFunction3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts] //// + +=== ArrowFunction3.ts === var v = (a): => { >v : any >(a) : any diff --git a/tests/baselines/reference/ArrowFunction4.js b/tests/baselines/reference/ArrowFunction4.js index e9759abb18360..a60136f19c72f 100644 --- a/tests/baselines/reference/ArrowFunction4.js +++ b/tests/baselines/reference/ArrowFunction4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction4.ts] //// + //// [ArrowFunction4.ts] var v = (a, b) => { diff --git a/tests/baselines/reference/ArrowFunction4.symbols b/tests/baselines/reference/ArrowFunction4.symbols index cd19b8cdac9d1..1f8d7a0e0d80e 100644 --- a/tests/baselines/reference/ArrowFunction4.symbols +++ b/tests/baselines/reference/ArrowFunction4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction4.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction4.ts] //// + +=== ArrowFunction4.ts === var v = (a, b) => { >v : Symbol(v, Decl(ArrowFunction4.ts, 0, 3)) >a : Symbol(a, Decl(ArrowFunction4.ts, 0, 9)) diff --git a/tests/baselines/reference/ArrowFunction4.types b/tests/baselines/reference/ArrowFunction4.types index 1d049f193e63e..e6ff00d50e3cd 100644 --- a/tests/baselines/reference/ArrowFunction4.types +++ b/tests/baselines/reference/ArrowFunction4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction4.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction4.ts] //// + +=== ArrowFunction4.ts === var v = (a, b) => { >v : (a: any, b: any) => void >(a, b) => { } : (a: any, b: any) => void diff --git a/tests/baselines/reference/ArrowFunctionExpression1.errors.txt b/tests/baselines/reference/ArrowFunctionExpression1.errors.txt index 593b75d4ee248..37476504d4708 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.errors.txt +++ b/tests/baselines/reference/ArrowFunctionExpression1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ArrowFunctionExpression1.ts(1,10): error TS2369: A parameter property is only allowed in a constructor implementation. +ArrowFunctionExpression1.ts(1,10): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/ArrowFunctionExpression1.ts (1 errors) ==== +==== ArrowFunctionExpression1.ts (1 errors) ==== var v = (public x: string) => { }; ~~~~~~~~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunctionExpression1.js b/tests/baselines/reference/ArrowFunctionExpression1.js index 21c71af243c6b..aa18c62926bd5 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.js +++ b/tests/baselines/reference/ArrowFunctionExpression1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ArrowFunctionExpression1.ts] //// + //// [ArrowFunctionExpression1.ts] var v = (public x: string) => { }; diff --git a/tests/baselines/reference/ArrowFunctionExpression1.symbols b/tests/baselines/reference/ArrowFunctionExpression1.symbols index 5fe82a1c15b6f..10cdbea5e9135 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.symbols +++ b/tests/baselines/reference/ArrowFunctionExpression1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ArrowFunctionExpression1.ts === +//// [tests/cases/compiler/ArrowFunctionExpression1.ts] //// + +=== ArrowFunctionExpression1.ts === var v = (public x: string) => { }; >v : Symbol(v, Decl(ArrowFunctionExpression1.ts, 0, 3)) >x : Symbol(x, Decl(ArrowFunctionExpression1.ts, 0, 9)) diff --git a/tests/baselines/reference/ArrowFunctionExpression1.types b/tests/baselines/reference/ArrowFunctionExpression1.types index 122f949c3c341..a83352a1583f8 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.types +++ b/tests/baselines/reference/ArrowFunctionExpression1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ArrowFunctionExpression1.ts === +//// [tests/cases/compiler/ArrowFunctionExpression1.ts] //// + +=== ArrowFunctionExpression1.ts === var v = (public x: string) => { }; >v : (x: string) => void >(public x: string) => { } : (x: string) => void diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt index aa97ca3caa5af..ce6f836d168c6 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(10,19): error TS2304: Cannot find name 'T'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(20,12): error TS2304: Cannot find name 'T'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(22,23): error TS2304: Cannot find name 'T'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(35,26): error TS2304: Cannot find name 'T'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): error TS2304: Cannot find name 'T'. +ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(10,19): error TS2304: Cannot find name 'T'. +ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(20,12): error TS2304: Cannot find name 'T'. +ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(22,23): error TS2304: Cannot find name 'T'. +ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(35,26): error TS2304: Cannot find name 'T'. +ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): error TS2304: Cannot find name 'T'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts (5 errors) ==== +==== ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts (5 errors) ==== // all expected to be errors class clodule1{ diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js index f266c117dff68..8dc0f6cd84cc4 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts] //// + //// [ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts] // all expected to be errors diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.symbols index 5f4e77658bf8f..01a91f6155152 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts] //// + +=== ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts === // all expected to be errors class clodule1{ diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.types b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.types index a2132fefdbc22..3f755490c27da 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts] //// + +=== ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts === // all expected to be errors class clodule1{ diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt index d200258fdb17c..4fdf96cc4fee2 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. +ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. +ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== +==== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== class clodule { id: string; value: T; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js index abe399154dd1c..30517849bd828 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts] //// + //// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts] class clodule { id: string; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.symbols index 791f185a24757..98c1dc7a8c670 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts] //// + +=== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts === class clodule { >clodule : Symbol(clodule, Decl(ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts, 5, 1)) >T : Symbol(T, Decl(ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts, 0, 14)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.types index 733d537f05c61..cdf0ff8c231fd 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts] //// + +=== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts === class clodule { >clodule : clodule diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt index 474613e283fd9..e85d3f1c32c2a 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. +ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'. +ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== +==== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (2 errors) ==== class clodule { id: string; value: T; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js index 4bd5f9c7d370f..58640ad1de03c 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts] //// + //// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts] class clodule { id: string; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.symbols index f4acdc9a601df..2e9f3c9f709b7 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts] //// + +=== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts === class clodule { >clodule : Symbol(clodule, Decl(ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts, 5, 1)) >T : Symbol(T, Decl(ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts, 0, 14)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.types index 355a17e393df6..2aba9cac597df 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts] //// + +=== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts === class clodule { >clodule : clodule diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt index d2847665c7c0a..10513ef9e6d1e 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(11,24): error TS2341: Property 'sfn' is private and only accessible within class 'clodule'. +ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(11,24): error TS2341: Property 'sfn' is private and only accessible within class 'clodule'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts (1 errors) ==== +==== ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts (1 errors) ==== class clodule { id: string; value: T; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js index 6620c4fabf87e..dea890d7551cb 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts] //// + //// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts] class clodule { id: string; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.symbols index 13cdbdf66aef8..43c6761d59973 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts] //// + +=== ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts === class clodule { >clodule : Symbol(clodule, Decl(ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts, 0, 0), Decl(ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts, 5, 1)) >T : Symbol(T, Decl(ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts, 0, 14)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.types b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.types index d73f40cc6fcbb..2ba58b6c38dfe 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts] //// + +=== ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts === class clodule { >clodule : clodule diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt index a59953e7fb2bb..5c973d3184374 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ==== +==== ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ==== class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js index de0bb3cd400a6..4b9db74210d12 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts] //// + //// [ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts] class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.symbols index c465566bfb92b..c3f8496f50638 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts === class Point { >Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts, 4, 1)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.types index bc5157a26c82c..1124c18aee97d 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts === class Point { >Point : Point diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js index 50acdf1b9dadc..05a7992430e6e 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts] //// + //// [ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts] class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.symbols index 14e9ebf612402..374aa13a84987 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts === class Point { >Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts, 4, 1)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types index 2bcde7c656a5c..2f4b390e2568d 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts === class Point { >Point : Point diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt index 88ad9f358bef2..e42c4b7e66a8b 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(8,16): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. -tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(8,16): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'. +ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20): error TS2300: Duplicate identifier 'Origin'. -==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (4 errors) ==== +==== ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (4 errors) ==== class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js index db07e83eb7f81..24a032ed00385 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts] //// + //// [ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts] class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.symbols index dd940f70e01fc..4c21038bd4754 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts === class Point { >Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts, 4, 1)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.types index f5d679df487a1..54dfc67e7bf53 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts === class Point { >Point : Point diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js index 246acf9af117b..9d84a57d7de15 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts] //// + //// [ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts] class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.symbols index b995c02929fea..706a207c386ef 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts === class Point { >Point : Symbol(Point, Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 0, 0), Decl(ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts, 4, 1)) diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types index 287012d0d6a21..6fc3072449037 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts] //// + +=== ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts === class Point { >Point : Point diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.js index d687b5ffa0ea3..3fcff5b439277 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts] //// + //// [ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts] diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.symbols b/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.symbols index 84b8619920f3d..758a93da7d95a 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.symbols +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.symbols @@ -1,2 +1,4 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts] //// + +=== ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts === diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.types b/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.types index 84b8619920f3d..758a93da7d95a 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.types +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.types @@ -1,2 +1,4 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts] //// + +=== ClassAndModuleThatMergeWithStringIndexerAndExportedFunctionWithTypeIncompatibleWithIndexer.ts === diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index af0c9b14841b0..4c67c17831b78 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== +==== class.ts (0 errors) ==== module X.Y { export class Point { constructor(x: number, y: number) { @@ -13,7 +13,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== +==== module.ts (1 errors) ==== module X.Y { export module Point { ~~~~~ @@ -22,13 +22,13 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (0 errors) ==== +==== test.ts (0 errors) ==== //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? -==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (0 errors) ==== +==== simple.ts (0 errors) ==== class A { id: string; } diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.symbols index 6fd9822c2a928..9732ddf70b90f 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/class.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts] //// + +=== class.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) >Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) @@ -30,7 +32,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) >Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) @@ -44,7 +46,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) @@ -65,7 +67,7 @@ var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >Origin : Symbol(X.Y.Point.Origin, Decl(module.ts, 2, 18)) -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === class A { >A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1)) diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types index f3e05acf1166e..6dcdc3f014159 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/class.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts] //// + +=== class.ts === module X.Y { >X : typeof X >Y : typeof Y @@ -32,7 +34,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module X.Y { >X : typeof X >Y : typeof Y @@ -49,7 +51,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : X.Y.Point @@ -73,7 +75,7 @@ var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >Origin : X.Y.Point -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === class A { >A : A diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt index af0c9b14841b0..4c67c17831b78 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== +==== class.ts (0 errors) ==== module X.Y { export class Point { constructor(x: number, y: number) { @@ -13,7 +13,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== +==== module.ts (1 errors) ==== module X.Y { export module Point { ~~~~~ @@ -22,13 +22,13 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (0 errors) ==== +==== test.ts (0 errors) ==== //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? -==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (0 errors) ==== +==== simple.ts (0 errors) ==== class A { id: string; } diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.symbols b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.symbols index 6fd9822c2a928..66292440b05de 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.symbols +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/class.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts] //// + +=== class.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) >Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) @@ -30,7 +32,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) >Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) @@ -44,7 +46,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) @@ -65,7 +67,7 @@ var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >Origin : Symbol(X.Y.Point.Origin, Decl(module.ts, 2, 18)) -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === class A { >A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1)) diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types index f3e05acf1166e..17bbd79a7a813 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/class.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts] //// + +=== class.ts === module X.Y { >X : typeof X >Y : typeof Y @@ -32,7 +34,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module X.Y { >X : typeof X >Y : typeof Y @@ -49,7 +51,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : X.Y.Point @@ -73,7 +75,7 @@ var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >Origin : X.Y.Point -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === class A { >A : A diff --git a/tests/baselines/reference/ClassDeclaration10.errors.txt b/tests/baselines/reference/ClassDeclaration10.errors.txt index 4d195961f8149..ebc91c539e4af 100644 --- a/tests/baselines/reference/ClassDeclaration10.errors.txt +++ b/tests/baselines/reference/ClassDeclaration10.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ClassDeclaration10.ts(2,4): error TS2390: Constructor implementation is missing. -tests/cases/compiler/ClassDeclaration10.ts(3,4): error TS2391: Function implementation is missing or not immediately following the declaration. +ClassDeclaration10.ts(2,4): error TS2390: Constructor implementation is missing. +ClassDeclaration10.ts(3,4): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/ClassDeclaration10.ts (2 errors) ==== +==== ClassDeclaration10.ts (2 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/ClassDeclaration10.js b/tests/baselines/reference/ClassDeclaration10.js index f3ffaa17f90d7..5f73b8d33a788 100644 --- a/tests/baselines/reference/ClassDeclaration10.js +++ b/tests/baselines/reference/ClassDeclaration10.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration10.ts] //// + //// [ClassDeclaration10.ts] class C { constructor(); diff --git a/tests/baselines/reference/ClassDeclaration10.symbols b/tests/baselines/reference/ClassDeclaration10.symbols index 3b967f70cbe29..3999d24f71df7 100644 --- a/tests/baselines/reference/ClassDeclaration10.symbols +++ b/tests/baselines/reference/ClassDeclaration10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration10.ts === +//// [tests/cases/compiler/ClassDeclaration10.ts] //// + +=== ClassDeclaration10.ts === class C { >C : Symbol(C, Decl(ClassDeclaration10.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration10.types b/tests/baselines/reference/ClassDeclaration10.types index ec5fac037413b..b403ac259e2b7 100644 --- a/tests/baselines/reference/ClassDeclaration10.types +++ b/tests/baselines/reference/ClassDeclaration10.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration10.ts === +//// [tests/cases/compiler/ClassDeclaration10.ts] //// + +=== ClassDeclaration10.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration11.errors.txt b/tests/baselines/reference/ClassDeclaration11.errors.txt index 518e62803eacf..eacd2e9232ac6 100644 --- a/tests/baselines/reference/ClassDeclaration11.errors.txt +++ b/tests/baselines/reference/ClassDeclaration11.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration11.ts(2,4): error TS2390: Constructor implementation is missing. +ClassDeclaration11.ts(2,4): error TS2390: Constructor implementation is missing. -==== tests/cases/compiler/ClassDeclaration11.ts (1 errors) ==== +==== ClassDeclaration11.ts (1 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/ClassDeclaration11.js b/tests/baselines/reference/ClassDeclaration11.js index 908956b4eb670..e89e124dec1a2 100644 --- a/tests/baselines/reference/ClassDeclaration11.js +++ b/tests/baselines/reference/ClassDeclaration11.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration11.ts] //// + //// [ClassDeclaration11.ts] class C { constructor(); diff --git a/tests/baselines/reference/ClassDeclaration11.symbols b/tests/baselines/reference/ClassDeclaration11.symbols index a231eaf48d321..7218196750064 100644 --- a/tests/baselines/reference/ClassDeclaration11.symbols +++ b/tests/baselines/reference/ClassDeclaration11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration11.ts === +//// [tests/cases/compiler/ClassDeclaration11.ts] //// + +=== ClassDeclaration11.ts === class C { >C : Symbol(C, Decl(ClassDeclaration11.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration11.types b/tests/baselines/reference/ClassDeclaration11.types index d7b3f4f640660..9723f73cde2a1 100644 --- a/tests/baselines/reference/ClassDeclaration11.types +++ b/tests/baselines/reference/ClassDeclaration11.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration11.ts === +//// [tests/cases/compiler/ClassDeclaration11.ts] //// + +=== ClassDeclaration11.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration13.errors.txt b/tests/baselines/reference/ClassDeclaration13.errors.txt index 7b001022d9d91..0badf880b2721 100644 --- a/tests/baselines/reference/ClassDeclaration13.errors.txt +++ b/tests/baselines/reference/ClassDeclaration13.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration13.ts(3,4): error TS2389: Function implementation name must be 'foo'. +ClassDeclaration13.ts(3,4): error TS2389: Function implementation name must be 'foo'. -==== tests/cases/compiler/ClassDeclaration13.ts (1 errors) ==== +==== ClassDeclaration13.ts (1 errors) ==== class C { foo(); bar() { } diff --git a/tests/baselines/reference/ClassDeclaration13.js b/tests/baselines/reference/ClassDeclaration13.js index 1f72cf9de3430..f7d99956c17c3 100644 --- a/tests/baselines/reference/ClassDeclaration13.js +++ b/tests/baselines/reference/ClassDeclaration13.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration13.ts] //// + //// [ClassDeclaration13.ts] class C { foo(); diff --git a/tests/baselines/reference/ClassDeclaration13.symbols b/tests/baselines/reference/ClassDeclaration13.symbols index fe6e0706a4582..efd78f3eaf13c 100644 --- a/tests/baselines/reference/ClassDeclaration13.symbols +++ b/tests/baselines/reference/ClassDeclaration13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration13.ts === +//// [tests/cases/compiler/ClassDeclaration13.ts] //// + +=== ClassDeclaration13.ts === class C { >C : Symbol(C, Decl(ClassDeclaration13.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration13.types b/tests/baselines/reference/ClassDeclaration13.types index 353dfd029883f..9c7e65956734f 100644 --- a/tests/baselines/reference/ClassDeclaration13.types +++ b/tests/baselines/reference/ClassDeclaration13.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration13.ts === +//// [tests/cases/compiler/ClassDeclaration13.ts] //// + +=== ClassDeclaration13.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration14.errors.txt b/tests/baselines/reference/ClassDeclaration14.errors.txt index af87daef99701..1a7020aa80172 100644 --- a/tests/baselines/reference/ClassDeclaration14.errors.txt +++ b/tests/baselines/reference/ClassDeclaration14.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ClassDeclaration14.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/ClassDeclaration14.ts(3,4): error TS2390: Constructor implementation is missing. +ClassDeclaration14.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. +ClassDeclaration14.ts(3,4): error TS2390: Constructor implementation is missing. -==== tests/cases/compiler/ClassDeclaration14.ts (2 errors) ==== +==== ClassDeclaration14.ts (2 errors) ==== class C { foo(); ~~~ diff --git a/tests/baselines/reference/ClassDeclaration14.js b/tests/baselines/reference/ClassDeclaration14.js index 724f1a222d7ab..151db74105a9b 100644 --- a/tests/baselines/reference/ClassDeclaration14.js +++ b/tests/baselines/reference/ClassDeclaration14.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration14.ts] //// + //// [ClassDeclaration14.ts] class C { foo(); diff --git a/tests/baselines/reference/ClassDeclaration14.symbols b/tests/baselines/reference/ClassDeclaration14.symbols index 341f6c984aa59..383100a5e2326 100644 --- a/tests/baselines/reference/ClassDeclaration14.symbols +++ b/tests/baselines/reference/ClassDeclaration14.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration14.ts === +//// [tests/cases/compiler/ClassDeclaration14.ts] //// + +=== ClassDeclaration14.ts === class C { >C : Symbol(C, Decl(ClassDeclaration14.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration14.types b/tests/baselines/reference/ClassDeclaration14.types index 7f7038d571071..a04beb4167e10 100644 --- a/tests/baselines/reference/ClassDeclaration14.types +++ b/tests/baselines/reference/ClassDeclaration14.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration14.ts === +//// [tests/cases/compiler/ClassDeclaration14.ts] //// + +=== ClassDeclaration14.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration15.errors.txt b/tests/baselines/reference/ClassDeclaration15.errors.txt index 27cd8f9aa4de0..1cc2d273db8f9 100644 --- a/tests/baselines/reference/ClassDeclaration15.errors.txt +++ b/tests/baselines/reference/ClassDeclaration15.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration15.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. +ClassDeclaration15.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/ClassDeclaration15.ts (1 errors) ==== +==== ClassDeclaration15.ts (1 errors) ==== class C { foo(); ~~~ diff --git a/tests/baselines/reference/ClassDeclaration15.js b/tests/baselines/reference/ClassDeclaration15.js index f5040f9c63b93..e9b350b48b45f 100644 --- a/tests/baselines/reference/ClassDeclaration15.js +++ b/tests/baselines/reference/ClassDeclaration15.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration15.ts] //// + //// [ClassDeclaration15.ts] class C { foo(); diff --git a/tests/baselines/reference/ClassDeclaration15.symbols b/tests/baselines/reference/ClassDeclaration15.symbols index da6fe68397449..d6fbcbd82199c 100644 --- a/tests/baselines/reference/ClassDeclaration15.symbols +++ b/tests/baselines/reference/ClassDeclaration15.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration15.ts === +//// [tests/cases/compiler/ClassDeclaration15.ts] //// + +=== ClassDeclaration15.ts === class C { >C : Symbol(C, Decl(ClassDeclaration15.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration15.types b/tests/baselines/reference/ClassDeclaration15.types index 9b861b5230cb5..9802a0d167772 100644 --- a/tests/baselines/reference/ClassDeclaration15.types +++ b/tests/baselines/reference/ClassDeclaration15.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration15.ts === +//// [tests/cases/compiler/ClassDeclaration15.ts] //// + +=== ClassDeclaration15.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration21.errors.txt b/tests/baselines/reference/ClassDeclaration21.errors.txt index 36dc01d75d084..98425edd55379 100644 --- a/tests/baselines/reference/ClassDeclaration21.errors.txt +++ b/tests/baselines/reference/ClassDeclaration21.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration21.ts(3,5): error TS2389: Function implementation name must be '0'. +ClassDeclaration21.ts(3,5): error TS2389: Function implementation name must be '0'. -==== tests/cases/compiler/ClassDeclaration21.ts (1 errors) ==== +==== ClassDeclaration21.ts (1 errors) ==== class C { 0(); 1() { } diff --git a/tests/baselines/reference/ClassDeclaration21.js b/tests/baselines/reference/ClassDeclaration21.js index 9b26af46b7cd1..8dc2048f31532 100644 --- a/tests/baselines/reference/ClassDeclaration21.js +++ b/tests/baselines/reference/ClassDeclaration21.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration21.ts] //// + //// [ClassDeclaration21.ts] class C { 0(); diff --git a/tests/baselines/reference/ClassDeclaration21.symbols b/tests/baselines/reference/ClassDeclaration21.symbols index 3d0b571ea3797..66f876bd8fd08 100644 --- a/tests/baselines/reference/ClassDeclaration21.symbols +++ b/tests/baselines/reference/ClassDeclaration21.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration21.ts === +//// [tests/cases/compiler/ClassDeclaration21.ts] //// + +=== ClassDeclaration21.ts === class C { >C : Symbol(C, Decl(ClassDeclaration21.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration21.types b/tests/baselines/reference/ClassDeclaration21.types index 32ed0db413e54..2bc32f73bcf52 100644 --- a/tests/baselines/reference/ClassDeclaration21.types +++ b/tests/baselines/reference/ClassDeclaration21.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration21.ts === +//// [tests/cases/compiler/ClassDeclaration21.ts] //// + +=== ClassDeclaration21.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration22.errors.txt b/tests/baselines/reference/ClassDeclaration22.errors.txt index a297ae825969c..0d746cc3190ed 100644 --- a/tests/baselines/reference/ClassDeclaration22.errors.txt +++ b/tests/baselines/reference/ClassDeclaration22.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration22.ts(3,5): error TS2389: Function implementation name must be '"foo"'. +ClassDeclaration22.ts(3,5): error TS2389: Function implementation name must be '"foo"'. -==== tests/cases/compiler/ClassDeclaration22.ts (1 errors) ==== +==== ClassDeclaration22.ts (1 errors) ==== class C { "foo"(); "bar"() { } diff --git a/tests/baselines/reference/ClassDeclaration22.js b/tests/baselines/reference/ClassDeclaration22.js index 35c13c8bb0f32..4a03cf47b15f2 100644 --- a/tests/baselines/reference/ClassDeclaration22.js +++ b/tests/baselines/reference/ClassDeclaration22.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration22.ts] //// + //// [ClassDeclaration22.ts] class C { "foo"(); diff --git a/tests/baselines/reference/ClassDeclaration22.symbols b/tests/baselines/reference/ClassDeclaration22.symbols index b53258c6ee579..54f06faccaa4b 100644 --- a/tests/baselines/reference/ClassDeclaration22.symbols +++ b/tests/baselines/reference/ClassDeclaration22.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration22.ts === +//// [tests/cases/compiler/ClassDeclaration22.ts] //// + +=== ClassDeclaration22.ts === class C { >C : Symbol(C, Decl(ClassDeclaration22.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration22.types b/tests/baselines/reference/ClassDeclaration22.types index 768160a8ac943..3a69d2f8efd17 100644 --- a/tests/baselines/reference/ClassDeclaration22.types +++ b/tests/baselines/reference/ClassDeclaration22.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration22.ts === +//// [tests/cases/compiler/ClassDeclaration22.ts] //// + +=== ClassDeclaration22.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration24.errors.txt b/tests/baselines/reference/ClassDeclaration24.errors.txt index 1584fce4b386d..dc670288ea0d4 100644 --- a/tests/baselines/reference/ClassDeclaration24.errors.txt +++ b/tests/baselines/reference/ClassDeclaration24.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any'. +ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any'. -==== tests/cases/compiler/ClassDeclaration24.ts (1 errors) ==== +==== ClassDeclaration24.ts (1 errors) ==== class any { ~~~ !!! error TS2414: Class name cannot be 'any'. diff --git a/tests/baselines/reference/ClassDeclaration24.js b/tests/baselines/reference/ClassDeclaration24.js index 6eee844cbbd23..e248c088afd3f 100644 --- a/tests/baselines/reference/ClassDeclaration24.js +++ b/tests/baselines/reference/ClassDeclaration24.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration24.ts] //// + //// [ClassDeclaration24.ts] class any { } diff --git a/tests/baselines/reference/ClassDeclaration24.symbols b/tests/baselines/reference/ClassDeclaration24.symbols index e3e28d995821a..35c570dc0cd55 100644 --- a/tests/baselines/reference/ClassDeclaration24.symbols +++ b/tests/baselines/reference/ClassDeclaration24.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration24.ts === +//// [tests/cases/compiler/ClassDeclaration24.ts] //// + +=== ClassDeclaration24.ts === class any { >any : Symbol(any, Decl(ClassDeclaration24.ts, 0, 0)) } diff --git a/tests/baselines/reference/ClassDeclaration24.types b/tests/baselines/reference/ClassDeclaration24.types index 9d39e77c08b92..8037f8acb303c 100644 --- a/tests/baselines/reference/ClassDeclaration24.types +++ b/tests/baselines/reference/ClassDeclaration24.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration24.ts === +//// [tests/cases/compiler/ClassDeclaration24.ts] //// + +=== ClassDeclaration24.ts === class any { >any : any } diff --git a/tests/baselines/reference/ClassDeclaration25.errors.txt b/tests/baselines/reference/ClassDeclaration25.errors.txt index 964974481d6fb..3e479fd49e4f4 100644 --- a/tests/baselines/reference/ClassDeclaration25.errors.txt +++ b/tests/baselines/reference/ClassDeclaration25.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ClassDeclaration25.ts(6,5): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/ClassDeclaration25.ts(7,5): error TS2391: Function implementation is missing or not immediately following the declaration. +ClassDeclaration25.ts(6,5): error TS2391: Function implementation is missing or not immediately following the declaration. +ClassDeclaration25.ts(7,5): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/ClassDeclaration25.ts (2 errors) ==== +==== ClassDeclaration25.ts (2 errors) ==== interface IList { data(): T; next(): string; diff --git a/tests/baselines/reference/ClassDeclaration25.js b/tests/baselines/reference/ClassDeclaration25.js index e19ce48c137e3..67283dc647c6e 100644 --- a/tests/baselines/reference/ClassDeclaration25.js +++ b/tests/baselines/reference/ClassDeclaration25.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration25.ts] //// + //// [ClassDeclaration25.ts] interface IList { data(): T; diff --git a/tests/baselines/reference/ClassDeclaration25.symbols b/tests/baselines/reference/ClassDeclaration25.symbols index 3d792b0b8f4d6..d1b70a2012747 100644 --- a/tests/baselines/reference/ClassDeclaration25.symbols +++ b/tests/baselines/reference/ClassDeclaration25.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration25.ts === +//// [tests/cases/compiler/ClassDeclaration25.ts] //// + +=== ClassDeclaration25.ts === interface IList { >IList : Symbol(IList, Decl(ClassDeclaration25.ts, 0, 0)) >T : Symbol(T, Decl(ClassDeclaration25.ts, 0, 16)) diff --git a/tests/baselines/reference/ClassDeclaration25.types b/tests/baselines/reference/ClassDeclaration25.types index 1c30d48d6586a..11591da8e906d 100644 --- a/tests/baselines/reference/ClassDeclaration25.types +++ b/tests/baselines/reference/ClassDeclaration25.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration25.ts === +//// [tests/cases/compiler/ClassDeclaration25.ts] //// + +=== ClassDeclaration25.ts === interface IList { data(): T; >data : () => T diff --git a/tests/baselines/reference/ClassDeclaration26.errors.txt b/tests/baselines/reference/ClassDeclaration26.errors.txt index 4b7534741b1f2..abd51cf24eca5 100644 --- a/tests/baselines/reference/ClassDeclaration26.errors.txt +++ b/tests/baselines/reference/ClassDeclaration26.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/ClassDeclaration26.ts(2,18): error TS1440: Variable declaration not allowed at this location. -tests/cases/compiler/ClassDeclaration26.ts(4,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -tests/cases/compiler/ClassDeclaration26.ts(4,20): error TS1005: ',' expected. -tests/cases/compiler/ClassDeclaration26.ts(4,23): error TS1005: '=>' expected. -tests/cases/compiler/ClassDeclaration26.ts(5,1): error TS1128: Declaration or statement expected. +ClassDeclaration26.ts(2,18): error TS1440: Variable declaration not allowed at this location. +ClassDeclaration26.ts(4,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +ClassDeclaration26.ts(4,20): error TS1005: ',' expected. +ClassDeclaration26.ts(4,23): error TS1005: '=>' expected. +ClassDeclaration26.ts(5,1): error TS1128: Declaration or statement expected. -==== tests/cases/compiler/ClassDeclaration26.ts (5 errors) ==== +==== ClassDeclaration26.ts (5 errors) ==== class C { public const var export foo = 10; ~~~ diff --git a/tests/baselines/reference/ClassDeclaration26.js b/tests/baselines/reference/ClassDeclaration26.js index 8a240f696a451..ff1c2fdd8ed52 100644 --- a/tests/baselines/reference/ClassDeclaration26.js +++ b/tests/baselines/reference/ClassDeclaration26.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration26.ts] //// + //// [ClassDeclaration26.ts] class C { public const var export foo = 10; diff --git a/tests/baselines/reference/ClassDeclaration26.symbols b/tests/baselines/reference/ClassDeclaration26.symbols index cc4757b97de45..3e1e33e2b4c22 100644 --- a/tests/baselines/reference/ClassDeclaration26.symbols +++ b/tests/baselines/reference/ClassDeclaration26.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration26.ts === +//// [tests/cases/compiler/ClassDeclaration26.ts] //// + +=== ClassDeclaration26.ts === class C { >C : Symbol(C, Decl(ClassDeclaration26.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration26.types b/tests/baselines/reference/ClassDeclaration26.types index 628795523490a..3bd43b96b4c41 100644 --- a/tests/baselines/reference/ClassDeclaration26.types +++ b/tests/baselines/reference/ClassDeclaration26.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration26.ts === +//// [tests/cases/compiler/ClassDeclaration26.ts] //// + +=== ClassDeclaration26.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration8.errors.txt b/tests/baselines/reference/ClassDeclaration8.errors.txt index 3894c91bdc825..020e404630486 100644 --- a/tests/baselines/reference/ClassDeclaration8.errors.txt +++ b/tests/baselines/reference/ClassDeclaration8.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration8.ts(2,3): error TS2390: Constructor implementation is missing. +ClassDeclaration8.ts(2,3): error TS2390: Constructor implementation is missing. -==== tests/cases/compiler/ClassDeclaration8.ts (1 errors) ==== +==== ClassDeclaration8.ts (1 errors) ==== class C { constructor(); ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/ClassDeclaration8.js b/tests/baselines/reference/ClassDeclaration8.js index 71271ab1d8be0..3a288f769dac4 100644 --- a/tests/baselines/reference/ClassDeclaration8.js +++ b/tests/baselines/reference/ClassDeclaration8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration8.ts] //// + //// [ClassDeclaration8.ts] class C { constructor(); diff --git a/tests/baselines/reference/ClassDeclaration8.symbols b/tests/baselines/reference/ClassDeclaration8.symbols index bec50a10bbfc7..25380a5f67a49 100644 --- a/tests/baselines/reference/ClassDeclaration8.symbols +++ b/tests/baselines/reference/ClassDeclaration8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration8.ts === +//// [tests/cases/compiler/ClassDeclaration8.ts] //// + +=== ClassDeclaration8.ts === class C { >C : Symbol(C, Decl(ClassDeclaration8.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration8.types b/tests/baselines/reference/ClassDeclaration8.types index 5f89e84680f59..5707d3bd7acb0 100644 --- a/tests/baselines/reference/ClassDeclaration8.types +++ b/tests/baselines/reference/ClassDeclaration8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration8.ts === +//// [tests/cases/compiler/ClassDeclaration8.ts] //// + +=== ClassDeclaration8.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclaration9.errors.txt b/tests/baselines/reference/ClassDeclaration9.errors.txt index 7f13d41001ad9..d153c55d14c80 100644 --- a/tests/baselines/reference/ClassDeclaration9.errors.txt +++ b/tests/baselines/reference/ClassDeclaration9.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclaration9.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. +ClassDeclaration9.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/ClassDeclaration9.ts (1 errors) ==== +==== ClassDeclaration9.ts (1 errors) ==== class C { foo(); ~~~ diff --git a/tests/baselines/reference/ClassDeclaration9.js b/tests/baselines/reference/ClassDeclaration9.js index a61c6a564ccfb..0fbf5c9ad7f6c 100644 --- a/tests/baselines/reference/ClassDeclaration9.js +++ b/tests/baselines/reference/ClassDeclaration9.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclaration9.ts] //// + //// [ClassDeclaration9.ts] class C { foo(); diff --git a/tests/baselines/reference/ClassDeclaration9.symbols b/tests/baselines/reference/ClassDeclaration9.symbols index 7a853b8b61bdc..d194429460b22 100644 --- a/tests/baselines/reference/ClassDeclaration9.symbols +++ b/tests/baselines/reference/ClassDeclaration9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration9.ts === +//// [tests/cases/compiler/ClassDeclaration9.ts] //// + +=== ClassDeclaration9.ts === class C { >C : Symbol(C, Decl(ClassDeclaration9.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclaration9.types b/tests/baselines/reference/ClassDeclaration9.types index f9193d6d56764..5c540d8d3db90 100644 --- a/tests/baselines/reference/ClassDeclaration9.types +++ b/tests/baselines/reference/ClassDeclaration9.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclaration9.ts === +//// [tests/cases/compiler/ClassDeclaration9.ts] //// + +=== ClassDeclaration9.ts === class C { >C : C diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.errors.txt b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.errors.txt index 5091937bde25e..7c0f945d87e31 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.errors.txt +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts(2,16): error TS1248: A class member cannot have the 'const' keyword. +ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts(2,16): error TS1248: A class member cannot have the 'const' keyword. -==== tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts (1 errors) ==== +==== ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts (1 errors) ==== class AtomicNumbers { static const H = 1; ~ diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js index c4cab7cc9396c..c359f9000369f 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts] //// + //// [ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts] class AtomicNumbers { static const H = 1; diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.symbols b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.symbols index 5c9bb23a923b4..658dcaf9caaf1 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.symbols +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts === +//// [tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts] //// + +=== ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts === class AtomicNumbers { >AtomicNumbers : Symbol(AtomicNumbers, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.types b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.types index 81ec49120fdda..e6c373febfaa6 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.types +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts === +//// [tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts] //// + +=== ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts === class AtomicNumbers { >AtomicNumbers : AtomicNumbers diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js index 847264e596983..f4c93aafa39fa 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts] //// + //// [ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts] class C { const diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.symbols b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.symbols index 69f0d0520e6c7..21275298660fd 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.symbols +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts === +//// [tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts] //// + +=== ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts === class C { >C : Symbol(C, Decl(ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts, 0, 0)) diff --git a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.types b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.types index 5e6077a09332d..226b7164d1a05 100644 --- a/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.types +++ b/tests/baselines/reference/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts === +//// [tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts] //// + +=== ClassDeclarationWithInvalidConstOnPropertyDeclaration2.ts === class C { >C : C diff --git a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.errors.txt b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.errors.txt index 90434c5d4d648..ad96fbe2ee110 100644 --- a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.errors.txt +++ b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts(1,29): error TS2339: Property 'formatRange' does not exist on type 'NumberFormat'. -tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts(4,25): error TS2339: Property 'formatRange' does not exist on type 'NumberFormat'. -tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts(5,25): error TS2551: Property 'formatRangeToParts' does not exist on type 'NumberFormat'. Did you mean 'formatToParts'? +DateTimeFormatAndNumberFormatES2021.ts(1,29): error TS2339: Property 'formatRange' does not exist on type 'NumberFormat'. +DateTimeFormatAndNumberFormatES2021.ts(4,25): error TS2339: Property 'formatRange' does not exist on type 'NumberFormat'. +DateTimeFormatAndNumberFormatES2021.ts(5,25): error TS2551: Property 'formatRangeToParts' does not exist on type 'NumberFormat'. Did you mean 'formatToParts'? -==== tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts (3 errors) ==== +==== DateTimeFormatAndNumberFormatES2021.ts (3 errors) ==== Intl.NumberFormat.prototype.formatRange ~~~~~~~~~~~ !!! error TS2339: Property 'formatRange' does not exist on type 'NumberFormat'. @@ -15,6 +15,6 @@ tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts(5,25): error TS2551: new Intl.NumberFormat().formatRangeToParts ~~~~~~~~~~~~~~~~~~ !!! error TS2551: Property 'formatRangeToParts' does not exist on type 'NumberFormat'. Did you mean 'formatToParts'? -!!! related TS2728 /.ts/lib.es2018.intl.d.ts:--:--: 'formatToParts' is declared here. +!!! related TS2728 lib.es2018.intl.d.ts:--:--: 'formatToParts' is declared here. new Intl.DateTimeFormat().formatRange new Intl.DateTimeFormat().formatRangeToParts \ No newline at end of file diff --git a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.js b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.js index daa7bd00d4b3b..8bd25380b8b8d 100644 --- a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.js +++ b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts] //// + //// [DateTimeFormatAndNumberFormatES2021.ts] Intl.NumberFormat.prototype.formatRange Intl.DateTimeFormat.prototype.formatRange diff --git a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.symbols b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.symbols index b32bb6e2b69d6..4ebf8040e60ad 100644 --- a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.symbols +++ b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts === +//// [tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts] //// + +=== DateTimeFormatAndNumberFormatES2021.ts === Intl.NumberFormat.prototype.formatRange >Intl.NumberFormat.prototype : Symbol(prototype, Decl(lib.es5.d.ts, --, --)) >Intl.NumberFormat : Symbol(Intl.NumberFormat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2018.intl.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) diff --git a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.types b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.types index 4c3c8e654ece0..51ec4fc0d8a1c 100644 --- a/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.types +++ b/tests/baselines/reference/DateTimeFormatAndNumberFormatES2021.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts === +//// [tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts] //// + +=== DateTimeFormatAndNumberFormatES2021.ts === Intl.NumberFormat.prototype.formatRange >Intl.NumberFormat.prototype.formatRange : any >Intl.NumberFormat.prototype : Intl.NumberFormat diff --git a/tests/baselines/reference/DeclarationErrorsNoEmitOnError.js b/tests/baselines/reference/DeclarationErrorsNoEmitOnError.js index e887568596da2..510bf021bafcc 100644 --- a/tests/baselines/reference/DeclarationErrorsNoEmitOnError.js +++ b/tests/baselines/reference/DeclarationErrorsNoEmitOnError.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts] //// + //// [DeclarationErrorsNoEmitOnError.ts] type T = { x : number } export interface I { diff --git a/tests/baselines/reference/DeclarationErrorsNoEmitOnError.symbols b/tests/baselines/reference/DeclarationErrorsNoEmitOnError.symbols index f57bd8d6cc415..d58a13c13fd5b 100644 --- a/tests/baselines/reference/DeclarationErrorsNoEmitOnError.symbols +++ b/tests/baselines/reference/DeclarationErrorsNoEmitOnError.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts === +//// [tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts] //// + +=== DeclarationErrorsNoEmitOnError.ts === type T = { x : number } >T : Symbol(T, Decl(DeclarationErrorsNoEmitOnError.ts, 0, 0)) >x : Symbol(x, Decl(DeclarationErrorsNoEmitOnError.ts, 0, 10)) diff --git a/tests/baselines/reference/DeclarationErrorsNoEmitOnError.types b/tests/baselines/reference/DeclarationErrorsNoEmitOnError.types index 5e79973b27b15..756ff4d73d988 100644 --- a/tests/baselines/reference/DeclarationErrorsNoEmitOnError.types +++ b/tests/baselines/reference/DeclarationErrorsNoEmitOnError.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts === +//// [tests/cases/compiler/DeclarationErrorsNoEmitOnError.ts] //// + +=== DeclarationErrorsNoEmitOnError.ts === type T = { x : number } >T : { x: number; } >x : number diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt index 520392a911da5..806f2458b9d79 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt @@ -1,9 +1,9 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts(1,15): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. +ES3For-ofTypeCheck1.ts(1,15): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts (1 errors) ==== +==== ES3For-ofTypeCheck1.ts (1 errors) ==== for (var v of "") { } ~~ !!! error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.js b/tests/baselines/reference/ES3For-ofTypeCheck1.js index 19efa96808b2b..7c119c66deddb 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck1.js +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts] //// + //// [ES3For-ofTypeCheck1.ts] for (var v of "") { } diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.symbols b/tests/baselines/reference/ES3For-ofTypeCheck1.symbols index c7d17a31763cb..d8cc394ad2ab1 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck1.symbols +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts] //// + +=== ES3For-ofTypeCheck1.ts === for (var v of "") { } >v : Symbol(v, Decl(ES3For-ofTypeCheck1.ts, 0, 8)) diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.types b/tests/baselines/reference/ES3For-ofTypeCheck1.types index 3b5af3905ccb5..7099d0a4deac4 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck1.types +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts] //// + +=== ES3For-ofTypeCheck1.ts === for (var v of "") { } >v : string >"" : "" diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck2.errors.txt index a97ae3abfb267..4e6bade0e1901 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck2.errors.txt +++ b/tests/baselines/reference/ES3For-ofTypeCheck2.errors.txt @@ -2,5 +2,5 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in Typ !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts (0 errors) ==== +==== ES3For-ofTypeCheck2.ts (0 errors) ==== for (var v of [true]) { } \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2.js b/tests/baselines/reference/ES3For-ofTypeCheck2.js index 865a5493a0cf4..2e0aab3481f1c 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck2.js +++ b/tests/baselines/reference/ES3For-ofTypeCheck2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts] //// + //// [ES3For-ofTypeCheck2.ts] for (var v of [true]) { } diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2.symbols b/tests/baselines/reference/ES3For-ofTypeCheck2.symbols index 607c404682b3b..5bb17f81215af 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck2.symbols +++ b/tests/baselines/reference/ES3For-ofTypeCheck2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts] //// + +=== ES3For-ofTypeCheck2.ts === for (var v of [true]) { } >v : Symbol(v, Decl(ES3For-ofTypeCheck2.ts, 0, 8)) diff --git a/tests/baselines/reference/ES3For-ofTypeCheck2.types b/tests/baselines/reference/ES3For-ofTypeCheck2.types index dd5861094980d..b3fa93af6a11e 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck2.types +++ b/tests/baselines/reference/ES3For-ofTypeCheck2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck2.ts] //// + +=== ES3For-ofTypeCheck2.ts === for (var v of [true]) { } >v : boolean >[true] : boolean[] diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt index 388e7db13c87b..10cf9f7cbb851 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt @@ -1,9 +1,9 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts(2,17): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. +ES3For-ofTypeCheck4.ts(2,17): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts (1 errors) ==== +==== ES3For-ofTypeCheck4.ts (1 errors) ==== var union: string | string[]; for (const v of union) { } ~~~~~ diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.js b/tests/baselines/reference/ES3For-ofTypeCheck4.js index a628a81c51751..30b042c3c77ef 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck4.js +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts] //// + //// [ES3For-ofTypeCheck4.ts] var union: string | string[]; for (const v of union) { } diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.symbols b/tests/baselines/reference/ES3For-ofTypeCheck4.symbols index 31c862025b923..8b8eb511ac8aa 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck4.symbols +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts] //// + +=== ES3For-ofTypeCheck4.ts === var union: string | string[]; >union : Symbol(union, Decl(ES3For-ofTypeCheck4.ts, 0, 3)) diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.types b/tests/baselines/reference/ES3For-ofTypeCheck4.types index bec14ff259f2c..21bc2869ed8e2 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck4.types +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts] //// + +=== ES3For-ofTypeCheck4.ts === var union: string | string[]; >union : string | string[] diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck6.errors.txt index 148ef044ff129..e2c16523c274c 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck6.errors.txt +++ b/tests/baselines/reference/ES3For-ofTypeCheck6.errors.txt @@ -2,6 +2,6 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in Typ !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts (0 errors) ==== +==== ES3For-ofTypeCheck6.ts (0 errors) ==== var union: string[] | number[]; for (var v of union) { } \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6.js b/tests/baselines/reference/ES3For-ofTypeCheck6.js index 8b4a917eb85a7..ba5a4971ba36b 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck6.js +++ b/tests/baselines/reference/ES3For-ofTypeCheck6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts] //// + //// [ES3For-ofTypeCheck6.ts] var union: string[] | number[]; for (var v of union) { } diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6.symbols b/tests/baselines/reference/ES3For-ofTypeCheck6.symbols index f42b8e87f35a2..381139a99fff9 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck6.symbols +++ b/tests/baselines/reference/ES3For-ofTypeCheck6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts] //// + +=== ES3For-ofTypeCheck6.ts === var union: string[] | number[]; >union : Symbol(union, Decl(ES3For-ofTypeCheck6.ts, 0, 3)) diff --git a/tests/baselines/reference/ES3For-ofTypeCheck6.types b/tests/baselines/reference/ES3For-ofTypeCheck6.types index d7e6045b02954..baaf466a426f2 100644 --- a/tests/baselines/reference/ES3For-ofTypeCheck6.types +++ b/tests/baselines/reference/ES3For-ofTypeCheck6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck6.ts] //// + +=== ES3For-ofTypeCheck6.ts === var union: string[] | number[]; >union : string[] | number[] diff --git a/tests/baselines/reference/ES5For-of1.js b/tests/baselines/reference/ES5For-of1.js index dffe843399f69..41d9072a7ae68 100644 --- a/tests/baselines/reference/ES5For-of1.js +++ b/tests/baselines/reference/ES5For-of1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts] //// + //// [ES5For-of1.ts] for (var v of ['a', 'b', 'c']) { console.log(v); diff --git a/tests/baselines/reference/ES5For-of1.sourcemap.txt b/tests/baselines/reference/ES5For-of1.sourcemap.txt index 0a137cf2e807d..8c54956ede66d 100644 --- a/tests/baselines/reference/ES5For-of1.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of1.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of1.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of1.js +emittedFile:ES5For-of1.js sourceFile:ES5For-of1.ts ------------------------------------------------------------------- >>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) { diff --git a/tests/baselines/reference/ES5For-of1.symbols b/tests/baselines/reference/ES5For-of1.symbols index 1e57e982c856f..c46185e48bf70 100644 --- a/tests/baselines/reference/ES5For-of1.symbols +++ b/tests/baselines/reference/ES5For-of1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts] //// + +=== ES5For-of1.ts === for (var v of ['a', 'b', 'c']) { >v : Symbol(v, Decl(ES5For-of1.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of1.types b/tests/baselines/reference/ES5For-of1.types index 69e73ef517de9..5ea915182a01d 100644 --- a/tests/baselines/reference/ES5For-of1.types +++ b/tests/baselines/reference/ES5For-of1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts] //// + +=== ES5For-of1.ts === for (var v of ['a', 'b', 'c']) { >v : string >['a', 'b', 'c'] : string[] diff --git a/tests/baselines/reference/ES5For-of10.js b/tests/baselines/reference/ES5For-of10.js index f12dc9d8acb75..434d9cacaa529 100644 --- a/tests/baselines/reference/ES5For-of10.js +++ b/tests/baselines/reference/ES5For-of10.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts] //// + //// [ES5For-of10.ts] function foo() { return { x: 0 }; diff --git a/tests/baselines/reference/ES5For-of10.symbols b/tests/baselines/reference/ES5For-of10.symbols index 302db0a5ec7a6..831e4d4bfe279 100644 --- a/tests/baselines/reference/ES5For-of10.symbols +++ b/tests/baselines/reference/ES5For-of10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts] //// + +=== ES5For-of10.ts === function foo() { >foo : Symbol(foo, Decl(ES5For-of10.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5For-of10.types b/tests/baselines/reference/ES5For-of10.types index 2813e614e54a7..75b82a36ec94c 100644 --- a/tests/baselines/reference/ES5For-of10.types +++ b/tests/baselines/reference/ES5For-of10.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts] //// + +=== ES5For-of10.ts === function foo() { >foo : () => { x: number; } diff --git a/tests/baselines/reference/ES5For-of11.js b/tests/baselines/reference/ES5For-of11.js index dc1268524f1c1..c22ea957f644c 100644 --- a/tests/baselines/reference/ES5For-of11.js +++ b/tests/baselines/reference/ES5For-of11.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts] //// + //// [ES5For-of11.ts] var v; for (v of []) { } diff --git a/tests/baselines/reference/ES5For-of11.symbols b/tests/baselines/reference/ES5For-of11.symbols index 7d80e3ab27120..e3f67e552847e 100644 --- a/tests/baselines/reference/ES5For-of11.symbols +++ b/tests/baselines/reference/ES5For-of11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts] //// + +=== ES5For-of11.ts === var v; >v : Symbol(v, Decl(ES5For-of11.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-of11.types b/tests/baselines/reference/ES5For-of11.types index e51bc46f1572c..d98b068642282 100644 --- a/tests/baselines/reference/ES5For-of11.types +++ b/tests/baselines/reference/ES5For-of11.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts] //// + +=== ES5For-of11.ts === var v; >v : any diff --git a/tests/baselines/reference/ES5For-of12.errors.txt b/tests/baselines/reference/ES5For-of12.errors.txt index 180a32bddb48e..fe53e92b35951 100644 --- a/tests/baselines/reference/ES5For-of12.errors.txt +++ b/tests/baselines/reference/ES5For-of12.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts(1,7): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +ES5For-of12.ts(1,7): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts (1 errors) ==== +==== ES5For-of12.ts (1 errors) ==== for ([""] of [[""]]) { } ~~ !!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of12.js b/tests/baselines/reference/ES5For-of12.js index 99c5fad5fad2f..39deefe2cce98 100644 --- a/tests/baselines/reference/ES5For-of12.js +++ b/tests/baselines/reference/ES5For-of12.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts] //// + //// [ES5For-of12.ts] for ([""] of [[""]]) { } diff --git a/tests/baselines/reference/ES5For-of12.symbols b/tests/baselines/reference/ES5For-of12.symbols index e35b3e24193dc..29851965a76ae 100644 --- a/tests/baselines/reference/ES5For-of12.symbols +++ b/tests/baselines/reference/ES5For-of12.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts] //// + +=== ES5For-of12.ts === for ([""] of [[""]]) { } diff --git a/tests/baselines/reference/ES5For-of12.types b/tests/baselines/reference/ES5For-of12.types index 42ea34cd61721..d953fd59ff536 100644 --- a/tests/baselines/reference/ES5For-of12.types +++ b/tests/baselines/reference/ES5For-of12.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts] //// + +=== ES5For-of12.ts === for ([""] of [[""]]) { } >[""] : [string] >"" : "" diff --git a/tests/baselines/reference/ES5For-of13.js b/tests/baselines/reference/ES5For-of13.js index 2bcf98e14f18a..fe1a0f41a0c9d 100644 --- a/tests/baselines/reference/ES5For-of13.js +++ b/tests/baselines/reference/ES5For-of13.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts] //// + //// [ES5For-of13.ts] for (let v of ['a', 'b', 'c']) { var x = v; diff --git a/tests/baselines/reference/ES5For-of13.sourcemap.txt b/tests/baselines/reference/ES5For-of13.sourcemap.txt index 5ea68e3da3f73..c429e03acb4ee 100644 --- a/tests/baselines/reference/ES5For-of13.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of13.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of13.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of13.js +emittedFile:ES5For-of13.js sourceFile:ES5For-of13.ts ------------------------------------------------------------------- >>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) { diff --git a/tests/baselines/reference/ES5For-of13.symbols b/tests/baselines/reference/ES5For-of13.symbols index 2dcfe344cf4ef..be7a964d3be51 100644 --- a/tests/baselines/reference/ES5For-of13.symbols +++ b/tests/baselines/reference/ES5For-of13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts] //// + +=== ES5For-of13.ts === for (let v of ['a', 'b', 'c']) { >v : Symbol(v, Decl(ES5For-of13.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of13.types b/tests/baselines/reference/ES5For-of13.types index 150517378d896..7367ff957be7d 100644 --- a/tests/baselines/reference/ES5For-of13.types +++ b/tests/baselines/reference/ES5For-of13.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts] //// + +=== ES5For-of13.ts === for (let v of ['a', 'b', 'c']) { >v : string >['a', 'b', 'c'] : string[] diff --git a/tests/baselines/reference/ES5For-of14.js b/tests/baselines/reference/ES5For-of14.js index 1011bc3558c93..6e3c5a2ff5642 100644 --- a/tests/baselines/reference/ES5For-of14.js +++ b/tests/baselines/reference/ES5For-of14.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts] //// + //// [ES5For-of14.ts] for (const v of []) { var x = v; diff --git a/tests/baselines/reference/ES5For-of14.symbols b/tests/baselines/reference/ES5For-of14.symbols index 771a088f8dc91..58a736c3ecc2c 100644 --- a/tests/baselines/reference/ES5For-of14.symbols +++ b/tests/baselines/reference/ES5For-of14.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts] //// + +=== ES5For-of14.ts === for (const v of []) { >v : Symbol(v, Decl(ES5For-of14.ts, 0, 10)) diff --git a/tests/baselines/reference/ES5For-of14.types b/tests/baselines/reference/ES5For-of14.types index 0a4f9a78453a5..40bb0ba7cfde5 100644 --- a/tests/baselines/reference/ES5For-of14.types +++ b/tests/baselines/reference/ES5For-of14.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts] //// + +=== ES5For-of14.ts === for (const v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of15.js b/tests/baselines/reference/ES5For-of15.js index 5a1b8327107c7..c9138b2974055 100644 --- a/tests/baselines/reference/ES5For-of15.js +++ b/tests/baselines/reference/ES5For-of15.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts] //// + //// [ES5For-of15.ts] for (let v of []) { v; diff --git a/tests/baselines/reference/ES5For-of15.symbols b/tests/baselines/reference/ES5For-of15.symbols index ea769ccfac911..02c9120b447a2 100644 --- a/tests/baselines/reference/ES5For-of15.symbols +++ b/tests/baselines/reference/ES5For-of15.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts] //// + +=== ES5For-of15.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of15.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of15.types b/tests/baselines/reference/ES5For-of15.types index 90409b8b16768..00457d45209ce 100644 --- a/tests/baselines/reference/ES5For-of15.types +++ b/tests/baselines/reference/ES5For-of15.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts] //// + +=== ES5For-of15.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of16.js b/tests/baselines/reference/ES5For-of16.js index 88f2c39414aa4..72a190faae400 100644 --- a/tests/baselines/reference/ES5For-of16.js +++ b/tests/baselines/reference/ES5For-of16.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts] //// + //// [ES5For-of16.ts] for (let v of []) { v; diff --git a/tests/baselines/reference/ES5For-of16.symbols b/tests/baselines/reference/ES5For-of16.symbols index f603cb05450d3..6218bd628f20f 100644 --- a/tests/baselines/reference/ES5For-of16.symbols +++ b/tests/baselines/reference/ES5For-of16.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts] //// + +=== ES5For-of16.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of16.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of16.types b/tests/baselines/reference/ES5For-of16.types index 94f015097118c..89cd0a1a28d93 100644 --- a/tests/baselines/reference/ES5For-of16.types +++ b/tests/baselines/reference/ES5For-of16.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts] //// + +=== ES5For-of16.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of17.errors.txt b/tests/baselines/reference/ES5For-of17.errors.txt index ee24a232bd2af..8f20fb7f68a15 100644 --- a/tests/baselines/reference/ES5For-of17.errors.txt +++ b/tests/baselines/reference/ES5For-of17.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. +ES5For-of17.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts (1 errors) ==== +==== ES5For-of17.ts (1 errors) ==== for (let v of []) { v; for (let v of [v]) { ~ !!! error TS2448: Block-scoped variable 'v' used before its declaration. -!!! related TS2728 tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts:3:14: 'v' is declared here. +!!! related TS2728 ES5For-of17.ts:3:14: 'v' is declared here. var x = v; v++; } diff --git a/tests/baselines/reference/ES5For-of17.js b/tests/baselines/reference/ES5For-of17.js index fb3a02fd0e978..807c5e5f879dc 100644 --- a/tests/baselines/reference/ES5For-of17.js +++ b/tests/baselines/reference/ES5For-of17.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts] //// + //// [ES5For-of17.ts] for (let v of []) { v; diff --git a/tests/baselines/reference/ES5For-of17.symbols b/tests/baselines/reference/ES5For-of17.symbols index 277ffda267e4b..d0c784325743d 100644 --- a/tests/baselines/reference/ES5For-of17.symbols +++ b/tests/baselines/reference/ES5For-of17.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts] //// + +=== ES5For-of17.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of17.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of17.types b/tests/baselines/reference/ES5For-of17.types index 4dafdc0599d37..362396e1fcf64 100644 --- a/tests/baselines/reference/ES5For-of17.types +++ b/tests/baselines/reference/ES5For-of17.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts] //// + +=== ES5For-of17.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of18.js b/tests/baselines/reference/ES5For-of18.js index 0d4809ed72d06..e120417cbb582 100644 --- a/tests/baselines/reference/ES5For-of18.js +++ b/tests/baselines/reference/ES5For-of18.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts] //// + //// [ES5For-of18.ts] for (let v of []) { v; diff --git a/tests/baselines/reference/ES5For-of18.symbols b/tests/baselines/reference/ES5For-of18.symbols index f564c4d5aaae0..03f84868e8acb 100644 --- a/tests/baselines/reference/ES5For-of18.symbols +++ b/tests/baselines/reference/ES5For-of18.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts] //// + +=== ES5For-of18.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of18.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of18.types b/tests/baselines/reference/ES5For-of18.types index e78bc846df6c9..c63835af51bce 100644 --- a/tests/baselines/reference/ES5For-of18.types +++ b/tests/baselines/reference/ES5For-of18.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts] //// + +=== ES5For-of18.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of19.js b/tests/baselines/reference/ES5For-of19.js index 2714574ab5bc8..fa2933b5c3390 100644 --- a/tests/baselines/reference/ES5For-of19.js +++ b/tests/baselines/reference/ES5For-of19.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + //// [ES5For-of19.ts] for (let v of []) { v; diff --git a/tests/baselines/reference/ES5For-of19.symbols b/tests/baselines/reference/ES5For-of19.symbols index 93133c2ec4920..646e312385af2 100644 --- a/tests/baselines/reference/ES5For-of19.symbols +++ b/tests/baselines/reference/ES5For-of19.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of19.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of19.types b/tests/baselines/reference/ES5For-of19.types index d95dc63d2626b..bbe1c2524eb32 100644 --- a/tests/baselines/reference/ES5For-of19.types +++ b/tests/baselines/reference/ES5For-of19.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts] //// + +=== ES5For-of19.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of2.js b/tests/baselines/reference/ES5For-of2.js index 3d83df36c7651..a816e9a1abd21 100644 --- a/tests/baselines/reference/ES5For-of2.js +++ b/tests/baselines/reference/ES5For-of2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts] //// + //// [ES5For-of2.ts] for (var v of []) { var x = v; diff --git a/tests/baselines/reference/ES5For-of2.symbols b/tests/baselines/reference/ES5For-of2.symbols index 250429031c50c..b39720c4c6809 100644 --- a/tests/baselines/reference/ES5For-of2.symbols +++ b/tests/baselines/reference/ES5For-of2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts] //// + +=== ES5For-of2.ts === for (var v of []) { >v : Symbol(v, Decl(ES5For-of2.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of2.types b/tests/baselines/reference/ES5For-of2.types index 3e680c44bc8aa..a6146123fa9c3 100644 --- a/tests/baselines/reference/ES5For-of2.types +++ b/tests/baselines/reference/ES5For-of2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts] //// + +=== ES5For-of2.ts === for (var v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of20.errors.txt b/tests/baselines/reference/ES5For-of20.errors.txt index c72dee5d27ffc..ff8cf77d27271 100644 --- a/tests/baselines/reference/ES5For-of20.errors.txt +++ b/tests/baselines/reference/ES5For-of20.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. -tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized. +ES5For-of20.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. +ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts (2 errors) ==== +==== ES5For-of20.ts (2 errors) ==== for (let v of []) { let v; for (let v of [v]) { ~ !!! error TS2448: Block-scoped variable 'v' used before its declaration. -!!! related TS2728 tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts:3:14: 'v' is declared here. +!!! related TS2728 ES5For-of20.ts:3:14: 'v' is declared here. const v; ~ !!! error TS1155: 'const' declarations must be initialized. diff --git a/tests/baselines/reference/ES5For-of20.js b/tests/baselines/reference/ES5For-of20.js index d21ab73f8b506..2438413e2f2bd 100644 --- a/tests/baselines/reference/ES5For-of20.js +++ b/tests/baselines/reference/ES5For-of20.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts] //// + //// [ES5For-of20.ts] for (let v of []) { let v; diff --git a/tests/baselines/reference/ES5For-of20.symbols b/tests/baselines/reference/ES5For-of20.symbols index 01104e621a9e5..508681e8dcb90 100644 --- a/tests/baselines/reference/ES5For-of20.symbols +++ b/tests/baselines/reference/ES5For-of20.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts] //// + +=== ES5For-of20.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of20.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of20.types b/tests/baselines/reference/ES5For-of20.types index 3b07913c3b006..da8e8245471ba 100644 --- a/tests/baselines/reference/ES5For-of20.types +++ b/tests/baselines/reference/ES5For-of20.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts] //// + +=== ES5For-of20.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of21.js b/tests/baselines/reference/ES5For-of21.js index d7e4db63c3b8d..57cc47fbfc294 100644 --- a/tests/baselines/reference/ES5For-of21.js +++ b/tests/baselines/reference/ES5For-of21.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts] //// + //// [ES5For-of21.ts] for (let v of []) { for (let _i of []) { } diff --git a/tests/baselines/reference/ES5For-of21.symbols b/tests/baselines/reference/ES5For-of21.symbols index 9cbecdb20baa4..ddc2aa569a239 100644 --- a/tests/baselines/reference/ES5For-of21.symbols +++ b/tests/baselines/reference/ES5For-of21.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts] //// + +=== ES5For-of21.ts === for (let v of []) { >v : Symbol(v, Decl(ES5For-of21.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of21.types b/tests/baselines/reference/ES5For-of21.types index a15942fd0134e..1fa4a1ef66fd7 100644 --- a/tests/baselines/reference/ES5For-of21.types +++ b/tests/baselines/reference/ES5For-of21.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts] //// + +=== ES5For-of21.ts === for (let v of []) { >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of22.js b/tests/baselines/reference/ES5For-of22.js index 6e88a5c4d7114..ad6e593985551 100644 --- a/tests/baselines/reference/ES5For-of22.js +++ b/tests/baselines/reference/ES5For-of22.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts] //// + //// [ES5For-of22.ts] for (var x of [1, 2, 3]) { let _a = 0; diff --git a/tests/baselines/reference/ES5For-of22.symbols b/tests/baselines/reference/ES5For-of22.symbols index f3a9937b67a47..7c7773ebcef86 100644 --- a/tests/baselines/reference/ES5For-of22.symbols +++ b/tests/baselines/reference/ES5For-of22.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts] //// + +=== ES5For-of22.ts === for (var x of [1, 2, 3]) { >x : Symbol(x, Decl(ES5For-of22.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of22.types b/tests/baselines/reference/ES5For-of22.types index 4fac1dd16d2d6..b4e20c25cc320 100644 --- a/tests/baselines/reference/ES5For-of22.types +++ b/tests/baselines/reference/ES5For-of22.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts] //// + +=== ES5For-of22.ts === for (var x of [1, 2, 3]) { >x : number >[1, 2, 3] : number[] diff --git a/tests/baselines/reference/ES5For-of23.js b/tests/baselines/reference/ES5For-of23.js index 3842591820f54..3082de8b084e0 100644 --- a/tests/baselines/reference/ES5For-of23.js +++ b/tests/baselines/reference/ES5For-of23.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts] //// + //// [ES5For-of23.ts] for (var x of [1, 2, 3]) { var _a = 0; diff --git a/tests/baselines/reference/ES5For-of23.symbols b/tests/baselines/reference/ES5For-of23.symbols index 1da91521afb59..07606899a8174 100644 --- a/tests/baselines/reference/ES5For-of23.symbols +++ b/tests/baselines/reference/ES5For-of23.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts] //// + +=== ES5For-of23.ts === for (var x of [1, 2, 3]) { >x : Symbol(x, Decl(ES5For-of23.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of23.types b/tests/baselines/reference/ES5For-of23.types index 9c5f71c0160f7..f0cdbe6a40dd1 100644 --- a/tests/baselines/reference/ES5For-of23.types +++ b/tests/baselines/reference/ES5For-of23.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts] //// + +=== ES5For-of23.ts === for (var x of [1, 2, 3]) { >x : number >[1, 2, 3] : number[] diff --git a/tests/baselines/reference/ES5For-of24.js b/tests/baselines/reference/ES5For-of24.js index ce4376ad64859..c7f4b85d84f49 100644 --- a/tests/baselines/reference/ES5For-of24.js +++ b/tests/baselines/reference/ES5For-of24.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts] //// + //// [ES5For-of24.ts] var a = [1, 2, 3]; for (var v of a) { diff --git a/tests/baselines/reference/ES5For-of24.symbols b/tests/baselines/reference/ES5For-of24.symbols index 9a9a98660dc01..8db2c7e36ddc0 100644 --- a/tests/baselines/reference/ES5For-of24.symbols +++ b/tests/baselines/reference/ES5For-of24.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts] //// + +=== ES5For-of24.ts === var a = [1, 2, 3]; >a : Symbol(a, Decl(ES5For-of24.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-of24.types b/tests/baselines/reference/ES5For-of24.types index aa9aad228e56a..a41d7f47abad9 100644 --- a/tests/baselines/reference/ES5For-of24.types +++ b/tests/baselines/reference/ES5For-of24.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts] //// + +=== ES5For-of24.ts === var a = [1, 2, 3]; >a : number[] >[1, 2, 3] : number[] diff --git a/tests/baselines/reference/ES5For-of25.js b/tests/baselines/reference/ES5For-of25.js index 440c0b55efbd3..d84336430159d 100644 --- a/tests/baselines/reference/ES5For-of25.js +++ b/tests/baselines/reference/ES5For-of25.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts] //// + //// [ES5For-of25.ts] var a = [1, 2, 3]; for (var v of a) { diff --git a/tests/baselines/reference/ES5For-of25.sourcemap.txt b/tests/baselines/reference/ES5For-of25.sourcemap.txt index c84f5cfaa8dad..370fa8566dae3 100644 --- a/tests/baselines/reference/ES5For-of25.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of25.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of25.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of25.js +emittedFile:ES5For-of25.js sourceFile:ES5For-of25.ts ------------------------------------------------------------------- >>>var a = [1, 2, 3]; diff --git a/tests/baselines/reference/ES5For-of25.symbols b/tests/baselines/reference/ES5For-of25.symbols index 22f04d9ae28c8..cee3f1e3f2012 100644 --- a/tests/baselines/reference/ES5For-of25.symbols +++ b/tests/baselines/reference/ES5For-of25.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts] //// + +=== ES5For-of25.ts === var a = [1, 2, 3]; >a : Symbol(a, Decl(ES5For-of25.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-of25.types b/tests/baselines/reference/ES5For-of25.types index 0d304512bf38a..1a4536ab9e90b 100644 --- a/tests/baselines/reference/ES5For-of25.types +++ b/tests/baselines/reference/ES5For-of25.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts] //// + +=== ES5For-of25.ts === var a = [1, 2, 3]; >a : number[] >[1, 2, 3] : number[] diff --git a/tests/baselines/reference/ES5For-of26.errors.txt b/tests/baselines/reference/ES5For-of26.errors.txt index 324ded25b4fd7..04c47bcc748ec 100644 --- a/tests/baselines/reference/ES5For-of26.errors.txt +++ b/tests/baselines/reference/ES5For-of26.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts(1,10): error TS2461: Type 'number' is not an array type. +ES5For-of26.ts(1,10): error TS2461: Type 'number' is not an array type. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts (1 errors) ==== +==== ES5For-of26.ts (1 errors) ==== for (var [a = 0, b = 1] of [2, 3]) { ~~~~~~~~~~~~~~ !!! error TS2461: Type 'number' is not an array type. diff --git a/tests/baselines/reference/ES5For-of26.js b/tests/baselines/reference/ES5For-of26.js index 4571cc660a3d6..00d65b7c2f184 100644 --- a/tests/baselines/reference/ES5For-of26.js +++ b/tests/baselines/reference/ES5For-of26.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts] //// + //// [ES5For-of26.ts] for (var [a = 0, b = 1] of [2, 3]) { a; diff --git a/tests/baselines/reference/ES5For-of26.sourcemap.txt b/tests/baselines/reference/ES5For-of26.sourcemap.txt index 89ddf2e309c3e..914808f71b765 100644 --- a/tests/baselines/reference/ES5For-of26.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of26.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of26.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of26.js +emittedFile:ES5For-of26.js sourceFile:ES5For-of26.ts ------------------------------------------------------------------- >>>for (var _i = 0, _a = [2, 3]; _i < _a.length; _i++) { diff --git a/tests/baselines/reference/ES5For-of26.symbols b/tests/baselines/reference/ES5For-of26.symbols index 0c54eaea8240a..d0d28e1b6d844 100644 --- a/tests/baselines/reference/ES5For-of26.symbols +++ b/tests/baselines/reference/ES5For-of26.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts] //// + +=== ES5For-of26.ts === for (var [a = 0, b = 1] of [2, 3]) { >a : Symbol(a, Decl(ES5For-of26.ts, 0, 10)) >b : Symbol(b, Decl(ES5For-of26.ts, 0, 16)) diff --git a/tests/baselines/reference/ES5For-of26.types b/tests/baselines/reference/ES5For-of26.types index 17cac39a7238d..24f95fcc0b37a 100644 --- a/tests/baselines/reference/ES5For-of26.types +++ b/tests/baselines/reference/ES5For-of26.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts] //// + +=== ES5For-of26.ts === for (var [a = 0, b = 1] of [2, 3]) { >a : any >0 : 0 diff --git a/tests/baselines/reference/ES5For-of27.errors.txt b/tests/baselines/reference/ES5For-of27.errors.txt index 837a11cf7ee89..0e8087a19d99f 100644 --- a/tests/baselines/reference/ES5For-of27.errors.txt +++ b/tests/baselines/reference/ES5For-of27.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts(1,11): error TS2339: Property 'x' does not exist on type 'Number'. -tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts(1,21): error TS2339: Property 'y' does not exist on type 'Number'. +ES5For-of27.ts(1,11): error TS2339: Property 'x' does not exist on type 'Number'. +ES5For-of27.ts(1,21): error TS2339: Property 'y' does not exist on type 'Number'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts (2 errors) ==== +==== ES5For-of27.ts (2 errors) ==== for (var {x: a = 0, y: b = 1} of [2, 3]) { ~ !!! error TS2339: Property 'x' does not exist on type 'Number'. diff --git a/tests/baselines/reference/ES5For-of27.js b/tests/baselines/reference/ES5For-of27.js index c8e5a03b114cb..28110b6177be7 100644 --- a/tests/baselines/reference/ES5For-of27.js +++ b/tests/baselines/reference/ES5For-of27.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts] //// + //// [ES5For-of27.ts] for (var {x: a = 0, y: b = 1} of [2, 3]) { a; diff --git a/tests/baselines/reference/ES5For-of27.symbols b/tests/baselines/reference/ES5For-of27.symbols index 31348c4ca8a34..24d413a286b9f 100644 --- a/tests/baselines/reference/ES5For-of27.symbols +++ b/tests/baselines/reference/ES5For-of27.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts] //// + +=== ES5For-of27.ts === for (var {x: a = 0, y: b = 1} of [2, 3]) { >a : Symbol(a, Decl(ES5For-of27.ts, 0, 10)) >b : Symbol(b, Decl(ES5For-of27.ts, 0, 19)) diff --git a/tests/baselines/reference/ES5For-of27.types b/tests/baselines/reference/ES5For-of27.types index 3bdc3fe9118fd..77210131d8701 100644 --- a/tests/baselines/reference/ES5For-of27.types +++ b/tests/baselines/reference/ES5For-of27.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts] //// + +=== ES5For-of27.ts === for (var {x: a = 0, y: b = 1} of [2, 3]) { >x : any >a : any diff --git a/tests/baselines/reference/ES5For-of28.errors.txt b/tests/baselines/reference/ES5For-of28.errors.txt index 81398fa5a9bac..f669a33fa2a2e 100644 --- a/tests/baselines/reference/ES5For-of28.errors.txt +++ b/tests/baselines/reference/ES5For-of28.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts(1,10): error TS2461: Type 'number' is not an array type. +ES5For-of28.ts(1,10): error TS2461: Type 'number' is not an array type. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts (1 errors) ==== +==== ES5For-of28.ts (1 errors) ==== for (let [a = 0, b = 1] of [2, 3]) { ~~~~~~~~~~~~~~ !!! error TS2461: Type 'number' is not an array type. diff --git a/tests/baselines/reference/ES5For-of28.js b/tests/baselines/reference/ES5For-of28.js index 362b8835212a2..933f6548a0852 100644 --- a/tests/baselines/reference/ES5For-of28.js +++ b/tests/baselines/reference/ES5For-of28.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts] //// + //// [ES5For-of28.ts] for (let [a = 0, b = 1] of [2, 3]) { a; diff --git a/tests/baselines/reference/ES5For-of28.symbols b/tests/baselines/reference/ES5For-of28.symbols index 53e1de495ac74..1f2da5c469776 100644 --- a/tests/baselines/reference/ES5For-of28.symbols +++ b/tests/baselines/reference/ES5For-of28.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts] //// + +=== ES5For-of28.ts === for (let [a = 0, b = 1] of [2, 3]) { >a : Symbol(a, Decl(ES5For-of28.ts, 0, 10)) >b : Symbol(b, Decl(ES5For-of28.ts, 0, 16)) diff --git a/tests/baselines/reference/ES5For-of28.types b/tests/baselines/reference/ES5For-of28.types index 76646ef759646..1515ac2dd1c19 100644 --- a/tests/baselines/reference/ES5For-of28.types +++ b/tests/baselines/reference/ES5For-of28.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts] //// + +=== ES5For-of28.ts === for (let [a = 0, b = 1] of [2, 3]) { >a : any >0 : 0 diff --git a/tests/baselines/reference/ES5For-of29.errors.txt b/tests/baselines/reference/ES5For-of29.errors.txt index c23ff1af21171..ff9834e6f86ff 100644 --- a/tests/baselines/reference/ES5For-of29.errors.txt +++ b/tests/baselines/reference/ES5For-of29.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts(1,13): error TS2339: Property 'x' does not exist on type 'Number'. -tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts(1,23): error TS2339: Property 'y' does not exist on type 'Number'. +ES5For-of29.ts(1,13): error TS2339: Property 'x' does not exist on type 'Number'. +ES5For-of29.ts(1,23): error TS2339: Property 'y' does not exist on type 'Number'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts (2 errors) ==== +==== ES5For-of29.ts (2 errors) ==== for (const {x: a = 0, y: b = 1} of [2, 3]) { ~ !!! error TS2339: Property 'x' does not exist on type 'Number'. diff --git a/tests/baselines/reference/ES5For-of29.js b/tests/baselines/reference/ES5For-of29.js index 338ff311dba6e..45c85c38d5915 100644 --- a/tests/baselines/reference/ES5For-of29.js +++ b/tests/baselines/reference/ES5For-of29.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts] //// + //// [ES5For-of29.ts] for (const {x: a = 0, y: b = 1} of [2, 3]) { a; diff --git a/tests/baselines/reference/ES5For-of29.symbols b/tests/baselines/reference/ES5For-of29.symbols index efe7c386741fa..b28307c3b94f5 100644 --- a/tests/baselines/reference/ES5For-of29.symbols +++ b/tests/baselines/reference/ES5For-of29.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts] //// + +=== ES5For-of29.ts === for (const {x: a = 0, y: b = 1} of [2, 3]) { >a : Symbol(a, Decl(ES5For-of29.ts, 0, 12)) >b : Symbol(b, Decl(ES5For-of29.ts, 0, 21)) diff --git a/tests/baselines/reference/ES5For-of29.types b/tests/baselines/reference/ES5For-of29.types index 687dcef6bd5b8..febdaf712d03e 100644 --- a/tests/baselines/reference/ES5For-of29.types +++ b/tests/baselines/reference/ES5For-of29.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts] //// + +=== ES5For-of29.ts === for (const {x: a = 0, y: b = 1} of [2, 3]) { >x : any >a : any diff --git a/tests/baselines/reference/ES5For-of3.js b/tests/baselines/reference/ES5For-of3.js index 648d34a9b16d7..52cc54f782292 100644 --- a/tests/baselines/reference/ES5For-of3.js +++ b/tests/baselines/reference/ES5For-of3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts] //// + //// [ES5For-of3.ts] for (var v of ['a', 'b', 'c']) var x = v; diff --git a/tests/baselines/reference/ES5For-of3.sourcemap.txt b/tests/baselines/reference/ES5For-of3.sourcemap.txt index f7d9233bfeaf4..7eb273f86b381 100644 --- a/tests/baselines/reference/ES5For-of3.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of3.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of3.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of3.js +emittedFile:ES5For-of3.js sourceFile:ES5For-of3.ts ------------------------------------------------------------------- >>>for (var _i = 0, _a = ['a', 'b', 'c']; _i < _a.length; _i++) { diff --git a/tests/baselines/reference/ES5For-of3.symbols b/tests/baselines/reference/ES5For-of3.symbols index 452b2224aea58..21ff7d8e98a0c 100644 --- a/tests/baselines/reference/ES5For-of3.symbols +++ b/tests/baselines/reference/ES5For-of3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts] //// + +=== ES5For-of3.ts === for (var v of ['a', 'b', 'c']) >v : Symbol(v, Decl(ES5For-of3.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of3.types b/tests/baselines/reference/ES5For-of3.types index 29825c5c32d71..f855d1e6a3753 100644 --- a/tests/baselines/reference/ES5For-of3.types +++ b/tests/baselines/reference/ES5For-of3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts] //// + +=== ES5For-of3.ts === for (var v of ['a', 'b', 'c']) >v : string >['a', 'b', 'c'] : string[] diff --git a/tests/baselines/reference/ES5For-of30.errors.txt b/tests/baselines/reference/ES5For-of30.errors.txt index e99b8284bf336..b2e8a692f7c08 100644 --- a/tests/baselines/reference/ES5For-of30.errors.txt +++ b/tests/baselines/reference/ES5For-of30.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,6): error TS2461: Type 'string | number' is not an array type. -tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,7): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,14): error TS2322: Type 'string' is not assignable to type 'number'. +ES5For-of30.ts(3,6): error TS2461: Type 'string | number' is not an array type. +ES5For-of30.ts(3,7): error TS2322: Type 'number' is not assignable to type 'string'. +ES5For-of30.ts(3,14): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts (3 errors) ==== +==== ES5For-of30.ts (3 errors) ==== var a: string, b: number; var tuple: [number, string] = [2, "3"]; for ([a = 1, b = ""] of tuple) { diff --git a/tests/baselines/reference/ES5For-of30.js b/tests/baselines/reference/ES5For-of30.js index 2ee498efab426..55560203cd207 100644 --- a/tests/baselines/reference/ES5For-of30.js +++ b/tests/baselines/reference/ES5For-of30.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts] //// + //// [ES5For-of30.ts] var a: string, b: number; var tuple: [number, string] = [2, "3"]; diff --git a/tests/baselines/reference/ES5For-of30.symbols b/tests/baselines/reference/ES5For-of30.symbols index 60cb2a0a1f501..d9804400b3cd6 100644 --- a/tests/baselines/reference/ES5For-of30.symbols +++ b/tests/baselines/reference/ES5For-of30.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts] //// + +=== ES5For-of30.ts === var a: string, b: number; >a : Symbol(a, Decl(ES5For-of30.ts, 0, 3)) >b : Symbol(b, Decl(ES5For-of30.ts, 0, 14)) diff --git a/tests/baselines/reference/ES5For-of30.types b/tests/baselines/reference/ES5For-of30.types index e55ead743ada8..f007227d2e92f 100644 --- a/tests/baselines/reference/ES5For-of30.types +++ b/tests/baselines/reference/ES5For-of30.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts] //// + +=== ES5For-of30.ts === var a: string, b: number; >a : string >b : number diff --git a/tests/baselines/reference/ES5For-of31.errors.txt b/tests/baselines/reference/ES5For-of31.errors.txt index 4424a870071fa..2c311153ffc35 100644 --- a/tests/baselines/reference/ES5For-of31.errors.txt +++ b/tests/baselines/reference/ES5For-of31.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,8): error TS2339: Property 'a' does not exist on type 'undefined'. -tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,18): error TS2339: Property 'b' does not exist on type 'undefined'. +ES5For-of31.ts(3,8): error TS2339: Property 'a' does not exist on type 'undefined'. +ES5For-of31.ts(3,18): error TS2339: Property 'b' does not exist on type 'undefined'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts (2 errors) ==== +==== ES5For-of31.ts (2 errors) ==== var a: string, b: number; for ({ a: b = 1, b: a = ""} of []) { diff --git a/tests/baselines/reference/ES5For-of31.js b/tests/baselines/reference/ES5For-of31.js index 23cee8bff42df..4a6b9536483b6 100644 --- a/tests/baselines/reference/ES5For-of31.js +++ b/tests/baselines/reference/ES5For-of31.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts] //// + //// [ES5For-of31.ts] var a: string, b: number; diff --git a/tests/baselines/reference/ES5For-of31.symbols b/tests/baselines/reference/ES5For-of31.symbols index 73c355fdad2a9..540fb0dd04ee3 100644 --- a/tests/baselines/reference/ES5For-of31.symbols +++ b/tests/baselines/reference/ES5For-of31.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts] //// + +=== ES5For-of31.ts === var a: string, b: number; >a : Symbol(a, Decl(ES5For-of31.ts, 0, 3)) >b : Symbol(b, Decl(ES5For-of31.ts, 0, 14)) diff --git a/tests/baselines/reference/ES5For-of31.types b/tests/baselines/reference/ES5For-of31.types index 309c8d1cab8c5..efab9130eac04 100644 --- a/tests/baselines/reference/ES5For-of31.types +++ b/tests/baselines/reference/ES5For-of31.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts] //// + +=== ES5For-of31.ts === var a: string, b: number; >a : string >b : number diff --git a/tests/baselines/reference/ES5For-of33.js b/tests/baselines/reference/ES5For-of33.js index 506d74130fda7..87eb158b1af2b 100644 --- a/tests/baselines/reference/ES5For-of33.js +++ b/tests/baselines/reference/ES5For-of33.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts] //// + //// [ES5For-of33.ts] for (var v of ['a', 'b', 'c']) { console.log(v); diff --git a/tests/baselines/reference/ES5For-of33.sourcemap.txt b/tests/baselines/reference/ES5For-of33.sourcemap.txt index 4158401e0ed8d..2835251f53f3f 100644 --- a/tests/baselines/reference/ES5For-of33.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of33.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of33.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of33.js +emittedFile:ES5For-of33.js sourceFile:ES5For-of33.ts ------------------------------------------------------------------- >>>var __values = (this && this.__values) || function(o) { diff --git a/tests/baselines/reference/ES5For-of33.symbols b/tests/baselines/reference/ES5For-of33.symbols index eb882d16e7c92..6ab34a601a072 100644 --- a/tests/baselines/reference/ES5For-of33.symbols +++ b/tests/baselines/reference/ES5For-of33.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts] //// + +=== ES5For-of33.ts === for (var v of ['a', 'b', 'c']) { >v : Symbol(v, Decl(ES5For-of33.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of33.types b/tests/baselines/reference/ES5For-of33.types index b0a80c32402a4..57c9bfc5ac05a 100644 --- a/tests/baselines/reference/ES5For-of33.types +++ b/tests/baselines/reference/ES5For-of33.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of33.ts] //// + +=== ES5For-of33.ts === for (var v of ['a', 'b', 'c']) { >v : string >['a', 'b', 'c'] : string[] diff --git a/tests/baselines/reference/ES5For-of34.errors.txt b/tests/baselines/reference/ES5For-of34.errors.txt index 46f9666f7766f..f144c20c30d3b 100644 --- a/tests/baselines/reference/ES5For-of34.errors.txt +++ b/tests/baselines/reference/ES5For-of34.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'. +ES5For-of34.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts (1 errors) ==== +==== ES5For-of34.ts (1 errors) ==== function foo() { return { x: 0 }; } diff --git a/tests/baselines/reference/ES5For-of34.js b/tests/baselines/reference/ES5For-of34.js index efc0361a3397d..37c6d066f6373 100644 --- a/tests/baselines/reference/ES5For-of34.js +++ b/tests/baselines/reference/ES5For-of34.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts] //// + //// [ES5For-of34.ts] function foo() { return { x: 0 }; diff --git a/tests/baselines/reference/ES5For-of34.sourcemap.txt b/tests/baselines/reference/ES5For-of34.sourcemap.txt index f1d020506f46f..028342b62f066 100644 --- a/tests/baselines/reference/ES5For-of34.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of34.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of34.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of34.js +emittedFile:ES5For-of34.js sourceFile:ES5For-of34.ts ------------------------------------------------------------------- >>>var __values = (this && this.__values) || function(o) { diff --git a/tests/baselines/reference/ES5For-of34.symbols b/tests/baselines/reference/ES5For-of34.symbols index 134a7b985b9d3..6f167440f8876 100644 --- a/tests/baselines/reference/ES5For-of34.symbols +++ b/tests/baselines/reference/ES5For-of34.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts] //// + +=== ES5For-of34.ts === function foo() { >foo : Symbol(foo, Decl(ES5For-of34.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5For-of34.types b/tests/baselines/reference/ES5For-of34.types index c565b8c8e871d..3756fa5565ff2 100644 --- a/tests/baselines/reference/ES5For-of34.types +++ b/tests/baselines/reference/ES5For-of34.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts] //// + +=== ES5For-of34.ts === function foo() { >foo : () => { x: number; } diff --git a/tests/baselines/reference/ES5For-of35.errors.txt b/tests/baselines/reference/ES5For-of35.errors.txt index c22dc96e42dce..64fe6dcc61a3a 100644 --- a/tests/baselines/reference/ES5For-of35.errors.txt +++ b/tests/baselines/reference/ES5For-of35.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts(1,13): error TS2339: Property 'x' does not exist on type 'Number'. -tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts(1,23): error TS2339: Property 'y' does not exist on type 'Number'. +ES5For-of35.ts(1,13): error TS2339: Property 'x' does not exist on type 'Number'. +ES5For-of35.ts(1,23): error TS2339: Property 'y' does not exist on type 'Number'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts (2 errors) ==== +==== ES5For-of35.ts (2 errors) ==== for (const {x: a = 0, y: b = 1} of [2, 3]) { ~ !!! error TS2339: Property 'x' does not exist on type 'Number'. diff --git a/tests/baselines/reference/ES5For-of35.js b/tests/baselines/reference/ES5For-of35.js index 5f6d7ed95dca4..b7feda58ce1e4 100644 --- a/tests/baselines/reference/ES5For-of35.js +++ b/tests/baselines/reference/ES5For-of35.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts] //// + //// [ES5For-of35.ts] for (const {x: a = 0, y: b = 1} of [2, 3]) { a; diff --git a/tests/baselines/reference/ES5For-of35.sourcemap.txt b/tests/baselines/reference/ES5For-of35.sourcemap.txt index a6b26628bbacf..c325725fbcbbf 100644 --- a/tests/baselines/reference/ES5For-of35.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of35.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of35.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of35.js +emittedFile:ES5For-of35.js sourceFile:ES5For-of35.ts ------------------------------------------------------------------- >>>var __values = (this && this.__values) || function(o) { diff --git a/tests/baselines/reference/ES5For-of35.symbols b/tests/baselines/reference/ES5For-of35.symbols index e8dcb07ca5a52..8dcd9d0ccddf8 100644 --- a/tests/baselines/reference/ES5For-of35.symbols +++ b/tests/baselines/reference/ES5For-of35.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts] //// + +=== ES5For-of35.ts === for (const {x: a = 0, y: b = 1} of [2, 3]) { >a : Symbol(a, Decl(ES5For-of35.ts, 0, 12)) >b : Symbol(b, Decl(ES5For-of35.ts, 0, 21)) diff --git a/tests/baselines/reference/ES5For-of35.types b/tests/baselines/reference/ES5For-of35.types index dab1b49c57a98..7df7ab76b241f 100644 --- a/tests/baselines/reference/ES5For-of35.types +++ b/tests/baselines/reference/ES5For-of35.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts] //// + +=== ES5For-of35.ts === for (const {x: a = 0, y: b = 1} of [2, 3]) { >x : any >a : any diff --git a/tests/baselines/reference/ES5For-of36.errors.txt b/tests/baselines/reference/ES5For-of36.errors.txt index 86a40dcffa547..2c9458b431d35 100644 --- a/tests/baselines/reference/ES5For-of36.errors.txt +++ b/tests/baselines/reference/ES5For-of36.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts(1,10): error TS2548: Type 'number' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator. +ES5For-of36.ts(1,10): error TS2548: Type 'number' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts (1 errors) ==== +==== ES5For-of36.ts (1 errors) ==== for (let [a = 0, b = 1] of [2, 3]) { ~~~~~~~~~~~~~~ !!! error TS2548: Type 'number' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator. diff --git a/tests/baselines/reference/ES5For-of36.js b/tests/baselines/reference/ES5For-of36.js index 5a3059a186643..be5150ce8f928 100644 --- a/tests/baselines/reference/ES5For-of36.js +++ b/tests/baselines/reference/ES5For-of36.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts] //// + //// [ES5For-of36.ts] for (let [a = 0, b = 1] of [2, 3]) { a; diff --git a/tests/baselines/reference/ES5For-of36.sourcemap.txt b/tests/baselines/reference/ES5For-of36.sourcemap.txt index fa1b383b44cca..c7e72cba05ee5 100644 --- a/tests/baselines/reference/ES5For-of36.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of36.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of36.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of36.js +emittedFile:ES5For-of36.js sourceFile:ES5For-of36.ts ------------------------------------------------------------------- >>>var __values = (this && this.__values) || function(o) { diff --git a/tests/baselines/reference/ES5For-of36.symbols b/tests/baselines/reference/ES5For-of36.symbols index d93f5e3f34b71..5385cfbb0d72d 100644 --- a/tests/baselines/reference/ES5For-of36.symbols +++ b/tests/baselines/reference/ES5For-of36.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts] //// + +=== ES5For-of36.ts === for (let [a = 0, b = 1] of [2, 3]) { >a : Symbol(a, Decl(ES5For-of36.ts, 0, 10)) >b : Symbol(b, Decl(ES5For-of36.ts, 0, 16)) diff --git a/tests/baselines/reference/ES5For-of36.types b/tests/baselines/reference/ES5For-of36.types index 89b88e8b3355d..f0530569894af 100644 --- a/tests/baselines/reference/ES5For-of36.types +++ b/tests/baselines/reference/ES5For-of36.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts] //// + +=== ES5For-of36.ts === for (let [a = 0, b = 1] of [2, 3]) { >a : any >0 : 0 diff --git a/tests/baselines/reference/ES5For-of37.js b/tests/baselines/reference/ES5For-of37.js index 3d1bd3b00fcb2..5f388c3ae482d 100644 --- a/tests/baselines/reference/ES5For-of37.js +++ b/tests/baselines/reference/ES5For-of37.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts] //// + //// [ES5For-of37.ts] // https://github.com/microsoft/TypeScript/issues/30083 diff --git a/tests/baselines/reference/ES5For-of37.symbols b/tests/baselines/reference/ES5For-of37.symbols index 5c36b44170657..e23334fe836ef 100644 --- a/tests/baselines/reference/ES5For-of37.symbols +++ b/tests/baselines/reference/ES5For-of37.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts] //// + +=== ES5For-of37.ts === // https://github.com/microsoft/TypeScript/issues/30083 for (const i of [0, 1, 2, 3, 4]) { diff --git a/tests/baselines/reference/ES5For-of37.types b/tests/baselines/reference/ES5For-of37.types index bf62ed1f73552..7919756833a02 100644 --- a/tests/baselines/reference/ES5For-of37.types +++ b/tests/baselines/reference/ES5For-of37.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts] //// + +=== ES5For-of37.ts === // https://github.com/microsoft/TypeScript/issues/30083 for (const i of [0, 1, 2, 3, 4]) { diff --git a/tests/baselines/reference/ES5For-of4.js b/tests/baselines/reference/ES5For-of4.js index 44d486dddf01a..f9966ad370998 100644 --- a/tests/baselines/reference/ES5For-of4.js +++ b/tests/baselines/reference/ES5For-of4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts] //// + //// [ES5For-of4.ts] for (var v of []) var x = v; diff --git a/tests/baselines/reference/ES5For-of4.symbols b/tests/baselines/reference/ES5For-of4.symbols index f79e09b366f34..ef390450d7960 100644 --- a/tests/baselines/reference/ES5For-of4.symbols +++ b/tests/baselines/reference/ES5For-of4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts] //// + +=== ES5For-of4.ts === for (var v of []) >v : Symbol(v, Decl(ES5For-of4.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of4.types b/tests/baselines/reference/ES5For-of4.types index 9396096746c2f..495a2ba677a53 100644 --- a/tests/baselines/reference/ES5For-of4.types +++ b/tests/baselines/reference/ES5For-of4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts] //// + +=== ES5For-of4.ts === for (var v of []) >v : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of5.js b/tests/baselines/reference/ES5For-of5.js index 8e1a37db06173..42dc8a621accb 100644 --- a/tests/baselines/reference/ES5For-of5.js +++ b/tests/baselines/reference/ES5For-of5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts] //// + //// [ES5For-of5.ts] for (var _a of []) { var x = _a; diff --git a/tests/baselines/reference/ES5For-of5.symbols b/tests/baselines/reference/ES5For-of5.symbols index 9cf59c68c2bbb..dc6c85fc6ab5a 100644 --- a/tests/baselines/reference/ES5For-of5.symbols +++ b/tests/baselines/reference/ES5For-of5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts] //// + +=== ES5For-of5.ts === for (var _a of []) { >_a : Symbol(_a, Decl(ES5For-of5.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of5.types b/tests/baselines/reference/ES5For-of5.types index dd9aa285edba0..be35678c1c9ce 100644 --- a/tests/baselines/reference/ES5For-of5.types +++ b/tests/baselines/reference/ES5For-of5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts] //// + +=== ES5For-of5.ts === for (var _a of []) { >_a : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of6.js b/tests/baselines/reference/ES5For-of6.js index bf966a0a5aea7..1023bbf09269c 100644 --- a/tests/baselines/reference/ES5For-of6.js +++ b/tests/baselines/reference/ES5For-of6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts] //// + //// [ES5For-of6.ts] for (var w of []) { for (var v of []) { diff --git a/tests/baselines/reference/ES5For-of6.symbols b/tests/baselines/reference/ES5For-of6.symbols index 3bdae94703856..2b758d1006d41 100644 --- a/tests/baselines/reference/ES5For-of6.symbols +++ b/tests/baselines/reference/ES5For-of6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts] //// + +=== ES5For-of6.ts === for (var w of []) { >w : Symbol(w, Decl(ES5For-of6.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of6.types b/tests/baselines/reference/ES5For-of6.types index e2d2f872809d4..e3e27d510f793 100644 --- a/tests/baselines/reference/ES5For-of6.types +++ b/tests/baselines/reference/ES5For-of6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts] //// + +=== ES5For-of6.ts === for (var w of []) { >w : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of7.errors.txt b/tests/baselines/reference/ES5For-of7.errors.txt index 460c7bf468091..321726f9e2572 100644 --- a/tests/baselines/reference/ES5For-of7.errors.txt +++ b/tests/baselines/reference/ES5For-of7.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(6,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'any[]'. +ES5For-of7.ts(6,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'any[]'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts (1 errors) ==== +==== ES5For-of7.ts (1 errors) ==== for (var w of []) { var x = w; } @@ -10,5 +10,5 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(6,9): error TS var x = [w, v]; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'any[]'. -!!! related TS6203 tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts:2:9: 'x' was also declared here. +!!! related TS6203 ES5For-of7.ts:2:9: 'x' was also declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of7.js b/tests/baselines/reference/ES5For-of7.js index ad2302cdc5c5c..b51417005045a 100644 --- a/tests/baselines/reference/ES5For-of7.js +++ b/tests/baselines/reference/ES5For-of7.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts] //// + //// [ES5For-of7.ts] for (var w of []) { var x = w; diff --git a/tests/baselines/reference/ES5For-of7.symbols b/tests/baselines/reference/ES5For-of7.symbols index c6cb92b6d8808..dd673610c5b81 100644 --- a/tests/baselines/reference/ES5For-of7.symbols +++ b/tests/baselines/reference/ES5For-of7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts] //// + +=== ES5For-of7.ts === for (var w of []) { >w : Symbol(w, Decl(ES5For-of7.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-of7.types b/tests/baselines/reference/ES5For-of7.types index 6e1fdc25ea994..e3b291717ea56 100644 --- a/tests/baselines/reference/ES5For-of7.types +++ b/tests/baselines/reference/ES5For-of7.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts] //// + +=== ES5For-of7.ts === for (var w of []) { >w : any >[] : undefined[] diff --git a/tests/baselines/reference/ES5For-of8.errors.txt b/tests/baselines/reference/ES5For-of8.errors.txt index 7cc3c87127783..707302366a09c 100644 --- a/tests/baselines/reference/ES5For-of8.errors.txt +++ b/tests/baselines/reference/ES5For-of8.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'. +ES5For-of8.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts (1 errors) ==== +==== ES5For-of8.ts (1 errors) ==== function foo() { return { x: 0 }; } diff --git a/tests/baselines/reference/ES5For-of8.js b/tests/baselines/reference/ES5For-of8.js index dbe747b9690cb..72badc560ca64 100644 --- a/tests/baselines/reference/ES5For-of8.js +++ b/tests/baselines/reference/ES5For-of8.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts] //// + //// [ES5For-of8.ts] function foo() { return { x: 0 }; diff --git a/tests/baselines/reference/ES5For-of8.sourcemap.txt b/tests/baselines/reference/ES5For-of8.sourcemap.txt index 36c65d5a10df9..87142fc096a24 100644 --- a/tests/baselines/reference/ES5For-of8.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of8.sourcemap.txt @@ -5,7 +5,7 @@ sourceRoot: sources: ES5For-of8.ts =================================================================== ------------------------------------------------------------------- -emittedFile:tests/cases/conformance/statements/for-ofStatements/ES5For-of8.js +emittedFile:ES5For-of8.js sourceFile:ES5For-of8.ts ------------------------------------------------------------------- >>>function foo() { diff --git a/tests/baselines/reference/ES5For-of8.symbols b/tests/baselines/reference/ES5For-of8.symbols index e04c3ee7c09d5..2cbf0905d3f9a 100644 --- a/tests/baselines/reference/ES5For-of8.symbols +++ b/tests/baselines/reference/ES5For-of8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts] //// + +=== ES5For-of8.ts === function foo() { >foo : Symbol(foo, Decl(ES5For-of8.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5For-of8.types b/tests/baselines/reference/ES5For-of8.types index eca192ab61285..b2e7d19de712f 100644 --- a/tests/baselines/reference/ES5For-of8.types +++ b/tests/baselines/reference/ES5For-of8.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts] //// + +=== ES5For-of8.ts === function foo() { >foo : () => { x: number; } diff --git a/tests/baselines/reference/ES5For-of9.js b/tests/baselines/reference/ES5For-of9.js index 3a2cd2b1f74b6..79c18f4c7421a 100644 --- a/tests/baselines/reference/ES5For-of9.js +++ b/tests/baselines/reference/ES5For-of9.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts] //// + //// [ES5For-of9.ts] function foo() { return { x: 0 }; diff --git a/tests/baselines/reference/ES5For-of9.symbols b/tests/baselines/reference/ES5For-of9.symbols index 426a5442ecbd5..a40cfc6e4d121 100644 --- a/tests/baselines/reference/ES5For-of9.symbols +++ b/tests/baselines/reference/ES5For-of9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts] //// + +=== ES5For-of9.ts === function foo() { >foo : Symbol(foo, Decl(ES5For-of9.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5For-of9.types b/tests/baselines/reference/ES5For-of9.types index 6df6e295d759e..2ee3a5af1dde2 100644 --- a/tests/baselines/reference/ES5For-of9.types +++ b/tests/baselines/reference/ES5For-of9.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts] //// + +=== ES5For-of9.ts === function foo() { >foo : () => { x: number; } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1.js b/tests/baselines/reference/ES5For-ofTypeCheck1.js index f1522e512b60d..3c675ab41b9d7 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck1.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts] //// + //// [ES5For-ofTypeCheck1.ts] for (var v of "") { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1.symbols b/tests/baselines/reference/ES5For-ofTypeCheck1.symbols index 83b7fbd0d2cc8..01901f1612f59 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck1.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts] //// + +=== ES5For-ofTypeCheck1.ts === for (var v of "") { } >v : Symbol(v, Decl(ES5For-ofTypeCheck1.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck1.types b/tests/baselines/reference/ES5For-ofTypeCheck1.types index 6faba8c23aaa3..21e2c7bd129e6 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck1.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck1.ts] //// + +=== ES5For-ofTypeCheck1.ts === for (var v of "") { } >v : string >"" : "" diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt index 4be1397aab91a..bc8d50891705d 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' 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. -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. +ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' 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. +ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts (2 errors) ==== +==== ES5For-ofTypeCheck10.ts (2 errors) ==== // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { next() { diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.js b/tests/baselines/reference/ES5For-ofTypeCheck10.js index 85d44ca255005..efe4b27967d11 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// + //// [ES5For-ofTypeCheck10.ts] // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.symbols b/tests/baselines/reference/ES5For-ofTypeCheck10.symbols index 5267dd2fbc5e1..d6764447cfbeb 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// + +=== ES5For-ofTypeCheck10.ts === // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { >StringIterator : Symbol(StringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.types b/tests/baselines/reference/ES5For-ofTypeCheck10.types index a8f8d99050651..dca28a7663909 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// + +=== ES5For-ofTypeCheck10.ts === // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { >StringIterator : StringIterator diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt index 635bb09616afa..0c850f5ff5499 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts(3,6): error TS2322: Type 'string | number' is not assignable to type 'string'. +ES5For-ofTypeCheck11.ts(3,6): error TS2322: Type 'string | number' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts (1 errors) ==== +==== ES5For-ofTypeCheck11.ts (1 errors) ==== var union: string | number[]; var v: string; for (v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.js b/tests/baselines/reference/ES5For-ofTypeCheck11.js index ce43942775583..a601d2f658a11 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] //// + //// [ES5For-ofTypeCheck11.ts] var union: string | number[]; var v: string; diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.symbols b/tests/baselines/reference/ES5For-ofTypeCheck11.symbols index 412920f67dec8..51a72d9f37362 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] //// + +=== ES5For-ofTypeCheck11.ts === var union: string | number[]; >union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck11.types b/tests/baselines/reference/ES5For-ofTypeCheck11.types index c18aa4bcd8724..e04a352b6e4ce 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck11.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck11.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] //// + +=== ES5For-ofTypeCheck11.ts === var union: string | number[]; >union : string | number[] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt index 5310d5886197b..da876badcdddb 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck12.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts(1,17): error TS2495: Type '0' is not an array type or a string type. +ES5For-ofTypeCheck12.ts(1,17): error TS2495: Type '0' is not an array type or a string type. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts (1 errors) ==== +==== ES5For-ofTypeCheck12.ts (1 errors) ==== for (const v of 0) { } ~ !!! error TS2495: Type '0' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12.js b/tests/baselines/reference/ES5For-ofTypeCheck12.js index 6004990f6dc12..6b3a16973f301 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck12.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck12.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts] //// + //// [ES5For-ofTypeCheck12.ts] for (const v of 0) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12.symbols b/tests/baselines/reference/ES5For-ofTypeCheck12.symbols index 425aeb6e63ff5..3f16282e32e29 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck12.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck12.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts] //// + +=== ES5For-ofTypeCheck12.ts === for (const v of 0) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck12.ts, 0, 10)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck12.types b/tests/baselines/reference/ES5For-ofTypeCheck12.types index 533c44edd510a..5b9cc9fc415cf 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck12.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck12.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts] //// + +=== ES5For-ofTypeCheck12.ts === for (const v of 0) { } >v : any >0 : 0 diff --git a/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt index 4d680b362ace9..84bbb524a371d 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck13.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts(4,19): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +ES5For-ofTypeCheck13.ts(4,19): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts (1 errors) ==== +==== ES5For-ofTypeCheck13.ts (1 errors) ==== const strSet: Set = new Set() strSet.add('Hello') strSet.add('World') diff --git a/tests/baselines/reference/ES5For-ofTypeCheck13.js b/tests/baselines/reference/ES5For-ofTypeCheck13.js index 216aa57f97c4d..b2a0b7bfcfbf4 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck13.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck13.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts] //// + //// [ES5For-ofTypeCheck13.ts] const strSet: Set = new Set() strSet.add('Hello') diff --git a/tests/baselines/reference/ES5For-ofTypeCheck13.symbols b/tests/baselines/reference/ES5For-ofTypeCheck13.symbols index 4e1cb8369d243..4c7557d45d2ab 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck13.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts] //// + +=== ES5For-ofTypeCheck13.ts === const strSet: Set = new Set() >strSet : Symbol(strSet, Decl(ES5For-ofTypeCheck13.ts, 0, 5)) >Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck13.types b/tests/baselines/reference/ES5For-ofTypeCheck13.types index 407f925b4e329..4c6d8f298ff46 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck13.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck13.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck13.ts] //// + +=== ES5For-ofTypeCheck13.ts === const strSet: Set = new Set() >strSet : Set >new Set() : Set diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt index e815c53e2f3f8..68d5353f1a606 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts(2,17): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +ES5For-ofTypeCheck14.ts(2,17): error TS2802: Type 'Set' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts (1 errors) ==== +==== ES5For-ofTypeCheck14.ts (1 errors) ==== var union: string | Set for (const e of union) { } ~~~~~ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.js b/tests/baselines/reference/ES5For-ofTypeCheck14.js index 87e55c41a0eff..c97179f60e279 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] //// + //// [ES5For-ofTypeCheck14.ts] var union: string | Set for (const e of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.symbols b/tests/baselines/reference/ES5For-ofTypeCheck14.symbols index 2d2357e7e2f8f..49354157b12a0 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] //// + +=== ES5For-ofTypeCheck14.ts === var union: string | Set >union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 3)) >Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck14.types b/tests/baselines/reference/ES5For-ofTypeCheck14.types index 7f8da376d1c9a..c21d889e4c08d 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck14.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck14.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] //// + +=== ES5For-ofTypeCheck14.ts === var union: string | Set >union : string | Set diff --git a/tests/baselines/reference/ES5For-ofTypeCheck2.js b/tests/baselines/reference/ES5For-ofTypeCheck2.js index 587de4f82fff1..ba855f712c725 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck2.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts] //// + //// [ES5For-ofTypeCheck2.ts] for (var v of [true]) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck2.symbols b/tests/baselines/reference/ES5For-ofTypeCheck2.symbols index cd1d3f346e837..ba1baa606b955 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck2.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts] //// + +=== ES5For-ofTypeCheck2.ts === for (var v of [true]) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck2.ts, 0, 8)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck2.types b/tests/baselines/reference/ES5For-ofTypeCheck2.types index f6c9b7c8ba40d..47b097c428936 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck2.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck2.ts] //// + +=== ES5For-ofTypeCheck2.ts === for (var v of [true]) { } >v : boolean >[true] : boolean[] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3.js b/tests/baselines/reference/ES5For-ofTypeCheck3.js index 61a60727cba13..91f78c704b6bb 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck3.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts] //// + //// [ES5For-ofTypeCheck3.ts] var tuple: [string, number] = ["", 0]; for (var v of tuple) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3.symbols b/tests/baselines/reference/ES5For-ofTypeCheck3.symbols index 82196315ca628..269866024e3e4 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck3.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts] //// + +=== ES5For-ofTypeCheck3.ts === var tuple: [string, number] = ["", 0]; >tuple : Symbol(tuple, Decl(ES5For-ofTypeCheck3.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck3.types b/tests/baselines/reference/ES5For-ofTypeCheck3.types index d46cdd0172d56..d00152ee23fe2 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck3.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck3.ts] //// + +=== ES5For-ofTypeCheck3.ts === var tuple: [string, number] = ["", 0]; >tuple : [string, number] >["", 0] : [string, number] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck4.js b/tests/baselines/reference/ES5For-ofTypeCheck4.js index 6240b6a799a48..6ee223b523698 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck4.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts] //// + //// [ES5For-ofTypeCheck4.ts] var union: string | string[]; for (const v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck4.symbols b/tests/baselines/reference/ES5For-ofTypeCheck4.symbols index 7d3dac4ef81f0..f71743bec5408 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck4.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts] //// + +=== ES5For-ofTypeCheck4.ts === var union: string | string[]; >union : Symbol(union, Decl(ES5For-ofTypeCheck4.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck4.types b/tests/baselines/reference/ES5For-ofTypeCheck4.types index 4f5721a06045c..a46215a016de7 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck4.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts] //// + +=== ES5For-ofTypeCheck4.ts === var union: string | string[]; >union : string | string[] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck5.js b/tests/baselines/reference/ES5For-ofTypeCheck5.js index 0d285d67d8b5d..143f3508758aa 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck5.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts] //// + //// [ES5For-ofTypeCheck5.ts] var union: string | number[]; for (var v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck5.symbols b/tests/baselines/reference/ES5For-ofTypeCheck5.symbols index 41f80949e52e5..f2466f09cb132 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck5.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts] //// + +=== ES5For-ofTypeCheck5.ts === var union: string | number[]; >union : Symbol(union, Decl(ES5For-ofTypeCheck5.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck5.types b/tests/baselines/reference/ES5For-ofTypeCheck5.types index ed3d13f3918a7..d939b023a6353 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck5.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck5.ts] //// + +=== ES5For-ofTypeCheck5.ts === var union: string | number[]; >union : string | number[] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck6.js b/tests/baselines/reference/ES5For-ofTypeCheck6.js index c99fd415b23ae..0a7fbd19a15c5 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck6.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts] //// + //// [ES5For-ofTypeCheck6.ts] var union: string[] | number[]; for (var v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck6.symbols b/tests/baselines/reference/ES5For-ofTypeCheck6.symbols index 4c362bf9bc7e2..c69262d78f137 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck6.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts] //// + +=== ES5For-ofTypeCheck6.ts === var union: string[] | number[]; >union : Symbol(union, Decl(ES5For-ofTypeCheck6.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck6.types b/tests/baselines/reference/ES5For-ofTypeCheck6.types index 87999d9b0ca2e..a5e58bae7de43 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck6.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck6.ts] //// + +=== ES5For-ofTypeCheck6.ts === var union: string[] | number[]; >union : string[] | number[] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt index 9006b5a277981..2b66cf9f1fedb 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts(2,15): error TS2461: Type 'number' is not an array type. +ES5For-ofTypeCheck7.ts(2,15): error TS2461: Type 'number' is not an array type. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts (1 errors) ==== +==== ES5For-ofTypeCheck7.ts (1 errors) ==== var union: string | number; for (var v of union) { } ~~~~~ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.js b/tests/baselines/reference/ES5For-ofTypeCheck7.js index 1bd360e5132fd..1fe4b50ebaeb7 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] //// + //// [ES5For-ofTypeCheck7.ts] var union: string | number; for (var v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.symbols b/tests/baselines/reference/ES5For-ofTypeCheck7.symbols index ecdce4da59ebe..f6af471545832 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] //// + +=== ES5For-ofTypeCheck7.ts === var union: string | number; >union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck7.types b/tests/baselines/reference/ES5For-ofTypeCheck7.types index 846fc0b8bfc54..b4600951c4290 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck7.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck7.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] //// + +=== ES5For-ofTypeCheck7.ts === var union: string | number; >union : string | number diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt index 0cb52dbb21b60..0ad1495cebc23 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts(3,6): error TS2322: Type 'string | number | symbol' is not assignable to type 'symbol'. +ES5For-ofTypeCheck8.ts(3,6): error TS2322: Type 'string | number | symbol' is not assignable to type 'symbol'. Type 'string' is not assignable to type 'symbol'. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts (1 errors) ==== +==== ES5For-ofTypeCheck8.ts (1 errors) ==== var union: string | string[]| number[]| symbol[]; var v: symbol; for (v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.js b/tests/baselines/reference/ES5For-ofTypeCheck8.js index ae4a823a18cb4..6f126c036b4ca 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] //// + //// [ES5For-ofTypeCheck8.ts] var union: string | string[]| number[]| symbol[]; var v: symbol; diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.symbols b/tests/baselines/reference/ES5For-ofTypeCheck8.symbols index 67af60ffbd165..a73daf86cf977 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] //// + +=== ES5For-ofTypeCheck8.ts === var union: string | string[]| number[]| symbol[]; >union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck8.types b/tests/baselines/reference/ES5For-ofTypeCheck8.types index 6888680db9328..777fcf0eb6338 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck8.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck8.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] //// + +=== ES5For-ofTypeCheck8.ts === var union: string | string[]| number[]| symbol[]; >union : string | string[] | number[] | symbol[] diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt index 156eb18880367..681af2013de23 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts(2,15): error TS2461: Type 'number | symbol | string[]' is not an array type. +ES5For-ofTypeCheck9.ts(2,15): error TS2461: Type 'number | symbol | string[]' is not an array type. -==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts (1 errors) ==== +==== ES5For-ofTypeCheck9.ts (1 errors) ==== var union: string | string[] | number | symbol; for (let v of union) { } ~~~~~ diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.js b/tests/baselines/reference/ES5For-ofTypeCheck9.js index 3e18c2da31f94..00667fc24d45b 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] //// + //// [ES5For-ofTypeCheck9.ts] var union: string | string[] | number | symbol; for (let v of union) { } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.symbols b/tests/baselines/reference/ES5For-ofTypeCheck9.symbols index d820fb62ae873..8e157cb7c299d 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] //// + +=== ES5For-ofTypeCheck9.ts === var union: string | string[] | number | symbol; >union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck9.types b/tests/baselines/reference/ES5For-ofTypeCheck9.types index 19c1c593d6e15..57020d46206d9 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck9.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck9.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] //// + +=== ES5For-ofTypeCheck9.ts === var union: string | string[] | number | symbol; >union : string | number | symbol | string[] diff --git a/tests/baselines/reference/ES5SymbolProperty1.js b/tests/baselines/reference/ES5SymbolProperty1.js index 4300218c62668..6e0979c35a64d 100644 --- a/tests/baselines/reference/ES5SymbolProperty1.js +++ b/tests/baselines/reference/ES5SymbolProperty1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// + //// [ES5SymbolProperty1.ts] interface SymbolConstructor { foo: string; diff --git a/tests/baselines/reference/ES5SymbolProperty1.symbols b/tests/baselines/reference/ES5SymbolProperty1.symbols index a828129e359c0..7e7e691a130b1 100644 --- a/tests/baselines/reference/ES5SymbolProperty1.symbols +++ b/tests/baselines/reference/ES5SymbolProperty1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty1.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// + +=== ES5SymbolProperty1.ts === interface SymbolConstructor { >SymbolConstructor : Symbol(SymbolConstructor, Decl(ES5SymbolProperty1.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5SymbolProperty1.types b/tests/baselines/reference/ES5SymbolProperty1.types index 7b6ac592cbc9c..d4e0ae2402093 100644 --- a/tests/baselines/reference/ES5SymbolProperty1.types +++ b/tests/baselines/reference/ES5SymbolProperty1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty1.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// + +=== ES5SymbolProperty1.ts === interface SymbolConstructor { foo: string; >foo : string diff --git a/tests/baselines/reference/ES5SymbolProperty2.errors.txt b/tests/baselines/reference/ES5SymbolProperty2.errors.txt index d8b6263733b43..21ade634ca8b0 100644 --- a/tests/baselines/reference/ES5SymbolProperty2.errors.txt +++ b/tests/baselines/reference/ES5SymbolProperty2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' 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. +ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' 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. -==== tests/cases/conformance/Symbols/ES5SymbolProperty2.ts (1 errors) ==== +==== ES5SymbolProperty2.ts (1 errors) ==== module M { var Symbol: any; diff --git a/tests/baselines/reference/ES5SymbolProperty2.js b/tests/baselines/reference/ES5SymbolProperty2.js index 3de8541a6c94d..c7b34e17f1a17 100644 --- a/tests/baselines/reference/ES5SymbolProperty2.js +++ b/tests/baselines/reference/ES5SymbolProperty2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// + //// [ES5SymbolProperty2.ts] module M { var Symbol: any; diff --git a/tests/baselines/reference/ES5SymbolProperty2.symbols b/tests/baselines/reference/ES5SymbolProperty2.symbols index 38b0bc9a19fb6..5b93a97c553d1 100644 --- a/tests/baselines/reference/ES5SymbolProperty2.symbols +++ b/tests/baselines/reference/ES5SymbolProperty2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty2.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// + +=== ES5SymbolProperty2.ts === module M { >M : Symbol(M, Decl(ES5SymbolProperty2.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5SymbolProperty2.types b/tests/baselines/reference/ES5SymbolProperty2.types index 8ca1614de7f0d..c9b2d60532317 100644 --- a/tests/baselines/reference/ES5SymbolProperty2.types +++ b/tests/baselines/reference/ES5SymbolProperty2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty2.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// + +=== ES5SymbolProperty2.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/ES5SymbolProperty3.js b/tests/baselines/reference/ES5SymbolProperty3.js index 362fcfc7375ed..1f8e9732f5ac4 100644 --- a/tests/baselines/reference/ES5SymbolProperty3.js +++ b/tests/baselines/reference/ES5SymbolProperty3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// + //// [ES5SymbolProperty3.ts] var Symbol: any; diff --git a/tests/baselines/reference/ES5SymbolProperty3.symbols b/tests/baselines/reference/ES5SymbolProperty3.symbols index db6fd3eef2b6e..23a72379506be 100644 --- a/tests/baselines/reference/ES5SymbolProperty3.symbols +++ b/tests/baselines/reference/ES5SymbolProperty3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty3.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// + +=== ES5SymbolProperty3.ts === var Symbol: any; >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5SymbolProperty3.types b/tests/baselines/reference/ES5SymbolProperty3.types index 979f507c2037a..784de7ac53df3 100644 --- a/tests/baselines/reference/ES5SymbolProperty3.types +++ b/tests/baselines/reference/ES5SymbolProperty3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty3.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// + +=== ES5SymbolProperty3.ts === var Symbol: any; >Symbol : any diff --git a/tests/baselines/reference/ES5SymbolProperty4.js b/tests/baselines/reference/ES5SymbolProperty4.js index f756a730d52d8..d772f7c2364cb 100644 --- a/tests/baselines/reference/ES5SymbolProperty4.js +++ b/tests/baselines/reference/ES5SymbolProperty4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// + //// [ES5SymbolProperty4.ts] var Symbol: { iterator: string }; diff --git a/tests/baselines/reference/ES5SymbolProperty4.symbols b/tests/baselines/reference/ES5SymbolProperty4.symbols index 6c6aab627e6b2..d20f790a033eb 100644 --- a/tests/baselines/reference/ES5SymbolProperty4.symbols +++ b/tests/baselines/reference/ES5SymbolProperty4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty4.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// + +=== ES5SymbolProperty4.ts === var Symbol: { iterator: string }; >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty4.ts, 0, 3)) >iterator : Symbol(iterator, Decl(ES5SymbolProperty4.ts, 0, 13)) diff --git a/tests/baselines/reference/ES5SymbolProperty4.types b/tests/baselines/reference/ES5SymbolProperty4.types index 1dc0b90062a8d..4192abde10c4b 100644 --- a/tests/baselines/reference/ES5SymbolProperty4.types +++ b/tests/baselines/reference/ES5SymbolProperty4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty4.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// + +=== ES5SymbolProperty4.ts === var Symbol: { iterator: string }; >Symbol : { iterator: string; } >iterator : string diff --git a/tests/baselines/reference/ES5SymbolProperty5.js b/tests/baselines/reference/ES5SymbolProperty5.js index c146b8dd5f1e5..b7d21bec4a0a4 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.js +++ b/tests/baselines/reference/ES5SymbolProperty5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// + //// [ES5SymbolProperty5.ts] var Symbol: { iterator: symbol }; diff --git a/tests/baselines/reference/ES5SymbolProperty5.symbols b/tests/baselines/reference/ES5SymbolProperty5.symbols index c5610b9ce2c4b..940770823c0f3 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.symbols +++ b/tests/baselines/reference/ES5SymbolProperty5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty5.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// + +=== ES5SymbolProperty5.ts === var Symbol: { iterator: symbol }; >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3)) >iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13)) diff --git a/tests/baselines/reference/ES5SymbolProperty5.types b/tests/baselines/reference/ES5SymbolProperty5.types index 433d5165855b8..70728b9e297c8 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.types +++ b/tests/baselines/reference/ES5SymbolProperty5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty5.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// + +=== ES5SymbolProperty5.ts === var Symbol: { iterator: symbol }; >Symbol : { iterator: symbol; } >iterator : symbol diff --git a/tests/baselines/reference/ES5SymbolProperty6.errors.txt b/tests/baselines/reference/ES5SymbolProperty6.errors.txt index 5b49ecae0e5f5..3b575eaf033eb 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.errors.txt +++ b/tests/baselines/reference/ES5SymbolProperty6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' 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. -tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' 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. +ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' 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. +ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' 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. -==== tests/cases/conformance/Symbols/ES5SymbolProperty6.ts (2 errors) ==== +==== ES5SymbolProperty6.ts (2 errors) ==== class C { [Symbol.iterator]() { } ~~~~~~ diff --git a/tests/baselines/reference/ES5SymbolProperty6.js b/tests/baselines/reference/ES5SymbolProperty6.js index f9a5adec81570..d167efaa059f2 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.js +++ b/tests/baselines/reference/ES5SymbolProperty6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// + //// [ES5SymbolProperty6.ts] class C { [Symbol.iterator]() { } diff --git a/tests/baselines/reference/ES5SymbolProperty6.symbols b/tests/baselines/reference/ES5SymbolProperty6.symbols index d494d6ebfe9a4..9083c8637b018 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.symbols +++ b/tests/baselines/reference/ES5SymbolProperty6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty6.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// + +=== ES5SymbolProperty6.ts === class C { >C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5SymbolProperty6.types b/tests/baselines/reference/ES5SymbolProperty6.types index 3d1365f374b28..efbb66ceb6647 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.types +++ b/tests/baselines/reference/ES5SymbolProperty6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty6.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// + +=== ES5SymbolProperty6.ts === class C { >C : C diff --git a/tests/baselines/reference/ES5SymbolProperty7.js b/tests/baselines/reference/ES5SymbolProperty7.js index f874c4c77cd39..4921c9eeb1af6 100644 --- a/tests/baselines/reference/ES5SymbolProperty7.js +++ b/tests/baselines/reference/ES5SymbolProperty7.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// + //// [ES5SymbolProperty7.ts] var Symbol: { iterator: any }; diff --git a/tests/baselines/reference/ES5SymbolProperty7.symbols b/tests/baselines/reference/ES5SymbolProperty7.symbols index ac27f979b084e..7327cfaa1b2ab 100644 --- a/tests/baselines/reference/ES5SymbolProperty7.symbols +++ b/tests/baselines/reference/ES5SymbolProperty7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty7.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// + +=== ES5SymbolProperty7.ts === var Symbol: { iterator: any }; >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty7.ts, 0, 3)) >iterator : Symbol(iterator, Decl(ES5SymbolProperty7.ts, 0, 13)) diff --git a/tests/baselines/reference/ES5SymbolProperty7.types b/tests/baselines/reference/ES5SymbolProperty7.types index fd1404a98ba13..92c9334590122 100644 --- a/tests/baselines/reference/ES5SymbolProperty7.types +++ b/tests/baselines/reference/ES5SymbolProperty7.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolProperty7.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// + +=== ES5SymbolProperty7.ts === var Symbol: { iterator: any }; >Symbol : { iterator: any; } >iterator : any diff --git a/tests/baselines/reference/ES5SymbolType1.js b/tests/baselines/reference/ES5SymbolType1.js index 5b555c19e7ca9..0709bb89a8d27 100644 --- a/tests/baselines/reference/ES5SymbolType1.js +++ b/tests/baselines/reference/ES5SymbolType1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolType1.ts] //// + //// [ES5SymbolType1.ts] var s: symbol; s.toString(); diff --git a/tests/baselines/reference/ES5SymbolType1.symbols b/tests/baselines/reference/ES5SymbolType1.symbols index a0af3b5970615..d31cd5558ad81 100644 --- a/tests/baselines/reference/ES5SymbolType1.symbols +++ b/tests/baselines/reference/ES5SymbolType1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolType1.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolType1.ts] //// + +=== ES5SymbolType1.ts === var s: symbol; >s : Symbol(s, Decl(ES5SymbolType1.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5SymbolType1.types b/tests/baselines/reference/ES5SymbolType1.types index 79d93902fd6a2..d483537f37aaf 100644 --- a/tests/baselines/reference/ES5SymbolType1.types +++ b/tests/baselines/reference/ES5SymbolType1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/Symbols/ES5SymbolType1.ts === +//// [tests/cases/conformance/Symbols/ES5SymbolType1.ts] //// + +=== ES5SymbolType1.ts === var s: symbol; >s : symbol diff --git a/tests/baselines/reference/ES5for-of32.js b/tests/baselines/reference/ES5for-of32.js index 747f9524062f6..044002ebe8ccd 100644 --- a/tests/baselines/reference/ES5for-of32.js +++ b/tests/baselines/reference/ES5for-of32.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts] //// + //// [ES5for-of32.ts] var array = [1,2,3]; var sum = 0; diff --git a/tests/baselines/reference/ES5for-of32.symbols b/tests/baselines/reference/ES5for-of32.symbols index b6fa8810382d6..41ac3447f94d3 100644 --- a/tests/baselines/reference/ES5for-of32.symbols +++ b/tests/baselines/reference/ES5for-of32.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts] //// + +=== ES5for-of32.ts === var array = [1,2,3]; >array : Symbol(array, Decl(ES5for-of32.ts, 0, 3)) diff --git a/tests/baselines/reference/ES5for-of32.types b/tests/baselines/reference/ES5for-of32.types index 22e387d8484e4..1c3f924b8aa29 100644 --- a/tests/baselines/reference/ES5for-of32.types +++ b/tests/baselines/reference/ES5for-of32.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts === +//// [tests/cases/conformance/statements/for-ofStatements/ES5for-of32.ts] //// + +=== ES5for-of32.ts === var array = [1,2,3]; >array : number[] >[1,2,3] : number[] diff --git a/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.js index 40075310eb1f5..a1f1d12ba161b 100644 --- a/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts] //// + //// [EnumAndModuleWithSameNameAndCommonRoot.ts] enum enumdule { Red, Blue diff --git a/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.symbols index 30eca163cda09..9a076862270df 100644 --- a/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts] //// + +=== EnumAndModuleWithSameNameAndCommonRoot.ts === enum enumdule { >enumdule : Symbol(enumdule, Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 0, 0), Decl(EnumAndModuleWithSameNameAndCommonRoot.ts, 2, 1)) diff --git a/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.types b/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.types index c41d75706ae7e..6ce3081a22e8e 100644 --- a/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/EnumAndModuleWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts] //// + +=== EnumAndModuleWithSameNameAndCommonRoot.ts === enum enumdule { >enumdule : enumdule diff --git a/tests/baselines/reference/ExportAssignment7.errors.txt b/tests/baselines/reference/ExportAssignment7.errors.txt index 6535428e2e4ab..73cf872eed03a 100644 --- a/tests/baselines/reference/ExportAssignment7.errors.txt +++ b/tests/baselines/reference/ExportAssignment7.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'. +ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'. -==== tests/cases/compiler/ExportAssignment7.ts (2 errors) ==== +==== ExportAssignment7.ts (2 errors) ==== export class C { } diff --git a/tests/baselines/reference/ExportAssignment7.js b/tests/baselines/reference/ExportAssignment7.js index 1d774f62a8f7c..b700e79cfcb3c 100644 --- a/tests/baselines/reference/ExportAssignment7.js +++ b/tests/baselines/reference/ExportAssignment7.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ExportAssignment7.ts] //// + //// [ExportAssignment7.ts] export class C { } diff --git a/tests/baselines/reference/ExportAssignment7.symbols b/tests/baselines/reference/ExportAssignment7.symbols index 162c9c2911e9f..d21c2372ac04e 100644 --- a/tests/baselines/reference/ExportAssignment7.symbols +++ b/tests/baselines/reference/ExportAssignment7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ExportAssignment7.ts === +//// [tests/cases/compiler/ExportAssignment7.ts] //// + +=== ExportAssignment7.ts === export class C { >C : Symbol(C, Decl(ExportAssignment7.ts, 0, 0)) } diff --git a/tests/baselines/reference/ExportAssignment7.types b/tests/baselines/reference/ExportAssignment7.types index cf1f3ef795607..78bf1818d1411 100644 --- a/tests/baselines/reference/ExportAssignment7.types +++ b/tests/baselines/reference/ExportAssignment7.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ExportAssignment7.ts === +//// [tests/cases/compiler/ExportAssignment7.ts] //// + +=== ExportAssignment7.ts === export class C { >C : C } diff --git a/tests/baselines/reference/ExportAssignment8.errors.txt b/tests/baselines/reference/ExportAssignment8.errors.txt index e346dcbab11a1..8df9dd549f05c 100644 --- a/tests/baselines/reference/ExportAssignment8.errors.txt +++ b/tests/baselines/reference/ExportAssignment8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. -tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'. +ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements. +ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'. -==== tests/cases/compiler/ExportAssignment8.ts (2 errors) ==== +==== ExportAssignment8.ts (2 errors) ==== export = B; ~~~~~~~~~~~ !!! error TS2309: An export assignment cannot be used in a module with other exported elements. diff --git a/tests/baselines/reference/ExportAssignment8.js b/tests/baselines/reference/ExportAssignment8.js index 5ef706afbd5aa..436c5262c5481 100644 --- a/tests/baselines/reference/ExportAssignment8.js +++ b/tests/baselines/reference/ExportAssignment8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ExportAssignment8.ts] //// + //// [ExportAssignment8.ts] export = B; diff --git a/tests/baselines/reference/ExportAssignment8.symbols b/tests/baselines/reference/ExportAssignment8.symbols index 771de032de775..8675a446883d3 100644 --- a/tests/baselines/reference/ExportAssignment8.symbols +++ b/tests/baselines/reference/ExportAssignment8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ExportAssignment8.ts === +//// [tests/cases/compiler/ExportAssignment8.ts] //// + +=== ExportAssignment8.ts === export = B; export class C { diff --git a/tests/baselines/reference/ExportAssignment8.types b/tests/baselines/reference/ExportAssignment8.types index 86db65f2fbd7e..5b06f4ab46996 100644 --- a/tests/baselines/reference/ExportAssignment8.types +++ b/tests/baselines/reference/ExportAssignment8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ExportAssignment8.ts === +//// [tests/cases/compiler/ExportAssignment8.ts] //// + +=== ExportAssignment8.ts === export = B; >B : any diff --git a/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.js b/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.js index 94faa0dd4b34c..1feeb5834938e 100644 --- a/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.js +++ b/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts] //// + //// [ExportClassWhichExtendsInterfaceWithInaccessibleType.ts] module A { diff --git a/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.symbols b/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.symbols index 0ff8e694fd5e0..8f2590b2a16bc 100644 --- a/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.symbols +++ b/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts] //// + +=== ExportClassWhichExtendsInterfaceWithInaccessibleType.ts === module A { >A : Symbol(A, Decl(ExportClassWhichExtendsInterfaceWithInaccessibleType.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.types b/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.types index 9fff59f6c0998..7a646683be05d 100644 --- a/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.types +++ b/tests/baselines/reference/ExportClassWhichExtendsInterfaceWithInaccessibleType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts] //// + +=== ExportClassWhichExtendsInterfaceWithInaccessibleType.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index 55effcf4cfdb8..1e847b1f1829e 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] //// + //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] module A { diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols index 371c740d96703..d546a59855f7d 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] //// + +=== ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === module A { >A : Symbol(A, Decl(ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types index 9a467c7f373d8..56a82d2ceeafd 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] //// + +=== ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.js index 7642a6cbe871a..c989af97c4961 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts] //// + //// [ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts] module A { diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.symbols b/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.symbols index b42f561ccf3b6..98b386447d722 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.symbols +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts] //// + +=== ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts === module A { >A : Symbol(A, Decl(ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.types b/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.types index 795301b9c2d63..e249329af39b8 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.types +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts] //// + +=== ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 761537e7d5b20..eb5cab521ba77 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts] //// + //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts] module A { diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.symbols b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.symbols index 38c97a7e54a49..22ec31dbf33d1 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.symbols +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts] //// + +=== ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts === module A { >A : Symbol(A, Decl(ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.types b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.types index e1d3abecc4789..cb1e824c8d90a 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.types +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts] //// + +=== ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js index 2d7e408d81ba6..a2484637bbdd8 100644 --- a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts] //// + //// [ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts] module A { diff --git a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.symbols b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.symbols index 4903398db6ac9..542478e745680 100644 --- a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.symbols +++ b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts] //// + +=== ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts === module A { >A : Symbol(A, Decl(ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types index db5bcf2366257..d38f73ec0a442 100644 --- a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types +++ b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts] //// + +=== ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js index ac8e36d42224a..43b5800156161 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts] //// + //// [ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts] module A { diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.symbols b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.symbols index 2583ddc116378..d62e5e1ae38e6 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.symbols +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts] //// + +=== ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts === module A { >A : Symbol(A, Decl(ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types index ed909ebb4f460..a3540abfaa63e 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts] //// + +=== ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js index b2abc1a4d31fc..fabf8e908d7f6 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts] //// + //// [ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts] module A { diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.symbols b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.symbols index b39abaf73052f..d166e5013bdc2 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.symbols +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts] //// + +=== ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts === module A { >A : Symbol(A, Decl(ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types index 1514e086cfdce..5f6970a263178 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts] //// + +=== ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index e2b32a3bca409..c0d988fc50933 100644 --- a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] //// + //// [ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] module A { diff --git a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols index d03c7a4f58f2e..abe9e5ffe3835 100644 --- a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols +++ b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] //// + +=== ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === module A { >A : Symbol(A, Decl(ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types index d0c6b73349604..b55202c0adfe8 100644 --- a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types +++ b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] //// + +=== ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.js b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.js index 8f5df1d3fceba..7f7ef1985bda7 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.js +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts] //// + //// [ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts] module A { diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.symbols b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.symbols index d92f5ea536685..43ef4358d3d29 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.symbols +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts] //// + +=== ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts === module A { >A : Symbol(A, Decl(ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.types b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.types index 44f734e7a426b..a304d44ca0664 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.types +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts] //// + +=== ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts === module A { interface Point { diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js index 7625500a1d0a4..a039e21360e06 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts] //// + //// [ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts] module A { diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.symbols b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.symbols index 1d452b2b49648..08c1ce2b878d6 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.symbols +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts] //// + +=== ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts === module A { >A : Symbol(A, Decl(ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.types b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.types index f277ea87d261a..b776745f05504 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.types +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts] //// + +=== ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js index 401962dd2616f..0ca38c274534a 100644 --- a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js +++ b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts] //// + //// [ExportModuleWithAccessibleTypesOnItsExportedMembers.ts] module A { diff --git a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.symbols b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.symbols index 76df3ffd35adb..1d7aa6f269ef8 100644 --- a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.symbols +++ b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts] //// + +=== ExportModuleWithAccessibleTypesOnItsExportedMembers.ts === module A { >A : Symbol(A, Decl(ExportModuleWithAccessibleTypesOnItsExportedMembers.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.types b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.types index 2079201aee223..92b41db0f915a 100644 --- a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.types +++ b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts] //// + +=== ExportModuleWithAccessibleTypesOnItsExportedMembers.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js index 0990c9bf2bd2d..0862ac319de28 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts] //// + //// [ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts] module A { diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.symbols b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.symbols index 2bbedd3ea091e..6548eb50a723d 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.symbols +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts] //// + +=== ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts === module A { >A : Symbol(A, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.types b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.types index aa56ab818d0fb..c83ad97e75892 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.types +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts] //// + +=== ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.js b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.js index b454d785e9c7a..3949eba847d04 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts] //// + //// [ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts] module A { diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.symbols b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.symbols index 97ac79dc44d6f..216d52e6ef5e8 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.symbols +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts] //// + +=== ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts === module A { >A : Symbol(A, Decl(ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types index da5d2ee32412a..b2b63a2c4e8e3 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts] //// + +=== ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.js b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.js index e194bc3f8099c..28ceb3cd41c94 100644 --- a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.js +++ b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts] //// + //// [ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts] module A { class B { diff --git a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols index 89be91655aee2..cc5f8b384a33b 100644 --- a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols +++ b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts] //// + +=== ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts === module A { >A : Symbol(A, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.types b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.types index 4ea41475ec6fe..16954edadc9ec 100644 --- a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.types +++ b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts] //// + +=== ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js index 591845b627e2b..ee1533d2eeee8 100644 --- a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js +++ b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts] //// + //// [ExportVariableWithAccessibleTypeInTypeAnnotation.ts] module A { diff --git a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.symbols b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.symbols index c32bed24d981f..a0c71904bae86 100644 --- a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.symbols +++ b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts] //// + +=== ExportVariableWithAccessibleTypeInTypeAnnotation.ts === module A { >A : Symbol(A, Decl(ExportVariableWithAccessibleTypeInTypeAnnotation.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.types b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.types index f0f4506a61db0..dd6b56687c525 100644 --- a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.types +++ b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts] //// + +=== ExportVariableWithAccessibleTypeInTypeAnnotation.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js index d63edb655691a..cfe7b458a23bd 100644 --- a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js +++ b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts] //// + //// [ExportVariableWithInaccessibleTypeInTypeAnnotation.ts] module A { diff --git a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.symbols b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.symbols index ea7806eb0f6e2..6f827c586d8ea 100644 --- a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.symbols +++ b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts] //// + +=== ExportVariableWithInaccessibleTypeInTypeAnnotation.ts === module A { >A : Symbol(A, Decl(ExportVariableWithInaccessibleTypeInTypeAnnotation.ts, 0, 0)) diff --git a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.types b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.types index eed376a470b99..70188773850d6 100644 --- a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.types +++ b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts] //// + +=== ExportVariableWithInaccessibleTypeInTypeAnnotation.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt index 0a72e6b641d6c..d71944866d1d7 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. -tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. -==== tests/cases/conformance/internalModules/DeclarationMerging/function.ts (0 errors) ==== +==== function.ts (0 errors) ==== module A { export function Point() { return { x: 0, y: 0 }; } } -==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== +==== module.ts (1 errors) ==== module A { export module Point { ~~~~~ @@ -19,19 +19,19 @@ tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error T } } -==== tests/cases/conformance/internalModules/DeclarationMerging/test.ts (1 errors) ==== +==== test.ts (1 errors) ==== var fn: () => { x: number; y: number }; var fn = A.Point; ~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. -!!! related TS6203 tests/cases/conformance/internalModules/DeclarationMerging/test.ts:1:5: 'fn' was also declared here. +!!! related TS6203 test.ts:1:5: 'fn' was also declared here. var cl: { x: number; y: number; } var cl = A.Point(); var cl = A.Point.Origin; // not expected to be an error. -==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== +==== simple.ts (1 errors) ==== module B { export function Point() { @@ -47,7 +47,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error T var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected ~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. -!!! related TS6203 tests/cases/conformance/internalModules/DeclarationMerging/test.ts:1:5: 'fn' was also declared here. +!!! related TS6203 test.ts:1:5: 'fn' was also declared here. var cl: { x: number; y: number; } var cl = B.Point(); diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.symbols index 19c587f71487a..eee0fbb91767c 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts] //// + +=== function.ts === module A { >A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0)) @@ -11,7 +13,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module A { >A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0)) @@ -25,7 +27,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var fn: () => { x: number; y: number }; >fn : Symbol(fn, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(simple.ts, 11, 3), Decl(simple.ts, 12, 3)) >x : Symbol(x, Decl(test.ts, 0, 15)) @@ -57,7 +59,7 @@ var cl = A.Point.Origin; // not expected to be an error. >Origin : Symbol(A.Point.Origin, Decl(module.ts, 2, 18)) -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === module B { >B : Symbol(B, Decl(simple.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types index 898039eb6cb2e..3e3334393fdbf 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts] //// + +=== function.ts === module A { >A : typeof A @@ -14,7 +16,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module A { >A : typeof A @@ -31,7 +33,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var fn: () => { x: number; y: number }; >fn : () => { x: number; y: number;} >x : number @@ -64,7 +66,7 @@ var cl = A.Point.Origin; // not expected to be an error. >Origin : { x: number; y: number; } -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === module B { >B : typeof B diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.symbols b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.symbols index 96963246d26d9..cc72de3138d05 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.symbols +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts] //// + +=== function.ts === module A { >A : Symbol(A, Decl(function.ts, 0, 0)) @@ -11,7 +13,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module B { >B : Symbol(B, Decl(module.ts, 0, 0)) @@ -25,7 +27,7 @@ module B { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var fn: () => { x: number; y: number }; >fn : Symbol(fn, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3)) >x : Symbol(x, Decl(test.ts, 0, 15)) diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types index c0c50ee3caa59..6a1233bff157b 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts] //// + +=== function.ts === module A { >A : typeof A @@ -14,7 +16,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +=== module.ts === module B { >B : typeof B @@ -31,7 +33,7 @@ module B { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts === +=== test.ts === var fn: () => { x: number; y: number }; >fn : () => { x: number; y: number;} >x : number diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt index 9f1e12a48ac65..2fa59ff7d5bc6 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration10_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,20): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,26): error TS1005: ',' expected. +FunctionDeclaration10_es6.ts(1,20): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +FunctionDeclaration10_es6.ts(1,26): error TS1005: ',' expected. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (2 errors) ==== +==== FunctionDeclaration10_es6.ts (2 errors) ==== function * foo(a = yield => yield) { ~~~~~ !!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.js b/tests/baselines/reference/FunctionDeclaration10_es6.js index 73eb9bedcdbb8..4f7af9e24be2f 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.js +++ b/tests/baselines/reference/FunctionDeclaration10_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts] //// + //// [FunctionDeclaration10_es6.ts] function * foo(a = yield => yield) { } diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.symbols b/tests/baselines/reference/FunctionDeclaration10_es6.symbols index 3b6631df8b8d3..a076adf972bbd 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration10_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts] //// + +=== FunctionDeclaration10_es6.ts === function * foo(a = yield => yield) { >foo : Symbol(foo, Decl(FunctionDeclaration10_es6.ts, 0, 0)) >a : Symbol(a, Decl(FunctionDeclaration10_es6.ts, 0, 15)) diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.types b/tests/baselines/reference/FunctionDeclaration10_es6.types index e30b5be2d76ac..662d27b152a76 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.types +++ b/tests/baselines/reference/FunctionDeclaration10_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts] //// + +=== FunctionDeclaration10_es6.ts === function * foo(a = yield => yield) { >foo : (a: any, yield: any) => Generator >a : any diff --git a/tests/baselines/reference/FunctionDeclaration11_es6.js b/tests/baselines/reference/FunctionDeclaration11_es6.js index d56eebd3bb52f..36436e5679ee4 100644 --- a/tests/baselines/reference/FunctionDeclaration11_es6.js +++ b/tests/baselines/reference/FunctionDeclaration11_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts] //// + //// [FunctionDeclaration11_es6.ts] function * yield() { } diff --git a/tests/baselines/reference/FunctionDeclaration11_es6.symbols b/tests/baselines/reference/FunctionDeclaration11_es6.symbols index a51b763e4bfd2..20f9094b73f26 100644 --- a/tests/baselines/reference/FunctionDeclaration11_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration11_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts] //// + +=== FunctionDeclaration11_es6.ts === function * yield() { >yield : Symbol(yield, Decl(FunctionDeclaration11_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/FunctionDeclaration11_es6.types b/tests/baselines/reference/FunctionDeclaration11_es6.types index c5053de9781a9..d7e50d0fd0fc5 100644 --- a/tests/baselines/reference/FunctionDeclaration11_es6.types +++ b/tests/baselines/reference/FunctionDeclaration11_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts] //// + +=== FunctionDeclaration11_es6.ts === function * yield() { >yield : () => Generator } diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration12_es6.errors.txt index aa3f0f7e39689..acdc5c9b2f32d 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration12_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts(1,20): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +FunctionDeclaration12_es6.ts(1,20): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts (1 errors) ==== +==== FunctionDeclaration12_es6.ts (1 errors) ==== var v = function * yield() { } ~~~~~ !!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.js b/tests/baselines/reference/FunctionDeclaration12_es6.js index c284e42620dd8..77f783aa26e85 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.js +++ b/tests/baselines/reference/FunctionDeclaration12_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts] //// + //// [FunctionDeclaration12_es6.ts] var v = function * yield() { } diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.symbols b/tests/baselines/reference/FunctionDeclaration12_es6.symbols index 2bb80a2cd5d89..7c52288961c88 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration12_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts] //// + +=== FunctionDeclaration12_es6.ts === var v = function * yield() { } >v : Symbol(v, Decl(FunctionDeclaration12_es6.ts, 0, 3)) >yield : Symbol(yield, Decl(FunctionDeclaration12_es6.ts, 0, 7)) diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.types b/tests/baselines/reference/FunctionDeclaration12_es6.types index 307b391bdb97c..e654186bcbc9c 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.types +++ b/tests/baselines/reference/FunctionDeclaration12_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts] //// + +=== FunctionDeclaration12_es6.ts === var v = function * yield() { } >v : () => Generator >function * yield() { } : () => Generator diff --git a/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt index 1f921475fd330..ba913e897b998 100644 --- a/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration13_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'yield'. +FunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'yield'. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts (1 errors) ==== +==== FunctionDeclaration13_es6.ts (1 errors) ==== function * foo() { // Legal to use 'yield' in a type context. var v: yield; diff --git a/tests/baselines/reference/FunctionDeclaration13_es6.js b/tests/baselines/reference/FunctionDeclaration13_es6.js index b0527ee47ef31..1495b2c78c90f 100644 --- a/tests/baselines/reference/FunctionDeclaration13_es6.js +++ b/tests/baselines/reference/FunctionDeclaration13_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts] //// + //// [FunctionDeclaration13_es6.ts] function * foo() { // Legal to use 'yield' in a type context. diff --git a/tests/baselines/reference/FunctionDeclaration13_es6.symbols b/tests/baselines/reference/FunctionDeclaration13_es6.symbols index 6795164384e29..7363e0666aa54 100644 --- a/tests/baselines/reference/FunctionDeclaration13_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration13_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts] //// + +=== FunctionDeclaration13_es6.ts === function * foo() { >foo : Symbol(foo, Decl(FunctionDeclaration13_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionDeclaration13_es6.types b/tests/baselines/reference/FunctionDeclaration13_es6.types index 449b87e214cb4..9c27ec8558bc2 100644 --- a/tests/baselines/reference/FunctionDeclaration13_es6.types +++ b/tests/baselines/reference/FunctionDeclaration13_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts] //// + +=== FunctionDeclaration13_es6.ts === function * foo() { >foo : () => Generator diff --git a/tests/baselines/reference/FunctionDeclaration1_es6.js b/tests/baselines/reference/FunctionDeclaration1_es6.js index 534a4c21cd7e5..ebe562345226f 100644 --- a/tests/baselines/reference/FunctionDeclaration1_es6.js +++ b/tests/baselines/reference/FunctionDeclaration1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts] //// + //// [FunctionDeclaration1_es6.ts] function * foo() { } diff --git a/tests/baselines/reference/FunctionDeclaration1_es6.symbols b/tests/baselines/reference/FunctionDeclaration1_es6.symbols index 7683664cb93f8..ec9aac5f2e2da 100644 --- a/tests/baselines/reference/FunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts] //// + +=== FunctionDeclaration1_es6.ts === function * foo() { >foo : Symbol(foo, Decl(FunctionDeclaration1_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/FunctionDeclaration1_es6.types b/tests/baselines/reference/FunctionDeclaration1_es6.types index 025cbe051c6c9..71484da7d92ef 100644 --- a/tests/baselines/reference/FunctionDeclaration1_es6.types +++ b/tests/baselines/reference/FunctionDeclaration1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts] //// + +=== FunctionDeclaration1_es6.ts === function * foo() { >foo : () => Generator } diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.js b/tests/baselines/reference/FunctionDeclaration2_es6.js index dc73cad330f19..b162aa7fe4560 100644 --- a/tests/baselines/reference/FunctionDeclaration2_es6.js +++ b/tests/baselines/reference/FunctionDeclaration2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + //// [FunctionDeclaration2_es6.ts] function f(yield) { } diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.symbols b/tests/baselines/reference/FunctionDeclaration2_es6.symbols index ad9241abaf1b3..771277a7e7b1c 100644 --- a/tests/baselines/reference/FunctionDeclaration2_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +=== FunctionDeclaration2_es6.ts === function f(yield) { >f : Symbol(f, Decl(FunctionDeclaration2_es6.ts, 0, 0)) >yield : Symbol(yield, Decl(FunctionDeclaration2_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/FunctionDeclaration2_es6.types b/tests/baselines/reference/FunctionDeclaration2_es6.types index f23d9cf6840eb..caa516a687566 100644 --- a/tests/baselines/reference/FunctionDeclaration2_es6.types +++ b/tests/baselines/reference/FunctionDeclaration2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts] //// + +=== FunctionDeclaration2_es6.ts === function f(yield) { >f : (yield: any) => void >yield : any diff --git a/tests/baselines/reference/FunctionDeclaration3.errors.txt b/tests/baselines/reference/FunctionDeclaration3.errors.txt index 648d2a7ff79c0..309efcbd12e85 100644 --- a/tests/baselines/reference/FunctionDeclaration3.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/FunctionDeclaration3.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +FunctionDeclaration3.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/FunctionDeclaration3.ts (1 errors) ==== +==== FunctionDeclaration3.ts (1 errors) ==== function foo(); ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration3.js b/tests/baselines/reference/FunctionDeclaration3.js index b77c1f4fe8227..9e1cea2afc497 100644 --- a/tests/baselines/reference/FunctionDeclaration3.js +++ b/tests/baselines/reference/FunctionDeclaration3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/FunctionDeclaration3.ts] //// + //// [FunctionDeclaration3.ts] function foo(); diff --git a/tests/baselines/reference/FunctionDeclaration3.symbols b/tests/baselines/reference/FunctionDeclaration3.symbols index 1bc408ca323b9..e0a4dc0efefb7 100644 --- a/tests/baselines/reference/FunctionDeclaration3.symbols +++ b/tests/baselines/reference/FunctionDeclaration3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration3.ts === +//// [tests/cases/compiler/FunctionDeclaration3.ts] //// + +=== FunctionDeclaration3.ts === function foo(); >foo : Symbol(foo, Decl(FunctionDeclaration3.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionDeclaration3.types b/tests/baselines/reference/FunctionDeclaration3.types index 8f528adc9ce17..750e4c1abdf8a 100644 --- a/tests/baselines/reference/FunctionDeclaration3.types +++ b/tests/baselines/reference/FunctionDeclaration3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration3.ts === +//// [tests/cases/compiler/FunctionDeclaration3.ts] //// + +=== FunctionDeclaration3.ts === function foo(); >foo : () => any diff --git a/tests/baselines/reference/FunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration3_es6.errors.txt index cdc50037d65a4..131c54c9f1e20 100644 --- a/tests/baselines/reference/FunctionDeclaration3_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration3_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'yield' cannot reference itself. +FunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'yield' cannot reference itself. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts (1 errors) ==== +==== FunctionDeclaration3_es6.ts (1 errors) ==== function f(yield = yield) { ~~~~~ !!! error TS2372: Parameter 'yield' cannot reference itself. diff --git a/tests/baselines/reference/FunctionDeclaration3_es6.js b/tests/baselines/reference/FunctionDeclaration3_es6.js index eebce92f5b994..86a0765043c8e 100644 --- a/tests/baselines/reference/FunctionDeclaration3_es6.js +++ b/tests/baselines/reference/FunctionDeclaration3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts] //// + //// [FunctionDeclaration3_es6.ts] function f(yield = yield) { } diff --git a/tests/baselines/reference/FunctionDeclaration3_es6.symbols b/tests/baselines/reference/FunctionDeclaration3_es6.symbols index 3a797233a4739..625f1e8241da4 100644 --- a/tests/baselines/reference/FunctionDeclaration3_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts] //// + +=== FunctionDeclaration3_es6.ts === function f(yield = yield) { >f : Symbol(f, Decl(FunctionDeclaration3_es6.ts, 0, 0)) >yield : Symbol(yield, Decl(FunctionDeclaration3_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/FunctionDeclaration3_es6.types b/tests/baselines/reference/FunctionDeclaration3_es6.types index ce1e58e34b6cb..406ae19be31d7 100644 --- a/tests/baselines/reference/FunctionDeclaration3_es6.types +++ b/tests/baselines/reference/FunctionDeclaration3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts] //// + +=== FunctionDeclaration3_es6.ts === function f(yield = yield) { >f : (yield?: any) => void >yield : any diff --git a/tests/baselines/reference/FunctionDeclaration4.errors.txt b/tests/baselines/reference/FunctionDeclaration4.errors.txt index a744ac9bfd591..6cca5dfc7e021 100644 --- a/tests/baselines/reference/FunctionDeclaration4.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/FunctionDeclaration4.ts(2,10): error TS2389: Function implementation name must be 'foo'. +FunctionDeclaration4.ts(2,10): error TS2389: Function implementation name must be 'foo'. -==== tests/cases/compiler/FunctionDeclaration4.ts (1 errors) ==== +==== FunctionDeclaration4.ts (1 errors) ==== function foo(); function bar() { } ~~~ diff --git a/tests/baselines/reference/FunctionDeclaration4.js b/tests/baselines/reference/FunctionDeclaration4.js index b50970965f090..eee614c6e026c 100644 --- a/tests/baselines/reference/FunctionDeclaration4.js +++ b/tests/baselines/reference/FunctionDeclaration4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/FunctionDeclaration4.ts] //// + //// [FunctionDeclaration4.ts] function foo(); function bar() { } diff --git a/tests/baselines/reference/FunctionDeclaration4.symbols b/tests/baselines/reference/FunctionDeclaration4.symbols index 1e22e10cbe514..8a0e4780e51ab 100644 --- a/tests/baselines/reference/FunctionDeclaration4.symbols +++ b/tests/baselines/reference/FunctionDeclaration4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration4.ts === +//// [tests/cases/compiler/FunctionDeclaration4.ts] //// + +=== FunctionDeclaration4.ts === function foo(); >foo : Symbol(foo, Decl(FunctionDeclaration4.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionDeclaration4.types b/tests/baselines/reference/FunctionDeclaration4.types index ee6d57880cce4..4b4af4a935b24 100644 --- a/tests/baselines/reference/FunctionDeclaration4.types +++ b/tests/baselines/reference/FunctionDeclaration4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration4.ts === +//// [tests/cases/compiler/FunctionDeclaration4.ts] //// + +=== FunctionDeclaration4.ts === function foo(); >foo : () => any diff --git a/tests/baselines/reference/FunctionDeclaration4_es6.js b/tests/baselines/reference/FunctionDeclaration4_es6.js index da6c695fcb9ea..7420537b63bc0 100644 --- a/tests/baselines/reference/FunctionDeclaration4_es6.js +++ b/tests/baselines/reference/FunctionDeclaration4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts] //// + //// [FunctionDeclaration4_es6.ts] function yield() { } diff --git a/tests/baselines/reference/FunctionDeclaration4_es6.symbols b/tests/baselines/reference/FunctionDeclaration4_es6.symbols index badb1695cdcb9..34d651a02c7b6 100644 --- a/tests/baselines/reference/FunctionDeclaration4_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts] //// + +=== FunctionDeclaration4_es6.ts === function yield() { >yield : Symbol(yield, Decl(FunctionDeclaration4_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/FunctionDeclaration4_es6.types b/tests/baselines/reference/FunctionDeclaration4_es6.types index e4f102a8f706a..7bbb67f31b2b6 100644 --- a/tests/baselines/reference/FunctionDeclaration4_es6.types +++ b/tests/baselines/reference/FunctionDeclaration4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts] //// + +=== FunctionDeclaration4_es6.ts === function yield() { >yield : () => void } diff --git a/tests/baselines/reference/FunctionDeclaration5_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration5_es6.errors.txt index 1c13fcfd7d53b..f3aeba6c9c1ee 100644 --- a/tests/baselines/reference/FunctionDeclaration5_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts(1,14): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +FunctionDeclaration5_es6.ts(1,14): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts (1 errors) ==== +==== FunctionDeclaration5_es6.ts (1 errors) ==== function*foo(yield) { ~~~~~ !!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/FunctionDeclaration5_es6.js b/tests/baselines/reference/FunctionDeclaration5_es6.js index 22f1ff7030d49..059ed261bb656 100644 --- a/tests/baselines/reference/FunctionDeclaration5_es6.js +++ b/tests/baselines/reference/FunctionDeclaration5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts] //// + //// [FunctionDeclaration5_es6.ts] function*foo(yield) { } diff --git a/tests/baselines/reference/FunctionDeclaration5_es6.symbols b/tests/baselines/reference/FunctionDeclaration5_es6.symbols index 33e9f437fdf85..9d25d0d622f4f 100644 --- a/tests/baselines/reference/FunctionDeclaration5_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts] //// + +=== FunctionDeclaration5_es6.ts === function*foo(yield) { >foo : Symbol(foo, Decl(FunctionDeclaration5_es6.ts, 0, 0)) >yield : Symbol(yield, Decl(FunctionDeclaration5_es6.ts, 0, 13)) diff --git a/tests/baselines/reference/FunctionDeclaration5_es6.types b/tests/baselines/reference/FunctionDeclaration5_es6.types index beaee0c50d52a..f0bdc427648cb 100644 --- a/tests/baselines/reference/FunctionDeclaration5_es6.types +++ b/tests/baselines/reference/FunctionDeclaration5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts] //// + +=== FunctionDeclaration5_es6.ts === function*foo(yield) { >foo : (yield: any) => Generator >yield : any diff --git a/tests/baselines/reference/FunctionDeclaration6.errors.txt b/tests/baselines/reference/FunctionDeclaration6.errors.txt index 89f9aff9ca7ef..11495f5d341e5 100644 --- a/tests/baselines/reference/FunctionDeclaration6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/FunctionDeclaration6.ts(3,14): error TS2389: Function implementation name must be 'foo'. +FunctionDeclaration6.ts(3,14): error TS2389: Function implementation name must be 'foo'. -==== tests/cases/compiler/FunctionDeclaration6.ts (1 errors) ==== +==== FunctionDeclaration6.ts (1 errors) ==== { function foo(); function bar() { } diff --git a/tests/baselines/reference/FunctionDeclaration6.js b/tests/baselines/reference/FunctionDeclaration6.js index 721d4d80b6d6a..2e00f2e143514 100644 --- a/tests/baselines/reference/FunctionDeclaration6.js +++ b/tests/baselines/reference/FunctionDeclaration6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/FunctionDeclaration6.ts] //// + //// [FunctionDeclaration6.ts] { function foo(); diff --git a/tests/baselines/reference/FunctionDeclaration6.symbols b/tests/baselines/reference/FunctionDeclaration6.symbols index d8c66e8398518..f6d37bf53ac86 100644 --- a/tests/baselines/reference/FunctionDeclaration6.symbols +++ b/tests/baselines/reference/FunctionDeclaration6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration6.ts === +//// [tests/cases/compiler/FunctionDeclaration6.ts] //// + +=== FunctionDeclaration6.ts === { function foo(); >foo : Symbol(foo, Decl(FunctionDeclaration6.ts, 0, 1)) diff --git a/tests/baselines/reference/FunctionDeclaration6.types b/tests/baselines/reference/FunctionDeclaration6.types index d3d135a6cfaaa..edebf3b929142 100644 --- a/tests/baselines/reference/FunctionDeclaration6.types +++ b/tests/baselines/reference/FunctionDeclaration6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration6.ts === +//// [tests/cases/compiler/FunctionDeclaration6.ts] //// + +=== FunctionDeclaration6.ts === { function foo(); >foo : () => any diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt index 04806c7aae9c4..4afe01a7c9ced 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +FunctionDeclaration6_es6.ts(1,18): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (1 errors) ==== +==== FunctionDeclaration6_es6.ts (1 errors) ==== function*foo(a = yield) { ~~~~~ !!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.js b/tests/baselines/reference/FunctionDeclaration6_es6.js index bc8c3b030aee9..d0ca5adb8a77e 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.js +++ b/tests/baselines/reference/FunctionDeclaration6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts] //// + //// [FunctionDeclaration6_es6.ts] function*foo(a = yield) { } diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.symbols b/tests/baselines/reference/FunctionDeclaration6_es6.symbols index 36d4624da4276..76a550af82ba3 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts] //// + +=== FunctionDeclaration6_es6.ts === function*foo(a = yield) { >foo : Symbol(foo, Decl(FunctionDeclaration6_es6.ts, 0, 0)) >a : Symbol(a, Decl(FunctionDeclaration6_es6.ts, 0, 13)) diff --git a/tests/baselines/reference/FunctionDeclaration6_es6.types b/tests/baselines/reference/FunctionDeclaration6_es6.types index e567b033ec6c7..d059b8e0acae4 100644 --- a/tests/baselines/reference/FunctionDeclaration6_es6.types +++ b/tests/baselines/reference/FunctionDeclaration6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts] //// + +=== FunctionDeclaration6_es6.ts === function*foo(a = yield) { >foo : (a?: any) => Generator >a : any diff --git a/tests/baselines/reference/FunctionDeclaration7.errors.txt b/tests/baselines/reference/FunctionDeclaration7.errors.txt index 8f8230fe73e79..9f4446f3613f3 100644 --- a/tests/baselines/reference/FunctionDeclaration7.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/FunctionDeclaration7.ts(2,13): error TS2391: Function implementation is missing or not immediately following the declaration. +FunctionDeclaration7.ts(2,13): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/FunctionDeclaration7.ts (1 errors) ==== +==== FunctionDeclaration7.ts (1 errors) ==== module M { function foo(); ~~~ diff --git a/tests/baselines/reference/FunctionDeclaration7.js b/tests/baselines/reference/FunctionDeclaration7.js index 545d9f236cae0..5d4aabcb4c627 100644 --- a/tests/baselines/reference/FunctionDeclaration7.js +++ b/tests/baselines/reference/FunctionDeclaration7.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/FunctionDeclaration7.ts] //// + //// [FunctionDeclaration7.ts] module M { function foo(); diff --git a/tests/baselines/reference/FunctionDeclaration7.symbols b/tests/baselines/reference/FunctionDeclaration7.symbols index 65199406fea33..a651b0cf91121 100644 --- a/tests/baselines/reference/FunctionDeclaration7.symbols +++ b/tests/baselines/reference/FunctionDeclaration7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration7.ts === +//// [tests/cases/compiler/FunctionDeclaration7.ts] //// + +=== FunctionDeclaration7.ts === module M { >M : Symbol(M, Decl(FunctionDeclaration7.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionDeclaration7.types b/tests/baselines/reference/FunctionDeclaration7.types index 3142431e4d7b3..2c1487af19d62 100644 --- a/tests/baselines/reference/FunctionDeclaration7.types +++ b/tests/baselines/reference/FunctionDeclaration7.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/FunctionDeclaration7.ts === +//// [tests/cases/compiler/FunctionDeclaration7.ts] //// + +=== FunctionDeclaration7.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt index e0273c3bb44a0..73a84a46048e4 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +FunctionDeclaration7_es6.ts(3,20): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (1 errors) ==== +==== FunctionDeclaration7_es6.ts (1 errors) ==== function*bar() { // 'yield' here is an identifier, and not a yield expression. function*foo(a = yield) { diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.js b/tests/baselines/reference/FunctionDeclaration7_es6.js index 18256461aeb53..b63493f860961 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.js +++ b/tests/baselines/reference/FunctionDeclaration7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts] //// + //// [FunctionDeclaration7_es6.ts] function*bar() { // 'yield' here is an identifier, and not a yield expression. diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.symbols b/tests/baselines/reference/FunctionDeclaration7_es6.symbols index dc15ae760cd65..475442f44e6b8 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts] //// + +=== FunctionDeclaration7_es6.ts === function*bar() { >bar : Symbol(bar, Decl(FunctionDeclaration7_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionDeclaration7_es6.types b/tests/baselines/reference/FunctionDeclaration7_es6.types index 05df09ef780d1..30f9abf7f4e9d 100644 --- a/tests/baselines/reference/FunctionDeclaration7_es6.types +++ b/tests/baselines/reference/FunctionDeclaration7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts] //// + +=== FunctionDeclaration7_es6.ts === function*bar() { >bar : () => Generator diff --git a/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt b/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt index c35015af7cf32..d649f8ef8b34b 100644 --- a/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration8_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. -tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. +FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. +FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts (2 errors) ==== +==== FunctionDeclaration8_es6.ts (2 errors) ==== var v = { [yield]: foo } ~~~~~ !!! error TS2304: Cannot find name 'yield'. diff --git a/tests/baselines/reference/FunctionDeclaration8_es6.js b/tests/baselines/reference/FunctionDeclaration8_es6.js index 2b2912ffcc7d6..99453bca92a8a 100644 --- a/tests/baselines/reference/FunctionDeclaration8_es6.js +++ b/tests/baselines/reference/FunctionDeclaration8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// + //// [FunctionDeclaration8_es6.ts] var v = { [yield]: foo } diff --git a/tests/baselines/reference/FunctionDeclaration8_es6.symbols b/tests/baselines/reference/FunctionDeclaration8_es6.symbols index c04f2369ba507..b0809840973c7 100644 --- a/tests/baselines/reference/FunctionDeclaration8_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// + +=== FunctionDeclaration8_es6.ts === var v = { [yield]: foo } >v : Symbol(v, Decl(FunctionDeclaration8_es6.ts, 0, 3)) >[yield] : Symbol([yield], Decl(FunctionDeclaration8_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionDeclaration8_es6.types b/tests/baselines/reference/FunctionDeclaration8_es6.types index 2588f042add9a..a83db816a5919 100644 --- a/tests/baselines/reference/FunctionDeclaration8_es6.types +++ b/tests/baselines/reference/FunctionDeclaration8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// + +=== FunctionDeclaration8_es6.ts === var v = { [yield]: foo } >v : { [x: number]: any; } >{ [yield]: foo } : { [x: number]: any; } diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.js b/tests/baselines/reference/FunctionDeclaration9_es6.js index b5be11778ac80..bab288e53236b 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.js +++ b/tests/baselines/reference/FunctionDeclaration9_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts] //// + //// [FunctionDeclaration9_es6.ts] function * foo() { var v = { [yield]: foo } diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.symbols b/tests/baselines/reference/FunctionDeclaration9_es6.symbols index 0d6b08438d3f4..f39699423a697 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.symbols +++ b/tests/baselines/reference/FunctionDeclaration9_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts] //// + +=== FunctionDeclaration9_es6.ts === function * foo() { >foo : Symbol(foo, Decl(FunctionDeclaration9_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.types b/tests/baselines/reference/FunctionDeclaration9_es6.types index 0c854f623f435..fd6f9e2f77eb1 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.types +++ b/tests/baselines/reference/FunctionDeclaration9_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts === +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts] //// + +=== FunctionDeclaration9_es6.ts === function * foo() { >foo : () => Generator diff --git a/tests/baselines/reference/FunctionExpression1_es6.js b/tests/baselines/reference/FunctionExpression1_es6.js index 4d2f36843a9cc..8455084b0cdf1 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.js +++ b/tests/baselines/reference/FunctionExpression1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts] //// + //// [FunctionExpression1_es6.ts] var v = function * () { } diff --git a/tests/baselines/reference/FunctionExpression1_es6.symbols b/tests/baselines/reference/FunctionExpression1_es6.symbols index 4e1ed33ea1cfb..70c947a1f706e 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.symbols +++ b/tests/baselines/reference/FunctionExpression1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts === +//// [tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts] //// + +=== FunctionExpression1_es6.ts === var v = function * () { } >v : Symbol(v, Decl(FunctionExpression1_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/FunctionExpression1_es6.types b/tests/baselines/reference/FunctionExpression1_es6.types index 1c56baf396a2a..a11f1589fc098 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.types +++ b/tests/baselines/reference/FunctionExpression1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts === +//// [tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts] //// + +=== FunctionExpression1_es6.ts === var v = function * () { } >v : () => Generator >function * () { } : () => Generator diff --git a/tests/baselines/reference/FunctionExpression2_es6.js b/tests/baselines/reference/FunctionExpression2_es6.js index bd88efcc7ec2b..da565d4830f72 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.js +++ b/tests/baselines/reference/FunctionExpression2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts] //// + //// [FunctionExpression2_es6.ts] var v = function * foo() { } diff --git a/tests/baselines/reference/FunctionExpression2_es6.symbols b/tests/baselines/reference/FunctionExpression2_es6.symbols index 1fc8c3c10d64a..5ff4246f9fa4c 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.symbols +++ b/tests/baselines/reference/FunctionExpression2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts === +//// [tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts] //// + +=== FunctionExpression2_es6.ts === var v = function * foo() { } >v : Symbol(v, Decl(FunctionExpression2_es6.ts, 0, 3)) >foo : Symbol(foo, Decl(FunctionExpression2_es6.ts, 0, 7)) diff --git a/tests/baselines/reference/FunctionExpression2_es6.types b/tests/baselines/reference/FunctionExpression2_es6.types index 8945268bf715d..18ff701deaa47 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.types +++ b/tests/baselines/reference/FunctionExpression2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts === +//// [tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts] //// + +=== FunctionExpression2_es6.ts === var v = function * foo() { } >v : () => Generator >function * foo() { } : () => Generator diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js index be89637c5ea1d..f9014eded106e 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts] //// + //// [FunctionPropertyAssignments1_es6.ts] var v = { *foo() { } } diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.symbols b/tests/baselines/reference/FunctionPropertyAssignments1_es6.symbols index 79aee0f470088..0e6e1d6468541 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.symbols +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts] //// + +=== FunctionPropertyAssignments1_es6.ts === var v = { *foo() { } } >v : Symbol(v, Decl(FunctionPropertyAssignments1_es6.ts, 0, 3)) >foo : Symbol(foo, Decl(FunctionPropertyAssignments1_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.types b/tests/baselines/reference/FunctionPropertyAssignments1_es6.types index 8fa1b03583086..c49249a146f5c 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.types +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts] //// + +=== FunctionPropertyAssignments1_es6.ts === var v = { *foo() { } } >v : { foo(): Generator; } >{ *foo() { } } : { foo(): Generator; } diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments2_es6.errors.txt index f0287f12696f1..ef1fb1c19f9c1 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts(1,12): error TS1003: Identifier expected. +FunctionPropertyAssignments2_es6.ts(1,12): error TS1003: Identifier expected. -==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts (1 errors) ==== +==== FunctionPropertyAssignments2_es6.ts (1 errors) ==== var v = { *() { } } ~ !!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js index b0f66e94c78e1..149426d1afa8b 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts] //// + //// [FunctionPropertyAssignments2_es6.ts] var v = { *() { } } diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.symbols b/tests/baselines/reference/FunctionPropertyAssignments2_es6.symbols index ac135affbb64d..3a785bad6a421 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.symbols +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts] //// + +=== FunctionPropertyAssignments2_es6.ts === var v = { *() { } } >v : Symbol(v, Decl(FunctionPropertyAssignments2_es6.ts, 0, 3)) > : Symbol((Missing), Decl(FunctionPropertyAssignments2_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.types b/tests/baselines/reference/FunctionPropertyAssignments2_es6.types index cd13e5308a172..ba52619c0b2d6 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.types +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts] //// + +=== FunctionPropertyAssignments2_es6.ts === var v = { *() { } } >v : { ""(): Generator; } >{ *() { } } : { ""(): Generator; } diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments3_es6.errors.txt index b5873e807961b..a20f4d120891e 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. +FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. -==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts (1 errors) ==== +==== FunctionPropertyAssignments3_es6.ts (1 errors) ==== var v = { *{ } } ~ !!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js index f13810af3ca34..3676eeb18cc79 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// + //// [FunctionPropertyAssignments3_es6.ts] var v = { *{ } } diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.symbols b/tests/baselines/reference/FunctionPropertyAssignments3_es6.symbols index e16ef01c9573f..0ada12759274d 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.symbols +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// + +=== FunctionPropertyAssignments3_es6.ts === var v = { *{ } } >v : Symbol(v, Decl(FunctionPropertyAssignments3_es6.ts, 0, 3)) > : Symbol((Missing), Decl(FunctionPropertyAssignments3_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.types b/tests/baselines/reference/FunctionPropertyAssignments3_es6.types index bc494801a74ac..735df2dad0898 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.types +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// + +=== FunctionPropertyAssignments3_es6.ts === var v = { *{ } } >v : { ""(): Generator; } >{ *{ } } : { ""(): Generator; } diff --git a/tests/baselines/reference/FunctionPropertyAssignments4_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments4_es6.errors.txt index 285341f04dc2d..ca5629d5c369d 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments4_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments4_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts(1,13): error TS1003: Identifier expected. +FunctionPropertyAssignments4_es6.ts(1,13): error TS1003: Identifier expected. -==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts (1 errors) ==== +==== FunctionPropertyAssignments4_es6.ts (1 errors) ==== var v = { * } ~ !!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments4_es6.js b/tests/baselines/reference/FunctionPropertyAssignments4_es6.js index a76405e34dfd5..70c4938f04acc 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments4_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts] //// + //// [FunctionPropertyAssignments4_es6.ts] var v = { * } diff --git a/tests/baselines/reference/FunctionPropertyAssignments4_es6.symbols b/tests/baselines/reference/FunctionPropertyAssignments4_es6.symbols index 6b9754f9b50b0..4d1a348067abc 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments4_es6.symbols +++ b/tests/baselines/reference/FunctionPropertyAssignments4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts] //// + +=== FunctionPropertyAssignments4_es6.ts === var v = { * } >v : Symbol(v, Decl(FunctionPropertyAssignments4_es6.ts, 0, 3)) > : Symbol((Missing), Decl(FunctionPropertyAssignments4_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionPropertyAssignments4_es6.types b/tests/baselines/reference/FunctionPropertyAssignments4_es6.types index cdf6b7329a2a8..9ff18ee1439b3 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments4_es6.types +++ b/tests/baselines/reference/FunctionPropertyAssignments4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts] //// + +=== FunctionPropertyAssignments4_es6.ts === var v = { * } >v : { ""(): any; } >{ * } : { ""(): any; } diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt index 143b764c08c85..015d3d7e1b5a3 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. +FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (1 errors) ==== +==== FunctionPropertyAssignments5_es6.ts (1 errors) ==== var v = { *[foo()]() { } } ~~~ !!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js index 027dc6fb41ec8..f48e1593bcf24 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// + //// [FunctionPropertyAssignments5_es6.ts] var v = { *[foo()]() { } } diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.symbols b/tests/baselines/reference/FunctionPropertyAssignments5_es6.symbols index 9fbe817c64627..59656ec5e8ead 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.symbols +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// + +=== FunctionPropertyAssignments5_es6.ts === var v = { *[foo()]() { } } >v : Symbol(v, Decl(FunctionPropertyAssignments5_es6.ts, 0, 3)) >[foo()] : Symbol([foo()], Decl(FunctionPropertyAssignments5_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.types b/tests/baselines/reference/FunctionPropertyAssignments5_es6.types index 18b2a7f33e50f..9d6a61967bf4a 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.types +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// + +=== FunctionPropertyAssignments5_es6.ts === var v = { *[foo()]() { } } >v : { [x: number]: () => Generator; } >{ *[foo()]() { } } : { [x: number]: () => Generator; } diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.errors.txt b/tests/baselines/reference/FunctionPropertyAssignments6_es6.errors.txt index a4e8450bd73e5..3577129f78d52 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.errors.txt +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts(1,12): error TS1003: Identifier expected. +FunctionPropertyAssignments6_es6.ts(1,12): error TS1003: Identifier expected. -==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts (1 errors) ==== +==== FunctionPropertyAssignments6_es6.ts (1 errors) ==== var v = { *() { } } ~ !!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js index e3f7b7e6332f4..205bf9cf4979f 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts] //// + //// [FunctionPropertyAssignments6_es6.ts] var v = { *() { } } diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.symbols b/tests/baselines/reference/FunctionPropertyAssignments6_es6.symbols index b7e08ae0ed48f..364f419a56692 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.symbols +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts] //// + +=== FunctionPropertyAssignments6_es6.ts === var v = { *() { } } >v : Symbol(v, Decl(FunctionPropertyAssignments6_es6.ts, 0, 3)) > : Symbol((Missing), Decl(FunctionPropertyAssignments6_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.types b/tests/baselines/reference/FunctionPropertyAssignments6_es6.types index f7df9cfef618b..32262d2fd9e67 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.types +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts === +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts] //// + +=== FunctionPropertyAssignments6_es6.ts === var v = { *() { } } >v : { ""(): Generator; } >{ *() { } } : { ""(): Generator; } diff --git a/tests/baselines/reference/InterfaceDeclaration8.errors.txt b/tests/baselines/reference/InterfaceDeclaration8.errors.txt index 15c06f6dd0dcc..ed9a617a73f27 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.errors.txt +++ b/tests/baselines/reference/InterfaceDeclaration8.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string'. +InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string'. -==== tests/cases/compiler/InterfaceDeclaration8.ts (1 errors) ==== +==== InterfaceDeclaration8.ts (1 errors) ==== interface string { ~~~~~~ !!! error TS2427: Interface name cannot be 'string'. diff --git a/tests/baselines/reference/InterfaceDeclaration8.js b/tests/baselines/reference/InterfaceDeclaration8.js index 69e98947a0276..629c1e6e1a551 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.js +++ b/tests/baselines/reference/InterfaceDeclaration8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/InterfaceDeclaration8.ts] //// + //// [InterfaceDeclaration8.ts] interface string { } diff --git a/tests/baselines/reference/InterfaceDeclaration8.symbols b/tests/baselines/reference/InterfaceDeclaration8.symbols index cf57f53c89955..eb5ea94ef3366 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.symbols +++ b/tests/baselines/reference/InterfaceDeclaration8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/InterfaceDeclaration8.ts === +//// [tests/cases/compiler/InterfaceDeclaration8.ts] //// + +=== InterfaceDeclaration8.ts === interface string { >string : Symbol(string, Decl(InterfaceDeclaration8.ts, 0, 0)) } diff --git a/tests/baselines/reference/InterfaceDeclaration8.types b/tests/baselines/reference/InterfaceDeclaration8.types index 213c2e2f809c3..1b659411edd57 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.types +++ b/tests/baselines/reference/InterfaceDeclaration8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/InterfaceDeclaration8.ts === +//// [tests/cases/compiler/InterfaceDeclaration8.ts] //// + +=== InterfaceDeclaration8.ts === interface string { } diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt b/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt index bc8582debd901..c8f357bada3d6 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts(5,9): error TS2708: Cannot use namespace 'M' as a value. -tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts(7,15): error TS2708: Cannot use namespace 'M' as a value. +InvalidNonInstantiatedModule.ts(5,9): error TS2708: Cannot use namespace 'M' as a value. +InvalidNonInstantiatedModule.ts(7,15): error TS2708: Cannot use namespace 'M' as a value. -==== tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts (2 errors) ==== +==== InvalidNonInstantiatedModule.ts (2 errors) ==== module M { export interface Point { x: number; y: number } } diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.js b/tests/baselines/reference/InvalidNonInstantiatedModule.js index 54c0f7a42ab1f..6d63561ad12d8 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.js +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts] //// + //// [InvalidNonInstantiatedModule.ts] module M { export interface Point { x: number; y: number } diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.symbols b/tests/baselines/reference/InvalidNonInstantiatedModule.symbols index 1fd5f0839a27f..ea63b484a4c38 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.symbols +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts] //// + +=== InvalidNonInstantiatedModule.ts === module M { >M : Symbol(M, Decl(InvalidNonInstantiatedModule.ts, 0, 0)) diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.types b/tests/baselines/reference/InvalidNonInstantiatedModule.types index 218229e823578..cf01bb06064e5 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.types +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts] //// + +=== InvalidNonInstantiatedModule.ts === module M { export interface Point { x: number; y: number } >x : number diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt index d81b9169c1c1c..3dad8ee506341 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt +++ b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/MemberAccessorDeclaration15.ts(2,12): error TS2369: A parameter property is only allowed in a constructor implementation. +MemberAccessorDeclaration15.ts(2,12): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/MemberAccessorDeclaration15.ts (1 errors) ==== +==== MemberAccessorDeclaration15.ts (1 errors) ==== class C { set Foo(public a: number) { } ~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.js b/tests/baselines/reference/MemberAccessorDeclaration15.js index 3ab84331c9546..4d3b763e8e3bb 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.js +++ b/tests/baselines/reference/MemberAccessorDeclaration15.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/MemberAccessorDeclaration15.ts] //// + //// [MemberAccessorDeclaration15.ts] class C { set Foo(public a: number) { } diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.symbols b/tests/baselines/reference/MemberAccessorDeclaration15.symbols index e7159a4f522b1..3c0cc82b19abf 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.symbols +++ b/tests/baselines/reference/MemberAccessorDeclaration15.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/MemberAccessorDeclaration15.ts === +//// [tests/cases/compiler/MemberAccessorDeclaration15.ts] //// + +=== MemberAccessorDeclaration15.ts === class C { >C : Symbol(C, Decl(MemberAccessorDeclaration15.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.types b/tests/baselines/reference/MemberAccessorDeclaration15.types index 7824582782422..a82df2bfc5523 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.types +++ b/tests/baselines/reference/MemberAccessorDeclaration15.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/MemberAccessorDeclaration15.ts === +//// [tests/cases/compiler/MemberAccessorDeclaration15.ts] //// + +=== MemberAccessorDeclaration15.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js index 3eec7c188cd60..049b3149ed0df 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts] //// + //// [MemberFunctionDeclaration1_es6.ts] class C { *foo() { } diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration1_es6.symbols index a1862ea9209d4..b634bf155c934 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts] //// + +=== MemberFunctionDeclaration1_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration1_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.types b/tests/baselines/reference/MemberFunctionDeclaration1_es6.types index d002439563b3c..437623220ff6a 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts] //// + +=== MemberFunctionDeclaration1_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js index 9dd6bbfb9f9b3..cdae46df370f0 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts] //// + //// [MemberFunctionDeclaration2_es6.ts] class C { public * foo() { } diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration2_es6.symbols index ac380db0268d3..87b8009212c96 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts] //// + +=== MemberFunctionDeclaration2_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration2_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.types b/tests/baselines/reference/MemberFunctionDeclaration2_es6.types index 761fd3c8bb824..2a6e4246c64be 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts] //// + +=== MemberFunctionDeclaration2_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt index fdfe7425320c1..b150ee2c0a1fc 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. +MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (1 errors) ==== +==== MemberFunctionDeclaration3_es6.ts (1 errors) ==== class C { *[foo]() { } ~~~ diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js index 0cfc1732c9975..5a1db01dafabe 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// + //// [MemberFunctionDeclaration3_es6.ts] class C { *[foo]() { } diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration3_es6.symbols index c50ec77e64dab..fd540dbece354 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// + +=== MemberFunctionDeclaration3_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration3_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.types b/tests/baselines/reference/MemberFunctionDeclaration3_es6.types index 97ecf7236b0ed..de839a5ba0819 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// + +=== MemberFunctionDeclaration3_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration4_es6.errors.txt index 988527ccfd7a2..82ed564fd9188 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts(2,5): error TS1003: Identifier expected. +MemberFunctionDeclaration4_es6.ts(2,5): error TS1003: Identifier expected. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts (1 errors) ==== +==== MemberFunctionDeclaration4_es6.ts (1 errors) ==== class C { *() { } ~ diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js index 73b8f395a929b..dc0f55f23bdaa 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts] //// + //// [MemberFunctionDeclaration4_es6.ts] class C { *() { } diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration4_es6.symbols index 151fd3906210d..bf12ee98c4e77 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts] //// + +=== MemberFunctionDeclaration4_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration4_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.types b/tests/baselines/reference/MemberFunctionDeclaration4_es6.types index 48b1bc1f5917f..911d6bbf2f3f0 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts] //// + +=== MemberFunctionDeclaration4_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration5_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration5_es6.errors.txt index e27d6198104bf..e4f6d34cc66ee 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration5_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. +MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts (1 errors) ==== +==== MemberFunctionDeclaration5_es6.ts (1 errors) ==== class C { * } diff --git a/tests/baselines/reference/MemberFunctionDeclaration5_es6.js b/tests/baselines/reference/MemberFunctionDeclaration5_es6.js index bbba43eae05a3..02b6b91d103d4 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration5_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// + //// [MemberFunctionDeclaration5_es6.ts] class C { * diff --git a/tests/baselines/reference/MemberFunctionDeclaration5_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration5_es6.symbols index 60879aadfe681..e5ed2ba791676 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration5_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// + +=== MemberFunctionDeclaration5_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration5_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration5_es6.types b/tests/baselines/reference/MemberFunctionDeclaration5_es6.types index 12241a660c49e..3a32acd9d0dff 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration5_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// + +=== MemberFunctionDeclaration5_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration6_es6.errors.txt index 911e91b8193c4..ca7bb62c64c05 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration6_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. +MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. +MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts (2 errors) ==== +==== MemberFunctionDeclaration6_es6.ts (2 errors) ==== class C { *foo ~~~ diff --git a/tests/baselines/reference/MemberFunctionDeclaration6_es6.js b/tests/baselines/reference/MemberFunctionDeclaration6_es6.js index 370697051e6b5..9338d7d0e32f3 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// + //// [MemberFunctionDeclaration6_es6.ts] class C { *foo diff --git a/tests/baselines/reference/MemberFunctionDeclaration6_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration6_es6.symbols index bbf4da338e7ec..9c70115fed6fc 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration6_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// + +=== MemberFunctionDeclaration6_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration6_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration6_es6.types b/tests/baselines/reference/MemberFunctionDeclaration6_es6.types index a74bd86b61567..76958f0bb2b46 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration6_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// + +=== MemberFunctionDeclaration6_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js index 78bf55457f74c..d2b76e729f17e 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts] //// + //// [MemberFunctionDeclaration7_es6.ts] class C { *foo() { } diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration7_es6.symbols index fa07b61e4a660..18e46a785d080 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts] //// + +=== MemberFunctionDeclaration7_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration7_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.types b/tests/baselines/reference/MemberFunctionDeclaration7_es6.types index 1ee2ffc1433b2..966265e8019ef 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts] //// + +=== MemberFunctionDeclaration7_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/MemberFunctionDeclaration8_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration8_es6.errors.txt index 6c6e9f5b59f11..59e00a71b1f6f 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration8_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration8_es6.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,9): error TS2304: Cannot find name 'a'. -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,12): error TS1127: Invalid character. -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,14): error TS1109: Expression expected. -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,16): error TS2304: Cannot find name 'bar'. -tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(5,12): error TS2304: Cannot find name 'bar'. +MemberFunctionDeclaration8_es6.ts(4,9): error TS2304: Cannot find name 'a'. +MemberFunctionDeclaration8_es6.ts(4,12): error TS1127: Invalid character. +MemberFunctionDeclaration8_es6.ts(4,14): error TS1109: Expression expected. +MemberFunctionDeclaration8_es6.ts(4,16): error TS2304: Cannot find name 'bar'. +MemberFunctionDeclaration8_es6.ts(5,12): error TS2304: Cannot find name 'bar'. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts (5 errors) ==== +==== MemberFunctionDeclaration8_es6.ts (5 errors) ==== class C { foo() { // Make sure we don't think of *bar as the start of a generator method. diff --git a/tests/baselines/reference/MemberFunctionDeclaration8_es6.js b/tests/baselines/reference/MemberFunctionDeclaration8_es6.js index a44ff273fa000..00043612d6321 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration8_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts] //// + //// [MemberFunctionDeclaration8_es6.ts] class C { foo() { diff --git a/tests/baselines/reference/MemberFunctionDeclaration8_es6.symbols b/tests/baselines/reference/MemberFunctionDeclaration8_es6.symbols index 80218909dd97a..c917ba0dc1126 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration8_es6.symbols +++ b/tests/baselines/reference/MemberFunctionDeclaration8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts] //// + +=== MemberFunctionDeclaration8_es6.ts === class C { >C : Symbol(C, Decl(MemberFunctionDeclaration8_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/MemberFunctionDeclaration8_es6.types b/tests/baselines/reference/MemberFunctionDeclaration8_es6.types index 2f4c7b3bb0b44..976da85108da2 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration8_es6.types +++ b/tests/baselines/reference/MemberFunctionDeclaration8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts === +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts] //// + +=== MemberFunctionDeclaration8_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index 207d3569b31ef..1da20e5604fa3 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(2,31): error TS2449: Class 'A' used before its declaration. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +simple.ts(2,31): error TS2449: Class 'A' used before its declaration. -==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== +==== module.ts (1 errors) ==== module X.Y { export module Point { ~~~~~ @@ -12,7 +12,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(2,31): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts (0 errors) ==== +==== classPoint.ts (0 errors) ==== module X.Y { // duplicate identifier export class Point { @@ -25,14 +25,14 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(2,31): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (2 errors) ==== +==== simple.ts (2 errors) ==== module A { ~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. export var Instance = new A(); ~ !!! error TS2449: Class 'A' used before its declaration. -!!! related TS2728 tests/cases/conformance/internalModules/DeclarationMerging/simple.ts:6:7: 'A' is declared here. +!!! related TS2728 simple.ts:6:7: 'A' is declared here. } // duplicate identifier diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.symbols index 9d90d6dd3cc75..b7dd1c03a9978 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts] //// + +=== module.ts === module X.Y { >X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0)) >Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9)) @@ -12,7 +14,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts === +=== classPoint.ts === module X.Y { >X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0)) >Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9)) @@ -45,7 +47,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === module A { >A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1)) diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types index 0041418426aef..9176254088f44 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts] //// + +=== module.ts === module X.Y { >X : typeof X >Y : typeof Y @@ -15,7 +17,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts === +=== classPoint.ts === module X.Y { >X : typeof X >Y : typeof Y @@ -50,7 +52,7 @@ module X.Y { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.js b/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.js index 740d02edd17ff..3d0b677e3a6f5 100644 --- a/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts] //// + //// [ModuleAndEnumWithSameNameAndCommonRoot.ts] module enumdule { diff --git a/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.symbols index 7d1358ca92707..1596b691f780d 100644 --- a/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts] //// + +=== ModuleAndEnumWithSameNameAndCommonRoot.ts === module enumdule { >enumdule : Symbol(enumdule, Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 0, 0), Decl(ModuleAndEnumWithSameNameAndCommonRoot.ts, 5, 1)) diff --git a/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.types b/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.types index 8ffdc9271da82..4647ee4650b87 100644 --- a/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/ModuleAndEnumWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts] //// + +=== ModuleAndEnumWithSameNameAndCommonRoot.ts === module enumdule { >enumdule : typeof enumdule diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt index 5edbaf28f00c5..d88cb56a78592 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== +==== module.ts (1 errors) ==== module A { export module Point { ~~~~~ @@ -11,7 +11,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/function.ts (0 errors) ==== +==== function.ts (0 errors) ==== module A { // duplicate identifier error export function Point() { @@ -19,7 +19,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): erro } } -==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== +==== simple.ts (1 errors) ==== module B { export module Point { diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.symbols b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.symbols index 2753c04b7b0fa..1d7870cdbc128 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.symbols +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts] //// + +=== module.ts === module A { >A : Symbol(A, Decl(module.ts, 0, 0), Decl(function.ts, 0, 0)) @@ -12,7 +14,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +=== function.ts === module A { >A : Symbol(A, Decl(module.ts, 0, 0), Decl(function.ts, 0, 0)) @@ -26,7 +28,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === module B { >B : Symbol(B, Decl(simple.ts, 0, 0)) diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.types b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.types index ffa10552a03c0..2c08395c9bd3c 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.types +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts] //// + +=== module.ts === module A { >A : typeof A @@ -15,7 +17,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts === +=== function.ts === module A { >A : typeof A @@ -32,7 +34,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts === +=== simple.ts === module B { >B : typeof B diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt index 8f9bfe03ecdc7..0e64c5ff2118a 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts(30,16): error TS2339: Property 'A2' does not exist on type 'typeof A'. -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts(31,17): error TS2339: Property 'A2' does not exist on type 'typeof A'. +ModuleWithExportedAndNonExportedClasses.ts(30,16): error TS2339: Property 'A2' does not exist on type 'typeof A'. +ModuleWithExportedAndNonExportedClasses.ts(31,17): error TS2339: Property 'A2' does not exist on type 'typeof A'. -==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts (2 errors) ==== +==== ModuleWithExportedAndNonExportedClasses.ts (2 errors) ==== module A { export class A { id: number; diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.js index 26d014f16c2f3..af72b31e8b739 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts] //// + //// [ModuleWithExportedAndNonExportedClasses.ts] module A { export class A { diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.symbols b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.symbols index 54bf3dd70e41a..d564c1174c2f4 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.symbols +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts] //// + +=== ModuleWithExportedAndNonExportedClasses.ts === module A { >A : Symbol(A, Decl(ModuleWithExportedAndNonExportedClasses.ts, 0, 0)) diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types index a7fdb5d3cec26..17be8d38f4158 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts] //// + +=== ModuleWithExportedAndNonExportedClasses.ts === module A { >A : typeof globalThis.A diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt index 3484d426d2ffb..5d2d48c0ac130 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts(10,11): error TS2339: Property 'Day' does not exist on type 'typeof A'. +ModuleWithExportedAndNonExportedEnums.ts(10,11): error TS2339: Property 'Day' does not exist on type 'typeof A'. -==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts (1 errors) ==== +==== ModuleWithExportedAndNonExportedEnums.ts (1 errors) ==== module A { export enum Color { Red, Blue } enum Day { Monday, Tuesday } diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js index 713d2ac7f1870..c554648284727 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts] //// + //// [ModuleWithExportedAndNonExportedEnums.ts] module A { export enum Color { Red, Blue } diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.symbols b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.symbols index 38b93290f75e7..15bbb275a9c22 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.symbols +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts] //// + +=== ModuleWithExportedAndNonExportedEnums.ts === module A { >A : Symbol(A, Decl(ModuleWithExportedAndNonExportedEnums.ts, 0, 0)) diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.types index 9a1bf4cd15f26..63a2e83de6a8d 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts] //// + +=== ModuleWithExportedAndNonExportedEnums.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt index 68033f3eeec9f..eda91f4cb1a8a 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(28,13): error TS2339: Property 'fn2' does not exist on type 'typeof A'. -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(29,14): error TS2551: Property 'fng2' does not exist on type 'typeof A'. Did you mean 'fng'? +ModuleWithExportedAndNonExportedFunctions.ts(28,13): error TS2339: Property 'fn2' does not exist on type 'typeof A'. +ModuleWithExportedAndNonExportedFunctions.ts(29,14): error TS2551: Property 'fng2' does not exist on type 'typeof A'. Did you mean 'fng'? -==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts (2 errors) ==== +==== ModuleWithExportedAndNonExportedFunctions.ts (2 errors) ==== module A { export function fn(s: string) { @@ -36,4 +36,4 @@ tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAnd var fng2 = A.fng2; ~~~~ !!! error TS2551: Property 'fng2' does not exist on type 'typeof A'. Did you mean 'fng'? -!!! related TS2728 tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts:7:21: 'fng' is declared here. \ No newline at end of file +!!! related TS2728 ModuleWithExportedAndNonExportedFunctions.ts:7:21: 'fng' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js index ed0e1f90bf33f..b181424e599cf 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts] //// + //// [ModuleWithExportedAndNonExportedFunctions.ts] module A { diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.symbols b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.symbols index 83104e9af7308..3473533cf6708 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.symbols +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts] //// + +=== ModuleWithExportedAndNonExportedFunctions.ts === module A { >A : Symbol(A, Decl(ModuleWithExportedAndNonExportedFunctions.ts, 0, 0)) diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.types index b5bd3d49b621f..45817126c9353 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts] //// + +=== ModuleWithExportedAndNonExportedFunctions.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt index b64544118587d..5578e472334e7 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts(37,21): error TS2339: Property 'Lines' does not exist on type 'typeof Geometry'. +ModuleWithExportedAndNonExportedImportAlias.ts(37,21): error TS2339: Property 'Lines' does not exist on type 'typeof Geometry'. -==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts (1 errors) ==== +==== ModuleWithExportedAndNonExportedImportAlias.ts (1 errors) ==== module A { export interface Point { x: number; diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js index e1c36200005c5..6546aab5783e7 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts] //// + //// [ModuleWithExportedAndNonExportedImportAlias.ts] module A { export interface Point { diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.symbols b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.symbols index bf2bbb3960790..46a2e22d85568 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.symbols +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts] //// + +=== ModuleWithExportedAndNonExportedImportAlias.ts === module A { >A : Symbol(A, Decl(ModuleWithExportedAndNonExportedImportAlias.ts, 0, 0)) diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types index 34afcbe4c174e..1dc36a08ef444 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts] //// + +=== ModuleWithExportedAndNonExportedImportAlias.ts === module A { export interface Point { x: number; diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt index fa4c9e57c082e..b53616c66dbc3 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts(11,11): error TS2339: Property 'y' does not exist on type 'typeof A'. +ModuleWithExportedAndNonExportedVariables.ts(11,11): error TS2339: Property 'y' does not exist on type 'typeof A'. -==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts (1 errors) ==== +==== ModuleWithExportedAndNonExportedVariables.ts (1 errors) ==== module A { export var x = 'hello world' var y = 12; diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.js index 0a2c63342c6f4..4c2a824c0233e 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts] //// + //// [ModuleWithExportedAndNonExportedVariables.ts] module A { export var x = 'hello world' diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.symbols b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.symbols index 85e84b75476db..26e8a51dedbd4 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.symbols +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts] //// + +=== ModuleWithExportedAndNonExportedVariables.ts === module A { >A : Symbol(A, Decl(ModuleWithExportedAndNonExportedVariables.ts, 0, 0)) diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.types b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.types index 67c754765cc70..76bf89e780070 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.types +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts] //// + +=== ModuleWithExportedAndNonExportedVariables.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt b/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt index b6d4c4c69902f..38c0480c6bf35 100644 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt +++ b/tests/baselines/reference/NonInitializedExportInInternalModule.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts(2,8): error TS1123: Variable declaration list cannot be empty. -tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts(3,5): error TS2304: Cannot find name 'let'. -tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts(4,10): error TS1123: Variable declaration list cannot be empty. +NonInitializedExportInInternalModule.ts(2,8): error TS1123: Variable declaration list cannot be empty. +NonInitializedExportInInternalModule.ts(3,5): error TS2304: Cannot find name 'let'. +NonInitializedExportInInternalModule.ts(4,10): error TS1123: Variable declaration list cannot be empty. -==== tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts (3 errors) ==== +==== NonInitializedExportInInternalModule.ts (3 errors) ==== module Inner { var; diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.js b/tests/baselines/reference/NonInitializedExportInInternalModule.js index e1df1d41f5483..0e4bd13bfb8ea 100644 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.js +++ b/tests/baselines/reference/NonInitializedExportInInternalModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + //// [NonInitializedExportInInternalModule.ts] module Inner { var; diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.symbols b/tests/baselines/reference/NonInitializedExportInInternalModule.symbols index afa9504856eb8..70f757d815ccb 100644 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.symbols +++ b/tests/baselines/reference/NonInitializedExportInInternalModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +=== NonInitializedExportInInternalModule.ts === module Inner { >Inner : Symbol(Inner, Decl(NonInitializedExportInInternalModule.ts, 0, 0)) diff --git a/tests/baselines/reference/NonInitializedExportInInternalModule.types b/tests/baselines/reference/NonInitializedExportInInternalModule.types index c6c84bbabb483..98897805ff64a 100644 --- a/tests/baselines/reference/NonInitializedExportInInternalModule.types +++ b/tests/baselines/reference/NonInitializedExportInInternalModule.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts === +//// [tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts] //// + +=== NonInitializedExportInInternalModule.ts === module Inner { >Inner : typeof Inner diff --git a/tests/baselines/reference/ParameterList13.errors.txt b/tests/baselines/reference/ParameterList13.errors.txt index 13bffe4328fe6..34a5427b99950 100644 --- a/tests/baselines/reference/ParameterList13.errors.txt +++ b/tests/baselines/reference/ParameterList13.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ParameterList13.ts(2,10): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList13.ts(2,10): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/ParameterList13.ts (1 errors) ==== +==== ParameterList13.ts (1 errors) ==== interface I { new (public x); ~~~~~~~~ diff --git a/tests/baselines/reference/ParameterList13.js b/tests/baselines/reference/ParameterList13.js index 3c27c9c1a0ad1..d9273080b243e 100644 --- a/tests/baselines/reference/ParameterList13.js +++ b/tests/baselines/reference/ParameterList13.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ParameterList13.ts] //// + //// [ParameterList13.ts] interface I { new (public x); diff --git a/tests/baselines/reference/ParameterList13.symbols b/tests/baselines/reference/ParameterList13.symbols index 7ed8ca187de6a..17420911269aa 100644 --- a/tests/baselines/reference/ParameterList13.symbols +++ b/tests/baselines/reference/ParameterList13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList13.ts === +//// [tests/cases/compiler/ParameterList13.ts] //// + +=== ParameterList13.ts === interface I { >I : Symbol(I, Decl(ParameterList13.ts, 0, 0)) diff --git a/tests/baselines/reference/ParameterList13.types b/tests/baselines/reference/ParameterList13.types index 279e18bedcd25..6a0177f1eda68 100644 --- a/tests/baselines/reference/ParameterList13.types +++ b/tests/baselines/reference/ParameterList13.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList13.ts === +//// [tests/cases/compiler/ParameterList13.ts] //// + +=== ParameterList13.ts === interface I { new (public x); >x : any diff --git a/tests/baselines/reference/ParameterList4.errors.txt b/tests/baselines/reference/ParameterList4.errors.txt index 1d1b009267493..d97d97e24ca99 100644 --- a/tests/baselines/reference/ParameterList4.errors.txt +++ b/tests/baselines/reference/ParameterList4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ParameterList4.ts(1,12): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList4.ts(1,12): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/ParameterList4.ts (1 errors) ==== +==== ParameterList4.ts (1 errors) ==== function F(public A) { ~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. diff --git a/tests/baselines/reference/ParameterList4.js b/tests/baselines/reference/ParameterList4.js index 90a89cef2ae06..5070698cc2fcd 100644 --- a/tests/baselines/reference/ParameterList4.js +++ b/tests/baselines/reference/ParameterList4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ParameterList4.ts] //// + //// [ParameterList4.ts] function F(public A) { } diff --git a/tests/baselines/reference/ParameterList4.symbols b/tests/baselines/reference/ParameterList4.symbols index 262710a77d079..66f2254bd9dd5 100644 --- a/tests/baselines/reference/ParameterList4.symbols +++ b/tests/baselines/reference/ParameterList4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList4.ts === +//// [tests/cases/compiler/ParameterList4.ts] //// + +=== ParameterList4.ts === function F(public A) { >F : Symbol(F, Decl(ParameterList4.ts, 0, 0)) >A : Symbol(A, Decl(ParameterList4.ts, 0, 11)) diff --git a/tests/baselines/reference/ParameterList4.types b/tests/baselines/reference/ParameterList4.types index 4c354abb68ae7..0d1b7a0f7fc9d 100644 --- a/tests/baselines/reference/ParameterList4.types +++ b/tests/baselines/reference/ParameterList4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList4.ts === +//// [tests/cases/compiler/ParameterList4.ts] //// + +=== ParameterList4.ts === function F(public A) { >F : (A: any) => void >A : any diff --git a/tests/baselines/reference/ParameterList5.errors.txt b/tests/baselines/reference/ParameterList5.errors.txt index f8479c8ab153f..96e653fee0531 100644 --- a/tests/baselines/reference/ParameterList5.errors.txt +++ b/tests/baselines/reference/ParameterList5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/ParameterList5.ts(1,15): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -tests/cases/compiler/ParameterList5.ts(1,16): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/compiler/ParameterList5.ts(1,29): error TS2304: Cannot find name 'C'. +ParameterList5.ts(1,15): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +ParameterList5.ts(1,16): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList5.ts(1,29): error TS2304: Cannot find name 'C'. -==== tests/cases/compiler/ParameterList5.ts (3 errors) ==== +==== ParameterList5.ts (3 errors) ==== function A(): (public B) => C { ~~~~~~~~~~~~~~~ !!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. diff --git a/tests/baselines/reference/ParameterList5.js b/tests/baselines/reference/ParameterList5.js index bcdfe02864050..48715d6ae562a 100644 --- a/tests/baselines/reference/ParameterList5.js +++ b/tests/baselines/reference/ParameterList5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ParameterList5.ts] //// + //// [ParameterList5.ts] function A(): (public B) => C { } diff --git a/tests/baselines/reference/ParameterList5.symbols b/tests/baselines/reference/ParameterList5.symbols index a4b5a0b7b1c25..6c259d410b685 100644 --- a/tests/baselines/reference/ParameterList5.symbols +++ b/tests/baselines/reference/ParameterList5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList5.ts === +//// [tests/cases/compiler/ParameterList5.ts] //// + +=== ParameterList5.ts === function A(): (public B) => C { >A : Symbol(A, Decl(ParameterList5.ts, 0, 0)) >B : Symbol(B, Decl(ParameterList5.ts, 0, 15)) diff --git a/tests/baselines/reference/ParameterList5.types b/tests/baselines/reference/ParameterList5.types index a46e6ea819f3d..e9dde482c5109 100644 --- a/tests/baselines/reference/ParameterList5.types +++ b/tests/baselines/reference/ParameterList5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList5.ts === +//// [tests/cases/compiler/ParameterList5.ts] //// + +=== ParameterList5.ts === function A(): (public B) => C { >A : () => (B: any) => C >B : any diff --git a/tests/baselines/reference/ParameterList6.errors.txt b/tests/baselines/reference/ParameterList6.errors.txt index b938b7cb52ff9..afaaaf51ca90b 100644 --- a/tests/baselines/reference/ParameterList6.errors.txt +++ b/tests/baselines/reference/ParameterList6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ParameterList6.ts(2,19): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList6.ts(2,19): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/ParameterList6.ts (1 errors) ==== +==== ParameterList6.ts (1 errors) ==== class C { constructor(C: (public A) => any) { ~~~~~~~~ diff --git a/tests/baselines/reference/ParameterList6.js b/tests/baselines/reference/ParameterList6.js index dea859e0f58ff..7ccd946b44433 100644 --- a/tests/baselines/reference/ParameterList6.js +++ b/tests/baselines/reference/ParameterList6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ParameterList6.ts] //// + //// [ParameterList6.ts] class C { constructor(C: (public A) => any) { diff --git a/tests/baselines/reference/ParameterList6.symbols b/tests/baselines/reference/ParameterList6.symbols index b7baba3f462fe..807682c788cd0 100644 --- a/tests/baselines/reference/ParameterList6.symbols +++ b/tests/baselines/reference/ParameterList6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList6.ts === +//// [tests/cases/compiler/ParameterList6.ts] //// + +=== ParameterList6.ts === class C { >C : Symbol(C, Decl(ParameterList6.ts, 0, 0)) diff --git a/tests/baselines/reference/ParameterList6.types b/tests/baselines/reference/ParameterList6.types index c514041ce2791..1c13cb154f40e 100644 --- a/tests/baselines/reference/ParameterList6.types +++ b/tests/baselines/reference/ParameterList6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList6.ts === +//// [tests/cases/compiler/ParameterList6.ts] //// + +=== ParameterList6.ts === class C { >C : C diff --git a/tests/baselines/reference/ParameterList7.errors.txt b/tests/baselines/reference/ParameterList7.errors.txt index a2b28391a6789..6c5bb19c85902 100644 --- a/tests/baselines/reference/ParameterList7.errors.txt +++ b/tests/baselines/reference/ParameterList7.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ParameterList7.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/compiler/ParameterList7.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList7.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList7.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/ParameterList7.ts (2 errors) ==== +==== ParameterList7.ts (2 errors) ==== class C1 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/ParameterList7.js b/tests/baselines/reference/ParameterList7.js index 9b252c780614d..57eadcb8da30f 100644 --- a/tests/baselines/reference/ParameterList7.js +++ b/tests/baselines/reference/ParameterList7.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ParameterList7.ts] //// + //// [ParameterList7.ts] class C1 { constructor(public p1:string); // ERROR diff --git a/tests/baselines/reference/ParameterList7.symbols b/tests/baselines/reference/ParameterList7.symbols index 8d01805e4752a..b2f2cde78fe4b 100644 --- a/tests/baselines/reference/ParameterList7.symbols +++ b/tests/baselines/reference/ParameterList7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList7.ts === +//// [tests/cases/compiler/ParameterList7.ts] //// + +=== ParameterList7.ts === class C1 { >C1 : Symbol(C1, Decl(ParameterList7.ts, 0, 0)) diff --git a/tests/baselines/reference/ParameterList7.types b/tests/baselines/reference/ParameterList7.types index 6503c09e5a5eb..a94b8ee69a414 100644 --- a/tests/baselines/reference/ParameterList7.types +++ b/tests/baselines/reference/ParameterList7.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList7.ts === +//// [tests/cases/compiler/ParameterList7.ts] //// + +=== ParameterList7.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/ParameterList8.errors.txt b/tests/baselines/reference/ParameterList8.errors.txt index f49a135999291..7be16c9c77fc4 100644 --- a/tests/baselines/reference/ParameterList8.errors.txt +++ b/tests/baselines/reference/ParameterList8.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/ParameterList8.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/compiler/ParameterList8.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/compiler/ParameterList8.ts(4,14): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList8.ts(2,14): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList8.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. +ParameterList8.ts(4,14): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/ParameterList8.ts (3 errors) ==== +==== ParameterList8.ts (3 errors) ==== declare class C2 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/ParameterList8.js b/tests/baselines/reference/ParameterList8.js index 4ea4ac05f748a..ba1a14752248b 100644 --- a/tests/baselines/reference/ParameterList8.js +++ b/tests/baselines/reference/ParameterList8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ParameterList8.ts] //// + //// [ParameterList8.ts] declare class C2 { constructor(public p1:string); // ERROR diff --git a/tests/baselines/reference/ParameterList8.symbols b/tests/baselines/reference/ParameterList8.symbols index 919de165ea98d..c3bb175b9c24d 100644 --- a/tests/baselines/reference/ParameterList8.symbols +++ b/tests/baselines/reference/ParameterList8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList8.ts === +//// [tests/cases/compiler/ParameterList8.ts] //// + +=== ParameterList8.ts === declare class C2 { >C2 : Symbol(C2, Decl(ParameterList8.ts, 0, 0)) diff --git a/tests/baselines/reference/ParameterList8.types b/tests/baselines/reference/ParameterList8.types index 150ebb7b7d4d4..662a8e14189b8 100644 --- a/tests/baselines/reference/ParameterList8.types +++ b/tests/baselines/reference/ParameterList8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ParameterList8.ts === +//// [tests/cases/compiler/ParameterList8.ts] //// + +=== ParameterList8.ts === declare class C2 { >C2 : C2 diff --git a/tests/baselines/reference/Protected1.errors.txt b/tests/baselines/reference/Protected1.errors.txt index 157c9b3263ef6..6a7f385181e48 100644 --- a/tests/baselines/reference/Protected1.errors.txt +++ b/tests/baselines/reference/Protected1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts(1,1): error TS1044: 'protected' modifier cannot appear on a module or namespace element. +Protected1.ts(1,1): error TS1044: 'protected' modifier cannot appear on a module or namespace element. -==== tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts (1 errors) ==== +==== Protected1.ts (1 errors) ==== protected class C { ~~~~~~~~~ !!! error TS1044: 'protected' modifier cannot appear on a module or namespace element. diff --git a/tests/baselines/reference/Protected1.js b/tests/baselines/reference/Protected1.js index 13e017acadfe3..b7a1f4eaa48bf 100644 --- a/tests/baselines/reference/Protected1.js +++ b/tests/baselines/reference/Protected1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts] //// + //// [Protected1.ts] protected class C { } diff --git a/tests/baselines/reference/Protected1.symbols b/tests/baselines/reference/Protected1.symbols index 1fbefb2a8af7b..de7aa7ffc2dac 100644 --- a/tests/baselines/reference/Protected1.symbols +++ b/tests/baselines/reference/Protected1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts] //// + +=== Protected1.ts === protected class C { >C : Symbol(C, Decl(Protected1.ts, 0, 0)) } diff --git a/tests/baselines/reference/Protected1.types b/tests/baselines/reference/Protected1.types index 3d648e6a4b4d7..50486973a6845 100644 --- a/tests/baselines/reference/Protected1.types +++ b/tests/baselines/reference/Protected1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected1.ts] //// + +=== Protected1.ts === protected class C { >C : C } diff --git a/tests/baselines/reference/Protected2.errors.txt b/tests/baselines/reference/Protected2.errors.txt index 7779cb5534871..6affb6084ade0 100644 --- a/tests/baselines/reference/Protected2.errors.txt +++ b/tests/baselines/reference/Protected2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts(1,1): error TS1044: 'protected' modifier cannot appear on a module or namespace element. +Protected2.ts(1,1): error TS1044: 'protected' modifier cannot appear on a module or namespace element. -==== tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts (1 errors) ==== +==== Protected2.ts (1 errors) ==== protected module M { ~~~~~~~~~ !!! error TS1044: 'protected' modifier cannot appear on a module or namespace element. diff --git a/tests/baselines/reference/Protected2.js b/tests/baselines/reference/Protected2.js index 6675d9d50fb29..eb24e229ef8e6 100644 --- a/tests/baselines/reference/Protected2.js +++ b/tests/baselines/reference/Protected2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts] //// + //// [Protected2.ts] protected module M { } diff --git a/tests/baselines/reference/Protected2.symbols b/tests/baselines/reference/Protected2.symbols index c1d9deec2c1df..a4ec0e5de45d7 100644 --- a/tests/baselines/reference/Protected2.symbols +++ b/tests/baselines/reference/Protected2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts] //// + +=== Protected2.ts === protected module M { >M : Symbol(M, Decl(Protected2.ts, 0, 0)) } diff --git a/tests/baselines/reference/Protected2.types b/tests/baselines/reference/Protected2.types index 727db5b1be946..8bc849135f0d2 100644 --- a/tests/baselines/reference/Protected2.types +++ b/tests/baselines/reference/Protected2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected2.ts] //// + +=== Protected2.ts === protected module M { } diff --git a/tests/baselines/reference/Protected3.js b/tests/baselines/reference/Protected3.js index 29b1f96effe8e..4fe3e0a4c5c5d 100644 --- a/tests/baselines/reference/Protected3.js +++ b/tests/baselines/reference/Protected3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts] //// + //// [Protected3.ts] class C { protected constructor() { } diff --git a/tests/baselines/reference/Protected3.symbols b/tests/baselines/reference/Protected3.symbols index a9882189902f4..5ce169faa5d84 100644 --- a/tests/baselines/reference/Protected3.symbols +++ b/tests/baselines/reference/Protected3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts] //// + +=== Protected3.ts === class C { >C : Symbol(C, Decl(Protected3.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected3.types b/tests/baselines/reference/Protected3.types index d3f938a443191..b5db8f6f1ea9c 100644 --- a/tests/baselines/reference/Protected3.types +++ b/tests/baselines/reference/Protected3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected3.ts] //// + +=== Protected3.ts === class C { >C : C diff --git a/tests/baselines/reference/Protected4.errors.txt b/tests/baselines/reference/Protected4.errors.txt index fa4f410ab6b0d..81a02f778fe9d 100644 --- a/tests/baselines/reference/Protected4.errors.txt +++ b/tests/baselines/reference/Protected4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts(2,13): error TS1028: Accessibility modifier already seen. +Protected4.ts(2,13): error TS1028: Accessibility modifier already seen. -==== tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts (1 errors) ==== +==== Protected4.ts (1 errors) ==== class C { protected public m() { } ~~~~~~ diff --git a/tests/baselines/reference/Protected4.js b/tests/baselines/reference/Protected4.js index 35bce025cb864..67232f9d1edf8 100644 --- a/tests/baselines/reference/Protected4.js +++ b/tests/baselines/reference/Protected4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts] //// + //// [Protected4.ts] class C { protected public m() { } diff --git a/tests/baselines/reference/Protected4.symbols b/tests/baselines/reference/Protected4.symbols index 54814def624a3..cd27400274dae 100644 --- a/tests/baselines/reference/Protected4.symbols +++ b/tests/baselines/reference/Protected4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts] //// + +=== Protected4.ts === class C { >C : Symbol(C, Decl(Protected4.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected4.types b/tests/baselines/reference/Protected4.types index af4d56083c5a1..3294d48a6c660 100644 --- a/tests/baselines/reference/Protected4.types +++ b/tests/baselines/reference/Protected4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts] //// + +=== Protected4.ts === class C { >C : C diff --git a/tests/baselines/reference/Protected5.js b/tests/baselines/reference/Protected5.js index 24356999d616c..a2ee17321590f 100644 --- a/tests/baselines/reference/Protected5.js +++ b/tests/baselines/reference/Protected5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts] //// + //// [Protected5.ts] class C { protected static m() { } diff --git a/tests/baselines/reference/Protected5.symbols b/tests/baselines/reference/Protected5.symbols index a4c91729ed345..0e03623197f1e 100644 --- a/tests/baselines/reference/Protected5.symbols +++ b/tests/baselines/reference/Protected5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts] //// + +=== Protected5.ts === class C { >C : Symbol(C, Decl(Protected5.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected5.types b/tests/baselines/reference/Protected5.types index 7ef0be949a7c5..03d763d5c8a06 100644 --- a/tests/baselines/reference/Protected5.types +++ b/tests/baselines/reference/Protected5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected5.ts] //// + +=== Protected5.ts === class C { >C : C diff --git a/tests/baselines/reference/Protected6.errors.txt b/tests/baselines/reference/Protected6.errors.txt index 3b3804b0fb1ff..fc95ecba81430 100644 --- a/tests/baselines/reference/Protected6.errors.txt +++ b/tests/baselines/reference/Protected6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts(2,10): error TS1029: 'protected' modifier must precede 'static' modifier. +Protected6.ts(2,10): error TS1029: 'protected' modifier must precede 'static' modifier. -==== tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts (1 errors) ==== +==== Protected6.ts (1 errors) ==== class C { static protected m() { } ~~~~~~~~~ diff --git a/tests/baselines/reference/Protected6.js b/tests/baselines/reference/Protected6.js index 654543a2df77d..5a34d06deea46 100644 --- a/tests/baselines/reference/Protected6.js +++ b/tests/baselines/reference/Protected6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts] //// + //// [Protected6.ts] class C { static protected m() { } diff --git a/tests/baselines/reference/Protected6.symbols b/tests/baselines/reference/Protected6.symbols index 321c9fbe88787..8f8bc889466da 100644 --- a/tests/baselines/reference/Protected6.symbols +++ b/tests/baselines/reference/Protected6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts] //// + +=== Protected6.ts === class C { >C : Symbol(C, Decl(Protected6.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected6.types b/tests/baselines/reference/Protected6.types index 4a902fe54605c..e46cb686d1209 100644 --- a/tests/baselines/reference/Protected6.types +++ b/tests/baselines/reference/Protected6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected6.ts] //// + +=== Protected6.ts === class C { >C : C diff --git a/tests/baselines/reference/Protected7.errors.txt b/tests/baselines/reference/Protected7.errors.txt index e95f39eb1b227..04d5d239e0666 100644 --- a/tests/baselines/reference/Protected7.errors.txt +++ b/tests/baselines/reference/Protected7.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts(2,13): error TS1028: Accessibility modifier already seen. +Protected7.ts(2,13): error TS1028: Accessibility modifier already seen. -==== tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts (1 errors) ==== +==== Protected7.ts (1 errors) ==== class C { protected private m() { } ~~~~~~~ diff --git a/tests/baselines/reference/Protected7.js b/tests/baselines/reference/Protected7.js index 41211f13b3b07..022c1468c7160 100644 --- a/tests/baselines/reference/Protected7.js +++ b/tests/baselines/reference/Protected7.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts] //// + //// [Protected7.ts] class C { protected private m() { } diff --git a/tests/baselines/reference/Protected7.symbols b/tests/baselines/reference/Protected7.symbols index e72be44f21008..6b60557139a86 100644 --- a/tests/baselines/reference/Protected7.symbols +++ b/tests/baselines/reference/Protected7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts] //// + +=== Protected7.ts === class C { >C : Symbol(C, Decl(Protected7.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected7.types b/tests/baselines/reference/Protected7.types index d3b770676cefa..57a164b3d7e43 100644 --- a/tests/baselines/reference/Protected7.types +++ b/tests/baselines/reference/Protected7.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected7.ts] //// + +=== Protected7.ts === class C { >C : C diff --git a/tests/baselines/reference/Protected8.js b/tests/baselines/reference/Protected8.js index 4a24f98dc5f5d..7a2dda4c92738 100644 --- a/tests/baselines/reference/Protected8.js +++ b/tests/baselines/reference/Protected8.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected8.ts] //// + //// [Protected8.ts] interface I { protected diff --git a/tests/baselines/reference/Protected8.symbols b/tests/baselines/reference/Protected8.symbols index eccd4b50f3cb0..8185adc0d818d 100644 --- a/tests/baselines/reference/Protected8.symbols +++ b/tests/baselines/reference/Protected8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected8.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected8.ts] //// + +=== Protected8.ts === interface I { >I : Symbol(I, Decl(Protected8.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected8.types b/tests/baselines/reference/Protected8.types index 69a9b34f91ea6..535dacc8e17e6 100644 --- a/tests/baselines/reference/Protected8.types +++ b/tests/baselines/reference/Protected8.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected8.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected8.ts] //// + +=== Protected8.ts === interface I { protected >protected : any diff --git a/tests/baselines/reference/Protected9.js b/tests/baselines/reference/Protected9.js index 63c542f6d4f1c..d9a9d81000973 100644 --- a/tests/baselines/reference/Protected9.js +++ b/tests/baselines/reference/Protected9.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts] //// + //// [Protected9.ts] class C { constructor(protected p) { } diff --git a/tests/baselines/reference/Protected9.symbols b/tests/baselines/reference/Protected9.symbols index 9ca97c78f9a99..6b4814752cc33 100644 --- a/tests/baselines/reference/Protected9.symbols +++ b/tests/baselines/reference/Protected9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts] //// + +=== Protected9.ts === class C { >C : Symbol(C, Decl(Protected9.ts, 0, 0)) diff --git a/tests/baselines/reference/Protected9.types b/tests/baselines/reference/Protected9.types index d4b6e2fff824a..918ae1642821e 100644 --- a/tests/baselines/reference/Protected9.types +++ b/tests/baselines/reference/Protected9.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts === +//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected9.ts] //// + +=== Protected9.ts === class C { >C : C diff --git a/tests/baselines/reference/SystemModuleForStatementNoInitializer.js b/tests/baselines/reference/SystemModuleForStatementNoInitializer.js index ff31b3c73e284..24e59f8c1d125 100644 --- a/tests/baselines/reference/SystemModuleForStatementNoInitializer.js +++ b/tests/baselines/reference/SystemModuleForStatementNoInitializer.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/SystemModuleForStatementNoInitializer.ts] //// + //// [SystemModuleForStatementNoInitializer.ts] export { }; diff --git a/tests/baselines/reference/SystemModuleForStatementNoInitializer.symbols b/tests/baselines/reference/SystemModuleForStatementNoInitializer.symbols index 33144e07cf039..c21c07c95e8ae 100644 --- a/tests/baselines/reference/SystemModuleForStatementNoInitializer.symbols +++ b/tests/baselines/reference/SystemModuleForStatementNoInitializer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/SystemModuleForStatementNoInitializer.ts === +//// [tests/cases/compiler/SystemModuleForStatementNoInitializer.ts] //// + +=== SystemModuleForStatementNoInitializer.ts === export { }; let i = 0; diff --git a/tests/baselines/reference/SystemModuleForStatementNoInitializer.types b/tests/baselines/reference/SystemModuleForStatementNoInitializer.types index 7e876056c5a7a..c8645d11118a3 100644 --- a/tests/baselines/reference/SystemModuleForStatementNoInitializer.types +++ b/tests/baselines/reference/SystemModuleForStatementNoInitializer.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/SystemModuleForStatementNoInitializer.ts === +//// [tests/cases/compiler/SystemModuleForStatementNoInitializer.ts] //// + +=== SystemModuleForStatementNoInitializer.ts === export { }; let i = 0; diff --git a/tests/baselines/reference/TemplateExpression1.errors.txt b/tests/baselines/reference/TemplateExpression1.errors.txt index aa3b1674bf89c..9da3ad7f5549e 100644 --- a/tests/baselines/reference/TemplateExpression1.errors.txt +++ b/tests/baselines/reference/TemplateExpression1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/templates/TemplateExpression1.ts(1,17): error TS2304: Cannot find name 'a'. -tests/cases/conformance/es6/templates/TemplateExpression1.ts(1,19): error TS1005: '}' expected. +TemplateExpression1.ts(1,17): error TS2304: Cannot find name 'a'. +TemplateExpression1.ts(1,19): error TS1005: '}' expected. -==== tests/cases/conformance/es6/templates/TemplateExpression1.ts (2 errors) ==== +==== TemplateExpression1.ts (2 errors) ==== var v = `foo ${ a ~ !!! error TS2304: Cannot find name 'a'. diff --git a/tests/baselines/reference/TemplateExpression1.js b/tests/baselines/reference/TemplateExpression1.js index 6a0f901f0f982..5bd36658939ec 100644 --- a/tests/baselines/reference/TemplateExpression1.js +++ b/tests/baselines/reference/TemplateExpression1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/templates/TemplateExpression1.ts] //// + //// [TemplateExpression1.ts] var v = `foo ${ a diff --git a/tests/baselines/reference/TemplateExpression1.symbols b/tests/baselines/reference/TemplateExpression1.symbols index d272dae79d206..e6be311e98631 100644 --- a/tests/baselines/reference/TemplateExpression1.symbols +++ b/tests/baselines/reference/TemplateExpression1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/templates/TemplateExpression1.ts === +//// [tests/cases/conformance/es6/templates/TemplateExpression1.ts] //// + +=== TemplateExpression1.ts === var v = `foo ${ a >v : Symbol(v, Decl(TemplateExpression1.ts, 0, 3)) diff --git a/tests/baselines/reference/TemplateExpression1.types b/tests/baselines/reference/TemplateExpression1.types index e23083d83ec5e..65cc4eb572dd6 100644 --- a/tests/baselines/reference/TemplateExpression1.types +++ b/tests/baselines/reference/TemplateExpression1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/templates/TemplateExpression1.ts === +//// [tests/cases/conformance/es6/templates/TemplateExpression1.ts] //// + +=== TemplateExpression1.ts === var v = `foo ${ a >v : string >`foo ${ a : string diff --git a/tests/baselines/reference/TupleType1.js b/tests/baselines/reference/TupleType1.js index 96a1db465489b..8be436f2e7b6b 100644 --- a/tests/baselines/reference/TupleType1.js +++ b/tests/baselines/reference/TupleType1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType1.ts] //// + //// [TupleType1.ts] var v: [number] diff --git a/tests/baselines/reference/TupleType1.symbols b/tests/baselines/reference/TupleType1.symbols index 9f4b2c78a8e44..d9d1d4196bfa0 100644 --- a/tests/baselines/reference/TupleType1.symbols +++ b/tests/baselines/reference/TupleType1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType1.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType1.ts] //// + +=== TupleType1.ts === var v: [number] >v : Symbol(v, Decl(TupleType1.ts, 0, 3)) diff --git a/tests/baselines/reference/TupleType1.types b/tests/baselines/reference/TupleType1.types index 39fa32d5dcac9..ab185c4a035d9 100644 --- a/tests/baselines/reference/TupleType1.types +++ b/tests/baselines/reference/TupleType1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType1.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType1.ts] //// + +=== TupleType1.ts === var v: [number] >v : [number] diff --git a/tests/baselines/reference/TupleType2.js b/tests/baselines/reference/TupleType2.js index e74db6f031af5..d9ef15bf84fbf 100644 --- a/tests/baselines/reference/TupleType2.js +++ b/tests/baselines/reference/TupleType2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType2.ts] //// + //// [TupleType2.ts] var v: [number, string] diff --git a/tests/baselines/reference/TupleType2.symbols b/tests/baselines/reference/TupleType2.symbols index 5ef9209147aa0..0eee6b2dec6e0 100644 --- a/tests/baselines/reference/TupleType2.symbols +++ b/tests/baselines/reference/TupleType2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType2.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType2.ts] //// + +=== TupleType2.ts === var v: [number, string] >v : Symbol(v, Decl(TupleType2.ts, 0, 3)) diff --git a/tests/baselines/reference/TupleType2.types b/tests/baselines/reference/TupleType2.types index 0f35f60786ce2..7082ac62a394c 100644 --- a/tests/baselines/reference/TupleType2.types +++ b/tests/baselines/reference/TupleType2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType2.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType2.ts] //// + +=== TupleType2.ts === var v: [number, string] >v : [number, string] diff --git a/tests/baselines/reference/TupleType3.js b/tests/baselines/reference/TupleType3.js index 8d357a77be7d5..19a3e3c1d7926 100644 --- a/tests/baselines/reference/TupleType3.js +++ b/tests/baselines/reference/TupleType3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts] //// + //// [TupleType3.ts] var v: [] diff --git a/tests/baselines/reference/TupleType3.symbols b/tests/baselines/reference/TupleType3.symbols index a2466e8512103..884c9faa9d5b1 100644 --- a/tests/baselines/reference/TupleType3.symbols +++ b/tests/baselines/reference/TupleType3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts] //// + +=== TupleType3.ts === var v: [] >v : Symbol(v, Decl(TupleType3.ts, 0, 3)) diff --git a/tests/baselines/reference/TupleType3.types b/tests/baselines/reference/TupleType3.types index 5944aabd7d417..fb83be314bd7d 100644 --- a/tests/baselines/reference/TupleType3.types +++ b/tests/baselines/reference/TupleType3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType3.ts] //// + +=== TupleType3.ts === var v: [] >v : [] diff --git a/tests/baselines/reference/TupleType4.errors.txt b/tests/baselines/reference/TupleType4.errors.txt index 987f40b7aed6b..195121343c7b8 100644 --- a/tests/baselines/reference/TupleType4.errors.txt +++ b/tests/baselines/reference/TupleType4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts(1,9): error TS1005: ']' expected. +TupleType4.ts(1,9): error TS1005: ']' expected. -==== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts (1 errors) ==== +==== TupleType4.ts (1 errors) ==== var v: [ !!! error TS1005: ']' expected. \ No newline at end of file diff --git a/tests/baselines/reference/TupleType4.js b/tests/baselines/reference/TupleType4.js index aaa660f95d966..7d71182b6b42a 100644 --- a/tests/baselines/reference/TupleType4.js +++ b/tests/baselines/reference/TupleType4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts] //// + //// [TupleType4.ts] var v: [ diff --git a/tests/baselines/reference/TupleType4.symbols b/tests/baselines/reference/TupleType4.symbols index 9b5e4a1c00cc0..bb1d356c2e0fe 100644 --- a/tests/baselines/reference/TupleType4.symbols +++ b/tests/baselines/reference/TupleType4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts] //// + +=== TupleType4.ts === var v: [ >v : Symbol(v, Decl(TupleType4.ts, 0, 3)) diff --git a/tests/baselines/reference/TupleType4.types b/tests/baselines/reference/TupleType4.types index 7ad64f5606b72..032a65596b4f0 100644 --- a/tests/baselines/reference/TupleType4.types +++ b/tests/baselines/reference/TupleType4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType4.ts] //// + +=== TupleType4.ts === var v: [ >v : [] diff --git a/tests/baselines/reference/TupleType5.js b/tests/baselines/reference/TupleType5.js index 5e9a0a580be78..6b8d035e2f950 100644 --- a/tests/baselines/reference/TupleType5.js +++ b/tests/baselines/reference/TupleType5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType5.ts] //// + //// [TupleType5.ts] var v: [number,] diff --git a/tests/baselines/reference/TupleType5.symbols b/tests/baselines/reference/TupleType5.symbols index 6c20b3f7a6607..4c61b93dc0db6 100644 --- a/tests/baselines/reference/TupleType5.symbols +++ b/tests/baselines/reference/TupleType5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType5.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType5.ts] //// + +=== TupleType5.ts === var v: [number,] >v : Symbol(v, Decl(TupleType5.ts, 0, 3)) diff --git a/tests/baselines/reference/TupleType5.types b/tests/baselines/reference/TupleType5.types index 6c23baf57d9b9..419fce3128d30 100644 --- a/tests/baselines/reference/TupleType5.types +++ b/tests/baselines/reference/TupleType5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType5.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType5.ts] //// + +=== TupleType5.ts === var v: [number,] >v : [number] diff --git a/tests/baselines/reference/TupleType6.errors.txt b/tests/baselines/reference/TupleType6.errors.txt index 1c3427b8f38c4..164c542ee46a8 100644 --- a/tests/baselines/reference/TupleType6.errors.txt +++ b/tests/baselines/reference/TupleType6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts(1,16): error TS1110: Type expected. +TupleType6.ts(1,16): error TS1110: Type expected. -==== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts (1 errors) ==== +==== TupleType6.ts (1 errors) ==== var v: [number,,] ~ !!! error TS1110: Type expected. \ No newline at end of file diff --git a/tests/baselines/reference/TupleType6.js b/tests/baselines/reference/TupleType6.js index 828d90a72bfda..1d48701b060c0 100644 --- a/tests/baselines/reference/TupleType6.js +++ b/tests/baselines/reference/TupleType6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts] //// + //// [TupleType6.ts] var v: [number,,] diff --git a/tests/baselines/reference/TupleType6.symbols b/tests/baselines/reference/TupleType6.symbols index 8517221a5735d..52f027ce24f7f 100644 --- a/tests/baselines/reference/TupleType6.symbols +++ b/tests/baselines/reference/TupleType6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts] //// + +=== TupleType6.ts === var v: [number,,] >v : Symbol(v, Decl(TupleType6.ts, 0, 3)) > : Symbol(unknown) diff --git a/tests/baselines/reference/TupleType6.types b/tests/baselines/reference/TupleType6.types index a5f9c5e59ebf3..6c1fde8d394f3 100644 --- a/tests/baselines/reference/TupleType6.types +++ b/tests/baselines/reference/TupleType6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts === +//// [tests/cases/conformance/parser/ecmascript5/TupleTypes/TupleType6.ts] //// + +=== TupleType6.ts === var v: [number,,] >v : [number, any] diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js index 134c14e3a8ecb..1edd319cfb27c 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts] //// + //// [TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts] module A { export class Point { diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols index f5830071897c6..bfbb80eff0db6 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts === module A { >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 5, 1)) diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types index 68a8a78f42e9a..52f9163b56370 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js index b9218ea1a555a..9a6d81ac46268 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts] //// + //// [TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts] module A { export interface Point { diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols index f9237087508d3..6a3602a5572b6 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts === module A { >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 6, 1)) diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.types index cb10f83fa14a9..e75078ed4a919 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts === module A { export interface Point { x: number; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.symbols index a9de1388dcd88..6cc0d81c1b6f3 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts] //// + +=== part1.ts === module A { >A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0)) @@ -40,7 +42,7 @@ module A { >y : Symbol(y, Decl(part1.ts, 11, 38)) } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === module A { >A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0)) @@ -63,7 +65,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part3.ts === +=== part3.ts === // test the merging actually worked var o: { x: number; y: number }; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types index e2eefc8cefc53..3ad0f6347b378 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts] //// + +=== part1.ts === module A { >A : typeof A @@ -38,7 +40,7 @@ module A { >0 : 0 } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === module A { >A : typeof A @@ -60,7 +62,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part3.ts === +=== part3.ts === // test the merging actually worked var o: { x: number; y: number }; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt index 39e5278041d94..63afa98aa5cbc 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(2,18): error TS2300: Duplicate identifier 'Point'. -tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'. -tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(17,18): error TS2300: Duplicate identifier 'Line'. -tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'. +TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(2,18): error TS2300: Duplicate identifier 'Point'. +TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'. +TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(17,18): error TS2300: Duplicate identifier 'Line'. +TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'. -==== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (4 errors) ==== +==== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (4 errors) ==== module A { export class Point { ~~~~~ diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js index 9e7c7d46aee56..ebf2a9b46a003 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts] //// + //// [TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts] module A { export class Point { diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols index a100da43c358a..a7c68ee6f9716 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts === module A { >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 5, 1)) diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.types index bc4b6c847c5d1..c161d173b19fd 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts === module A { >A : typeof A diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js index b54a0938a32ba..13414c334047c 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts] //// + //// [TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts] module A { export interface Point { diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols index ba0d0a1888d21..b462115f681df 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts === module A { >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 6, 1)) diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.types index c9320217d0756..22658cd7c41a1 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts === module A { export interface Point { x: number; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt index fd048a987a485..e7d9bcf40169a 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(3,24): error TS2304: Cannot find name 'Point'. -tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,36): error TS2304: Cannot find name 'Point'. -tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error TS2304: Cannot find name 'Point'. +part2.ts(3,24): error TS2304: Cannot find name 'Point'. +part2.ts(7,36): error TS2304: Cannot find name 'Point'. +part2.ts(7,54): error TS2304: Cannot find name 'Point'. -==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (0 errors) ==== +==== part1.ts (0 errors) ==== export module A { export interface Point { x: number; @@ -19,7 +19,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error export var Origin: Point = { x: 0, y: 0 }; } -==== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts (3 errors) ==== +==== part2.ts (3 errors) ==== export module A { // collision with 'Origin' var in other part of merged module export var Origin: Point = { x: 0, y: 0 }; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.symbols index f291c885147ff..a7f6454348f17 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.ts] //// + +=== part1.ts === export module A { >A : Symbol(A, Decl(part1.ts, 0, 0)) @@ -41,7 +43,7 @@ export module A { >y : Symbol(y, Decl(part1.ts, 12, 38)) } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === export module A { >A : Symbol(A, Decl(part2.ts, 0, 0)) diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types index b287fc67bbdff..f005af8fb2bbe 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.ts] //// + +=== part1.ts === export module A { >A : typeof A @@ -39,7 +41,7 @@ export module A { >0 : 0 } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === export module A { >A : typeof A diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js index c3c05c722539d..fed33c84d7e2b 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts] //// + //// [TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts] module A.B { export var x: number; diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols index bf8fd1dc48d1b..ff6ce503c889d 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts === module A.B { >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 2, 1)) >B : Symbol(B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types index 673f382c0ce81..5fb1befd14a4b 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts] //// + +=== TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts === module A.B { >A : typeof A >B : typeof B diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.symbols b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.symbols index c76da99ac42a5..9c89a4b291e2d 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.symbols +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts] //// + +=== part1.ts === module Root { >Root : Symbol(Root, Decl(part1.ts, 0, 0)) @@ -39,7 +41,7 @@ module Root { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === module otherRoot { >otherRoot : Symbol(otherRoot, Decl(part2.ts, 0, 0)) diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types index 1fc74eef3d697..5331423ee7dd2 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts] //// + +=== part1.ts === module Root { >Root : typeof Root @@ -35,7 +37,7 @@ module Root { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === module otherRoot { >otherRoot : typeof otherRoot diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.symbols b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.symbols index ada4d20c0be80..ffc0ba279c01b 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.symbols +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts] //// + +=== part1.ts === module A { >A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0)) @@ -35,7 +37,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === module A { >A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0)) @@ -60,7 +62,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part3.ts === +=== part3.ts === // test the merging actually worked var o: { x: number; y: number }; diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types index d67ab5a68873e..7032a657d4619 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts === +//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts] //// + +=== part1.ts === module A { >A : typeof A @@ -31,7 +33,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts === +=== part2.ts === module A { >A : typeof A @@ -56,7 +58,7 @@ module A { } } -=== tests/cases/conformance/internalModules/DeclarationMerging/part3.ts === +=== part3.ts === // test the merging actually worked var o: { x: number; y: number }; diff --git a/tests/baselines/reference/TypeArgumentList1.errors.txt b/tests/baselines/reference/TypeArgumentList1.errors.txt index 851dd0b59edce..58d2cab35499e 100644 --- a/tests/baselines/reference/TypeArgumentList1.errors.txt +++ b/tests/baselines/reference/TypeArgumentList1.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2304: Cannot find name 'Foo'. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2695: Left side of comma operator is unused and has no side effects. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2695: Left side of comma operator is unused and has no side effects. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,5): error TS2304: Cannot find name 'A'. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,7): error TS2304: Cannot find name 'B'. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,9): error TS1127: Invalid character. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,11): error TS2304: Cannot find name 'C'. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,14): error TS2695: Left side of comma operator is unused and has no side effects. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,14): error TS2695: Left side of comma operator is unused and has no side effects. +TypeArgumentList1.ts(1,1): error TS2304: Cannot find name 'Foo'. +TypeArgumentList1.ts(1,1): error TS2695: Left side of comma operator is unused and has no side effects. +TypeArgumentList1.ts(1,1): error TS2695: Left side of comma operator is unused and has no side effects. +TypeArgumentList1.ts(1,5): error TS2304: Cannot find name 'A'. +TypeArgumentList1.ts(1,7): error TS2304: Cannot find name 'B'. +TypeArgumentList1.ts(1,9): error TS1127: Invalid character. +TypeArgumentList1.ts(1,11): error TS2304: Cannot find name 'C'. +TypeArgumentList1.ts(1,14): error TS2695: Left side of comma operator is unused and has no side effects. +TypeArgumentList1.ts(1,14): error TS2695: Left side of comma operator is unused and has no side effects. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts (9 errors) ==== +==== TypeArgumentList1.ts (9 errors) ==== Foo(4, 5, 6); ~~~ !!! error TS2304: Cannot find name 'Foo'. diff --git a/tests/baselines/reference/TypeArgumentList1.js b/tests/baselines/reference/TypeArgumentList1.js index f6f5412ce1624..3254810cd804f 100644 --- a/tests/baselines/reference/TypeArgumentList1.js +++ b/tests/baselines/reference/TypeArgumentList1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts] //// + //// [TypeArgumentList1.ts] Foo(4, 5, 6); diff --git a/tests/baselines/reference/TypeArgumentList1.symbols b/tests/baselines/reference/TypeArgumentList1.symbols index f9976273ddccf..6f83e591ff0f3 100644 --- a/tests/baselines/reference/TypeArgumentList1.symbols +++ b/tests/baselines/reference/TypeArgumentList1.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts] //// + +=== TypeArgumentList1.ts === Foo(4, 5, 6); diff --git a/tests/baselines/reference/TypeArgumentList1.types b/tests/baselines/reference/TypeArgumentList1.types index 5d346592c49e4..bc801f87c742d 100644 --- a/tests/baselines/reference/TypeArgumentList1.types +++ b/tests/baselines/reference/TypeArgumentList1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts === +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts] //// + +=== TypeArgumentList1.ts === Foo(4, 5, 6); >FooFooMessage : Symbol(Message, Decl(TypeGuardWithArrayUnion.ts, 0, 0)) diff --git a/tests/baselines/reference/TypeGuardWithArrayUnion.types b/tests/baselines/reference/TypeGuardWithArrayUnion.types index 283905b036954..daac532b26423 100644 --- a/tests/baselines/reference/TypeGuardWithArrayUnion.types +++ b/tests/baselines/reference/TypeGuardWithArrayUnion.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts === +//// [tests/cases/conformance/expressions/typeGuards/TypeGuardWithArrayUnion.ts] //// + +=== TypeGuardWithArrayUnion.ts === class Message { >Message : Message diff --git a/tests/baselines/reference/TypeGuardWithEnumUnion.js b/tests/baselines/reference/TypeGuardWithEnumUnion.js index f582c70857af7..4a47a9aefcad5 100644 --- a/tests/baselines/reference/TypeGuardWithEnumUnion.js +++ b/tests/baselines/reference/TypeGuardWithEnumUnion.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/typeGuards/TypeGuardWithEnumUnion.ts] //// + //// [TypeGuardWithEnumUnion.ts] enum Color { R, G, B } diff --git a/tests/baselines/reference/TypeGuardWithEnumUnion.symbols b/tests/baselines/reference/TypeGuardWithEnumUnion.symbols index 92b83f3c56da0..8e4a382b4c87f 100644 --- a/tests/baselines/reference/TypeGuardWithEnumUnion.symbols +++ b/tests/baselines/reference/TypeGuardWithEnumUnion.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/typeGuards/TypeGuardWithEnumUnion.ts === +//// [tests/cases/conformance/expressions/typeGuards/TypeGuardWithEnumUnion.ts] //// + +=== TypeGuardWithEnumUnion.ts === enum Color { R, G, B } >Color : Symbol(Color, Decl(TypeGuardWithEnumUnion.ts, 0, 0)) >R : Symbol(Color.R, Decl(TypeGuardWithEnumUnion.ts, 0, 12)) diff --git a/tests/baselines/reference/TypeGuardWithEnumUnion.types b/tests/baselines/reference/TypeGuardWithEnumUnion.types index 5f1c81cb80c5d..f23acb17ede7e 100644 --- a/tests/baselines/reference/TypeGuardWithEnumUnion.types +++ b/tests/baselines/reference/TypeGuardWithEnumUnion.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/typeGuards/TypeGuardWithEnumUnion.ts === +//// [tests/cases/conformance/expressions/typeGuards/TypeGuardWithEnumUnion.ts] //// + +=== TypeGuardWithEnumUnion.ts === enum Color { R, G, B } >Color : Color >R : Color.R diff --git a/tests/baselines/reference/VariableDeclaration10_es6.js b/tests/baselines/reference/VariableDeclaration10_es6.js index 14f47cea04dfe..4aac9e2b945a5 100644 --- a/tests/baselines/reference/VariableDeclaration10_es6.js +++ b/tests/baselines/reference/VariableDeclaration10_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts] //// + //// [VariableDeclaration10_es6.ts] let a: number = 1 diff --git a/tests/baselines/reference/VariableDeclaration10_es6.symbols b/tests/baselines/reference/VariableDeclaration10_es6.symbols index ce37f77ed6d30..028c48b9d33e0 100644 --- a/tests/baselines/reference/VariableDeclaration10_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration10_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts] //// + +=== VariableDeclaration10_es6.ts === let a: number = 1 >a : Symbol(a, Decl(VariableDeclaration10_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/VariableDeclaration10_es6.types b/tests/baselines/reference/VariableDeclaration10_es6.types index 29056b88ce1a9..26bdb3ff5f5e9 100644 --- a/tests/baselines/reference/VariableDeclaration10_es6.types +++ b/tests/baselines/reference/VariableDeclaration10_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts] //// + +=== VariableDeclaration10_es6.ts === let a: number = 1 >a : number >1 : 1 diff --git a/tests/baselines/reference/VariableDeclaration11_es6.errors.txt b/tests/baselines/reference/VariableDeclaration11_es6.errors.txt index 8fa0a99ab67d4..fa5b1c93f770c 100644 --- a/tests/baselines/reference/VariableDeclaration11_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration11_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS2304: Cannot find name 'let'. +VariableDeclaration11_es6.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. +VariableDeclaration11_es6.ts(2,1): error TS2304: Cannot find name 'let'. -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts (2 errors) ==== +==== VariableDeclaration11_es6.ts (2 errors) ==== "use strict"; let ~~~ diff --git a/tests/baselines/reference/VariableDeclaration11_es6.js b/tests/baselines/reference/VariableDeclaration11_es6.js index cf4c14617bcc5..b12e6c2fe4652 100644 --- a/tests/baselines/reference/VariableDeclaration11_es6.js +++ b/tests/baselines/reference/VariableDeclaration11_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts] //// + //// [VariableDeclaration11_es6.ts] "use strict"; let diff --git a/tests/baselines/reference/VariableDeclaration11_es6.symbols b/tests/baselines/reference/VariableDeclaration11_es6.symbols index d4116fb8da4f6..16bfb3bdfad21 100644 --- a/tests/baselines/reference/VariableDeclaration11_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration11_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts] //// + +=== VariableDeclaration11_es6.ts === "use strict"; let diff --git a/tests/baselines/reference/VariableDeclaration11_es6.types b/tests/baselines/reference/VariableDeclaration11_es6.types index 8806d07de0ca4..7f6c81830f089 100644 --- a/tests/baselines/reference/VariableDeclaration11_es6.types +++ b/tests/baselines/reference/VariableDeclaration11_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts] //// + +=== VariableDeclaration11_es6.ts === "use strict"; >"use strict" : "use strict" diff --git a/tests/baselines/reference/VariableDeclaration12_es6.js b/tests/baselines/reference/VariableDeclaration12_es6.js index da0748d2191a1..98a622fe9a0e4 100644 --- a/tests/baselines/reference/VariableDeclaration12_es6.js +++ b/tests/baselines/reference/VariableDeclaration12_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration12_es6.ts] //// + //// [VariableDeclaration12_es6.ts] let x diff --git a/tests/baselines/reference/VariableDeclaration12_es6.symbols b/tests/baselines/reference/VariableDeclaration12_es6.symbols index 5c4f583fbb25f..5b91093cb658a 100644 --- a/tests/baselines/reference/VariableDeclaration12_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration12_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration12_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration12_es6.ts] //// + +=== VariableDeclaration12_es6.ts === let x >x : Symbol(x, Decl(VariableDeclaration12_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/VariableDeclaration12_es6.types b/tests/baselines/reference/VariableDeclaration12_es6.types index db8acdffd7926..29a5d4ebc99e7 100644 --- a/tests/baselines/reference/VariableDeclaration12_es6.types +++ b/tests/baselines/reference/VariableDeclaration12_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration12_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration12_es6.ts] //// + +=== VariableDeclaration12_es6.ts === let x >x : any diff --git a/tests/baselines/reference/VariableDeclaration13_es6.errors.txt b/tests/baselines/reference/VariableDeclaration13_es6.errors.txt index c954969f19dc7..7e20c6d8d05e2 100644 --- a/tests/baselines/reference/VariableDeclaration13_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration13_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts(4,5): error TS1181: Array element destructuring pattern expected. -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts(4,6): error TS1005: ';' expected. -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts(4,8): error TS1128: Declaration or statement expected. +VariableDeclaration13_es6.ts(4,5): error TS1181: Array element destructuring pattern expected. +VariableDeclaration13_es6.ts(4,6): error TS1005: ';' expected. +VariableDeclaration13_es6.ts(4,8): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts (3 errors) ==== +==== VariableDeclaration13_es6.ts (3 errors) ==== // An ExpressionStatement cannot start with the two token sequence `let [` because // that would make it ambiguous with a `let` LexicalDeclaration whose first LexicalBinding was an ArrayBindingPattern. var let: any; diff --git a/tests/baselines/reference/VariableDeclaration13_es6.js b/tests/baselines/reference/VariableDeclaration13_es6.js index 152ca6a26d6c8..bafe314c4f55a 100644 --- a/tests/baselines/reference/VariableDeclaration13_es6.js +++ b/tests/baselines/reference/VariableDeclaration13_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts] //// + //// [VariableDeclaration13_es6.ts] // An ExpressionStatement cannot start with the two token sequence `let [` because // that would make it ambiguous with a `let` LexicalDeclaration whose first LexicalBinding was an ArrayBindingPattern. diff --git a/tests/baselines/reference/VariableDeclaration13_es6.symbols b/tests/baselines/reference/VariableDeclaration13_es6.symbols index 7e2d3a370ec1f..7bdf955db13b9 100644 --- a/tests/baselines/reference/VariableDeclaration13_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration13_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts] //// + +=== VariableDeclaration13_es6.ts === // An ExpressionStatement cannot start with the two token sequence `let [` because // that would make it ambiguous with a `let` LexicalDeclaration whose first LexicalBinding was an ArrayBindingPattern. var let: any; diff --git a/tests/baselines/reference/VariableDeclaration13_es6.types b/tests/baselines/reference/VariableDeclaration13_es6.types index 1e40a719c3b22..9200b11d4d6eb 100644 --- a/tests/baselines/reference/VariableDeclaration13_es6.types +++ b/tests/baselines/reference/VariableDeclaration13_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration13_es6.ts] //// + +=== VariableDeclaration13_es6.ts === // An ExpressionStatement cannot start with the two token sequence `let [` because // that would make it ambiguous with a `let` LexicalDeclaration whose first LexicalBinding was an ArrayBindingPattern. var let: any; diff --git a/tests/baselines/reference/VariableDeclaration1_es6.errors.txt b/tests/baselines/reference/VariableDeclaration1_es6.errors.txt index f4413e151c16b..7174a646b1943 100644 --- a/tests/baselines/reference/VariableDeclaration1_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration1_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts(1,6): error TS1123: Variable declaration list cannot be empty. +VariableDeclaration1_es6.ts(1,6): error TS1123: Variable declaration list cannot be empty. -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts (1 errors) ==== +==== VariableDeclaration1_es6.ts (1 errors) ==== const !!! error TS1123: Variable declaration list cannot be empty. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration1_es6.js b/tests/baselines/reference/VariableDeclaration1_es6.js index 26433bd88c3dd..753a718651913 100644 --- a/tests/baselines/reference/VariableDeclaration1_es6.js +++ b/tests/baselines/reference/VariableDeclaration1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts] //// + //// [VariableDeclaration1_es6.ts] const diff --git a/tests/baselines/reference/VariableDeclaration1_es6.symbols b/tests/baselines/reference/VariableDeclaration1_es6.symbols index c556858159731..cf97634e8dbf4 100644 --- a/tests/baselines/reference/VariableDeclaration1_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration1_es6.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts] //// + +=== VariableDeclaration1_es6.ts === const diff --git a/tests/baselines/reference/VariableDeclaration1_es6.types b/tests/baselines/reference/VariableDeclaration1_es6.types index c556858159731..cf97634e8dbf4 100644 --- a/tests/baselines/reference/VariableDeclaration1_es6.types +++ b/tests/baselines/reference/VariableDeclaration1_es6.types @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts] //// + +=== VariableDeclaration1_es6.ts === const diff --git a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt index adf56a61f840d..b754a7df94eef 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized. +VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized. -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (1 errors) ==== +==== VariableDeclaration2_es6.ts (1 errors) ==== const a ~ !!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration2_es6.js b/tests/baselines/reference/VariableDeclaration2_es6.js index a955315a2f02c..8014be127dd8b 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.js +++ b/tests/baselines/reference/VariableDeclaration2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts] //// + //// [VariableDeclaration2_es6.ts] const a diff --git a/tests/baselines/reference/VariableDeclaration2_es6.symbols b/tests/baselines/reference/VariableDeclaration2_es6.symbols index 93d36394e5964..c27f4a0c4afc3 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts] //// + +=== VariableDeclaration2_es6.ts === const a >a : Symbol(a, Decl(VariableDeclaration2_es6.ts, 0, 5)) diff --git a/tests/baselines/reference/VariableDeclaration2_es6.types b/tests/baselines/reference/VariableDeclaration2_es6.types index 60f6c46499ee3..612424eb0e394 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.types +++ b/tests/baselines/reference/VariableDeclaration2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts] //// + +=== VariableDeclaration2_es6.ts === const a >a : any diff --git a/tests/baselines/reference/VariableDeclaration3_es6.js b/tests/baselines/reference/VariableDeclaration3_es6.js index 4be8a3daf381f..d7b0e57e8e8cd 100644 --- a/tests/baselines/reference/VariableDeclaration3_es6.js +++ b/tests/baselines/reference/VariableDeclaration3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts] //// + //// [VariableDeclaration3_es6.ts] const a = 1 diff --git a/tests/baselines/reference/VariableDeclaration3_es6.symbols b/tests/baselines/reference/VariableDeclaration3_es6.symbols index 431e15aa60ee6..c6f7431f2db30 100644 --- a/tests/baselines/reference/VariableDeclaration3_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts] //// + +=== VariableDeclaration3_es6.ts === const a = 1 >a : Symbol(a, Decl(VariableDeclaration3_es6.ts, 0, 5)) diff --git a/tests/baselines/reference/VariableDeclaration3_es6.types b/tests/baselines/reference/VariableDeclaration3_es6.types index 5f92a06df1195..edcda909d3b44 100644 --- a/tests/baselines/reference/VariableDeclaration3_es6.types +++ b/tests/baselines/reference/VariableDeclaration3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts] //// + +=== VariableDeclaration3_es6.ts === const a = 1 >a : 1 >1 : 1 diff --git a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt index ddfd6c5302d15..850fd46f90e31 100644 --- a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized. +VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized. -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (1 errors) ==== +==== VariableDeclaration4_es6.ts (1 errors) ==== const a: number ~ !!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration4_es6.js b/tests/baselines/reference/VariableDeclaration4_es6.js index 7a9934e052bfb..a14d01fda5c28 100644 --- a/tests/baselines/reference/VariableDeclaration4_es6.js +++ b/tests/baselines/reference/VariableDeclaration4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts] //// + //// [VariableDeclaration4_es6.ts] const a: number diff --git a/tests/baselines/reference/VariableDeclaration4_es6.symbols b/tests/baselines/reference/VariableDeclaration4_es6.symbols index e0ed56d9f2cd3..67476a581d90a 100644 --- a/tests/baselines/reference/VariableDeclaration4_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts] //// + +=== VariableDeclaration4_es6.ts === const a: number >a : Symbol(a, Decl(VariableDeclaration4_es6.ts, 0, 5)) diff --git a/tests/baselines/reference/VariableDeclaration4_es6.types b/tests/baselines/reference/VariableDeclaration4_es6.types index 622d6bb6ba655..aa3b708ef6e86 100644 --- a/tests/baselines/reference/VariableDeclaration4_es6.types +++ b/tests/baselines/reference/VariableDeclaration4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts] //// + +=== VariableDeclaration4_es6.ts === const a: number >a : number diff --git a/tests/baselines/reference/VariableDeclaration5_es6.js b/tests/baselines/reference/VariableDeclaration5_es6.js index e6a3c175651df..749f63fc508be 100644 --- a/tests/baselines/reference/VariableDeclaration5_es6.js +++ b/tests/baselines/reference/VariableDeclaration5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts] //// + //// [VariableDeclaration5_es6.ts] const a: number = 1 diff --git a/tests/baselines/reference/VariableDeclaration5_es6.symbols b/tests/baselines/reference/VariableDeclaration5_es6.symbols index e187f78e4d7d8..b34477d7c75f3 100644 --- a/tests/baselines/reference/VariableDeclaration5_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts] //// + +=== VariableDeclaration5_es6.ts === const a: number = 1 >a : Symbol(a, Decl(VariableDeclaration5_es6.ts, 0, 5)) diff --git a/tests/baselines/reference/VariableDeclaration5_es6.types b/tests/baselines/reference/VariableDeclaration5_es6.types index c0ed35a43e3e0..cbb33e82825c5 100644 --- a/tests/baselines/reference/VariableDeclaration5_es6.types +++ b/tests/baselines/reference/VariableDeclaration5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts] //// + +=== VariableDeclaration5_es6.ts === const a: number = 1 >a : number >1 : 1 diff --git a/tests/baselines/reference/VariableDeclaration6_es6.errors.txt b/tests/baselines/reference/VariableDeclaration6_es6.errors.txt index fb2a41b873977..a475016684007 100644 --- a/tests/baselines/reference/VariableDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration6_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts(1,1): error TS2304: Cannot find name 'let'. +VariableDeclaration6_es6.ts(1,1): error TS2304: Cannot find name 'let'. -==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts (1 errors) ==== +==== VariableDeclaration6_es6.ts (1 errors) ==== let ~~~ !!! error TS2304: Cannot find name 'let'. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration6_es6.js b/tests/baselines/reference/VariableDeclaration6_es6.js index aee01ed527194..05bd083e66fdd 100644 --- a/tests/baselines/reference/VariableDeclaration6_es6.js +++ b/tests/baselines/reference/VariableDeclaration6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts] //// + //// [VariableDeclaration6_es6.ts] let diff --git a/tests/baselines/reference/VariableDeclaration6_es6.symbols b/tests/baselines/reference/VariableDeclaration6_es6.symbols index 38718bf93acfe..477f9209007bb 100644 --- a/tests/baselines/reference/VariableDeclaration6_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration6_es6.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts] //// + +=== VariableDeclaration6_es6.ts === let diff --git a/tests/baselines/reference/VariableDeclaration6_es6.types b/tests/baselines/reference/VariableDeclaration6_es6.types index a47682673fc01..a7d1bcc05117a 100644 --- a/tests/baselines/reference/VariableDeclaration6_es6.types +++ b/tests/baselines/reference/VariableDeclaration6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts] //// + +=== VariableDeclaration6_es6.ts === let >let : any diff --git a/tests/baselines/reference/VariableDeclaration7_es6.js b/tests/baselines/reference/VariableDeclaration7_es6.js index 00ab95503a62e..448c1fa5198f4 100644 --- a/tests/baselines/reference/VariableDeclaration7_es6.js +++ b/tests/baselines/reference/VariableDeclaration7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts] //// + //// [VariableDeclaration7_es6.ts] let a diff --git a/tests/baselines/reference/VariableDeclaration7_es6.symbols b/tests/baselines/reference/VariableDeclaration7_es6.symbols index 033e10978a3ba..9b0de3c311836 100644 --- a/tests/baselines/reference/VariableDeclaration7_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts] //// + +=== VariableDeclaration7_es6.ts === let a >a : Symbol(a, Decl(VariableDeclaration7_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/VariableDeclaration7_es6.types b/tests/baselines/reference/VariableDeclaration7_es6.types index 321c1b07bbcdd..80111179eab94 100644 --- a/tests/baselines/reference/VariableDeclaration7_es6.types +++ b/tests/baselines/reference/VariableDeclaration7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts] //// + +=== VariableDeclaration7_es6.ts === let a >a : any diff --git a/tests/baselines/reference/VariableDeclaration8_es6.js b/tests/baselines/reference/VariableDeclaration8_es6.js index 9178871ef65e3..8a26a861d5db1 100644 --- a/tests/baselines/reference/VariableDeclaration8_es6.js +++ b/tests/baselines/reference/VariableDeclaration8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts] //// + //// [VariableDeclaration8_es6.ts] let a = 1 diff --git a/tests/baselines/reference/VariableDeclaration8_es6.symbols b/tests/baselines/reference/VariableDeclaration8_es6.symbols index 9dcd7c4b26037..079ce44c6d861 100644 --- a/tests/baselines/reference/VariableDeclaration8_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts] //// + +=== VariableDeclaration8_es6.ts === let a = 1 >a : Symbol(a, Decl(VariableDeclaration8_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/VariableDeclaration8_es6.types b/tests/baselines/reference/VariableDeclaration8_es6.types index e31fddbc09f89..8e6e1f7982477 100644 --- a/tests/baselines/reference/VariableDeclaration8_es6.types +++ b/tests/baselines/reference/VariableDeclaration8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts] //// + +=== VariableDeclaration8_es6.ts === let a = 1 >a : number >1 : 1 diff --git a/tests/baselines/reference/VariableDeclaration9_es6.js b/tests/baselines/reference/VariableDeclaration9_es6.js index b22c5691eb29d..1d107657c4e3e 100644 --- a/tests/baselines/reference/VariableDeclaration9_es6.js +++ b/tests/baselines/reference/VariableDeclaration9_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts] //// + //// [VariableDeclaration9_es6.ts] let a: number diff --git a/tests/baselines/reference/VariableDeclaration9_es6.symbols b/tests/baselines/reference/VariableDeclaration9_es6.symbols index a92d00f7fbd63..207c06f3aa2ce 100644 --- a/tests/baselines/reference/VariableDeclaration9_es6.symbols +++ b/tests/baselines/reference/VariableDeclaration9_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts] //// + +=== VariableDeclaration9_es6.ts === let a: number >a : Symbol(a, Decl(VariableDeclaration9_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/VariableDeclaration9_es6.types b/tests/baselines/reference/VariableDeclaration9_es6.types index 6b29a04281b58..fe22c80f9e1f8 100644 --- a/tests/baselines/reference/VariableDeclaration9_es6.types +++ b/tests/baselines/reference/VariableDeclaration9_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts === +//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts] //// + +=== VariableDeclaration9_es6.ts === let a: number >a : number diff --git a/tests/baselines/reference/YieldExpression10_es6.errors.txt b/tests/baselines/reference/YieldExpression10_es6.errors.txt index 9e48fefc10aab..018c6c64ac785 100644 --- a/tests/baselines/reference/YieldExpression10_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression10_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts(2,11): error TS2304: Cannot find name 'foo'. +YieldExpression10_es6.ts(2,11): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts (1 errors) ==== +==== YieldExpression10_es6.ts (1 errors) ==== var v = { * foo() { yield(foo); ~~~ diff --git a/tests/baselines/reference/YieldExpression10_es6.js b/tests/baselines/reference/YieldExpression10_es6.js index f32dd1decf70d..0e3f21cdde8b7 100644 --- a/tests/baselines/reference/YieldExpression10_es6.js +++ b/tests/baselines/reference/YieldExpression10_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts] //// + //// [YieldExpression10_es6.ts] var v = { * foo() { yield(foo); diff --git a/tests/baselines/reference/YieldExpression10_es6.symbols b/tests/baselines/reference/YieldExpression10_es6.symbols index 90b6f7773385a..674cedb7f3891 100644 --- a/tests/baselines/reference/YieldExpression10_es6.symbols +++ b/tests/baselines/reference/YieldExpression10_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts] //// + +=== YieldExpression10_es6.ts === var v = { * foo() { >v : Symbol(v, Decl(YieldExpression10_es6.ts, 0, 3)) >foo : Symbol(foo, Decl(YieldExpression10_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/YieldExpression10_es6.types b/tests/baselines/reference/YieldExpression10_es6.types index 4f9f400a616fa..b9e83f8b43052 100644 --- a/tests/baselines/reference/YieldExpression10_es6.types +++ b/tests/baselines/reference/YieldExpression10_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts] //// + +=== YieldExpression10_es6.ts === var v = { * foo() { >v : { foo(): Generator; } >{ * foo() { yield(foo); }} : { foo(): Generator; } diff --git a/tests/baselines/reference/YieldExpression11_es6.errors.txt b/tests/baselines/reference/YieldExpression11_es6.errors.txt index 223389e4e3945..58ca15ba6313a 100644 --- a/tests/baselines/reference/YieldExpression11_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression11_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(3,11): error TS2663: Cannot find name 'foo'. Did you mean the instance member 'this.foo'? +YieldExpression11_es6.ts(3,11): error TS2663: Cannot find name 'foo'. Did you mean the instance member 'this.foo'? -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (1 errors) ==== +==== YieldExpression11_es6.ts (1 errors) ==== class C { *foo() { yield(foo); diff --git a/tests/baselines/reference/YieldExpression11_es6.js b/tests/baselines/reference/YieldExpression11_es6.js index 46adf67363453..41b8f2b9be513 100644 --- a/tests/baselines/reference/YieldExpression11_es6.js +++ b/tests/baselines/reference/YieldExpression11_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts] //// + //// [YieldExpression11_es6.ts] class C { *foo() { diff --git a/tests/baselines/reference/YieldExpression11_es6.symbols b/tests/baselines/reference/YieldExpression11_es6.symbols index fb0302abe66bf..d338687b49279 100644 --- a/tests/baselines/reference/YieldExpression11_es6.symbols +++ b/tests/baselines/reference/YieldExpression11_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts] //// + +=== YieldExpression11_es6.ts === class C { >C : Symbol(C, Decl(YieldExpression11_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression11_es6.types b/tests/baselines/reference/YieldExpression11_es6.types index 0ddc8ba936c8c..3683a63513f87 100644 --- a/tests/baselines/reference/YieldExpression11_es6.types +++ b/tests/baselines/reference/YieldExpression11_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts] //// + +=== YieldExpression11_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/YieldExpression12_es6.errors.txt b/tests/baselines/reference/YieldExpression12_es6.errors.txt index 42d447ed5d60f..f278c3a851b3b 100644 --- a/tests/baselines/reference/YieldExpression12_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression12_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts(3,6): error TS1163: A 'yield' expression is only allowed in a generator body. +YieldExpression12_es6.ts(3,6): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts (1 errors) ==== +==== YieldExpression12_es6.ts (1 errors) ==== class C { constructor() { yield foo diff --git a/tests/baselines/reference/YieldExpression12_es6.js b/tests/baselines/reference/YieldExpression12_es6.js index d0ff7e9d6b86e..b57f72e31d5d5 100644 --- a/tests/baselines/reference/YieldExpression12_es6.js +++ b/tests/baselines/reference/YieldExpression12_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts] //// + //// [YieldExpression12_es6.ts] class C { constructor() { diff --git a/tests/baselines/reference/YieldExpression12_es6.symbols b/tests/baselines/reference/YieldExpression12_es6.symbols index aaa62f47cd18a..45ec9c57bbb1e 100644 --- a/tests/baselines/reference/YieldExpression12_es6.symbols +++ b/tests/baselines/reference/YieldExpression12_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts] //// + +=== YieldExpression12_es6.ts === class C { >C : Symbol(C, Decl(YieldExpression12_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression12_es6.types b/tests/baselines/reference/YieldExpression12_es6.types index a5743c0c1a73f..251f04b492009 100644 --- a/tests/baselines/reference/YieldExpression12_es6.types +++ b/tests/baselines/reference/YieldExpression12_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts] //// + +=== YieldExpression12_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/YieldExpression13_es6.js b/tests/baselines/reference/YieldExpression13_es6.js index c75e964675a55..2d31a2ea6388b 100644 --- a/tests/baselines/reference/YieldExpression13_es6.js +++ b/tests/baselines/reference/YieldExpression13_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts] //// + //// [YieldExpression13_es6.ts] function* foo() { yield } diff --git a/tests/baselines/reference/YieldExpression13_es6.symbols b/tests/baselines/reference/YieldExpression13_es6.symbols index f2e1b100c9d20..aa865c1271984 100644 --- a/tests/baselines/reference/YieldExpression13_es6.symbols +++ b/tests/baselines/reference/YieldExpression13_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts] //// + +=== YieldExpression13_es6.ts === function* foo() { yield } >foo : Symbol(foo, Decl(YieldExpression13_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression13_es6.types b/tests/baselines/reference/YieldExpression13_es6.types index 5859828b8fe94..098f6512599e2 100644 --- a/tests/baselines/reference/YieldExpression13_es6.types +++ b/tests/baselines/reference/YieldExpression13_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts] //// + +=== YieldExpression13_es6.ts === function* foo() { yield } >foo : () => Generator >yield : any diff --git a/tests/baselines/reference/YieldExpression14_es6.errors.txt b/tests/baselines/reference/YieldExpression14_es6.errors.txt index 2e32e7a23880b..b3ded2a1cb8ff 100644 --- a/tests/baselines/reference/YieldExpression14_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression14_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts(3,6): error TS1163: A 'yield' expression is only allowed in a generator body. +YieldExpression14_es6.ts(3,6): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts (1 errors) ==== +==== YieldExpression14_es6.ts (1 errors) ==== class C { foo() { yield foo diff --git a/tests/baselines/reference/YieldExpression14_es6.js b/tests/baselines/reference/YieldExpression14_es6.js index e25a29e606f04..94f6484284d0e 100644 --- a/tests/baselines/reference/YieldExpression14_es6.js +++ b/tests/baselines/reference/YieldExpression14_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts] //// + //// [YieldExpression14_es6.ts] class C { foo() { diff --git a/tests/baselines/reference/YieldExpression14_es6.symbols b/tests/baselines/reference/YieldExpression14_es6.symbols index 4ec09c3bef293..f60bf9f13f919 100644 --- a/tests/baselines/reference/YieldExpression14_es6.symbols +++ b/tests/baselines/reference/YieldExpression14_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts] //// + +=== YieldExpression14_es6.ts === class C { >C : Symbol(C, Decl(YieldExpression14_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression14_es6.types b/tests/baselines/reference/YieldExpression14_es6.types index 3b878347b7647..87b473f7986ce 100644 --- a/tests/baselines/reference/YieldExpression14_es6.types +++ b/tests/baselines/reference/YieldExpression14_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts] //// + +=== YieldExpression14_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/YieldExpression15_es6.errors.txt b/tests/baselines/reference/YieldExpression15_es6.errors.txt index bb60f6a8f76e1..a00a4429b235b 100644 --- a/tests/baselines/reference/YieldExpression15_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression15_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts(2,6): error TS1163: A 'yield' expression is only allowed in a generator body. +YieldExpression15_es6.ts(2,6): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts (1 errors) ==== +==== YieldExpression15_es6.ts (1 errors) ==== var v = () => { yield foo ~~~~~ diff --git a/tests/baselines/reference/YieldExpression15_es6.js b/tests/baselines/reference/YieldExpression15_es6.js index d03699922f600..52413d7326e34 100644 --- a/tests/baselines/reference/YieldExpression15_es6.js +++ b/tests/baselines/reference/YieldExpression15_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts] //// + //// [YieldExpression15_es6.ts] var v = () => { yield foo diff --git a/tests/baselines/reference/YieldExpression15_es6.symbols b/tests/baselines/reference/YieldExpression15_es6.symbols index 0d55bef21ac74..c48c21135f0cb 100644 --- a/tests/baselines/reference/YieldExpression15_es6.symbols +++ b/tests/baselines/reference/YieldExpression15_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts] //// + +=== YieldExpression15_es6.ts === var v = () => { >v : Symbol(v, Decl(YieldExpression15_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/YieldExpression15_es6.types b/tests/baselines/reference/YieldExpression15_es6.types index 33eedb854b0fd..3b752eb990c61 100644 --- a/tests/baselines/reference/YieldExpression15_es6.types +++ b/tests/baselines/reference/YieldExpression15_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts] //// + +=== YieldExpression15_es6.ts === var v = () => { >v : () => void >() => { yield foo } : () => void diff --git a/tests/baselines/reference/YieldExpression16_es6.errors.txt b/tests/baselines/reference/YieldExpression16_es6.errors.txt index 94e082f4c2760..b572c01dcd578 100644 --- a/tests/baselines/reference/YieldExpression16_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression16_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(3,5): error TS1163: A 'yield' expression is only allowed in a generator body. +YieldExpression16_es6.ts(3,5): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ==== +==== YieldExpression16_es6.ts (1 errors) ==== function* foo() { function bar() { yield foo; diff --git a/tests/baselines/reference/YieldExpression16_es6.js b/tests/baselines/reference/YieldExpression16_es6.js index 0937cfedcb902..fe803ae4e0ed2 100644 --- a/tests/baselines/reference/YieldExpression16_es6.js +++ b/tests/baselines/reference/YieldExpression16_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts] //// + //// [YieldExpression16_es6.ts] function* foo() { function bar() { diff --git a/tests/baselines/reference/YieldExpression16_es6.symbols b/tests/baselines/reference/YieldExpression16_es6.symbols index 50bedfcb15a0c..c62f3d1c2b1b2 100644 --- a/tests/baselines/reference/YieldExpression16_es6.symbols +++ b/tests/baselines/reference/YieldExpression16_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts] //// + +=== YieldExpression16_es6.ts === function* foo() { >foo : Symbol(foo, Decl(YieldExpression16_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression16_es6.types b/tests/baselines/reference/YieldExpression16_es6.types index 67b956a3cfcec..0f5f3c842e41e 100644 --- a/tests/baselines/reference/YieldExpression16_es6.types +++ b/tests/baselines/reference/YieldExpression16_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts] //// + +=== YieldExpression16_es6.ts === function* foo() { >foo : () => Generator diff --git a/tests/baselines/reference/YieldExpression17_es6.errors.txt b/tests/baselines/reference/YieldExpression17_es6.errors.txt index 540b1a889f02c..35fcb02ce1f3f 100644 --- a/tests/baselines/reference/YieldExpression17_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression17_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS2378: A 'get' accessor must return a value. -tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,23): error TS1163: A 'yield' expression is only allowed in a generator body. +YieldExpression17_es6.ts(1,15): error TS2378: A 'get' accessor must return a value. +YieldExpression17_es6.ts(1,23): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts (2 errors) ==== +==== YieldExpression17_es6.ts (2 errors) ==== var v = { get foo() { yield foo; } } ~~~ !!! error TS2378: A 'get' accessor must return a value. diff --git a/tests/baselines/reference/YieldExpression17_es6.js b/tests/baselines/reference/YieldExpression17_es6.js index 8aed4a9d571d0..176bc1382b4e7 100644 --- a/tests/baselines/reference/YieldExpression17_es6.js +++ b/tests/baselines/reference/YieldExpression17_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts] //// + //// [YieldExpression17_es6.ts] var v = { get foo() { yield foo; } } diff --git a/tests/baselines/reference/YieldExpression17_es6.symbols b/tests/baselines/reference/YieldExpression17_es6.symbols index 69a5caa9532cf..ecc9265282c65 100644 --- a/tests/baselines/reference/YieldExpression17_es6.symbols +++ b/tests/baselines/reference/YieldExpression17_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts] //// + +=== YieldExpression17_es6.ts === var v = { get foo() { yield foo; } } >v : Symbol(v, Decl(YieldExpression17_es6.ts, 0, 3)) >foo : Symbol(foo, Decl(YieldExpression17_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/YieldExpression17_es6.types b/tests/baselines/reference/YieldExpression17_es6.types index 08a8989b9ab06..d334a6d04794e 100644 --- a/tests/baselines/reference/YieldExpression17_es6.types +++ b/tests/baselines/reference/YieldExpression17_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts] //// + +=== YieldExpression17_es6.ts === var v = { get foo() { yield foo; } } >v : { readonly foo: void; } >{ get foo() { yield foo; } } : { readonly foo: void; } diff --git a/tests/baselines/reference/YieldExpression18_es6.errors.txt b/tests/baselines/reference/YieldExpression18_es6.errors.txt index dd4e483989459..e361d826b5d57 100644 --- a/tests/baselines/reference/YieldExpression18_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression18_es6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. -tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS2304: Cannot find name 'yield'. -tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,7): error TS2304: Cannot find name 'foo'. +YieldExpression18_es6.ts(2,1): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. +YieldExpression18_es6.ts(2,1): error TS2304: Cannot find name 'yield'. +YieldExpression18_es6.ts(2,7): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts (3 errors) ==== +==== YieldExpression18_es6.ts (3 errors) ==== "use strict"; yield(foo); ~~~~~ diff --git a/tests/baselines/reference/YieldExpression18_es6.js b/tests/baselines/reference/YieldExpression18_es6.js index 36be3faabfea0..65ffbadd729e6 100644 --- a/tests/baselines/reference/YieldExpression18_es6.js +++ b/tests/baselines/reference/YieldExpression18_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts] //// + //// [YieldExpression18_es6.ts] "use strict"; yield(foo); diff --git a/tests/baselines/reference/YieldExpression18_es6.symbols b/tests/baselines/reference/YieldExpression18_es6.symbols index 77aeecec7181d..8823546a5b1f0 100644 --- a/tests/baselines/reference/YieldExpression18_es6.symbols +++ b/tests/baselines/reference/YieldExpression18_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts] //// + +=== YieldExpression18_es6.ts === "use strict"; yield(foo); diff --git a/tests/baselines/reference/YieldExpression18_es6.types b/tests/baselines/reference/YieldExpression18_es6.types index 8322d4721d19d..4bb43307235e8 100644 --- a/tests/baselines/reference/YieldExpression18_es6.types +++ b/tests/baselines/reference/YieldExpression18_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts] //// + +=== YieldExpression18_es6.ts === "use strict"; >"use strict" : "use strict" diff --git a/tests/baselines/reference/YieldExpression19_es6.js b/tests/baselines/reference/YieldExpression19_es6.js index 444c7af7be1d4..f99fa292080ad 100644 --- a/tests/baselines/reference/YieldExpression19_es6.js +++ b/tests/baselines/reference/YieldExpression19_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts] //// + //// [YieldExpression19_es6.ts] function*foo() { function bar() { diff --git a/tests/baselines/reference/YieldExpression19_es6.symbols b/tests/baselines/reference/YieldExpression19_es6.symbols index 609102001c453..c09bc523f1105 100644 --- a/tests/baselines/reference/YieldExpression19_es6.symbols +++ b/tests/baselines/reference/YieldExpression19_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts] //// + +=== YieldExpression19_es6.ts === function*foo() { >foo : Symbol(foo, Decl(YieldExpression19_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression19_es6.types b/tests/baselines/reference/YieldExpression19_es6.types index cab1da911c555..364452a97fe6d 100644 --- a/tests/baselines/reference/YieldExpression19_es6.types +++ b/tests/baselines/reference/YieldExpression19_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts] //// + +=== YieldExpression19_es6.ts === function*foo() { >foo : () => Generator diff --git a/tests/baselines/reference/YieldExpression1_es6.errors.txt b/tests/baselines/reference/YieldExpression1_es6.errors.txt index f8a13fe54099b..5c5cf3714b9b1 100644 --- a/tests/baselines/reference/YieldExpression1_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression1_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts(1,1): error TS2304: Cannot find name 'yield'. +YieldExpression1_es6.ts(1,1): error TS2304: Cannot find name 'yield'. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts (1 errors) ==== +==== YieldExpression1_es6.ts (1 errors) ==== yield; ~~~~~ !!! error TS2304: Cannot find name 'yield'. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression1_es6.js b/tests/baselines/reference/YieldExpression1_es6.js index cb5c097df2c2e..b948bfaf37f84 100644 --- a/tests/baselines/reference/YieldExpression1_es6.js +++ b/tests/baselines/reference/YieldExpression1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts] //// + //// [YieldExpression1_es6.ts] yield; diff --git a/tests/baselines/reference/YieldExpression1_es6.symbols b/tests/baselines/reference/YieldExpression1_es6.symbols index dbbcab643bdac..fc478781bd7dd 100644 --- a/tests/baselines/reference/YieldExpression1_es6.symbols +++ b/tests/baselines/reference/YieldExpression1_es6.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts] //// + +=== YieldExpression1_es6.ts === yield; diff --git a/tests/baselines/reference/YieldExpression1_es6.types b/tests/baselines/reference/YieldExpression1_es6.types index bf582b5b7a5c4..744323259e181 100644 --- a/tests/baselines/reference/YieldExpression1_es6.types +++ b/tests/baselines/reference/YieldExpression1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts] //// + +=== YieldExpression1_es6.ts === yield; >yield : any diff --git a/tests/baselines/reference/YieldExpression2_es6.errors.txt b/tests/baselines/reference/YieldExpression2_es6.errors.txt index 2d1a7082d53b9..4795cd9f493b0 100644 --- a/tests/baselines/reference/YieldExpression2_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression2_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts(1,1): error TS1163: A 'yield' expression is only allowed in a generator body. +YieldExpression2_es6.ts(1,1): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts (1 errors) ==== +==== YieldExpression2_es6.ts (1 errors) ==== yield foo; ~~~~~ !!! error TS1163: A 'yield' expression is only allowed in a generator body. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression2_es6.js b/tests/baselines/reference/YieldExpression2_es6.js index 7d9b1efb76b5d..f290601ba5c51 100644 --- a/tests/baselines/reference/YieldExpression2_es6.js +++ b/tests/baselines/reference/YieldExpression2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts] //// + //// [YieldExpression2_es6.ts] yield foo; diff --git a/tests/baselines/reference/YieldExpression2_es6.symbols b/tests/baselines/reference/YieldExpression2_es6.symbols index 1b0a184455c54..48dcbd36465ec 100644 --- a/tests/baselines/reference/YieldExpression2_es6.symbols +++ b/tests/baselines/reference/YieldExpression2_es6.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts] //// + +=== YieldExpression2_es6.ts === yield foo; diff --git a/tests/baselines/reference/YieldExpression2_es6.types b/tests/baselines/reference/YieldExpression2_es6.types index abe61e5ea0708..9c5c010139a55 100644 --- a/tests/baselines/reference/YieldExpression2_es6.types +++ b/tests/baselines/reference/YieldExpression2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts] //// + +=== YieldExpression2_es6.ts === yield foo; >yield foo : any >foo : any diff --git a/tests/baselines/reference/YieldExpression3_es6.js b/tests/baselines/reference/YieldExpression3_es6.js index 737b35348865c..979cbe7b033a0 100644 --- a/tests/baselines/reference/YieldExpression3_es6.js +++ b/tests/baselines/reference/YieldExpression3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts] //// + //// [YieldExpression3_es6.ts] function* foo() { yield diff --git a/tests/baselines/reference/YieldExpression3_es6.symbols b/tests/baselines/reference/YieldExpression3_es6.symbols index 4ab5b42688f83..760a147368fd4 100644 --- a/tests/baselines/reference/YieldExpression3_es6.symbols +++ b/tests/baselines/reference/YieldExpression3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts] //// + +=== YieldExpression3_es6.ts === function* foo() { >foo : Symbol(foo, Decl(YieldExpression3_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression3_es6.types b/tests/baselines/reference/YieldExpression3_es6.types index 31ea178bc5ab9..7a34c9c89ad74 100644 --- a/tests/baselines/reference/YieldExpression3_es6.types +++ b/tests/baselines/reference/YieldExpression3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts] //// + +=== YieldExpression3_es6.ts === function* foo() { >foo : () => Generator diff --git a/tests/baselines/reference/YieldExpression4_es6.js b/tests/baselines/reference/YieldExpression4_es6.js index c97a7949b2bbd..4703f404c526a 100644 --- a/tests/baselines/reference/YieldExpression4_es6.js +++ b/tests/baselines/reference/YieldExpression4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts] //// + //// [YieldExpression4_es6.ts] function* foo() { yield; diff --git a/tests/baselines/reference/YieldExpression4_es6.symbols b/tests/baselines/reference/YieldExpression4_es6.symbols index 7954fb705e60f..b1b104cbfc142 100644 --- a/tests/baselines/reference/YieldExpression4_es6.symbols +++ b/tests/baselines/reference/YieldExpression4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts] //// + +=== YieldExpression4_es6.ts === function* foo() { >foo : Symbol(foo, Decl(YieldExpression4_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression4_es6.types b/tests/baselines/reference/YieldExpression4_es6.types index c52f9222070e5..4b8efe5c17e93 100644 --- a/tests/baselines/reference/YieldExpression4_es6.types +++ b/tests/baselines/reference/YieldExpression4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts] //// + +=== YieldExpression4_es6.ts === function* foo() { >foo : () => Generator diff --git a/tests/baselines/reference/YieldExpression5_es6.errors.txt b/tests/baselines/reference/YieldExpression5_es6.errors.txt index 3ce8f20c985d2..f2bc895804030 100644 --- a/tests/baselines/reference/YieldExpression5_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts(3,1): error TS1109: Expression expected. +YieldExpression5_es6.ts(3,1): error TS1109: Expression expected. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts (1 errors) ==== +==== YieldExpression5_es6.ts (1 errors) ==== function* foo() { yield* } diff --git a/tests/baselines/reference/YieldExpression5_es6.js b/tests/baselines/reference/YieldExpression5_es6.js index 8599cfdb6bbc7..da0904ba1db45 100644 --- a/tests/baselines/reference/YieldExpression5_es6.js +++ b/tests/baselines/reference/YieldExpression5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts] //// + //// [YieldExpression5_es6.ts] function* foo() { yield* diff --git a/tests/baselines/reference/YieldExpression5_es6.symbols b/tests/baselines/reference/YieldExpression5_es6.symbols index 61b51d002c021..066dc69525ac9 100644 --- a/tests/baselines/reference/YieldExpression5_es6.symbols +++ b/tests/baselines/reference/YieldExpression5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts] //// + +=== YieldExpression5_es6.ts === function* foo() { >foo : Symbol(foo, Decl(YieldExpression5_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression5_es6.types b/tests/baselines/reference/YieldExpression5_es6.types index 6ff16d8cd8db1..a03fa6af90b5b 100644 --- a/tests/baselines/reference/YieldExpression5_es6.types +++ b/tests/baselines/reference/YieldExpression5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts] //// + +=== YieldExpression5_es6.ts === function* foo() { >foo : () => Generator diff --git a/tests/baselines/reference/YieldExpression6_es6.errors.txt b/tests/baselines/reference/YieldExpression6_es6.errors.txt index db93ba256cb26..40d8ee70c022a 100644 --- a/tests/baselines/reference/YieldExpression6_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression6_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(2,9): error TS2488: Type '() => any' must have a '[Symbol.iterator]()' method that returns an iterator. +YieldExpression6_es6.ts(2,9): error TS2488: Type '() => any' must have a '[Symbol.iterator]()' method that returns an iterator. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (1 errors) ==== +==== YieldExpression6_es6.ts (1 errors) ==== function* foo() { yield*foo ~~~ diff --git a/tests/baselines/reference/YieldExpression6_es6.js b/tests/baselines/reference/YieldExpression6_es6.js index c511daec989d6..93798bb3ac4a0 100644 --- a/tests/baselines/reference/YieldExpression6_es6.js +++ b/tests/baselines/reference/YieldExpression6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts] //// + //// [YieldExpression6_es6.ts] function* foo() { yield*foo diff --git a/tests/baselines/reference/YieldExpression6_es6.symbols b/tests/baselines/reference/YieldExpression6_es6.symbols index 67b9059dc0dc3..0c1684fc2c224 100644 --- a/tests/baselines/reference/YieldExpression6_es6.symbols +++ b/tests/baselines/reference/YieldExpression6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts] //// + +=== YieldExpression6_es6.ts === function* foo() { >foo : Symbol(foo, Decl(YieldExpression6_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression6_es6.types b/tests/baselines/reference/YieldExpression6_es6.types index c3f813c55a180..0bbf612a93c7b 100644 --- a/tests/baselines/reference/YieldExpression6_es6.types +++ b/tests/baselines/reference/YieldExpression6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts] //// + +=== YieldExpression6_es6.ts === function* foo() { >foo : () => any diff --git a/tests/baselines/reference/YieldExpression7_es6.js b/tests/baselines/reference/YieldExpression7_es6.js index 8055b96ec73f4..d86963a134533 100644 --- a/tests/baselines/reference/YieldExpression7_es6.js +++ b/tests/baselines/reference/YieldExpression7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts] //// + //// [YieldExpression7_es6.ts] function* foo() { yield foo diff --git a/tests/baselines/reference/YieldExpression7_es6.symbols b/tests/baselines/reference/YieldExpression7_es6.symbols index 53737c94be936..4162ed87c8d70 100644 --- a/tests/baselines/reference/YieldExpression7_es6.symbols +++ b/tests/baselines/reference/YieldExpression7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts] //// + +=== YieldExpression7_es6.ts === function* foo() { >foo : Symbol(foo, Decl(YieldExpression7_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldExpression7_es6.types b/tests/baselines/reference/YieldExpression7_es6.types index 8ebaa07ef604c..c128a6ee5d89b 100644 --- a/tests/baselines/reference/YieldExpression7_es6.types +++ b/tests/baselines/reference/YieldExpression7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts] //// + +=== YieldExpression7_es6.ts === function* foo() { >foo : () => Generator diff --git a/tests/baselines/reference/YieldExpression8_es6.errors.txt b/tests/baselines/reference/YieldExpression8_es6.errors.txt index f4dd30b1a1947..e7db07eb354f9 100644 --- a/tests/baselines/reference/YieldExpression8_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression8_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'. +YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts (1 errors) ==== +==== YieldExpression8_es6.ts (1 errors) ==== yield(foo); ~~~~~ !!! error TS2304: Cannot find name 'yield'. diff --git a/tests/baselines/reference/YieldExpression8_es6.js b/tests/baselines/reference/YieldExpression8_es6.js index cc92b79c722ea..eb7bf197d0c25 100644 --- a/tests/baselines/reference/YieldExpression8_es6.js +++ b/tests/baselines/reference/YieldExpression8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts] //// + //// [YieldExpression8_es6.ts] yield(foo); function* foo() { diff --git a/tests/baselines/reference/YieldExpression8_es6.symbols b/tests/baselines/reference/YieldExpression8_es6.symbols index 028ef8dcaa1d4..69deee27f5d2c 100644 --- a/tests/baselines/reference/YieldExpression8_es6.symbols +++ b/tests/baselines/reference/YieldExpression8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts] //// + +=== YieldExpression8_es6.ts === yield(foo); >foo : Symbol(foo, Decl(YieldExpression8_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/YieldExpression8_es6.types b/tests/baselines/reference/YieldExpression8_es6.types index 66935c18cc5c5..4874ebe80a4f2 100644 --- a/tests/baselines/reference/YieldExpression8_es6.types +++ b/tests/baselines/reference/YieldExpression8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts] //// + +=== YieldExpression8_es6.ts === yield(foo); >yield(foo) : any >yield : any diff --git a/tests/baselines/reference/YieldExpression9_es6.errors.txt b/tests/baselines/reference/YieldExpression9_es6.errors.txt index 1241e615f798e..c68adb7552641 100644 --- a/tests/baselines/reference/YieldExpression9_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression9_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(2,9): error TS2304: Cannot find name 'foo'. +YieldExpression9_es6.ts(2,9): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (1 errors) ==== +==== YieldExpression9_es6.ts (1 errors) ==== var v = function*() { yield(foo); ~~~ diff --git a/tests/baselines/reference/YieldExpression9_es6.js b/tests/baselines/reference/YieldExpression9_es6.js index a2ffa0fa01b10..5cd88a575f87f 100644 --- a/tests/baselines/reference/YieldExpression9_es6.js +++ b/tests/baselines/reference/YieldExpression9_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts] //// + //// [YieldExpression9_es6.ts] var v = function*() { yield(foo); diff --git a/tests/baselines/reference/YieldExpression9_es6.symbols b/tests/baselines/reference/YieldExpression9_es6.symbols index a7d55e4a04540..b05b86dc7efad 100644 --- a/tests/baselines/reference/YieldExpression9_es6.symbols +++ b/tests/baselines/reference/YieldExpression9_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts] //// + +=== YieldExpression9_es6.ts === var v = function*() { >v : Symbol(v, Decl(YieldExpression9_es6.ts, 0, 3)) diff --git a/tests/baselines/reference/YieldExpression9_es6.types b/tests/baselines/reference/YieldExpression9_es6.types index e277bc711c57b..a9aee94b9016c 100644 --- a/tests/baselines/reference/YieldExpression9_es6.types +++ b/tests/baselines/reference/YieldExpression9_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts] //// + +=== YieldExpression9_es6.ts === var v = function*() { >v : () => Generator >function*() { yield(foo);} : () => Generator diff --git a/tests/baselines/reference/YieldStarExpression1_es6.errors.txt b/tests/baselines/reference/YieldStarExpression1_es6.errors.txt index 265013d6bad57..e7776535f90cb 100644 --- a/tests/baselines/reference/YieldStarExpression1_es6.errors.txt +++ b/tests/baselines/reference/YieldStarExpression1_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts(1,1): error TS2304: Cannot find name 'yield'. -tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts(1,9): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +YieldStarExpression1_es6.ts(1,1): error TS2304: Cannot find name 'yield'. +YieldStarExpression1_es6.ts(1,9): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts (2 errors) ==== +==== YieldStarExpression1_es6.ts (2 errors) ==== yield * []; ~~~~~ !!! error TS2304: Cannot find name 'yield'. diff --git a/tests/baselines/reference/YieldStarExpression1_es6.js b/tests/baselines/reference/YieldStarExpression1_es6.js index 742c5b7d1e7d6..0c2e3356a9b6c 100644 --- a/tests/baselines/reference/YieldStarExpression1_es6.js +++ b/tests/baselines/reference/YieldStarExpression1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts] //// + //// [YieldStarExpression1_es6.ts] yield * []; diff --git a/tests/baselines/reference/YieldStarExpression1_es6.symbols b/tests/baselines/reference/YieldStarExpression1_es6.symbols index 4fd0a7b256430..6815ee50d435a 100644 --- a/tests/baselines/reference/YieldStarExpression1_es6.symbols +++ b/tests/baselines/reference/YieldStarExpression1_es6.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts] //// + +=== YieldStarExpression1_es6.ts === yield * []; diff --git a/tests/baselines/reference/YieldStarExpression1_es6.types b/tests/baselines/reference/YieldStarExpression1_es6.types index df3a2325acf95..7c2ea1d7573e5 100644 --- a/tests/baselines/reference/YieldStarExpression1_es6.types +++ b/tests/baselines/reference/YieldStarExpression1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression1_es6.ts] //// + +=== YieldStarExpression1_es6.ts === yield * []; >yield * [] : number >yield : any diff --git a/tests/baselines/reference/YieldStarExpression2_es6.errors.txt b/tests/baselines/reference/YieldStarExpression2_es6.errors.txt index 3d0c89fd23f0c..b2d5d540c4df0 100644 --- a/tests/baselines/reference/YieldStarExpression2_es6.errors.txt +++ b/tests/baselines/reference/YieldStarExpression2_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts(1,1): error TS2304: Cannot find name 'yield'. -tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts(1,8): error TS1109: Expression expected. +YieldStarExpression2_es6.ts(1,1): error TS2304: Cannot find name 'yield'. +YieldStarExpression2_es6.ts(1,8): error TS1109: Expression expected. -==== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts (2 errors) ==== +==== YieldStarExpression2_es6.ts (2 errors) ==== yield *; ~~~~~ !!! error TS2304: Cannot find name 'yield'. diff --git a/tests/baselines/reference/YieldStarExpression2_es6.js b/tests/baselines/reference/YieldStarExpression2_es6.js index 5b40963d9a2bf..f33990cad45de 100644 --- a/tests/baselines/reference/YieldStarExpression2_es6.js +++ b/tests/baselines/reference/YieldStarExpression2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts] //// + //// [YieldStarExpression2_es6.ts] yield *; diff --git a/tests/baselines/reference/YieldStarExpression2_es6.symbols b/tests/baselines/reference/YieldStarExpression2_es6.symbols index 06aea6e917832..0119efeadccb4 100644 --- a/tests/baselines/reference/YieldStarExpression2_es6.symbols +++ b/tests/baselines/reference/YieldStarExpression2_es6.symbols @@ -1,3 +1,5 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts] //// + +=== YieldStarExpression2_es6.ts === yield *; diff --git a/tests/baselines/reference/YieldStarExpression2_es6.types b/tests/baselines/reference/YieldStarExpression2_es6.types index ecfd8b2d43e0b..b7035c3f90c17 100644 --- a/tests/baselines/reference/YieldStarExpression2_es6.types +++ b/tests/baselines/reference/YieldStarExpression2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression2_es6.ts] //// + +=== YieldStarExpression2_es6.ts === yield *; >yield * : number >yield : any diff --git a/tests/baselines/reference/YieldStarExpression3_es6.errors.txt b/tests/baselines/reference/YieldStarExpression3_es6.errors.txt index 25cecc804449d..f214de39d3df2 100644 --- a/tests/baselines/reference/YieldStarExpression3_es6.errors.txt +++ b/tests/baselines/reference/YieldStarExpression3_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts(2,12): error TS1109: Expression expected. +YieldStarExpression3_es6.ts(2,12): error TS1109: Expression expected. -==== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts (1 errors) ==== +==== YieldStarExpression3_es6.ts (1 errors) ==== function *g() { yield *; ~ diff --git a/tests/baselines/reference/YieldStarExpression3_es6.js b/tests/baselines/reference/YieldStarExpression3_es6.js index e64306dc4cf58..66bde1547ff76 100644 --- a/tests/baselines/reference/YieldStarExpression3_es6.js +++ b/tests/baselines/reference/YieldStarExpression3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts] //// + //// [YieldStarExpression3_es6.ts] function *g() { yield *; diff --git a/tests/baselines/reference/YieldStarExpression3_es6.symbols b/tests/baselines/reference/YieldStarExpression3_es6.symbols index 5440d616c73a8..db07c75149fe8 100644 --- a/tests/baselines/reference/YieldStarExpression3_es6.symbols +++ b/tests/baselines/reference/YieldStarExpression3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts] //// + +=== YieldStarExpression3_es6.ts === function *g() { >g : Symbol(g, Decl(YieldStarExpression3_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldStarExpression3_es6.types b/tests/baselines/reference/YieldStarExpression3_es6.types index 46d71934225df..e9c2e79331b69 100644 --- a/tests/baselines/reference/YieldStarExpression3_es6.types +++ b/tests/baselines/reference/YieldStarExpression3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression3_es6.ts] //// + +=== YieldStarExpression3_es6.ts === function *g() { >g : () => Generator diff --git a/tests/baselines/reference/YieldStarExpression4_es6.js b/tests/baselines/reference/YieldStarExpression4_es6.js index 8ec5fa0c933c3..7e743965459d6 100644 --- a/tests/baselines/reference/YieldStarExpression4_es6.js +++ b/tests/baselines/reference/YieldStarExpression4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts] //// + //// [YieldStarExpression4_es6.ts] function *g() { yield * []; diff --git a/tests/baselines/reference/YieldStarExpression4_es6.symbols b/tests/baselines/reference/YieldStarExpression4_es6.symbols index c23e2ac8895ce..ea007ccd47369 100644 --- a/tests/baselines/reference/YieldStarExpression4_es6.symbols +++ b/tests/baselines/reference/YieldStarExpression4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts] //// + +=== YieldStarExpression4_es6.ts === function *g() { >g : Symbol(g, Decl(YieldStarExpression4_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/YieldStarExpression4_es6.types b/tests/baselines/reference/YieldStarExpression4_es6.types index 5a1ebbe6a6e12..6ab7b6205fe6b 100644 --- a/tests/baselines/reference/YieldStarExpression4_es6.types +++ b/tests/baselines/reference/YieldStarExpression4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts === +//// [tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts] //// + +=== YieldStarExpression4_es6.ts === function *g() { >g : () => Generator diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index b7409b6f9aa1c..33ac1f8a647bd 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractClassInLocalScope.ts] //// + //// [abstractClassInLocalScope.ts] (() => { abstract class A {} diff --git a/tests/baselines/reference/abstractClassInLocalScope.symbols b/tests/baselines/reference/abstractClassInLocalScope.symbols index 8b8033e5c8618..bd3479ccd06bd 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.symbols +++ b/tests/baselines/reference/abstractClassInLocalScope.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractClassInLocalScope.ts === +//// [tests/cases/compiler/abstractClassInLocalScope.ts] //// + +=== abstractClassInLocalScope.ts === (() => { abstract class A {} >A : Symbol(A, Decl(abstractClassInLocalScope.ts, 0, 8)) diff --git a/tests/baselines/reference/abstractClassInLocalScope.types b/tests/baselines/reference/abstractClassInLocalScope.types index 56456dc7d8cf6..5b51448943461 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.types +++ b/tests/baselines/reference/abstractClassInLocalScope.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractClassInLocalScope.ts === +//// [tests/cases/compiler/abstractClassInLocalScope.ts] //// + +=== abstractClassInLocalScope.ts === (() => { >(() => { abstract class A {} class B extends A {} new B(); return A;})() : typeof A >(() => { abstract class A {} class B extends A {} new B(); return A;}) : () => typeof A diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.errors.txt b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.errors.txt index fa02cb21d3483..a214d1ef3c811 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.errors.txt +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts(4,5): error TS2511: Cannot create an instance of an abstract class. +abstractClassInLocalScopeIsAbstract.ts(4,5): error TS2511: Cannot create an instance of an abstract class. -==== tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts (1 errors) ==== +==== abstractClassInLocalScopeIsAbstract.ts (1 errors) ==== (() => { abstract class A {} class B extends A {} diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index eda0c54ae060d..c26fa08b26423 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts] //// + //// [abstractClassInLocalScopeIsAbstract.ts] (() => { abstract class A {} diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.symbols b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.symbols index 9b8ce6d417b75..c38556310b8f5 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.symbols +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts === +//// [tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts] //// + +=== abstractClassInLocalScopeIsAbstract.ts === (() => { abstract class A {} >A : Symbol(A, Decl(abstractClassInLocalScopeIsAbstract.ts, 0, 8)) diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.types b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.types index 106559c7be330..afc238dd4cb8c 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.types +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts === +//// [tests/cases/compiler/abstractClassInLocalScopeIsAbstract.ts] //// + +=== abstractClassInLocalScopeIsAbstract.ts === (() => { >(() => { abstract class A {} class B extends A {} new A(); new B();})() : void >(() => { abstract class A {} class B extends A {} new A(); new B();}) : () => void diff --git a/tests/baselines/reference/abstractClassUnionInstantiation.errors.txt b/tests/baselines/reference/abstractClassUnionInstantiation.errors.txt index ff1eb39980212..5446841f97c33 100644 --- a/tests/baselines/reference/abstractClassUnionInstantiation.errors.txt +++ b/tests/baselines/reference/abstractClassUnionInstantiation.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/abstractClassUnionInstantiation.ts(14,1): error TS2511: Cannot create an instance of an abstract class. -tests/cases/compiler/abstractClassUnionInstantiation.ts(15,1): error TS2511: Cannot create an instance of an abstract class. -tests/cases/compiler/abstractClassUnionInstantiation.ts(18,46): error TS2511: Cannot create an instance of an abstract class. -tests/cases/compiler/abstractClassUnionInstantiation.ts(19,46): error TS2511: Cannot create an instance of an abstract class. -tests/cases/compiler/abstractClassUnionInstantiation.ts(21,35): error TS2511: Cannot create an instance of an abstract class. +abstractClassUnionInstantiation.ts(14,1): error TS2511: Cannot create an instance of an abstract class. +abstractClassUnionInstantiation.ts(15,1): error TS2511: Cannot create an instance of an abstract class. +abstractClassUnionInstantiation.ts(18,46): error TS2511: Cannot create an instance of an abstract class. +abstractClassUnionInstantiation.ts(19,46): error TS2511: Cannot create an instance of an abstract class. +abstractClassUnionInstantiation.ts(21,35): error TS2511: Cannot create an instance of an abstract class. -==== tests/cases/compiler/abstractClassUnionInstantiation.ts (5 errors) ==== +==== abstractClassUnionInstantiation.ts (5 errors) ==== class ConcreteA {} class ConcreteB {} abstract class AbstractA { a: string; } diff --git a/tests/baselines/reference/abstractClassUnionInstantiation.js b/tests/baselines/reference/abstractClassUnionInstantiation.js index c42d945625c75..6f28f395ec709 100644 --- a/tests/baselines/reference/abstractClassUnionInstantiation.js +++ b/tests/baselines/reference/abstractClassUnionInstantiation.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractClassUnionInstantiation.ts] //// + //// [abstractClassUnionInstantiation.ts] class ConcreteA {} class ConcreteB {} diff --git a/tests/baselines/reference/abstractClassUnionInstantiation.symbols b/tests/baselines/reference/abstractClassUnionInstantiation.symbols index 453ce18244115..2bd41e5852789 100644 --- a/tests/baselines/reference/abstractClassUnionInstantiation.symbols +++ b/tests/baselines/reference/abstractClassUnionInstantiation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractClassUnionInstantiation.ts === +//// [tests/cases/compiler/abstractClassUnionInstantiation.ts] //// + +=== abstractClassUnionInstantiation.ts === class ConcreteA {} >ConcreteA : Symbol(ConcreteA, Decl(abstractClassUnionInstantiation.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractClassUnionInstantiation.types b/tests/baselines/reference/abstractClassUnionInstantiation.types index 1f1458a7283ed..7b8d93cafb847 100644 --- a/tests/baselines/reference/abstractClassUnionInstantiation.types +++ b/tests/baselines/reference/abstractClassUnionInstantiation.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractClassUnionInstantiation.ts === +//// [tests/cases/compiler/abstractClassUnionInstantiation.ts] //// + +=== abstractClassUnionInstantiation.ts === class ConcreteA {} >ConcreteA : ConcreteA diff --git a/tests/baselines/reference/abstractIdentifierNameStrict.js b/tests/baselines/reference/abstractIdentifierNameStrict.js index 92d159766d7e8..9af7284f07cc4 100644 --- a/tests/baselines/reference/abstractIdentifierNameStrict.js +++ b/tests/baselines/reference/abstractIdentifierNameStrict.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractIdentifierNameStrict.ts] //// + //// [abstractIdentifierNameStrict.ts] var abstract = true; diff --git a/tests/baselines/reference/abstractIdentifierNameStrict.symbols b/tests/baselines/reference/abstractIdentifierNameStrict.symbols index c6a374e9bcdf0..70ca3f0b95264 100644 --- a/tests/baselines/reference/abstractIdentifierNameStrict.symbols +++ b/tests/baselines/reference/abstractIdentifierNameStrict.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractIdentifierNameStrict.ts === +//// [tests/cases/compiler/abstractIdentifierNameStrict.ts] //// + +=== abstractIdentifierNameStrict.ts === var abstract = true; >abstract : Symbol(abstract, Decl(abstractIdentifierNameStrict.ts, 0, 3)) diff --git a/tests/baselines/reference/abstractIdentifierNameStrict.types b/tests/baselines/reference/abstractIdentifierNameStrict.types index de6b1f458ac7f..967641cea9ad5 100644 --- a/tests/baselines/reference/abstractIdentifierNameStrict.types +++ b/tests/baselines/reference/abstractIdentifierNameStrict.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractIdentifierNameStrict.ts === +//// [tests/cases/compiler/abstractIdentifierNameStrict.ts] //// + +=== abstractIdentifierNameStrict.ts === var abstract = true; >abstract : boolean >true : true diff --git a/tests/baselines/reference/abstractInterfaceIdentifierName.js b/tests/baselines/reference/abstractInterfaceIdentifierName.js index 1e60d065dbc8f..2e092cf4b28c2 100644 --- a/tests/baselines/reference/abstractInterfaceIdentifierName.js +++ b/tests/baselines/reference/abstractInterfaceIdentifierName.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractInterfaceIdentifierName.ts] //// + //// [abstractInterfaceIdentifierName.ts] interface abstract { abstract(): void; diff --git a/tests/baselines/reference/abstractInterfaceIdentifierName.symbols b/tests/baselines/reference/abstractInterfaceIdentifierName.symbols index 9b8192db1d324..ac44ae85e7f04 100644 --- a/tests/baselines/reference/abstractInterfaceIdentifierName.symbols +++ b/tests/baselines/reference/abstractInterfaceIdentifierName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractInterfaceIdentifierName.ts === +//// [tests/cases/compiler/abstractInterfaceIdentifierName.ts] //// + +=== abstractInterfaceIdentifierName.ts === interface abstract { >abstract : Symbol(abstract, Decl(abstractInterfaceIdentifierName.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractInterfaceIdentifierName.types b/tests/baselines/reference/abstractInterfaceIdentifierName.types index b71772a4ec773..bb11dffe1a908 100644 --- a/tests/baselines/reference/abstractInterfaceIdentifierName.types +++ b/tests/baselines/reference/abstractInterfaceIdentifierName.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractInterfaceIdentifierName.ts === +//// [tests/cases/compiler/abstractInterfaceIdentifierName.ts] //// + +=== abstractInterfaceIdentifierName.ts === interface abstract { abstract(): void; >abstract : () => void diff --git a/tests/baselines/reference/abstractProperty(target=es2015).js b/tests/baselines/reference/abstractProperty(target=es2015).js index 37eb53fd7cb0c..5d6ccd7959384 100644 --- a/tests/baselines/reference/abstractProperty(target=es2015).js +++ b/tests/baselines/reference/abstractProperty(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts] //// + //// [abstractProperty.ts] abstract class A { protected abstract x: string; diff --git a/tests/baselines/reference/abstractProperty(target=es2015).symbols b/tests/baselines/reference/abstractProperty(target=es2015).symbols index 1f2f0b97570ac..bbcd2e62e243d 100644 --- a/tests/baselines/reference/abstractProperty(target=es2015).symbols +++ b/tests/baselines/reference/abstractProperty(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts] //// + +=== abstractProperty.ts === abstract class A { >A : Symbol(A, Decl(abstractProperty.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractProperty(target=es2015).types b/tests/baselines/reference/abstractProperty(target=es2015).types index 557c5833185dc..c5d35fca8b630 100644 --- a/tests/baselines/reference/abstractProperty(target=es2015).types +++ b/tests/baselines/reference/abstractProperty(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts] //// + +=== abstractProperty.ts === abstract class A { >A : A diff --git a/tests/baselines/reference/abstractProperty(target=esnext).js b/tests/baselines/reference/abstractProperty(target=esnext).js index dd2f6822080d9..1d6a28b40d9ff 100644 --- a/tests/baselines/reference/abstractProperty(target=esnext).js +++ b/tests/baselines/reference/abstractProperty(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts] //// + //// [abstractProperty.ts] abstract class A { protected abstract x: string; diff --git a/tests/baselines/reference/abstractProperty(target=esnext).symbols b/tests/baselines/reference/abstractProperty(target=esnext).symbols index 1f2f0b97570ac..bbcd2e62e243d 100644 --- a/tests/baselines/reference/abstractProperty(target=esnext).symbols +++ b/tests/baselines/reference/abstractProperty(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts] //// + +=== abstractProperty.ts === abstract class A { >A : Symbol(A, Decl(abstractProperty.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractProperty(target=esnext).types b/tests/baselines/reference/abstractProperty(target=esnext).types index 557c5833185dc..c5d35fca8b630 100644 --- a/tests/baselines/reference/abstractProperty(target=esnext).types +++ b/tests/baselines/reference/abstractProperty(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractProperty.ts] //// + +=== abstractProperty.ts === abstract class A { >A : A diff --git a/tests/baselines/reference/abstractPropertyBasics.js b/tests/baselines/reference/abstractPropertyBasics.js index b2010c3538162..c9026e5f3424d 100644 --- a/tests/baselines/reference/abstractPropertyBasics.js +++ b/tests/baselines/reference/abstractPropertyBasics.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractPropertyBasics.ts] //// + //// [abstractPropertyBasics.ts] interface A { prop: string; diff --git a/tests/baselines/reference/abstractPropertyBasics.symbols b/tests/baselines/reference/abstractPropertyBasics.symbols index 4d7cd333a96c3..b7c7a74483d02 100644 --- a/tests/baselines/reference/abstractPropertyBasics.symbols +++ b/tests/baselines/reference/abstractPropertyBasics.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractPropertyBasics.ts === +//// [tests/cases/compiler/abstractPropertyBasics.ts] //// + +=== abstractPropertyBasics.ts === interface A { >A : Symbol(A, Decl(abstractPropertyBasics.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractPropertyBasics.types b/tests/baselines/reference/abstractPropertyBasics.types index 123e4041941f6..774228d32afde 100644 --- a/tests/baselines/reference/abstractPropertyBasics.types +++ b/tests/baselines/reference/abstractPropertyBasics.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractPropertyBasics.ts === +//// [tests/cases/compiler/abstractPropertyBasics.ts] //// + +=== abstractPropertyBasics.ts === interface A { prop: string; >prop : string diff --git a/tests/baselines/reference/abstractPropertyInConstructor.errors.txt b/tests/baselines/reference/abstractPropertyInConstructor.errors.txt index 8b98c0816e936..a6ea82afdd03a 100644 --- a/tests/baselines/reference/abstractPropertyInConstructor.errors.txt +++ b/tests/baselines/reference/abstractPropertyInConstructor.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/abstractPropertyInConstructor.ts(4,24): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(7,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(9,14): error TS2715: Abstract property 'cb' in class 'AbstractClass' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(25,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(25,18): error TS2729: Property 'prop' is used before its initialization. -tests/cases/compiler/abstractPropertyInConstructor.ts(39,22): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(78,15): error TS2715: Abstract property 'x' in class 'C1' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(78,18): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(79,12): error TS2715: Abstract property 'x' in class 'C1' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(79,15): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. -tests/cases/compiler/abstractPropertyInConstructor.ts(79,22): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(4,24): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(7,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(9,14): error TS2715: Abstract property 'cb' in class 'AbstractClass' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(25,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(25,18): error TS2729: Property 'prop' is used before its initialization. +abstractPropertyInConstructor.ts(39,22): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(78,15): error TS2715: Abstract property 'x' in class 'C1' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(78,18): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(79,12): error TS2715: Abstract property 'x' in class 'C1' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(79,15): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. +abstractPropertyInConstructor.ts(79,22): error TS2715: Abstract property 'y' in class 'C1' cannot be accessed in the constructor. -==== tests/cases/compiler/abstractPropertyInConstructor.ts (11 errors) ==== +==== abstractPropertyInConstructor.ts (11 errors) ==== abstract class AbstractClass { constructor(str: string, other: AbstractClass) { this.method(parseInt(str)); @@ -47,7 +47,7 @@ tests/cases/compiler/abstractPropertyInConstructor.ts(79,22): error TS2715: Abst !!! error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. ~~~~ !!! error TS2729: Property 'prop' is used before its initialization. -!!! related TS2728 tests/cases/compiler/abstractPropertyInConstructor.ts:20:14: 'prop' is declared here. +!!! related TS2728 abstractPropertyInConstructor.ts:20:14: 'prop' is declared here. fn = () => this.prop; method2() { diff --git a/tests/baselines/reference/abstractPropertyInConstructor.js b/tests/baselines/reference/abstractPropertyInConstructor.js index 95fc2bfaa09c9..5656a8c9a6120 100644 --- a/tests/baselines/reference/abstractPropertyInConstructor.js +++ b/tests/baselines/reference/abstractPropertyInConstructor.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractPropertyInConstructor.ts] //// + //// [abstractPropertyInConstructor.ts] abstract class AbstractClass { constructor(str: string, other: AbstractClass) { diff --git a/tests/baselines/reference/abstractPropertyInConstructor.symbols b/tests/baselines/reference/abstractPropertyInConstructor.symbols index d75b31d140a2a..f8f3e848f04bc 100644 --- a/tests/baselines/reference/abstractPropertyInConstructor.symbols +++ b/tests/baselines/reference/abstractPropertyInConstructor.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractPropertyInConstructor.ts === +//// [tests/cases/compiler/abstractPropertyInConstructor.ts] //// + +=== abstractPropertyInConstructor.ts === abstract class AbstractClass { >AbstractClass : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractPropertyInConstructor.types b/tests/baselines/reference/abstractPropertyInConstructor.types index ee8500d70279e..79952bea0f23d 100644 --- a/tests/baselines/reference/abstractPropertyInConstructor.types +++ b/tests/baselines/reference/abstractPropertyInConstructor.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractPropertyInConstructor.ts === +//// [tests/cases/compiler/abstractPropertyInConstructor.ts] //// + +=== abstractPropertyInConstructor.ts === abstract class AbstractClass { >AbstractClass : AbstractClass diff --git a/tests/baselines/reference/abstractPropertyInitializer.errors.txt b/tests/baselines/reference/abstractPropertyInitializer.errors.txt index f9ccf2b1226ec..47749e02533ce 100644 --- a/tests/baselines/reference/abstractPropertyInitializer.errors.txt +++ b/tests/baselines/reference/abstractPropertyInitializer.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts(2,14): error TS1267: Property 'prop' cannot have an initializer because it is marked abstract. +abstractPropertyInitializer.ts(2,14): error TS1267: Property 'prop' cannot have an initializer because it is marked abstract. -==== tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts (1 errors) ==== +==== abstractPropertyInitializer.ts (1 errors) ==== abstract class C { abstract prop = 1 ~~~~ diff --git a/tests/baselines/reference/abstractPropertyInitializer.js b/tests/baselines/reference/abstractPropertyInitializer.js index efd9d52a96e3d..edb169729b932 100644 --- a/tests/baselines/reference/abstractPropertyInitializer.js +++ b/tests/baselines/reference/abstractPropertyInitializer.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts] //// + //// [abstractPropertyInitializer.ts] abstract class C { abstract prop = 1 diff --git a/tests/baselines/reference/abstractPropertyInitializer.symbols b/tests/baselines/reference/abstractPropertyInitializer.symbols index f2fa37c79689e..8d59488a0cade 100644 --- a/tests/baselines/reference/abstractPropertyInitializer.symbols +++ b/tests/baselines/reference/abstractPropertyInitializer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts] //// + +=== abstractPropertyInitializer.ts === abstract class C { >C : Symbol(C, Decl(abstractPropertyInitializer.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractPropertyInitializer.types b/tests/baselines/reference/abstractPropertyInitializer.types index 36ef0a621429d..0e499004fd842 100644 --- a/tests/baselines/reference/abstractPropertyInitializer.types +++ b/tests/baselines/reference/abstractPropertyInitializer.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/abstractPropertyInitializer.ts] //// + +=== abstractPropertyInitializer.ts === abstract class C { >C : C diff --git a/tests/baselines/reference/abstractPropertyNegative.errors.txt b/tests/baselines/reference/abstractPropertyNegative.errors.txt index cfacc4b4ad1a6..62fea47881bfc 100644 --- a/tests/baselines/reference/abstractPropertyNegative.errors.txt +++ b/tests/baselines/reference/abstractPropertyNegative.errors.txt @@ -1,20 +1,20 @@ -tests/cases/compiler/abstractPropertyNegative.ts(13,7): error TS18052: Non-abstract class 'C' does not implement all abstract members of 'B' -tests/cases/compiler/abstractPropertyNegative.ts(15,5): error TS1253: Abstract properties can only appear within an abstract class. -tests/cases/compiler/abstractPropertyNegative.ts(16,37): error TS1005: '{' expected. -tests/cases/compiler/abstractPropertyNegative.ts(19,3): error TS2540: Cannot assign to 'ro' because it is a read-only property. -tests/cases/compiler/abstractPropertyNegative.ts(25,5): error TS2416: Property 'num' in type 'WrongTypePropertyImpl' is not assignable to the same property in base type 'WrongTypeProperty'. +abstractPropertyNegative.ts(13,7): error TS18052: Non-abstract class 'C' does not implement all abstract members of 'B' +abstractPropertyNegative.ts(15,5): error TS1253: Abstract properties can only appear within an abstract class. +abstractPropertyNegative.ts(16,37): error TS1005: '{' expected. +abstractPropertyNegative.ts(19,3): error TS2540: Cannot assign to 'ro' because it is a read-only property. +abstractPropertyNegative.ts(25,5): error TS2416: Property 'num' in type 'WrongTypePropertyImpl' is not assignable to the same property in base type 'WrongTypeProperty'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/abstractPropertyNegative.ts(31,9): error TS2416: Property 'num' in type 'WrongTypeAccessorImpl' is not assignable to the same property in base type 'WrongTypeAccessor'. +abstractPropertyNegative.ts(31,9): error TS2416: Property 'num' in type 'WrongTypeAccessorImpl' is not assignable to the same property in base type 'WrongTypeAccessor'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/abstractPropertyNegative.ts(34,5): error TS2416: Property 'num' in type 'WrongTypeAccessorImpl2' is not assignable to the same property in base type 'WrongTypeAccessor'. +abstractPropertyNegative.ts(34,5): error TS2416: Property 'num' in type 'WrongTypeAccessorImpl2' is not assignable to the same property in base type 'WrongTypeAccessor'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/abstractPropertyNegative.ts(38,18): error TS2676: Accessors must both be abstract or non-abstract. -tests/cases/compiler/abstractPropertyNegative.ts(39,9): error TS2676: Accessors must both be abstract or non-abstract. -tests/cases/compiler/abstractPropertyNegative.ts(40,9): error TS2676: Accessors must both be abstract or non-abstract. -tests/cases/compiler/abstractPropertyNegative.ts(41,18): error TS2676: Accessors must both be abstract or non-abstract. +abstractPropertyNegative.ts(38,18): error TS2676: Accessors must both be abstract or non-abstract. +abstractPropertyNegative.ts(39,9): error TS2676: Accessors must both be abstract or non-abstract. +abstractPropertyNegative.ts(40,9): error TS2676: Accessors must both be abstract or non-abstract. +abstractPropertyNegative.ts(41,18): error TS2676: Accessors must both be abstract or non-abstract. -==== tests/cases/compiler/abstractPropertyNegative.ts (11 errors) ==== +==== abstractPropertyNegative.ts (11 errors) ==== interface A { prop: string; m(): string; @@ -30,10 +30,10 @@ tests/cases/compiler/abstractPropertyNegative.ts(41,18): error TS2676: Accessors class C extends B { ~ !!! error TS18052: Non-abstract class 'C' does not implement all abstract members of 'B' -!!! related TS2515 tests/cases/compiler/abstractPropertyNegative.ts:6:14: Non-abstract class 'C' does not implement inherited abstract member 'prop' from class 'B'. -!!! related TS2515 tests/cases/compiler/abstractPropertyNegative.ts:8:18: Non-abstract class 'C' does not implement inherited abstract member 'readonlyProp' from class 'B'. -!!! related TS2515 tests/cases/compiler/abstractPropertyNegative.ts:9:14: Non-abstract class 'C' does not implement inherited abstract member 'm' from class 'B'. -!!! related TS2515 tests/cases/compiler/abstractPropertyNegative.ts:10:18: Non-abstract class 'C' does not implement inherited abstract member 'mismatch' from class 'B'. +!!! related TS2515 abstractPropertyNegative.ts:6:14: Non-abstract class 'C' does not implement inherited abstract member 'prop' from class 'B'. +!!! related TS2515 abstractPropertyNegative.ts:8:18: Non-abstract class 'C' does not implement inherited abstract member 'readonlyProp' from class 'B'. +!!! related TS2515 abstractPropertyNegative.ts:9:14: Non-abstract class 'C' does not implement inherited abstract member 'm' from class 'B'. +!!! related TS2515 abstractPropertyNegative.ts:10:18: Non-abstract class 'C' does not implement inherited abstract member 'mismatch' from class 'B'. readonly ro = "readonly please"; abstract notAllowed: string; ~~~~~~~~ diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 93a7035793bad..193fd8e5a2001 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/abstractPropertyNegative.ts] //// + //// [abstractPropertyNegative.ts] interface A { prop: string; diff --git a/tests/baselines/reference/abstractPropertyNegative.symbols b/tests/baselines/reference/abstractPropertyNegative.symbols index a3a007dc66854..f6565eaa25624 100644 --- a/tests/baselines/reference/abstractPropertyNegative.symbols +++ b/tests/baselines/reference/abstractPropertyNegative.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractPropertyNegative.ts === +//// [tests/cases/compiler/abstractPropertyNegative.ts] //// + +=== abstractPropertyNegative.ts === interface A { >A : Symbol(A, Decl(abstractPropertyNegative.ts, 0, 0)) diff --git a/tests/baselines/reference/abstractPropertyNegative.types b/tests/baselines/reference/abstractPropertyNegative.types index 00447aa2f8a92..0f131dd77a6a4 100644 --- a/tests/baselines/reference/abstractPropertyNegative.types +++ b/tests/baselines/reference/abstractPropertyNegative.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/abstractPropertyNegative.ts === +//// [tests/cases/compiler/abstractPropertyNegative.ts] //// + +=== abstractPropertyNegative.ts === interface A { prop: string; >prop : string diff --git a/tests/baselines/reference/acceptSymbolAsWeakType.js b/tests/baselines/reference/acceptSymbolAsWeakType.js new file mode 100644 index 0000000000000..8c0911a9329a8 --- /dev/null +++ b/tests/baselines/reference/acceptSymbolAsWeakType.js @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/acceptSymbolAsWeakType.ts] //// + +//// [acceptSymbolAsWeakType.ts] +const s: symbol = Symbol('s'); + +const ws = new WeakSet([s]); +ws.add(s); +ws.has(s); +ws.delete(s); + +const wm = new WeakMap([[s, false]]); +wm.set(s, true); +wm.has(s); +wm.get(s); +wm.delete(s); + +const wr = new WeakRef(s); +wr.deref(); + +const f = new FinalizationRegistry(() => {}); +f.register(s, null); +f.unregister(s); + +//// [acceptSymbolAsWeakType.js] +"use strict"; +const s = Symbol('s'); +const ws = new WeakSet([s]); +ws.add(s); +ws.has(s); +ws.delete(s); +const wm = new WeakMap([[s, false]]); +wm.set(s, true); +wm.has(s); +wm.get(s); +wm.delete(s); +const wr = new WeakRef(s); +wr.deref(); +const f = new FinalizationRegistry(() => { }); +f.register(s, null); +f.unregister(s); diff --git a/tests/baselines/reference/acceptSymbolAsWeakType.symbols b/tests/baselines/reference/acceptSymbolAsWeakType.symbols new file mode 100644 index 0000000000000..21ec0d78f549a --- /dev/null +++ b/tests/baselines/reference/acceptSymbolAsWeakType.symbols @@ -0,0 +1,85 @@ +//// [tests/cases/compiler/acceptSymbolAsWeakType.ts] //// + +=== acceptSymbolAsWeakType.ts === +const s: symbol = Symbol('s'); +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) + +const ws = new WeakSet([s]); +>ws : Symbol(ws, Decl(acceptSymbolAsWeakType.ts, 2, 5)) +>WeakSet : Symbol(WeakSet, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +ws.add(s); +>ws.add : Symbol(WeakSet.add, Decl(lib.es2015.collection.d.ts, --, --)) +>ws : Symbol(ws, Decl(acceptSymbolAsWeakType.ts, 2, 5)) +>add : Symbol(WeakSet.add, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +ws.has(s); +>ws.has : Symbol(WeakSet.has, Decl(lib.es2015.collection.d.ts, --, --)) +>ws : Symbol(ws, Decl(acceptSymbolAsWeakType.ts, 2, 5)) +>has : Symbol(WeakSet.has, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +ws.delete(s); +>ws.delete : Symbol(WeakSet.delete, Decl(lib.es2015.collection.d.ts, --, --)) +>ws : Symbol(ws, Decl(acceptSymbolAsWeakType.ts, 2, 5)) +>delete : Symbol(WeakSet.delete, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +const wm = new WeakMap([[s, false]]); +>wm : Symbol(wm, Decl(acceptSymbolAsWeakType.ts, 7, 5)) +>WeakMap : Symbol(WeakMap, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +wm.set(s, true); +>wm.set : Symbol(WeakMap.set, Decl(lib.es2015.collection.d.ts, --, --)) +>wm : Symbol(wm, Decl(acceptSymbolAsWeakType.ts, 7, 5)) +>set : Symbol(WeakMap.set, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +wm.has(s); +>wm.has : Symbol(WeakMap.has, Decl(lib.es2015.collection.d.ts, --, --)) +>wm : Symbol(wm, Decl(acceptSymbolAsWeakType.ts, 7, 5)) +>has : Symbol(WeakMap.has, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +wm.get(s); +>wm.get : Symbol(WeakMap.get, Decl(lib.es2015.collection.d.ts, --, --)) +>wm : Symbol(wm, Decl(acceptSymbolAsWeakType.ts, 7, 5)) +>get : Symbol(WeakMap.get, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +wm.delete(s); +>wm.delete : Symbol(WeakMap.delete, Decl(lib.es2015.collection.d.ts, --, --)) +>wm : Symbol(wm, Decl(acceptSymbolAsWeakType.ts, 7, 5)) +>delete : Symbol(WeakMap.delete, Decl(lib.es2015.collection.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +const wr = new WeakRef(s); +>wr : Symbol(wr, Decl(acceptSymbolAsWeakType.ts, 13, 5)) +>WeakRef : Symbol(WeakRef, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +wr.deref(); +>wr.deref : Symbol(WeakRef.deref, Decl(lib.es2021.weakref.d.ts, --, --)) +>wr : Symbol(wr, Decl(acceptSymbolAsWeakType.ts, 13, 5)) +>deref : Symbol(WeakRef.deref, Decl(lib.es2021.weakref.d.ts, --, --)) + +const f = new FinalizationRegistry(() => {}); +>f : Symbol(f, Decl(acceptSymbolAsWeakType.ts, 16, 5)) +>FinalizationRegistry : Symbol(FinalizationRegistry, Decl(lib.es2021.weakref.d.ts, --, --), Decl(lib.es2021.weakref.d.ts, --, --)) + +f.register(s, null); +>f.register : Symbol(FinalizationRegistry.register, Decl(lib.es2021.weakref.d.ts, --, --)) +>f : Symbol(f, Decl(acceptSymbolAsWeakType.ts, 16, 5)) +>register : Symbol(FinalizationRegistry.register, Decl(lib.es2021.weakref.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + +f.unregister(s); +>f.unregister : Symbol(FinalizationRegistry.unregister, Decl(lib.es2021.weakref.d.ts, --, --)) +>f : Symbol(f, Decl(acceptSymbolAsWeakType.ts, 16, 5)) +>unregister : Symbol(FinalizationRegistry.unregister, Decl(lib.es2021.weakref.d.ts, --, --)) +>s : Symbol(s, Decl(acceptSymbolAsWeakType.ts, 0, 5)) + diff --git a/tests/baselines/reference/acceptSymbolAsWeakType.types b/tests/baselines/reference/acceptSymbolAsWeakType.types new file mode 100644 index 0000000000000..f026b03be23d5 --- /dev/null +++ b/tests/baselines/reference/acceptSymbolAsWeakType.types @@ -0,0 +1,107 @@ +//// [tests/cases/compiler/acceptSymbolAsWeakType.ts] //// + +=== acceptSymbolAsWeakType.ts === +const s: symbol = Symbol('s'); +>s : symbol +>Symbol('s') : unique symbol +>Symbol : SymbolConstructor +>'s' : "s" + +const ws = new WeakSet([s]); +>ws : WeakSet +>new WeakSet([s]) : WeakSet +>WeakSet : WeakSetConstructor +>[s] : symbol[] +>s : symbol + +ws.add(s); +>ws.add(s) : WeakSet +>ws.add : (value: symbol) => WeakSet +>ws : WeakSet +>add : (value: symbol) => WeakSet +>s : symbol + +ws.has(s); +>ws.has(s) : boolean +>ws.has : (value: symbol) => boolean +>ws : WeakSet +>has : (value: symbol) => boolean +>s : symbol + +ws.delete(s); +>ws.delete(s) : boolean +>ws.delete : (value: symbol) => boolean +>ws : WeakSet +>delete : (value: symbol) => boolean +>s : symbol + +const wm = new WeakMap([[s, false]]); +>wm : WeakMap +>new WeakMap([[s, false]]) : WeakMap +>WeakMap : WeakMapConstructor +>[[s, false]] : [symbol, false][] +>[s, false] : [symbol, false] +>s : symbol +>false : false + +wm.set(s, true); +>wm.set(s, true) : WeakMap +>wm.set : (key: symbol, value: boolean) => WeakMap +>wm : WeakMap +>set : (key: symbol, value: boolean) => WeakMap +>s : symbol +>true : true + +wm.has(s); +>wm.has(s) : boolean +>wm.has : (key: symbol) => boolean +>wm : WeakMap +>has : (key: symbol) => boolean +>s : symbol + +wm.get(s); +>wm.get(s) : boolean | undefined +>wm.get : (key: symbol) => boolean | undefined +>wm : WeakMap +>get : (key: symbol) => boolean | undefined +>s : symbol + +wm.delete(s); +>wm.delete(s) : boolean +>wm.delete : (key: symbol) => boolean +>wm : WeakMap +>delete : (key: symbol) => boolean +>s : symbol + +const wr = new WeakRef(s); +>wr : WeakRef +>new WeakRef(s) : WeakRef +>WeakRef : WeakRefConstructor +>s : symbol + +wr.deref(); +>wr.deref() : symbol | undefined +>wr.deref : () => symbol | undefined +>wr : WeakRef +>deref : () => symbol | undefined + +const f = new FinalizationRegistry(() => {}); +>f : FinalizationRegistry +>new FinalizationRegistry(() => {}) : FinalizationRegistry +>FinalizationRegistry : FinalizationRegistryConstructor +>() => {} : () => void + +f.register(s, null); +>f.register(s, null) : void +>f.register : (target: WeakKey, heldValue: unknown, unregisterToken?: WeakKey | undefined) => void +>f : FinalizationRegistry +>register : (target: WeakKey, heldValue: unknown, unregisterToken?: WeakKey | undefined) => void +>s : symbol + +f.unregister(s); +>f.unregister(s) : void +>f.unregister : (unregisterToken: WeakKey) => void +>f : FinalizationRegistry +>unregister : (unregisterToken: WeakKey) => void +>s : symbol + diff --git a/tests/baselines/reference/acceptableAlias1.js b/tests/baselines/reference/acceptableAlias1.js index d93b2f8791f6f..2dfa2a7401dd8 100644 --- a/tests/baselines/reference/acceptableAlias1.js +++ b/tests/baselines/reference/acceptableAlias1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/acceptableAlias1.ts] //// + //// [acceptableAlias1.ts] module M { export module N { diff --git a/tests/baselines/reference/acceptableAlias1.symbols b/tests/baselines/reference/acceptableAlias1.symbols index 31679fb6a525b..607068de65ee2 100644 --- a/tests/baselines/reference/acceptableAlias1.symbols +++ b/tests/baselines/reference/acceptableAlias1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/acceptableAlias1.ts === +//// [tests/cases/compiler/acceptableAlias1.ts] //// + +=== acceptableAlias1.ts === module M { >M : Symbol(M, Decl(acceptableAlias1.ts, 0, 0)) diff --git a/tests/baselines/reference/acceptableAlias1.types b/tests/baselines/reference/acceptableAlias1.types index 090b7c00e55d2..d01e7433e7d80 100644 --- a/tests/baselines/reference/acceptableAlias1.types +++ b/tests/baselines/reference/acceptableAlias1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/acceptableAlias1.ts === +//// [tests/cases/compiler/acceptableAlias1.ts] //// + +=== acceptableAlias1.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt index 0ce9c61461870..cca7c3bdc5e89 100644 --- a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts(5,17): error TS2662: Cannot find name 'foo'. Did you mean the static member 'C.foo'? +accessInstanceMemberFromStaticMethod01.ts(5,17): error TS2662: Cannot find name 'foo'. Did you mean the static member 'C.foo'? -==== tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts (1 errors) ==== +==== accessInstanceMemberFromStaticMethod01.ts (1 errors) ==== class C { static foo: string; diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js index 58999225820c0..250e78259926f 100644 --- a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts] //// + //// [accessInstanceMemberFromStaticMethod01.ts] class C { static foo: string; diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.symbols b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.symbols index 3c311ab6fab4d..ead5892d27e80 100644 --- a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.symbols +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts === +//// [tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts] //// + +=== accessInstanceMemberFromStaticMethod01.ts === class C { >C : Symbol(C, Decl(accessInstanceMemberFromStaticMethod01.ts, 0, 0)) diff --git a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.types b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.types index a0538378bd55f..913a234117725 100644 --- a/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.types +++ b/tests/baselines/reference/accessInstanceMemberFromStaticMethod01.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts === +//// [tests/cases/compiler/accessInstanceMemberFromStaticMethod01.ts] //// + +=== accessInstanceMemberFromStaticMethod01.ts === class C { >C : C diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index b235ca259297a..1a81263e63813 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessOverriddenBaseClassMember1.ts] //// + //// [accessOverriddenBaseClassMember1.ts] class Point { constructor(public x: number, public y: number) { } diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.symbols b/tests/baselines/reference/accessOverriddenBaseClassMember1.symbols index edcea5686e702..4be19996238ac 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.symbols +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessOverriddenBaseClassMember1.ts === +//// [tests/cases/compiler/accessOverriddenBaseClassMember1.ts] //// + +=== accessOverriddenBaseClassMember1.ts === class Point { >Point : Symbol(Point, Decl(accessOverriddenBaseClassMember1.ts, 0, 0)) diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.types b/tests/baselines/reference/accessOverriddenBaseClassMember1.types index f0dad0ccafcb7..197fbde5aaf8a 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.types +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessOverriddenBaseClassMember1.ts === +//// [tests/cases/compiler/accessOverriddenBaseClassMember1.ts] //// + +=== accessOverriddenBaseClassMember1.ts === class Point { >Point : Point diff --git a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt index 612a89a104346..029ebb55f871b 100644 --- a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt +++ b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts(5,17): error TS2304: Cannot find name 'foo'. +accessStaticMemberFromInstanceMethod01.ts(5,17): error TS2304: Cannot find name 'foo'. -==== tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts (1 errors) ==== +==== accessStaticMemberFromInstanceMethod01.ts (1 errors) ==== class C { foo: string; diff --git a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js index 342067c9e125b..f87f90e4f5423 100644 --- a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js +++ b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts] //// + //// [accessStaticMemberFromInstanceMethod01.ts] class C { foo: string; diff --git a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.symbols b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.symbols index f805a90ccc45e..ff68809747f53 100644 --- a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.symbols +++ b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts === +//// [tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts] //// + +=== accessStaticMemberFromInstanceMethod01.ts === class C { >C : Symbol(C, Decl(accessStaticMemberFromInstanceMethod01.ts, 0, 0)) diff --git a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.types b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.types index 7411ba1de69d1..5e2cf5b5b4de8 100644 --- a/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.types +++ b/tests/baselines/reference/accessStaticMemberFromInstanceMethod01.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts === +//// [tests/cases/compiler/accessStaticMemberFromInstanceMethod01.ts] //// + +=== accessStaticMemberFromInstanceMethod01.ts === class C { >C : C diff --git a/tests/baselines/reference/accessibilityModifiers.errors.txt b/tests/baselines/reference/accessibilityModifiers.errors.txt index 7d4351bd7b6b4..260ac25d0cfc0 100644 --- a/tests/baselines/reference/accessibilityModifiers.errors.txt +++ b/tests/baselines/reference/accessibilityModifiers.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(21,12): error TS1029: 'private' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(22,12): error TS1029: 'private' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(23,12): error TS1029: 'private' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(24,12): error TS1029: 'private' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(26,12): error TS1029: 'protected' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(27,12): error TS1029: 'protected' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(28,12): error TS1029: 'protected' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(29,12): error TS1029: 'protected' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(31,12): error TS1029: 'public' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(32,12): error TS1029: 'public' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(33,12): error TS1029: 'public' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(34,12): error TS1029: 'public' modifier must precede 'static' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(39,13): error TS1028: Accessibility modifier already seen. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(40,12): error TS1028: Accessibility modifier already seen. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(41,13): error TS1028: Accessibility modifier already seen. -tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(42,12): error TS1028: Accessibility modifier already seen. +accessibilityModifiers.ts(21,12): error TS1029: 'private' modifier must precede 'static' modifier. +accessibilityModifiers.ts(22,12): error TS1029: 'private' modifier must precede 'static' modifier. +accessibilityModifiers.ts(23,12): error TS1029: 'private' modifier must precede 'static' modifier. +accessibilityModifiers.ts(24,12): error TS1029: 'private' modifier must precede 'static' modifier. +accessibilityModifiers.ts(26,12): error TS1029: 'protected' modifier must precede 'static' modifier. +accessibilityModifiers.ts(27,12): error TS1029: 'protected' modifier must precede 'static' modifier. +accessibilityModifiers.ts(28,12): error TS1029: 'protected' modifier must precede 'static' modifier. +accessibilityModifiers.ts(29,12): error TS1029: 'protected' modifier must precede 'static' modifier. +accessibilityModifiers.ts(31,12): error TS1029: 'public' modifier must precede 'static' modifier. +accessibilityModifiers.ts(32,12): error TS1029: 'public' modifier must precede 'static' modifier. +accessibilityModifiers.ts(33,12): error TS1029: 'public' modifier must precede 'static' modifier. +accessibilityModifiers.ts(34,12): error TS1029: 'public' modifier must precede 'static' modifier. +accessibilityModifiers.ts(39,13): error TS1028: Accessibility modifier already seen. +accessibilityModifiers.ts(40,12): error TS1028: Accessibility modifier already seen. +accessibilityModifiers.ts(41,13): error TS1028: Accessibility modifier already seen. +accessibilityModifiers.ts(42,12): error TS1028: Accessibility modifier already seen. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts (16 errors) ==== +==== accessibilityModifiers.ts (16 errors) ==== // No errors class C { private static privateProperty; diff --git a/tests/baselines/reference/accessibilityModifiers.js b/tests/baselines/reference/accessibilityModifiers.js index 6adbc15f7e4ed..306717824e1b4 100644 --- a/tests/baselines/reference/accessibilityModifiers.js +++ b/tests/baselines/reference/accessibilityModifiers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts] //// + //// [accessibilityModifiers.ts] // No errors class C { diff --git a/tests/baselines/reference/accessibilityModifiers.symbols b/tests/baselines/reference/accessibilityModifiers.symbols index 09548fe13a11c..c3b1545f30467 100644 --- a/tests/baselines/reference/accessibilityModifiers.symbols +++ b/tests/baselines/reference/accessibilityModifiers.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts] //// + +=== accessibilityModifiers.ts === // No errors class C { >C : Symbol(C, Decl(accessibilityModifiers.ts, 0, 0)) diff --git a/tests/baselines/reference/accessibilityModifiers.types b/tests/baselines/reference/accessibilityModifiers.types index 5dd3f3b760896..49c419749fd39 100644 --- a/tests/baselines/reference/accessibilityModifiers.types +++ b/tests/baselines/reference/accessibilityModifiers.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts] //// + +=== accessibilityModifiers.ts === // No errors class C { >C : C diff --git a/tests/baselines/reference/accessorAccidentalCallDiagnostic.errors.txt b/tests/baselines/reference/accessorAccidentalCallDiagnostic.errors.txt index ee57be1742782..5d51cd8be52ea 100644 --- a/tests/baselines/reference/accessorAccidentalCallDiagnostic.errors.txt +++ b/tests/baselines/reference/accessorAccidentalCallDiagnostic.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/accessorAccidentalCallDiagnostic.ts(6,14): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'? +accessorAccidentalCallDiagnostic.ts(6,14): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'? Type 'Number' has no call signatures. -==== tests/cases/compiler/accessorAccidentalCallDiagnostic.ts (1 errors) ==== +==== accessorAccidentalCallDiagnostic.ts (1 errors) ==== // https://github.com/microsoft/TypeScript/issues/24554 class Test24554 { get property(): number { return 1; } diff --git a/tests/baselines/reference/accessorAccidentalCallDiagnostic.js b/tests/baselines/reference/accessorAccidentalCallDiagnostic.js index 6d5ae04ad5220..a808e4bf767e6 100644 --- a/tests/baselines/reference/accessorAccidentalCallDiagnostic.js +++ b/tests/baselines/reference/accessorAccidentalCallDiagnostic.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorAccidentalCallDiagnostic.ts] //// + //// [accessorAccidentalCallDiagnostic.ts] // https://github.com/microsoft/TypeScript/issues/24554 class Test24554 { diff --git a/tests/baselines/reference/accessorAccidentalCallDiagnostic.symbols b/tests/baselines/reference/accessorAccidentalCallDiagnostic.symbols index d60d466e4cd69..66b25a906c8b6 100644 --- a/tests/baselines/reference/accessorAccidentalCallDiagnostic.symbols +++ b/tests/baselines/reference/accessorAccidentalCallDiagnostic.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorAccidentalCallDiagnostic.ts === +//// [tests/cases/compiler/accessorAccidentalCallDiagnostic.ts] //// + +=== accessorAccidentalCallDiagnostic.ts === // https://github.com/microsoft/TypeScript/issues/24554 class Test24554 { >Test24554 : Symbol(Test24554, Decl(accessorAccidentalCallDiagnostic.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorAccidentalCallDiagnostic.types b/tests/baselines/reference/accessorAccidentalCallDiagnostic.types index 17a59da43c8e7..685e80184decd 100644 --- a/tests/baselines/reference/accessorAccidentalCallDiagnostic.types +++ b/tests/baselines/reference/accessorAccidentalCallDiagnostic.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorAccidentalCallDiagnostic.ts === +//// [tests/cases/compiler/accessorAccidentalCallDiagnostic.ts] //// + +=== accessorAccidentalCallDiagnostic.ts === // https://github.com/microsoft/TypeScript/issues/24554 class Test24554 { >Test24554 : Test24554 diff --git a/tests/baselines/reference/accessorBodyInTypeContext.errors.txt b/tests/baselines/reference/accessorBodyInTypeContext.errors.txt index fad18097a98d7..e1d9072f0fd32 100644 --- a/tests/baselines/reference/accessorBodyInTypeContext.errors.txt +++ b/tests/baselines/reference/accessorBodyInTypeContext.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/accessorBodyInTypeContext.ts(2,15): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorBodyInTypeContext.ts(6,21): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorBodyInTypeContext.ts(10,15): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorBodyInTypeContext.ts(14,21): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(2,15): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(6,21): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(10,15): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(14,21): error TS1183: An implementation cannot be declared in ambient contexts. -==== tests/cases/compiler/accessorBodyInTypeContext.ts (4 errors) ==== +==== accessorBodyInTypeContext.ts (4 errors) ==== type A = { get foo() { return 0 } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/accessorBodyInTypeContext.js b/tests/baselines/reference/accessorBodyInTypeContext.js index d99110e329cd0..d2bcee2a086ce 100644 --- a/tests/baselines/reference/accessorBodyInTypeContext.js +++ b/tests/baselines/reference/accessorBodyInTypeContext.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// + //// [accessorBodyInTypeContext.ts] type A = { get foo() { return 0 } diff --git a/tests/baselines/reference/accessorBodyInTypeContext.symbols b/tests/baselines/reference/accessorBodyInTypeContext.symbols index 4eb8bfd31289e..0400d1fc9f5a5 100644 --- a/tests/baselines/reference/accessorBodyInTypeContext.symbols +++ b/tests/baselines/reference/accessorBodyInTypeContext.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorBodyInTypeContext.ts === +//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// + +=== accessorBodyInTypeContext.ts === type A = { >A : Symbol(A, Decl(accessorBodyInTypeContext.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorBodyInTypeContext.types b/tests/baselines/reference/accessorBodyInTypeContext.types index 41a1a234e1bab..b8d324994d68c 100644 --- a/tests/baselines/reference/accessorBodyInTypeContext.types +++ b/tests/baselines/reference/accessorBodyInTypeContext.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorBodyInTypeContext.ts === +//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// + +=== accessorBodyInTypeContext.ts === type A = { >A : { readonly foo: number; } diff --git a/tests/baselines/reference/accessorDeclarationEmitJs.js b/tests/baselines/reference/accessorDeclarationEmitJs.js index 59cc0eb564450..bfebf24b71861 100644 --- a/tests/baselines/reference/accessorDeclarationEmitJs.js +++ b/tests/baselines/reference/accessorDeclarationEmitJs.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorDeclarationEmitJs.ts] //// + //// [a.js] export const t1 = { p: 'value', diff --git a/tests/baselines/reference/accessorDeclarationEmitJs.symbols b/tests/baselines/reference/accessorDeclarationEmitJs.symbols index 06bf51276d7bf..1dad9ef5d3076 100644 --- a/tests/baselines/reference/accessorDeclarationEmitJs.symbols +++ b/tests/baselines/reference/accessorDeclarationEmitJs.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorDeclarationEmitJs.ts] //// + === /a.js === export const t1 = { >t1 : Symbol(t1, Decl(a.js, 0, 12)) diff --git a/tests/baselines/reference/accessorDeclarationEmitJs.types b/tests/baselines/reference/accessorDeclarationEmitJs.types index 89dc07ef6b5ef..043aecbae0f52 100644 --- a/tests/baselines/reference/accessorDeclarationEmitJs.types +++ b/tests/baselines/reference/accessorDeclarationEmitJs.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorDeclarationEmitJs.ts] //// + === /a.js === export const t1 = { >t1 : { p: string; readonly getter: string; } diff --git a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.errors.txt b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.errors.txt index cb9f3fd79d6bb..0e908206a5638 100644 --- a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.errors.txt +++ b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS2304: Cannot find name 'DoesNotExist'. -tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. +accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS2304: Cannot find name 'DoesNotExist'. +accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'. -==== tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts (2 errors) ==== +==== accessorDeclarationEmitVisibilityErrors.ts (2 errors) ==== export class Q { set bet(arg: DoesNotExist) {} ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.js b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.js index 8757121d188e4..cd31e4220f4bd 100644 --- a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.js +++ b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] //// + //// [accessorDeclarationEmitVisibilityErrors.ts] export class Q { set bet(arg: DoesNotExist) {} diff --git a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.symbols b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.symbols index bf2bb4c49005a..669a1a89e4676 100644 --- a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.symbols +++ b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts === +//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] //// + +=== accessorDeclarationEmitVisibilityErrors.ts === export class Q { >Q : Symbol(Q, Decl(accessorDeclarationEmitVisibilityErrors.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.types b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.types index a4d2cf519b273..e0ebb0aa92a5f 100644 --- a/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.types +++ b/tests/baselines/reference/accessorDeclarationEmitVisibilityErrors.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts === +//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] //// + +=== accessorDeclarationEmitVisibilityErrors.ts === export class Q { >Q : Q diff --git a/tests/baselines/reference/accessorDeclarationOrder.js b/tests/baselines/reference/accessorDeclarationOrder.js index d7b0474e5bf10..5fc9a7e71bd38 100644 --- a/tests/baselines/reference/accessorDeclarationOrder.js +++ b/tests/baselines/reference/accessorDeclarationOrder.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorDeclarationOrder.ts] //// + //// [accessorDeclarationOrder.ts] class C1 { #name: string; diff --git a/tests/baselines/reference/accessorDeclarationOrder.symbols b/tests/baselines/reference/accessorDeclarationOrder.symbols index b889c5b5fc8ac..e4b9827f2a7e3 100644 --- a/tests/baselines/reference/accessorDeclarationOrder.symbols +++ b/tests/baselines/reference/accessorDeclarationOrder.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorDeclarationOrder.ts === +//// [tests/cases/compiler/accessorDeclarationOrder.ts] //// + +=== accessorDeclarationOrder.ts === class C1 { >C1 : Symbol(C1, Decl(accessorDeclarationOrder.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorDeclarationOrder.types b/tests/baselines/reference/accessorDeclarationOrder.types index 325596dd70d09..90c02b0e68a8c 100644 --- a/tests/baselines/reference/accessorDeclarationOrder.types +++ b/tests/baselines/reference/accessorDeclarationOrder.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorDeclarationOrder.ts === +//// [tests/cases/compiler/accessorDeclarationOrder.ts] //// + +=== accessorDeclarationOrder.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt b/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt index 17216739372f9..46de3d531dfb0 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/accessorParameterAccessibilityModifier.ts(2,11): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/compiler/accessorParameterAccessibilityModifier.ts(3,18): error TS2369: A parameter property is only allowed in a constructor implementation. +accessorParameterAccessibilityModifier.ts(2,11): error TS2369: A parameter property is only allowed in a constructor implementation. +accessorParameterAccessibilityModifier.ts(3,18): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/accessorParameterAccessibilityModifier.ts (2 errors) ==== +==== accessorParameterAccessibilityModifier.ts (2 errors) ==== class C { set X(public v) { } ~~~~~~~~ diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.js b/tests/baselines/reference/accessorParameterAccessibilityModifier.js index 66a8ad7430501..c0cf7eb7c9eb0 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorParameterAccessibilityModifier.ts] //// + //// [accessorParameterAccessibilityModifier.ts] class C { set X(public v) { } diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.symbols b/tests/baselines/reference/accessorParameterAccessibilityModifier.symbols index 76290d8d20925..19a35c15cd0dc 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.symbols +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorParameterAccessibilityModifier.ts === +//// [tests/cases/compiler/accessorParameterAccessibilityModifier.ts] //// + +=== accessorParameterAccessibilityModifier.ts === class C { >C : Symbol(C, Decl(accessorParameterAccessibilityModifier.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.types b/tests/baselines/reference/accessorParameterAccessibilityModifier.types index 0201a9d60ee8a..a778e45c56241 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.types +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorParameterAccessibilityModifier.ts === +//// [tests/cases/compiler/accessorParameterAccessibilityModifier.ts] //// + +=== accessorParameterAccessibilityModifier.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorWithES3.errors.txt b/tests/baselines/reference/accessorWithES3.errors.txt index 0d0a482c20983..1e2249cb4d0c8 100644 --- a/tests/baselines/reference/accessorWithES3.errors.txt +++ b/tests/baselines/reference/accessorWithES3.errors.txt @@ -1,12 +1,12 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +accessorWithES3.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +accessorWithES3.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +accessorWithES3.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +accessorWithES3.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts (4 errors) ==== +==== accessorWithES3.ts (4 errors) ==== // error to use accessors in ES3 mode class C { diff --git a/tests/baselines/reference/accessorWithES3.js b/tests/baselines/reference/accessorWithES3.js index 5137754c845d1..7ec59b77e3836 100644 --- a/tests/baselines/reference/accessorWithES3.js +++ b/tests/baselines/reference/accessorWithES3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts] //// + //// [accessorWithES3.ts] // error to use accessors in ES3 mode diff --git a/tests/baselines/reference/accessorWithES3.symbols b/tests/baselines/reference/accessorWithES3.symbols index 5b1e0cae1b7a6..ef31f09e2ff8c 100644 --- a/tests/baselines/reference/accessorWithES3.symbols +++ b/tests/baselines/reference/accessorWithES3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts] //// + +=== accessorWithES3.ts === // error to use accessors in ES3 mode class C { diff --git a/tests/baselines/reference/accessorWithES3.types b/tests/baselines/reference/accessorWithES3.types index b3c8353b96cfa..b1f34e330acd5 100644 --- a/tests/baselines/reference/accessorWithES3.types +++ b/tests/baselines/reference/accessorWithES3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts] //// + +=== accessorWithES3.ts === // error to use accessors in ES3 mode class C { diff --git a/tests/baselines/reference/accessorWithES5.js b/tests/baselines/reference/accessorWithES5.js index 0f75d614de3e0..19d5409b7f1b9 100644 --- a/tests/baselines/reference/accessorWithES5.js +++ b/tests/baselines/reference/accessorWithES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES5.ts] //// + //// [accessorWithES5.ts] class C { get x() { diff --git a/tests/baselines/reference/accessorWithES5.symbols b/tests/baselines/reference/accessorWithES5.symbols index 1a0d8ee70eac6..0a7e2176a58ca 100644 --- a/tests/baselines/reference/accessorWithES5.symbols +++ b/tests/baselines/reference/accessorWithES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES5.ts] //// + +=== accessorWithES5.ts === class C { >C : Symbol(C, Decl(accessorWithES5.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorWithES5.types b/tests/baselines/reference/accessorWithES5.types index 604f7c4301b30..0e7b1ba0d3798 100644 --- a/tests/baselines/reference/accessorWithES5.types +++ b/tests/baselines/reference/accessorWithES5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES5.ts] //// + +=== accessorWithES5.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorWithInitializer.errors.txt b/tests/baselines/reference/accessorWithInitializer.errors.txt index 1e64be49a1e66..2a1b64da30ac4 100644 --- a/tests/baselines/reference/accessorWithInitializer.errors.txt +++ b/tests/baselines/reference/accessorWithInitializer.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/accessorWithInitializer.ts(2,9): error TS1052: A 'set' accessor parameter cannot have an initializer. -tests/cases/compiler/accessorWithInitializer.ts(3,16): error TS1052: A 'set' accessor parameter cannot have an initializer. +accessorWithInitializer.ts(2,9): error TS1052: A 'set' accessor parameter cannot have an initializer. +accessorWithInitializer.ts(3,16): error TS1052: A 'set' accessor parameter cannot have an initializer. -==== tests/cases/compiler/accessorWithInitializer.ts (2 errors) ==== +==== accessorWithInitializer.ts (2 errors) ==== class C { set X(v = 0) { } ~ diff --git a/tests/baselines/reference/accessorWithInitializer.js b/tests/baselines/reference/accessorWithInitializer.js index 9fa2908855c36..d70cbd6828395 100644 --- a/tests/baselines/reference/accessorWithInitializer.js +++ b/tests/baselines/reference/accessorWithInitializer.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorWithInitializer.ts] //// + //// [accessorWithInitializer.ts] class C { set X(v = 0) { } diff --git a/tests/baselines/reference/accessorWithInitializer.symbols b/tests/baselines/reference/accessorWithInitializer.symbols index 7bf6716f146b8..82f61f90c7312 100644 --- a/tests/baselines/reference/accessorWithInitializer.symbols +++ b/tests/baselines/reference/accessorWithInitializer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithInitializer.ts === +//// [tests/cases/compiler/accessorWithInitializer.ts] //// + +=== accessorWithInitializer.ts === class C { >C : Symbol(C, Decl(accessorWithInitializer.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorWithInitializer.types b/tests/baselines/reference/accessorWithInitializer.types index 407bf158d1cfb..fd37badc1d2ff 100644 --- a/tests/baselines/reference/accessorWithInitializer.types +++ b/tests/baselines/reference/accessorWithInitializer.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithInitializer.ts === +//// [tests/cases/compiler/accessorWithInitializer.ts] //// + +=== accessorWithInitializer.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorWithLineTerminator.js b/tests/baselines/reference/accessorWithLineTerminator.js index ca521c6fe3822..4d7b3fe8d0535 100644 --- a/tests/baselines/reference/accessorWithLineTerminator.js +++ b/tests/baselines/reference/accessorWithLineTerminator.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorWithLineTerminator.ts] //// + //// [accessorWithLineTerminator.ts] class C { get diff --git a/tests/baselines/reference/accessorWithLineTerminator.symbols b/tests/baselines/reference/accessorWithLineTerminator.symbols index c73192977f6e6..7af2827dfb9ec 100644 --- a/tests/baselines/reference/accessorWithLineTerminator.symbols +++ b/tests/baselines/reference/accessorWithLineTerminator.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithLineTerminator.ts === +//// [tests/cases/compiler/accessorWithLineTerminator.ts] //// + +=== accessorWithLineTerminator.ts === class C { >C : Symbol(C, Decl(accessorWithLineTerminator.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorWithLineTerminator.types b/tests/baselines/reference/accessorWithLineTerminator.types index 327ff8e42344e..7facb50b997cc 100644 --- a/tests/baselines/reference/accessorWithLineTerminator.types +++ b/tests/baselines/reference/accessorWithLineTerminator.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithLineTerminator.ts === +//// [tests/cases/compiler/accessorWithLineTerminator.ts] //// + +=== accessorWithLineTerminator.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js index 5545ea379db2a..5f608fdaafe9a 100644 --- a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js +++ b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithMismatchedAccessibilityModifiers.ts] //// + //// [accessorWithMismatchedAccessibilityModifiers.ts] class C { get x() { diff --git a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.symbols b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.symbols index b3c626c02837f..6d2dabf4cda7f 100644 --- a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.symbols +++ b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithMismatchedAccessibilityModifiers.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithMismatchedAccessibilityModifiers.ts] //// + +=== accessorWithMismatchedAccessibilityModifiers.ts === class C { >C : Symbol(C, Decl(accessorWithMismatchedAccessibilityModifiers.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.types b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.types index 82902331573d4..fe29afe737fe1 100644 --- a/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.types +++ b/tests/baselines/reference/accessorWithMismatchedAccessibilityModifiers.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithMismatchedAccessibilityModifiers.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithMismatchedAccessibilityModifiers.ts] //// + +=== accessorWithMismatchedAccessibilityModifiers.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorWithRestParam.errors.txt b/tests/baselines/reference/accessorWithRestParam.errors.txt index ae06df99c95ed..8e94f0ee95af0 100644 --- a/tests/baselines/reference/accessorWithRestParam.errors.txt +++ b/tests/baselines/reference/accessorWithRestParam.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/accessorWithRestParam.ts(2,11): error TS1053: A 'set' accessor cannot have rest parameter. -tests/cases/compiler/accessorWithRestParam.ts(3,18): error TS1053: A 'set' accessor cannot have rest parameter. +accessorWithRestParam.ts(2,11): error TS1053: A 'set' accessor cannot have rest parameter. +accessorWithRestParam.ts(3,18): error TS1053: A 'set' accessor cannot have rest parameter. -==== tests/cases/compiler/accessorWithRestParam.ts (2 errors) ==== +==== accessorWithRestParam.ts (2 errors) ==== class C { set X(...v) { } ~~~ diff --git a/tests/baselines/reference/accessorWithRestParam.js b/tests/baselines/reference/accessorWithRestParam.js index c9afc192f5064..1713b6e0ad354 100644 --- a/tests/baselines/reference/accessorWithRestParam.js +++ b/tests/baselines/reference/accessorWithRestParam.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorWithRestParam.ts] //// + //// [accessorWithRestParam.ts] class C { set X(...v) { } diff --git a/tests/baselines/reference/accessorWithRestParam.symbols b/tests/baselines/reference/accessorWithRestParam.symbols index 204df594b24ef..98944c336b277 100644 --- a/tests/baselines/reference/accessorWithRestParam.symbols +++ b/tests/baselines/reference/accessorWithRestParam.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithRestParam.ts === +//// [tests/cases/compiler/accessorWithRestParam.ts] //// + +=== accessorWithRestParam.ts === class C { >C : Symbol(C, Decl(accessorWithRestParam.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorWithRestParam.types b/tests/baselines/reference/accessorWithRestParam.types index d447c1693d1d9..22957d455a84c 100644 --- a/tests/baselines/reference/accessorWithRestParam.types +++ b/tests/baselines/reference/accessorWithRestParam.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithRestParam.ts === +//// [tests/cases/compiler/accessorWithRestParam.ts] //// + +=== accessorWithRestParam.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorWithoutBody1.errors.txt b/tests/baselines/reference/accessorWithoutBody1.errors.txt index 3d074abf254c7..da7b29fe6b64e 100644 --- a/tests/baselines/reference/accessorWithoutBody1.errors.txt +++ b/tests/baselines/reference/accessorWithoutBody1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/accessorWithoutBody1.ts(1,19): error TS1005: '{' expected. +accessorWithoutBody1.ts(1,19): error TS1005: '{' expected. -==== tests/cases/compiler/accessorWithoutBody1.ts (1 errors) ==== +==== accessorWithoutBody1.ts (1 errors) ==== var v = { get foo() } ~ !!! error TS1005: '{' expected. \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithoutBody1.js b/tests/baselines/reference/accessorWithoutBody1.js index e06e305e16113..930cd3e6559b3 100644 --- a/tests/baselines/reference/accessorWithoutBody1.js +++ b/tests/baselines/reference/accessorWithoutBody1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorWithoutBody1.ts] //// + //// [accessorWithoutBody1.ts] var v = { get foo() } diff --git a/tests/baselines/reference/accessorWithoutBody1.symbols b/tests/baselines/reference/accessorWithoutBody1.symbols index 8b7b5f4fc6d65..288e4fa6ad87f 100644 --- a/tests/baselines/reference/accessorWithoutBody1.symbols +++ b/tests/baselines/reference/accessorWithoutBody1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithoutBody1.ts === +//// [tests/cases/compiler/accessorWithoutBody1.ts] //// + +=== accessorWithoutBody1.ts === var v = { get foo() } >v : Symbol(v, Decl(accessorWithoutBody1.ts, 0, 3)) >foo : Symbol(foo, Decl(accessorWithoutBody1.ts, 0, 9)) diff --git a/tests/baselines/reference/accessorWithoutBody1.types b/tests/baselines/reference/accessorWithoutBody1.types index aa70f78e1201e..425bc8a98bdeb 100644 --- a/tests/baselines/reference/accessorWithoutBody1.types +++ b/tests/baselines/reference/accessorWithoutBody1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithoutBody1.ts === +//// [tests/cases/compiler/accessorWithoutBody1.ts] //// + +=== accessorWithoutBody1.ts === var v = { get foo() } >v : { readonly foo: any; } >{ get foo() } : { readonly foo: any; } diff --git a/tests/baselines/reference/accessorWithoutBody2.errors.txt b/tests/baselines/reference/accessorWithoutBody2.errors.txt index 41bec9390450c..596da62347794 100644 --- a/tests/baselines/reference/accessorWithoutBody2.errors.txt +++ b/tests/baselines/reference/accessorWithoutBody2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/accessorWithoutBody2.ts(1,20): error TS1005: '{' expected. +accessorWithoutBody2.ts(1,20): error TS1005: '{' expected. -==== tests/cases/compiler/accessorWithoutBody2.ts (1 errors) ==== +==== accessorWithoutBody2.ts (1 errors) ==== var v = { set foo(a) } ~ !!! error TS1005: '{' expected. \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithoutBody2.js b/tests/baselines/reference/accessorWithoutBody2.js index 3b5a821d580a2..39a3bfd02dd40 100644 --- a/tests/baselines/reference/accessorWithoutBody2.js +++ b/tests/baselines/reference/accessorWithoutBody2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorWithoutBody2.ts] //// + //// [accessorWithoutBody2.ts] var v = { set foo(a) } diff --git a/tests/baselines/reference/accessorWithoutBody2.symbols b/tests/baselines/reference/accessorWithoutBody2.symbols index 242f59a7f505a..67f64ebbda474 100644 --- a/tests/baselines/reference/accessorWithoutBody2.symbols +++ b/tests/baselines/reference/accessorWithoutBody2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithoutBody2.ts === +//// [tests/cases/compiler/accessorWithoutBody2.ts] //// + +=== accessorWithoutBody2.ts === var v = { set foo(a) } >v : Symbol(v, Decl(accessorWithoutBody2.ts, 0, 3)) >foo : Symbol(foo, Decl(accessorWithoutBody2.ts, 0, 9)) diff --git a/tests/baselines/reference/accessorWithoutBody2.types b/tests/baselines/reference/accessorWithoutBody2.types index 19e9b941eadfc..12d5f7b43291c 100644 --- a/tests/baselines/reference/accessorWithoutBody2.types +++ b/tests/baselines/reference/accessorWithoutBody2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorWithoutBody2.ts === +//// [tests/cases/compiler/accessorWithoutBody2.ts] //// + +=== accessorWithoutBody2.ts === var v = { set foo(a) } >v : { foo: any; } >{ set foo(a) } : { foo: any; } diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js index 171fce799b9dd..4daab7e02060c 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts] //// + //// [accessorsAreNotContextuallyTyped.ts] // accessors are not contextually typed diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols b/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols index 0589eb7f4a8cb..bbe5355219d0d 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts] //// + +=== accessorsAreNotContextuallyTyped.ts === // accessors are not contextually typed class C { diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.types b/tests/baselines/reference/accessorsAreNotContextuallyTyped.types index 66c478dc87c73..dcbf9d03cb236 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.types +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts] //// + +=== accessorsAreNotContextuallyTyped.ts === // accessors are not contextually typed class C { diff --git a/tests/baselines/reference/accessorsEmit.js b/tests/baselines/reference/accessorsEmit.js index 46c35a643d5f2..bba2f09a44eb8 100644 --- a/tests/baselines/reference/accessorsEmit.js +++ b/tests/baselines/reference/accessorsEmit.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorsEmit.ts] //// + //// [accessorsEmit.ts] class Result { } diff --git a/tests/baselines/reference/accessorsEmit.symbols b/tests/baselines/reference/accessorsEmit.symbols index 119d81d369ab4..aaed4b000e89e 100644 --- a/tests/baselines/reference/accessorsEmit.symbols +++ b/tests/baselines/reference/accessorsEmit.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorsEmit.ts === +//// [tests/cases/compiler/accessorsEmit.ts] //// + +=== accessorsEmit.ts === class Result { } >Result : Symbol(Result, Decl(accessorsEmit.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsEmit.types b/tests/baselines/reference/accessorsEmit.types index 6b58f1fa4b866..d07ecf9a98a16 100644 --- a/tests/baselines/reference/accessorsEmit.types +++ b/tests/baselines/reference/accessorsEmit.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorsEmit.ts === +//// [tests/cases/compiler/accessorsEmit.ts] //// + +=== accessorsEmit.ts === class Result { } >Result : Result diff --git a/tests/baselines/reference/accessorsInAmbientContext.errors.txt b/tests/baselines/reference/accessorsInAmbientContext.errors.txt index 9a625f84c1091..89cd98a0a0c66 100644 --- a/tests/baselines/reference/accessorsInAmbientContext.errors.txt +++ b/tests/baselines/reference/accessorsInAmbientContext.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/accessorsInAmbientContext.ts(3,17): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(4,18): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(6,24): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(7,25): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(12,13): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(13,14): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(15,20): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/accessorsInAmbientContext.ts(16,21): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(3,17): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(4,18): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(6,24): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(7,25): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(12,13): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(13,14): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(15,20): error TS1183: An implementation cannot be declared in ambient contexts. +accessorsInAmbientContext.ts(16,21): error TS1183: An implementation cannot be declared in ambient contexts. -==== tests/cases/compiler/accessorsInAmbientContext.ts (8 errors) ==== +==== accessorsInAmbientContext.ts (8 errors) ==== declare module M { class C { get X() { return 1; } diff --git a/tests/baselines/reference/accessorsInAmbientContext.js b/tests/baselines/reference/accessorsInAmbientContext.js index 8e608edae1a50..05daedd495568 100644 --- a/tests/baselines/reference/accessorsInAmbientContext.js +++ b/tests/baselines/reference/accessorsInAmbientContext.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorsInAmbientContext.ts] //// + //// [accessorsInAmbientContext.ts] declare module M { class C { diff --git a/tests/baselines/reference/accessorsInAmbientContext.symbols b/tests/baselines/reference/accessorsInAmbientContext.symbols index 4e19cd08f557c..ae20eb27ee613 100644 --- a/tests/baselines/reference/accessorsInAmbientContext.symbols +++ b/tests/baselines/reference/accessorsInAmbientContext.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorsInAmbientContext.ts === +//// [tests/cases/compiler/accessorsInAmbientContext.ts] //// + +=== accessorsInAmbientContext.ts === declare module M { >M : Symbol(M, Decl(accessorsInAmbientContext.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsInAmbientContext.types b/tests/baselines/reference/accessorsInAmbientContext.types index fd21b158ac3d4..8f202b5af94c6 100644 --- a/tests/baselines/reference/accessorsInAmbientContext.types +++ b/tests/baselines/reference/accessorsInAmbientContext.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorsInAmbientContext.ts === +//// [tests/cases/compiler/accessorsInAmbientContext.ts] //// + +=== accessorsInAmbientContext.ts === declare module M { >M : typeof M diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt index e482b16103e8a..7c7f0015248e3 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt +++ b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt @@ -1,10 +1,10 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -tests/cases/compiler/accessorsNotAllowedInES3.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessorsNotAllowedInES3.ts(4,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +accessorsNotAllowedInES3.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +accessorsNotAllowedInES3.ts(4,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/compiler/accessorsNotAllowedInES3.ts (2 errors) ==== +==== accessorsNotAllowedInES3.ts (2 errors) ==== class C { get x(): number { return 1; } ~ diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.js b/tests/baselines/reference/accessorsNotAllowedInES3.js index ec37d8b02de54..5c96ffd64965d 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.js +++ b/tests/baselines/reference/accessorsNotAllowedInES3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessorsNotAllowedInES3.ts] //// + //// [accessorsNotAllowedInES3.ts] class C { get x(): number { return 1; } diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.symbols b/tests/baselines/reference/accessorsNotAllowedInES3.symbols index fc527434f3571..b84da45d56e32 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.symbols +++ b/tests/baselines/reference/accessorsNotAllowedInES3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorsNotAllowedInES3.ts === +//// [tests/cases/compiler/accessorsNotAllowedInES3.ts] //// + +=== accessorsNotAllowedInES3.ts === class C { >C : Symbol(C, Decl(accessorsNotAllowedInES3.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.types b/tests/baselines/reference/accessorsNotAllowedInES3.types index d83911586aadb..5a456d95827b7 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.types +++ b/tests/baselines/reference/accessorsNotAllowedInES3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessorsNotAllowedInES3.ts === +//// [tests/cases/compiler/accessorsNotAllowedInES3.ts] //// + +=== accessorsNotAllowedInES3.ts === class C { >C : C diff --git a/tests/baselines/reference/accessorsOverrideMethod.errors.txt b/tests/baselines/reference/accessorsOverrideMethod.errors.txt index 2ff047d49be36..0a8856a3bb369 100644 --- a/tests/baselines/reference/accessorsOverrideMethod.errors.txt +++ b/tests/baselines/reference/accessorsOverrideMethod.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts(5,9): error TS2423: Class 'A' defines instance member function 'm', but extended class 'B' defines it as instance member accessor. +accessorsOverrideMethod.ts(5,9): error TS2423: Class 'A' defines instance member function 'm', but extended class 'B' defines it as instance member accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts (1 errors) ==== +==== accessorsOverrideMethod.ts (1 errors) ==== class A { m() { } } diff --git a/tests/baselines/reference/accessorsOverrideMethod.js b/tests/baselines/reference/accessorsOverrideMethod.js index 0b7d62391909b..aebe8002d54ba 100644 --- a/tests/baselines/reference/accessorsOverrideMethod.js +++ b/tests/baselines/reference/accessorsOverrideMethod.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts] //// + //// [accessorsOverrideMethod.ts] class A { m() { } diff --git a/tests/baselines/reference/accessorsOverrideMethod.symbols b/tests/baselines/reference/accessorsOverrideMethod.symbols index d447c137acff4..9c35d0ba269b1 100644 --- a/tests/baselines/reference/accessorsOverrideMethod.symbols +++ b/tests/baselines/reference/accessorsOverrideMethod.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts] //// + +=== accessorsOverrideMethod.ts === class A { >A : Symbol(A, Decl(accessorsOverrideMethod.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideMethod.types b/tests/baselines/reference/accessorsOverrideMethod.types index a8781ae41a99b..8c2aa9f8bff4d 100644 --- a/tests/baselines/reference/accessorsOverrideMethod.types +++ b/tests/baselines/reference/accessorsOverrideMethod.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts] //// + +=== accessorsOverrideMethod.ts === class A { >A : A diff --git a/tests/baselines/reference/accessorsOverrideProperty.errors.txt b/tests/baselines/reference/accessorsOverrideProperty.errors.txt index 634e488e1a964..35e133911b4ef 100644 --- a/tests/baselines/reference/accessorsOverrideProperty.errors.txt +++ b/tests/baselines/reference/accessorsOverrideProperty.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor. -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts(12,9): error TS2611: 'p' is defined as a property in class 'C', but is overridden here in 'D' as an accessor. +accessorsOverrideProperty.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor. +accessorsOverrideProperty.ts(12,9): error TS2611: 'p' is defined as a property in class 'C', but is overridden here in 'D' as an accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts (2 errors) ==== +==== accessorsOverrideProperty.ts (2 errors) ==== class A { p = 'yep' } diff --git a/tests/baselines/reference/accessorsOverrideProperty.js b/tests/baselines/reference/accessorsOverrideProperty.js index 5e9b94457ca41..fc81501712031 100644 --- a/tests/baselines/reference/accessorsOverrideProperty.js +++ b/tests/baselines/reference/accessorsOverrideProperty.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts] //// + //// [accessorsOverrideProperty.ts] class A { p = 'yep' diff --git a/tests/baselines/reference/accessorsOverrideProperty.symbols b/tests/baselines/reference/accessorsOverrideProperty.symbols index 702417679a316..2016eb4e31cb5 100644 --- a/tests/baselines/reference/accessorsOverrideProperty.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts] //// + +=== accessorsOverrideProperty.ts === class A { >A : Symbol(A, Decl(accessorsOverrideProperty.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty.types b/tests/baselines/reference/accessorsOverrideProperty.types index 4e3021e70243f..76680a19caf7b 100644 --- a/tests/baselines/reference/accessorsOverrideProperty.types +++ b/tests/baselines/reference/accessorsOverrideProperty.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts] //// + +=== accessorsOverrideProperty.ts === class A { >A : A diff --git a/tests/baselines/reference/accessorsOverrideProperty2.errors.txt b/tests/baselines/reference/accessorsOverrideProperty2.errors.txt index ce4cbb8cdd84e..57b56969a7b76 100644 --- a/tests/baselines/reference/accessorsOverrideProperty2.errors.txt +++ b/tests/baselines/reference/accessorsOverrideProperty2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts(6,7): error TS2611: 'x' is defined as a property in class 'Base', but is overridden here in 'Derived' as an accessor. +accessorsOverrideProperty2.ts(6,7): error TS2611: 'x' is defined as a property in class 'Base', but is overridden here in 'Derived' as an accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts (1 errors) ==== +==== accessorsOverrideProperty2.ts (1 errors) ==== class Base { x = 1; } diff --git a/tests/baselines/reference/accessorsOverrideProperty2.js b/tests/baselines/reference/accessorsOverrideProperty2.js index 2a3f5723543bf..39bad9d894e37 100644 --- a/tests/baselines/reference/accessorsOverrideProperty2.js +++ b/tests/baselines/reference/accessorsOverrideProperty2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts] //// + //// [accessorsOverrideProperty2.ts] class Base { x = 1; diff --git a/tests/baselines/reference/accessorsOverrideProperty2.symbols b/tests/baselines/reference/accessorsOverrideProperty2.symbols index e4fa4bc7fc543..e39b1a3483033 100644 --- a/tests/baselines/reference/accessorsOverrideProperty2.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts] //// + +=== accessorsOverrideProperty2.ts === class Base { >Base : Symbol(Base, Decl(accessorsOverrideProperty2.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty2.types b/tests/baselines/reference/accessorsOverrideProperty2.types index 2fcff56230f5c..5c665d1f0f427 100644 --- a/tests/baselines/reference/accessorsOverrideProperty2.types +++ b/tests/baselines/reference/accessorsOverrideProperty2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts] //// + +=== accessorsOverrideProperty2.ts === class Base { >Base : Base diff --git a/tests/baselines/reference/accessorsOverrideProperty3.errors.txt b/tests/baselines/reference/accessorsOverrideProperty3.errors.txt index 24eebe13f931a..e63bc1062718f 100644 --- a/tests/baselines/reference/accessorsOverrideProperty3.errors.txt +++ b/tests/baselines/reference/accessorsOverrideProperty3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts(6,9): error TS2611: 'sound' is defined as a property in class 'Animal', but is overridden here in 'Lion' as an accessor. +accessorsOverrideProperty3.ts(6,9): error TS2611: 'sound' is defined as a property in class 'Animal', but is overridden here in 'Lion' as an accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts (1 errors) ==== +==== accessorsOverrideProperty3.ts (1 errors) ==== declare class Animal { sound: string } diff --git a/tests/baselines/reference/accessorsOverrideProperty3.js b/tests/baselines/reference/accessorsOverrideProperty3.js index 2b061298ab9a3..f030e47d5a784 100644 --- a/tests/baselines/reference/accessorsOverrideProperty3.js +++ b/tests/baselines/reference/accessorsOverrideProperty3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts] //// + //// [accessorsOverrideProperty3.ts] declare class Animal { sound: string diff --git a/tests/baselines/reference/accessorsOverrideProperty3.symbols b/tests/baselines/reference/accessorsOverrideProperty3.symbols index f34923d36aad3..e55a42714e58f 100644 --- a/tests/baselines/reference/accessorsOverrideProperty3.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts] //// + +=== accessorsOverrideProperty3.ts === declare class Animal { >Animal : Symbol(Animal, Decl(accessorsOverrideProperty3.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty3.types b/tests/baselines/reference/accessorsOverrideProperty3.types index 6fa0efd42f5a6..970c60fe6595f 100644 --- a/tests/baselines/reference/accessorsOverrideProperty3.types +++ b/tests/baselines/reference/accessorsOverrideProperty3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts] //// + +=== accessorsOverrideProperty3.ts === declare class Animal { >Animal : Animal diff --git a/tests/baselines/reference/accessorsOverrideProperty4.errors.txt b/tests/baselines/reference/accessorsOverrideProperty4.errors.txt index f7c16d9a8820f..9763ce341adc7 100644 --- a/tests/baselines/reference/accessorsOverrideProperty4.errors.txt +++ b/tests/baselines/reference/accessorsOverrideProperty4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts(6,9): error TS2611: 'sound' is defined as a property in class 'Animal', but is overridden here in 'Lion' as an accessor. +accessorsOverrideProperty4.ts(6,9): error TS2611: 'sound' is defined as a property in class 'Animal', but is overridden here in 'Lion' as an accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts (1 errors) ==== +==== accessorsOverrideProperty4.ts (1 errors) ==== declare class Animal { sound: string; } diff --git a/tests/baselines/reference/accessorsOverrideProperty4.js b/tests/baselines/reference/accessorsOverrideProperty4.js index 28a0af827b7eb..3b3f273685b63 100644 --- a/tests/baselines/reference/accessorsOverrideProperty4.js +++ b/tests/baselines/reference/accessorsOverrideProperty4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts] //// + //// [accessorsOverrideProperty4.ts] declare class Animal { sound: string; diff --git a/tests/baselines/reference/accessorsOverrideProperty4.symbols b/tests/baselines/reference/accessorsOverrideProperty4.symbols index d51646d1ce558..d9ba82ac9e3ae 100644 --- a/tests/baselines/reference/accessorsOverrideProperty4.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts] //// + +=== accessorsOverrideProperty4.ts === declare class Animal { >Animal : Symbol(Animal, Decl(accessorsOverrideProperty4.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty4.types b/tests/baselines/reference/accessorsOverrideProperty4.types index e553e5f37f05d..926e793970e28 100644 --- a/tests/baselines/reference/accessorsOverrideProperty4.types +++ b/tests/baselines/reference/accessorsOverrideProperty4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts] //// + +=== accessorsOverrideProperty4.ts === declare class Animal { >Animal : Animal diff --git a/tests/baselines/reference/accessorsOverrideProperty5.js b/tests/baselines/reference/accessorsOverrideProperty5.js index fb7cee0630b67..6f6af3a404449 100644 --- a/tests/baselines/reference/accessorsOverrideProperty5.js +++ b/tests/baselines/reference/accessorsOverrideProperty5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts] //// + //// [accessorsOverrideProperty5.ts] interface I { p: number diff --git a/tests/baselines/reference/accessorsOverrideProperty5.symbols b/tests/baselines/reference/accessorsOverrideProperty5.symbols index b048d8bbc928d..14dcd214b4667 100644 --- a/tests/baselines/reference/accessorsOverrideProperty5.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts] //// + +=== accessorsOverrideProperty5.ts === interface I { >I : Symbol(I, Decl(accessorsOverrideProperty5.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty5.types b/tests/baselines/reference/accessorsOverrideProperty5.types index 2032d3fa6ae50..5a16a2bb0356f 100644 --- a/tests/baselines/reference/accessorsOverrideProperty5.types +++ b/tests/baselines/reference/accessorsOverrideProperty5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts] //// + +=== accessorsOverrideProperty5.ts === interface I { p: number >p : number diff --git a/tests/baselines/reference/accessorsOverrideProperty6.errors.txt b/tests/baselines/reference/accessorsOverrideProperty6.errors.txt index ad3c13e6849e9..206ab7802a5d0 100644 --- a/tests/baselines/reference/accessorsOverrideProperty6.errors.txt +++ b/tests/baselines/reference/accessorsOverrideProperty6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor. -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts(12,9): error TS2611: 'p' is defined as a property in class 'C', but is overridden here in 'D' as an accessor. +accessorsOverrideProperty6.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor. +accessorsOverrideProperty6.ts(12,9): error TS2611: 'p' is defined as a property in class 'C', but is overridden here in 'D' as an accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts (2 errors) ==== +==== accessorsOverrideProperty6.ts (2 errors) ==== class A { p = 'yep' } diff --git a/tests/baselines/reference/accessorsOverrideProperty6.js b/tests/baselines/reference/accessorsOverrideProperty6.js index 3cd61062c8626..7a5ceb71e8c61 100644 --- a/tests/baselines/reference/accessorsOverrideProperty6.js +++ b/tests/baselines/reference/accessorsOverrideProperty6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts] //// + //// [accessorsOverrideProperty6.ts] class A { p = 'yep' diff --git a/tests/baselines/reference/accessorsOverrideProperty6.symbols b/tests/baselines/reference/accessorsOverrideProperty6.symbols index 19f93b02630bc..d66fb5e80f8f8 100644 --- a/tests/baselines/reference/accessorsOverrideProperty6.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts] //// + +=== accessorsOverrideProperty6.ts === class A { >A : Symbol(A, Decl(accessorsOverrideProperty6.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty6.types b/tests/baselines/reference/accessorsOverrideProperty6.types index 594dbd372adef..266de531c017f 100644 --- a/tests/baselines/reference/accessorsOverrideProperty6.types +++ b/tests/baselines/reference/accessorsOverrideProperty6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts] //// + +=== accessorsOverrideProperty6.ts === class A { >A : A diff --git a/tests/baselines/reference/accessorsOverrideProperty7.errors.txt b/tests/baselines/reference/accessorsOverrideProperty7.errors.txt index c83e5e6295b56..33a92cd351372 100644 --- a/tests/baselines/reference/accessorsOverrideProperty7.errors.txt +++ b/tests/baselines/reference/accessorsOverrideProperty7.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts(2,14): error TS1267: Property 'p' cannot have an initializer because it is marked abstract. -tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor. +accessorsOverrideProperty7.ts(2,14): error TS1267: Property 'p' cannot have an initializer because it is marked abstract. +accessorsOverrideProperty7.ts(5,9): error TS2611: 'p' is defined as a property in class 'A', but is overridden here in 'B' as an accessor. -==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts (2 errors) ==== +==== accessorsOverrideProperty7.ts (2 errors) ==== abstract class A { abstract p = 'yep' ~ diff --git a/tests/baselines/reference/accessorsOverrideProperty7.js b/tests/baselines/reference/accessorsOverrideProperty7.js index a879d2fe6eb6d..b4b222b18387d 100644 --- a/tests/baselines/reference/accessorsOverrideProperty7.js +++ b/tests/baselines/reference/accessorsOverrideProperty7.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts] //// + //// [accessorsOverrideProperty7.ts] abstract class A { abstract p = 'yep' diff --git a/tests/baselines/reference/accessorsOverrideProperty7.symbols b/tests/baselines/reference/accessorsOverrideProperty7.symbols index 0ca99ab7abd6f..4cc176675fa0b 100644 --- a/tests/baselines/reference/accessorsOverrideProperty7.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts] //// + +=== accessorsOverrideProperty7.ts === abstract class A { >A : Symbol(A, Decl(accessorsOverrideProperty7.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty7.types b/tests/baselines/reference/accessorsOverrideProperty7.types index 6e52715a3da6f..cc3a9d58808e3 100644 --- a/tests/baselines/reference/accessorsOverrideProperty7.types +++ b/tests/baselines/reference/accessorsOverrideProperty7.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts] //// + +=== accessorsOverrideProperty7.ts === abstract class A { >A : A diff --git a/tests/baselines/reference/accessorsOverrideProperty8.js b/tests/baselines/reference/accessorsOverrideProperty8.js index bd51c4b9afbaa..57f35263f166d 100644 --- a/tests/baselines/reference/accessorsOverrideProperty8.js +++ b/tests/baselines/reference/accessorsOverrideProperty8.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty8.ts] //// + //// [accessorsOverrideProperty8.ts] type Types = 'boolean' | 'unknown' | 'string'; diff --git a/tests/baselines/reference/accessorsOverrideProperty8.symbols b/tests/baselines/reference/accessorsOverrideProperty8.symbols index 7e60b8c582de5..13c4ad8807e6b 100644 --- a/tests/baselines/reference/accessorsOverrideProperty8.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty8.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty8.ts] //// + +=== accessorsOverrideProperty8.ts === type Types = 'boolean' | 'unknown' | 'string'; >Types : Symbol(Types, Decl(accessorsOverrideProperty8.ts, 0, 0)) diff --git a/tests/baselines/reference/accessorsOverrideProperty8.types b/tests/baselines/reference/accessorsOverrideProperty8.types index 1379593d280a4..f922554ae6740 100644 --- a/tests/baselines/reference/accessorsOverrideProperty8.types +++ b/tests/baselines/reference/accessorsOverrideProperty8.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty8.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty8.ts] //// + +=== accessorsOverrideProperty8.ts === type Types = 'boolean' | 'unknown' | 'string'; >Types : "string" | "boolean" | "unknown" diff --git a/tests/baselines/reference/accessorsOverrideProperty9.js b/tests/baselines/reference/accessorsOverrideProperty9.js index a1b8d7bde87aa..0cec04281e7b8 100644 --- a/tests/baselines/reference/accessorsOverrideProperty9.js +++ b/tests/baselines/reference/accessorsOverrideProperty9.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty9.ts] //// + //// [accessorsOverrideProperty9.ts] // #41347, based on microsoft/rushstack diff --git a/tests/baselines/reference/accessorsOverrideProperty9.symbols b/tests/baselines/reference/accessorsOverrideProperty9.symbols index 0ef03600bd311..e2c35f62e8e4f 100644 --- a/tests/baselines/reference/accessorsOverrideProperty9.symbols +++ b/tests/baselines/reference/accessorsOverrideProperty9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty9.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty9.ts] //// + +=== accessorsOverrideProperty9.ts === // #41347, based on microsoft/rushstack // Mixin utilities diff --git a/tests/baselines/reference/accessorsOverrideProperty9.types b/tests/baselines/reference/accessorsOverrideProperty9.types index dcbc3523e10cd..5f80cd40c1670 100644 --- a/tests/baselines/reference/accessorsOverrideProperty9.types +++ b/tests/baselines/reference/accessorsOverrideProperty9.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty9.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty9.ts] //// + +=== accessorsOverrideProperty9.ts === // #41347, based on microsoft/rushstack // Mixin utilities diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt index 6a86fbfd86a52..bbdd815799e61 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,48): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,47): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2322: Type 'number' is not assignable to type 'string'. +accessors_spec_section-4.5_error-cases.ts(3,48): error TS2322: Type 'string' is not assignable to type 'number'. +accessors_spec_section-4.5_error-cases.ts(5,47): error TS2322: Type 'string' is not assignable to type 'number'. +accessors_spec_section-4.5_error-cases.ts(9,52): error TS2322: Type 'number' is not assignable to type 'string'. +accessors_spec_section-4.5_error-cases.ts(11,51): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts (4 errors) ==== +==== accessors_spec_section-4.5_error-cases.ts (4 errors) ==== class LanguageSpec_section_4_5_error_cases { public set AnnotatedSetter_SetterFirst(a: number) { } public get AnnotatedSetter_SetterFirst() { return ""; } diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js index da28ba4f65303..9a23d75382896 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts] //// + //// [accessors_spec_section-4.5_error-cases.ts] class LanguageSpec_section_4_5_error_cases { public set AnnotatedSetter_SetterFirst(a: number) { } diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.symbols b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.symbols index 0e8b5ab7b9ace..93528c421768f 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.symbols +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts === +//// [tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts] //// + +=== accessors_spec_section-4.5_error-cases.ts === class LanguageSpec_section_4_5_error_cases { >LanguageSpec_section_4_5_error_cases : Symbol(LanguageSpec_section_4_5_error_cases, Decl(accessors_spec_section-4.5_error-cases.ts, 0, 0)) diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.types b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.types index 1fd475c579cc8..fbfb47997c305 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.types +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts === +//// [tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts] //// + +=== accessors_spec_section-4.5_error-cases.ts === class LanguageSpec_section_4_5_error_cases { >LanguageSpec_section_4_5_error_cases : LanguageSpec_section_4_5_error_cases diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index 68e78690218e8..24c228f075453 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/accessors_spec_section-4.5_inference.ts] //// + //// [accessors_spec_section-4.5_inference.ts] class A { } class B extends A { } diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols b/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols index de8781c42b0b5..247b9e7ed293a 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessors_spec_section-4.5_inference.ts === +//// [tests/cases/compiler/accessors_spec_section-4.5_inference.ts] //// + +=== accessors_spec_section-4.5_inference.ts === class A { } >A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.types b/tests/baselines/reference/accessors_spec_section-4.5_inference.types index 418fd2487a30e..3f0e460318554 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.types +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/accessors_spec_section-4.5_inference.ts === +//// [tests/cases/compiler/accessors_spec_section-4.5_inference.ts] //// + +=== accessors_spec_section-4.5_inference.ts === class A { } >A : A diff --git a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.js b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.js index a08a0f4ba7594..6d2085bf3c0b2 100644 --- a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.js +++ b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts] //// + //// [addMoreCallSignaturesToBaseSignature.ts] interface Foo { (): string; diff --git a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.symbols b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.symbols index 339f419f5cc22..355d2f8afa139 100644 --- a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.symbols +++ b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts === +//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts] //// + +=== addMoreCallSignaturesToBaseSignature.ts === interface Foo { >Foo : Symbol(Foo, Decl(addMoreCallSignaturesToBaseSignature.ts, 0, 0)) diff --git a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.types b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.types index 9af21c42c0767..e309c9aecb685 100644 --- a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.types +++ b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts === +//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature.ts] //// + +=== addMoreCallSignaturesToBaseSignature.ts === interface Foo { (): string; } diff --git a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.js b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.js index 73f7316dedc3c..c21f6c2c4fe56 100644 --- a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.js +++ b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature2.ts] //// + //// [addMoreCallSignaturesToBaseSignature2.ts] interface Foo { (bar:number): string; diff --git a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.symbols b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.symbols index e8185780dcf44..3acfa5923e732 100644 --- a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.symbols +++ b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/addMoreCallSignaturesToBaseSignature2.ts === +//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature2.ts] //// + +=== addMoreCallSignaturesToBaseSignature2.ts === interface Foo { >Foo : Symbol(Foo, Decl(addMoreCallSignaturesToBaseSignature2.ts, 0, 0)) diff --git a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.types b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.types index 55dc0f413437a..4347515f3ef03 100644 --- a/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.types +++ b/tests/baselines/reference/addMoreCallSignaturesToBaseSignature2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/addMoreCallSignaturesToBaseSignature2.ts === +//// [tests/cases/compiler/addMoreCallSignaturesToBaseSignature2.ts] //// + +=== addMoreCallSignaturesToBaseSignature2.ts === interface Foo { (bar:number): string; >bar : number diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt index dc6b00bdb8ea6..968c98bc7c597 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'. +addMoreOverloadsToBaseSignature.ts(5,11): error TS2430: Interface 'Bar' incorrectly extends interface 'Foo'. Types of property 'f' are incompatible. Type '(key: string) => string' is not assignable to type '() => string'. Target signature provides too few arguments. Expected 1 or more, but got 0. -==== tests/cases/compiler/addMoreOverloadsToBaseSignature.ts (1 errors) ==== +==== addMoreOverloadsToBaseSignature.ts (1 errors) ==== interface Foo { f(): string; } diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.js b/tests/baselines/reference/addMoreOverloadsToBaseSignature.js index 3a821da7382f4..de56258b76f3f 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.js +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/addMoreOverloadsToBaseSignature.ts] //// + //// [addMoreOverloadsToBaseSignature.ts] interface Foo { f(): string; diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.symbols b/tests/baselines/reference/addMoreOverloadsToBaseSignature.symbols index b75df57e2dc5e..81521176bf19e 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.symbols +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/addMoreOverloadsToBaseSignature.ts === +//// [tests/cases/compiler/addMoreOverloadsToBaseSignature.ts] //// + +=== addMoreOverloadsToBaseSignature.ts === interface Foo { >Foo : Symbol(Foo, Decl(addMoreOverloadsToBaseSignature.ts, 0, 0)) diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.types b/tests/baselines/reference/addMoreOverloadsToBaseSignature.types index cd676e084d117..3d43ce002d16c 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.types +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/addMoreOverloadsToBaseSignature.ts === +//// [tests/cases/compiler/addMoreOverloadsToBaseSignature.ts] //// + +=== addMoreOverloadsToBaseSignature.ts === interface Foo { f(): string; >f : () => string diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js index 82559b521dd85..c9f1290b0f57e 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts] //// + //// [additionOperatorWithAnyAndEveryType.ts] function foo() { } class C { diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols index 0c7fcd2f34657..5531a21a7da91 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts] //// + +=== additionOperatorWithAnyAndEveryType.ts === function foo() { } >foo : Symbol(foo, Decl(additionOperatorWithAnyAndEveryType.ts, 0, 0)) diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types index 1f8a9752dccfe..542e8ff06e876 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts] //// + +=== additionOperatorWithAnyAndEveryType.ts === function foo() { } >foo : () => void diff --git a/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.js b/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.js index 1366e242182e4..dbf1f3ddaa83e 100644 --- a/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.ts] //// + //// [additionOperatorWithConstrainedTypeParameter.ts] // test for #17069 function sum, K extends string>(n: number, v: T, k: K) { diff --git a/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.symbols b/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.symbols index 95836a70b7575..338a97fab9be7 100644 --- a/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.symbols +++ b/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.ts] //// + +=== additionOperatorWithConstrainedTypeParameter.ts === // test for #17069 function sum, K extends string>(n: number, v: T, k: K) { >sum : Symbol(sum, Decl(additionOperatorWithConstrainedTypeParameter.ts, 0, 0)) diff --git a/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.types b/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.types index 090f0ecda93cc..b34f24399afa3 100644 --- a/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.types +++ b/tests/baselines/reference/additionOperatorWithConstrainedTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.ts] //// + +=== additionOperatorWithConstrainedTypeParameter.ts === // test for #17069 function sum, K extends string>(n: number, v: T, k: K) { >sum : , K extends string>(n: number, v: T, k: K) => void diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt index bd71b64b50129..cb628c01a37d0 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt @@ -1,25 +1,25 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'Object'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(22,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'Object'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(25,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(26,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(27,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(30,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(31,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(32,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(33,11): error TS2365: Operator '+' cannot be applied to types '{}' and '{}'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(34,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'Number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(35,11): error TS2365: Operator '+' cannot be applied to types 'number' and '() => void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(36,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(37,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'typeof C'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(38,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'C'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(39,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts(40,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'typeof M'. +additionOperatorWithInvalidOperands.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +additionOperatorWithInvalidOperands.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. +additionOperatorWithInvalidOperands.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'Object'. +additionOperatorWithInvalidOperands.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. +additionOperatorWithInvalidOperands.ts(22,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'Object'. +additionOperatorWithInvalidOperands.ts(25,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'boolean'. +additionOperatorWithInvalidOperands.ts(26,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'number'. +additionOperatorWithInvalidOperands.ts(27,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. +additionOperatorWithInvalidOperands.ts(30,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +additionOperatorWithInvalidOperands.ts(31,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. +additionOperatorWithInvalidOperands.ts(32,11): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. +additionOperatorWithInvalidOperands.ts(33,11): error TS2365: Operator '+' cannot be applied to types '{}' and '{}'. +additionOperatorWithInvalidOperands.ts(34,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'Number'. +additionOperatorWithInvalidOperands.ts(35,11): error TS2365: Operator '+' cannot be applied to types 'number' and '() => void'. +additionOperatorWithInvalidOperands.ts(36,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'void'. +additionOperatorWithInvalidOperands.ts(37,11): error TS2365: Operator '+' cannot be applied to types 'number' and 'typeof C'. +additionOperatorWithInvalidOperands.ts(38,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'C'. +additionOperatorWithInvalidOperands.ts(39,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'void'. +additionOperatorWithInvalidOperands.ts(40,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'typeof M'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts (19 errors) ==== +==== additionOperatorWithInvalidOperands.ts (19 errors) ==== function foo() { } class C { public a: string; diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index fe7a332b5eef1..a5f7e3baa5d4b 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts] //// + //// [additionOperatorWithInvalidOperands.ts] function foo() { } class C { diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols b/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols index 41d2e17c9444b..2fc6040b97438 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts] //// + +=== additionOperatorWithInvalidOperands.ts === function foo() { } >foo : Symbol(foo, Decl(additionOperatorWithInvalidOperands.ts, 0, 0)) diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.types b/tests/baselines/reference/additionOperatorWithInvalidOperands.types index 561b23a618bb5..65e5fb6568fad 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.types +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts] //// + +=== additionOperatorWithInvalidOperands.ts === function foo() { } >foo : () => void diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt index 04d4606ef9f71..0a51361b10848 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(11,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(12,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'Object'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(13,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(14,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'Number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types 'null' and '{ a: string; }'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'null' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'null' and '() => void'. +additionOperatorWithNullValueAndInvalidOperator.ts(11,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'boolean'. +additionOperatorWithNullValueAndInvalidOperator.ts(12,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'Object'. +additionOperatorWithNullValueAndInvalidOperator.ts(13,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'void'. +additionOperatorWithNullValueAndInvalidOperator.ts(14,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'null'. +additionOperatorWithNullValueAndInvalidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'null'. +additionOperatorWithNullValueAndInvalidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'void'. +additionOperatorWithNullValueAndInvalidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'Number'. +additionOperatorWithNullValueAndInvalidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'boolean'. +additionOperatorWithNullValueAndInvalidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types 'null' and '{ a: string; }'. +additionOperatorWithNullValueAndInvalidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'null' and 'void'. +additionOperatorWithNullValueAndInvalidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'null' and '() => void'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts (11 errors) ==== +==== additionOperatorWithNullValueAndInvalidOperator.ts (11 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo(): void { return undefined } diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js index 79d3c0b9b8da0..8388dbebb3955 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts] //// + //// [additionOperatorWithNullValueAndInvalidOperator.ts] // If one operand is the null or undefined value, it is treated as having the type of the other operand. diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols index ed386befc6232..4e0844055bb5e 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts] //// + +=== additionOperatorWithNullValueAndInvalidOperator.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo(): void { return undefined } diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types index 2bb08da551c24..d110b1a2d85b3 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndInvalidOperator.ts] //// + +=== additionOperatorWithNullValueAndInvalidOperator.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo(): void { return undefined } diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt index b722fd1be4654..eb13ff16ed092 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'null' and '1'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'E'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(18,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'E.a'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'E.a'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types '1' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts(24,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'null'. +additionOperatorWithNullValueAndValidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'number'. +additionOperatorWithNullValueAndValidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'null' and '1'. +additionOperatorWithNullValueAndValidOperator.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'E'. +additionOperatorWithNullValueAndValidOperator.ts(18,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'E.a'. +additionOperatorWithNullValueAndValidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'E.a'. +additionOperatorWithNullValueAndValidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'null'. +additionOperatorWithNullValueAndValidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types '1' and 'null'. +additionOperatorWithNullValueAndValidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'null'. +additionOperatorWithNullValueAndValidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'null'. +additionOperatorWithNullValueAndValidOperator.ts(24,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'null'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts (10 errors) ==== +==== additionOperatorWithNullValueAndValidOperator.ts (10 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the other operand. enum E { a, b, c } diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js index 1b5cb877d21bc..460b5eb5fc358 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts] //// + //// [additionOperatorWithNullValueAndValidOperator.ts] // If one operand is the null or undefined value, it is treated as having the type of the other operand. diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols index ccb53ab5ef112..416e99c767155 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts] //// + +=== additionOperatorWithNullValueAndValidOperator.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. enum E { a, b, c } diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types index 1ae77c00dccd9..9065e3ce379e1 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types +++ b/tests/baselines/reference/additionOperatorWithNullValueAndValidOperator.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNullValueAndValidOperator.ts] //// + +=== additionOperatorWithNullValueAndValidOperator.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. enum E { a, b, c } diff --git a/tests/baselines/reference/additionOperatorWithNumberAndEnum.js b/tests/baselines/reference/additionOperatorWithNumberAndEnum.js index d559e98dc3eff..f687ae509f49f 100644 --- a/tests/baselines/reference/additionOperatorWithNumberAndEnum.js +++ b/tests/baselines/reference/additionOperatorWithNumberAndEnum.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNumberAndEnum.ts] //// + //// [additionOperatorWithNumberAndEnum.ts] enum E { a, b } enum F { c, d } diff --git a/tests/baselines/reference/additionOperatorWithNumberAndEnum.symbols b/tests/baselines/reference/additionOperatorWithNumberAndEnum.symbols index 835bdbe3a65d3..cd47bdd97cdb7 100644 --- a/tests/baselines/reference/additionOperatorWithNumberAndEnum.symbols +++ b/tests/baselines/reference/additionOperatorWithNumberAndEnum.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNumberAndEnum.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNumberAndEnum.ts] //// + +=== additionOperatorWithNumberAndEnum.ts === enum E { a, b } >E : Symbol(E, Decl(additionOperatorWithNumberAndEnum.ts, 0, 0)) >a : Symbol(E.a, Decl(additionOperatorWithNumberAndEnum.ts, 0, 8)) diff --git a/tests/baselines/reference/additionOperatorWithNumberAndEnum.types b/tests/baselines/reference/additionOperatorWithNumberAndEnum.types index aca445bf2cf6f..ba7ed5dea527b 100644 --- a/tests/baselines/reference/additionOperatorWithNumberAndEnum.types +++ b/tests/baselines/reference/additionOperatorWithNumberAndEnum.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNumberAndEnum.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithNumberAndEnum.ts] //// + +=== additionOperatorWithNumberAndEnum.ts === enum E { a, b } >E : E >a : E.a diff --git a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index b4746ff1e68b0..df254946507c7 100644 --- a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(2,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(3,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(4,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts(5,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +additionOperatorWithOnlyNullValueOrUndefinedValue.ts(2,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +additionOperatorWithOnlyNullValueOrUndefinedValue.ts(3,10): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. +additionOperatorWithOnlyNullValueOrUndefinedValue.ts(4,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'null'. +additionOperatorWithOnlyNullValueOrUndefinedValue.ts(5,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts (4 errors) ==== +==== additionOperatorWithOnlyNullValueOrUndefinedValue.ts (4 errors) ==== // bug 819721 var r1 = null + null; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.js b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.js index 1ed9b3e9708d4..94d34e8a15705 100644 --- a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.js +++ b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts] //// + //// [additionOperatorWithOnlyNullValueOrUndefinedValue.ts] // bug 819721 var r1 = null + null; diff --git a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.symbols b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.symbols index 87ae4f5578dec..a294db54049a8 100644 --- a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.symbols +++ b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts] //// + +=== additionOperatorWithOnlyNullValueOrUndefinedValue.ts === // bug 819721 var r1 = null + null; >r1 : Symbol(r1, Decl(additionOperatorWithOnlyNullValueOrUndefinedValue.ts, 1, 3)) diff --git a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.types b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.types index fc41b874cdeca..e042095c84b0b 100644 --- a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.types +++ b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithOnlyNullValueOrUndefinedValue.ts] //// + +=== additionOperatorWithOnlyNullValueOrUndefinedValue.ts === // bug 819721 var r1 = null + null; >r1 : any diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.js b/tests/baselines/reference/additionOperatorWithStringAndEveryType.js index 03456020c802f..aa6652ac8a8d3 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithStringAndEveryType.ts] //// + //// [additionOperatorWithStringAndEveryType.ts] enum E { a, b, c } diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols b/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols index 331e95936410e..ddf4af1ab2b8f 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithStringAndEveryType.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithStringAndEveryType.ts] //// + +=== additionOperatorWithStringAndEveryType.ts === enum E { a, b, c } >E : Symbol(E, Decl(additionOperatorWithStringAndEveryType.ts, 0, 0)) >a : Symbol(E.a, Decl(additionOperatorWithStringAndEveryType.ts, 0, 8)) diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.types b/tests/baselines/reference/additionOperatorWithStringAndEveryType.types index 28be50ab48ab3..6b332d41c157b 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.types +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithStringAndEveryType.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithStringAndEveryType.ts] //// + +=== additionOperatorWithStringAndEveryType.ts === enum E { a, b, c } >E : E >a : E.a diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt index bdb81190b5098..42e6850300c75 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(15,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(16,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(18,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'Object'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(19,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'E'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(20,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(24,14): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'T'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(25,15): error TS2365: Operator '+' cannot be applied to types 'number' and 'T'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(27,15): error TS2365: Operator '+' cannot be applied to types 'Object' and 'T'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(28,15): error TS2365: Operator '+' cannot be applied to types 'E' and 'T'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(29,15): error TS2365: Operator '+' cannot be applied to types 'void' and 'T'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(32,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'null'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(33,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(34,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(35,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'U'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(36,15): error TS2365: Operator '+' cannot be applied to types 'T' and '() => void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts(37,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined[]'. +additionOperatorWithTypeParameter.ts(15,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'boolean'. +additionOperatorWithTypeParameter.ts(16,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'number'. +additionOperatorWithTypeParameter.ts(18,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'Object'. +additionOperatorWithTypeParameter.ts(19,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'E'. +additionOperatorWithTypeParameter.ts(20,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'void'. +additionOperatorWithTypeParameter.ts(24,14): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'T'. +additionOperatorWithTypeParameter.ts(25,15): error TS2365: Operator '+' cannot be applied to types 'number' and 'T'. +additionOperatorWithTypeParameter.ts(27,15): error TS2365: Operator '+' cannot be applied to types 'Object' and 'T'. +additionOperatorWithTypeParameter.ts(28,15): error TS2365: Operator '+' cannot be applied to types 'E' and 'T'. +additionOperatorWithTypeParameter.ts(29,15): error TS2365: Operator '+' cannot be applied to types 'void' and 'T'. +additionOperatorWithTypeParameter.ts(32,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'null'. +additionOperatorWithTypeParameter.ts(33,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined'. +additionOperatorWithTypeParameter.ts(34,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. +additionOperatorWithTypeParameter.ts(35,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'U'. +additionOperatorWithTypeParameter.ts(36,15): error TS2365: Operator '+' cannot be applied to types 'T' and '() => void'. +additionOperatorWithTypeParameter.ts(37,15): error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined[]'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts (16 errors) ==== +==== additionOperatorWithTypeParameter.ts (16 errors) ==== // type parameter type is not a valid operand of addition operator enum E { a, b } diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.js b/tests/baselines/reference/additionOperatorWithTypeParameter.js index a568f420a32a4..7f321c748aeb0 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts] //// + //// [additionOperatorWithTypeParameter.ts] // type parameter type is not a valid operand of addition operator enum E { a, b } diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.symbols b/tests/baselines/reference/additionOperatorWithTypeParameter.symbols index 6e62ebd01a34c..4b765c129d755 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.symbols +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts] //// + +=== additionOperatorWithTypeParameter.ts === // type parameter type is not a valid operand of addition operator enum E { a, b } >E : Symbol(E, Decl(additionOperatorWithTypeParameter.ts, 0, 0)) diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.types b/tests/baselines/reference/additionOperatorWithTypeParameter.types index da381f776ea49..39cf48485cfbd 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.types +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithTypeParameter.ts] //// + +=== additionOperatorWithTypeParameter.ts === // type parameter type is not a valid operand of addition operator enum E { a, b } >E : E diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 151ad3cc65838..7546a67f9f332 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(11,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(12,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'Object'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(13,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(14,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'Number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'boolean'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(21,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and '{ a: string; }'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'void'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'undefined' and '() => void'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(11,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'boolean'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(12,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'Object'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(13,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'void'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(14,10): error TS2365: Operator '+' cannot be applied to types 'boolean' and 'undefined'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'Object' and 'undefined'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'void'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'Number'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'boolean'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(21,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and '{ a: string; }'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'void'. +additionOperatorWithUndefinedValueAndInvalidOperands.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'undefined' and '() => void'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts (11 errors) ==== +==== additionOperatorWithUndefinedValueAndInvalidOperands.ts (11 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo(): void { return undefined } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js index 98935db2b86e6..755ddc7bc18e3 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts] //// + //// [additionOperatorWithUndefinedValueAndInvalidOperands.ts] // If one operand is the null or undefined value, it is treated as having the type of the other operand. diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols index e11ea41aad69c..0ea20fccc4a65 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts] //// + +=== additionOperatorWithUndefinedValueAndInvalidOperands.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo(): void { return undefined } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types index 00f050b84649e..24228c3182da1 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndInvalidOperands.ts] //// + +=== additionOperatorWithUndefinedValueAndInvalidOperands.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. function foo(): void { return undefined } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt index db2446aa3f9db..36a4ce620cb5a 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'number'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and '1'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'E'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(18,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'E.a'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'E.a'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types '1' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'undefined'. -tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts(24,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'undefined'. +additionOperatorWithUndefinedValueAndValidOperator.ts(15,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'number'. +additionOperatorWithUndefinedValueAndValidOperator.ts(16,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and '1'. +additionOperatorWithUndefinedValueAndValidOperator.ts(17,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'E'. +additionOperatorWithUndefinedValueAndValidOperator.ts(18,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'E.a'. +additionOperatorWithUndefinedValueAndValidOperator.ts(19,10): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'E.a'. +additionOperatorWithUndefinedValueAndValidOperator.ts(20,10): error TS2365: Operator '+' cannot be applied to types 'number' and 'undefined'. +additionOperatorWithUndefinedValueAndValidOperator.ts(21,10): error TS2365: Operator '+' cannot be applied to types '1' and 'undefined'. +additionOperatorWithUndefinedValueAndValidOperator.ts(22,11): error TS2365: Operator '+' cannot be applied to types 'E' and 'undefined'. +additionOperatorWithUndefinedValueAndValidOperator.ts(23,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'undefined'. +additionOperatorWithUndefinedValueAndValidOperator.ts(24,11): error TS2365: Operator '+' cannot be applied to types 'E.a' and 'undefined'. -==== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts (10 errors) ==== +==== additionOperatorWithUndefinedValueAndValidOperator.ts (10 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the other operand. enum E { a, b, c } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js index 68804694449e1..bff58795e7683 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts] //// + //// [additionOperatorWithUndefinedValueAndValidOperator.ts] // If one operand is the null or undefined value, it is treated as having the type of the other operand. diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols index d91dd946c83b6..a45dfe9f559b6 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts] //// + +=== additionOperatorWithUndefinedValueAndValidOperator.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. enum E { a, b, c } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types index 5a49cdeba59af..40707c1910a0e 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndValidOperator.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts === +//// [tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithUndefinedValueAndValidOperator.ts] //// + +=== additionOperatorWithUndefinedValueAndValidOperator.ts === // If one operand is the null or undefined value, it is treated as having the type of the other operand. enum E { a, b, c } diff --git a/tests/baselines/reference/aliasAssignments.errors.txt b/tests/baselines/reference/aliasAssignments.errors.txt index 43d6ea58e5826..23a687c811270 100644 --- a/tests/baselines/reference/aliasAssignments.errors.txt +++ b/tests/baselines/reference/aliasAssignments.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")'. -tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")' is not assignable to type 'number'. +aliasAssignments_1.ts(3,1): error TS2322: Type 'number' is not assignable to type 'typeof import("aliasAssignments_moduleA")'. +aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof import("aliasAssignments_moduleA")' is not assignable to type 'number'. -==== tests/cases/compiler/aliasAssignments_1.ts (2 errors) ==== +==== aliasAssignments_1.ts (2 errors) ==== import moduleA = require("./aliasAssignments_moduleA"); var x = moduleA; x = 1; // Should be error ~ -!!! error TS2322: Type 'number' is not assignable to type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")'. +!!! error TS2322: Type 'number' is not assignable to type 'typeof import("aliasAssignments_moduleA")'. var y = 1; y = moduleA; // should be error ~ -!!! error TS2322: Type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")' is not assignable to type 'number'. +!!! error TS2322: Type 'typeof import("aliasAssignments_moduleA")' is not assignable to type 'number'. -==== tests/cases/compiler/aliasAssignments_moduleA.ts (0 errors) ==== +==== aliasAssignments_moduleA.ts (0 errors) ==== export class someClass { public someData: string; } diff --git a/tests/baselines/reference/aliasAssignments.symbols b/tests/baselines/reference/aliasAssignments.symbols index e5d9594c84721..de5f9425af56d 100644 --- a/tests/baselines/reference/aliasAssignments.symbols +++ b/tests/baselines/reference/aliasAssignments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasAssignments_1.ts === +//// [tests/cases/compiler/aliasAssignments.ts] //// + +=== aliasAssignments_1.ts === import moduleA = require("./aliasAssignments_moduleA"); >moduleA : Symbol(moduleA, Decl(aliasAssignments_1.ts, 0, 0)) @@ -16,7 +18,7 @@ y = moduleA; // should be error >y : Symbol(y, Decl(aliasAssignments_1.ts, 3, 3)) >moduleA : Symbol(moduleA, Decl(aliasAssignments_1.ts, 0, 0)) -=== tests/cases/compiler/aliasAssignments_moduleA.ts === +=== aliasAssignments_moduleA.ts === export class someClass { >someClass : Symbol(someClass, Decl(aliasAssignments_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasAssignments.types b/tests/baselines/reference/aliasAssignments.types index efb36541a4858..2b417efdb07e2 100644 --- a/tests/baselines/reference/aliasAssignments.types +++ b/tests/baselines/reference/aliasAssignments.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasAssignments_1.ts === +//// [tests/cases/compiler/aliasAssignments.ts] //// + +=== aliasAssignments_1.ts === import moduleA = require("./aliasAssignments_moduleA"); >moduleA : typeof moduleA @@ -20,7 +22,7 @@ y = moduleA; // should be error >y : number >moduleA : typeof moduleA -=== tests/cases/compiler/aliasAssignments_moduleA.ts === +=== aliasAssignments_moduleA.ts === export class someClass { >someClass : someClass diff --git a/tests/baselines/reference/aliasBug.errors.txt b/tests/baselines/reference/aliasBug.errors.txt index 70f6409ef21f4..d8842b18de0fc 100644 --- a/tests/baselines/reference/aliasBug.errors.txt +++ b/tests/baselines/reference/aliasBug.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/aliasBug.ts(16,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. +aliasBug.ts(16,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. -==== tests/cases/compiler/aliasBug.ts (1 errors) ==== +==== aliasBug.ts (1 errors) ==== module foo { export class Provide { } diff --git a/tests/baselines/reference/aliasBug.js b/tests/baselines/reference/aliasBug.js index 502bc9e11a715..d811177c674ff 100644 --- a/tests/baselines/reference/aliasBug.js +++ b/tests/baselines/reference/aliasBug.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasBug.ts] //// + //// [aliasBug.ts] module foo { export class Provide { diff --git a/tests/baselines/reference/aliasBug.symbols b/tests/baselines/reference/aliasBug.symbols index 90ff24199d129..af29dc0302820 100644 --- a/tests/baselines/reference/aliasBug.symbols +++ b/tests/baselines/reference/aliasBug.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasBug.ts === +//// [tests/cases/compiler/aliasBug.ts] //// + +=== aliasBug.ts === module foo { >foo : Symbol(foo, Decl(aliasBug.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasBug.types b/tests/baselines/reference/aliasBug.types index 9c4c4982d588a..ed860ce259b7b 100644 --- a/tests/baselines/reference/aliasBug.types +++ b/tests/baselines/reference/aliasBug.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasBug.ts === +//// [tests/cases/compiler/aliasBug.ts] //// + +=== aliasBug.ts === module foo { >foo : typeof foo diff --git a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.errors.txt b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.errors.txt index 38e2c8cfe176a..979e9bf750676 100644 --- a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.errors.txt +++ b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/user.ts(3,5): error TS2322: Type '() => void' is not assignable to type 'string'. -tests/cases/compiler/user.ts(4,5): error TS2322: Type '() => void' is not assignable to type 'string'. +user.ts(3,5): error TS2322: Type '() => void' is not assignable to type 'string'. +user.ts(4,5): error TS2322: Type '() => void' is not assignable to type 'string'. -==== tests/cases/compiler/demo.d.ts (0 errors) ==== +==== demo.d.ts (0 errors) ==== declare namespace demoNS { function f(): void; } @@ -10,7 +10,7 @@ tests/cases/compiler/user.ts(4,5): error TS2322: Type '() => void' is not assign import alias = demoNS; export = alias; } -==== tests/cases/compiler/user.ts (2 errors) ==== +==== user.ts (2 errors) ==== import { f } from 'demoModule'; // Assign an incorrect type here to see the type of 'f'. let x1: string = demoNS.f; diff --git a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols index 912798f4a1b69..36b4575141868 100644 --- a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols +++ b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/demo.d.ts === +//// [tests/cases/compiler/aliasDoesNotDuplicateSignatures.ts] //// + +=== demo.d.ts === declare namespace demoNS { >demoNS : Symbol(demoNS, Decl(demo.d.ts, 0, 0)) @@ -15,7 +17,7 @@ declare module 'demoModule' { export = alias; >alias : Symbol(alias, Decl(demo.d.ts, 3, 29)) } -=== tests/cases/compiler/user.ts === +=== user.ts === import { f } from 'demoModule'; >f : Symbol(f, Decl(user.ts, 0, 8)) diff --git a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.types b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.types index da8e7f3b8b6ea..25802c44b1d1d 100644 --- a/tests/baselines/reference/aliasDoesNotDuplicateSignatures.types +++ b/tests/baselines/reference/aliasDoesNotDuplicateSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/demo.d.ts === +//// [tests/cases/compiler/aliasDoesNotDuplicateSignatures.ts] //// + +=== demo.d.ts === declare namespace demoNS { >demoNS : typeof demoNS @@ -15,7 +17,7 @@ declare module 'demoModule' { export = alias; >alias : typeof alias } -=== tests/cases/compiler/user.ts === +=== user.ts === import { f } from 'demoModule'; >f : () => void diff --git a/tests/baselines/reference/aliasErrors.errors.txt b/tests/baselines/reference/aliasErrors.errors.txt index bb257f5337c9a..5e94cd3c9a710 100644 --- a/tests/baselines/reference/aliasErrors.errors.txt +++ b/tests/baselines/reference/aliasErrors.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/aliasErrors.ts(11,12): error TS2503: Cannot find namespace 'no'. -tests/cases/compiler/aliasErrors.ts(12,13): error TS2503: Cannot find namespace 'no'. -tests/cases/compiler/aliasErrors.ts(13,12): error TS1003: Identifier expected. -tests/cases/compiler/aliasErrors.ts(14,12): error TS1003: Identifier expected. -tests/cases/compiler/aliasErrors.ts(15,12): error TS1359: Identifier expected. 'null' is a reserved word that cannot be used here. -tests/cases/compiler/aliasErrors.ts(16,12): error TS2503: Cannot find namespace 'undefined'. -tests/cases/compiler/aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. +aliasErrors.ts(11,12): error TS2503: Cannot find namespace 'no'. +aliasErrors.ts(12,13): error TS2503: Cannot find namespace 'no'. +aliasErrors.ts(13,12): error TS1003: Identifier expected. +aliasErrors.ts(14,12): error TS1003: Identifier expected. +aliasErrors.ts(15,12): error TS1359: Identifier expected. 'null' is a reserved word that cannot be used here. +aliasErrors.ts(16,12): error TS2503: Cannot find namespace 'undefined'. +aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported member 'bar'. -==== tests/cases/compiler/aliasErrors.ts (7 errors) ==== +==== aliasErrors.ts (7 errors) ==== module foo { export class Provide { } diff --git a/tests/baselines/reference/aliasErrors.js b/tests/baselines/reference/aliasErrors.js index 54edb24fff32d..fc3e4c06ea74c 100644 --- a/tests/baselines/reference/aliasErrors.js +++ b/tests/baselines/reference/aliasErrors.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasErrors.ts] //// + //// [aliasErrors.ts] module foo { export class Provide { diff --git a/tests/baselines/reference/aliasErrors.symbols b/tests/baselines/reference/aliasErrors.symbols index 54eaa07cb8ca3..88ee6f6c6c586 100644 --- a/tests/baselines/reference/aliasErrors.symbols +++ b/tests/baselines/reference/aliasErrors.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasErrors.ts === +//// [tests/cases/compiler/aliasErrors.ts] //// + +=== aliasErrors.ts === module foo { >foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasErrors.types b/tests/baselines/reference/aliasErrors.types index 30cae598d016c..c474d813a29ba 100644 --- a/tests/baselines/reference/aliasErrors.types +++ b/tests/baselines/reference/aliasErrors.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasErrors.ts === +//// [tests/cases/compiler/aliasErrors.ts] //// + +=== aliasErrors.ts === module foo { >foo : typeof foo diff --git a/tests/baselines/reference/aliasInaccessibleModule.js b/tests/baselines/reference/aliasInaccessibleModule.js index d27cac1f8e75f..cc599fd874b88 100644 --- a/tests/baselines/reference/aliasInaccessibleModule.js +++ b/tests/baselines/reference/aliasInaccessibleModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasInaccessibleModule.ts] //// + //// [aliasInaccessibleModule.ts] module M { module N { @@ -12,8 +14,8 @@ var M; //// [aliasInaccessibleModule.d.ts] -declare module M { - module N { +declare namespace M { + namespace N { } export import X = N; export {}; diff --git a/tests/baselines/reference/aliasInaccessibleModule.symbols b/tests/baselines/reference/aliasInaccessibleModule.symbols index d4424e275c958..642fbd88fb8fb 100644 --- a/tests/baselines/reference/aliasInaccessibleModule.symbols +++ b/tests/baselines/reference/aliasInaccessibleModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasInaccessibleModule.ts === +//// [tests/cases/compiler/aliasInaccessibleModule.ts] //// + +=== aliasInaccessibleModule.ts === module M { >M : Symbol(M, Decl(aliasInaccessibleModule.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasInaccessibleModule.types b/tests/baselines/reference/aliasInaccessibleModule.types index 3a16691a0ef44..3f41e04695217 100644 --- a/tests/baselines/reference/aliasInaccessibleModule.types +++ b/tests/baselines/reference/aliasInaccessibleModule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasInaccessibleModule.ts === +//// [tests/cases/compiler/aliasInaccessibleModule.ts] //// + +=== aliasInaccessibleModule.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/aliasInaccessibleModule2.js b/tests/baselines/reference/aliasInaccessibleModule2.js index 89b7e66c96224..71e897b9446de 100644 --- a/tests/baselines/reference/aliasInaccessibleModule2.js +++ b/tests/baselines/reference/aliasInaccessibleModule2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasInaccessibleModule2.ts] //// + //// [aliasInaccessibleModule2.ts] module M { module N { @@ -26,8 +28,8 @@ var M; //// [aliasInaccessibleModule2.d.ts] -declare module M { - module N { +declare namespace M { + namespace N { } import R = N; export import X = R; diff --git a/tests/baselines/reference/aliasInaccessibleModule2.symbols b/tests/baselines/reference/aliasInaccessibleModule2.symbols index b5025845d7365..a45790dfb7474 100644 --- a/tests/baselines/reference/aliasInaccessibleModule2.symbols +++ b/tests/baselines/reference/aliasInaccessibleModule2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasInaccessibleModule2.ts === +//// [tests/cases/compiler/aliasInaccessibleModule2.ts] //// + +=== aliasInaccessibleModule2.ts === module M { >M : Symbol(M, Decl(aliasInaccessibleModule2.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasInaccessibleModule2.types b/tests/baselines/reference/aliasInaccessibleModule2.types index 1ad25ae0cf99f..178cd768d6c8a 100644 --- a/tests/baselines/reference/aliasInaccessibleModule2.types +++ b/tests/baselines/reference/aliasInaccessibleModule2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasInaccessibleModule2.ts === +//// [tests/cases/compiler/aliasInaccessibleModule2.ts] //// + +=== aliasInaccessibleModule2.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js b/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js index 567b75e850241..2c9b4bfc91371 100644 --- a/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js +++ b/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts] //// + //// [aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts] // the type printback for every `test` below should be "y" diff --git a/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.symbols b/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.symbols index 2978901d38595..bfcb9424c408b 100644 --- a/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.symbols +++ b/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts === +//// [tests/cases/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts] //// + +=== aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts === // the type printback for every `test` below should be "y" type ExtendedMapper = (name : string, mixed : HandledInputT, ...args : ArgsT) => OutputT; diff --git a/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.types b/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.types index 8b580c9cb3268..954b7b6f5cd0d 100644 --- a/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.types +++ b/tests/baselines/reference/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts === +//// [tests/cases/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts] //// + +=== aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.ts === // the type printback for every `test` below should be "y" type ExtendedMapper = (name : string, mixed : HandledInputT, ...args : ArgsT) => OutputT; diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt index 66d9eebb3dda6..69493aecadc87 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/aliasOnMergedModuleInterface_1.ts(5,16): error TS2708: Cannot use namespace 'foo' as a value. +aliasOnMergedModuleInterface_1.ts(5,16): error TS2708: Cannot use namespace 'foo' as a value. -==== tests/cases/compiler/aliasOnMergedModuleInterface_1.ts (1 errors) ==== +==== aliasOnMergedModuleInterface_1.ts (1 errors) ==== /// import foo = require("foo") var z: foo; @@ -10,7 +10,7 @@ tests/cases/compiler/aliasOnMergedModuleInterface_1.ts(5,16): error TS2708: Cann ~~~ !!! error TS2708: Cannot use namespace 'foo' as a value. -==== tests/cases/compiler/aliasOnMergedModuleInterface_0.ts (0 errors) ==== +==== aliasOnMergedModuleInterface_0.ts (0 errors) ==== declare module "foo" { module B { diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.symbols b/tests/baselines/reference/aliasOnMergedModuleInterface.symbols index 253c5639f5d0b..3cda351469db7 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.symbols +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasOnMergedModuleInterface_1.ts === +//// [tests/cases/compiler/aliasOnMergedModuleInterface.ts] //// + +=== aliasOnMergedModuleInterface_1.ts === /// import foo = require("foo") >foo : Symbol(foo, Decl(aliasOnMergedModuleInterface_1.ts, 0, 0)) @@ -17,7 +19,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err >foo : Symbol(foo, Decl(aliasOnMergedModuleInterface_1.ts, 0, 0)) >A : Symbol(foo.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14)) -=== tests/cases/compiler/aliasOnMergedModuleInterface_0.ts === +=== aliasOnMergedModuleInterface_0.ts === declare module "foo" >"foo" : Symbol("foo", Decl(aliasOnMergedModuleInterface_0.ts, 0, 0)) { diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.types b/tests/baselines/reference/aliasOnMergedModuleInterface.types index 86ad2d5f2ccd1..f39e5abaca999 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.types +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasOnMergedModuleInterface_1.ts === +//// [tests/cases/compiler/aliasOnMergedModuleInterface.ts] //// + +=== aliasOnMergedModuleInterface_1.ts === /// import foo = require("foo") >foo : any @@ -22,7 +24,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err >bar : any >"hello" : "hello" -=== tests/cases/compiler/aliasOnMergedModuleInterface_0.ts === +=== aliasOnMergedModuleInterface_0.ts === declare module "foo" >"foo" : typeof import("foo") { diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.symbols b/tests/baselines/reference/aliasUsageInAccessorsOfClass.symbols index 45132ea2aa97c..d1d413ac6d15d 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.symbols +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsage1_main.ts === +//// [tests/cases/compiler/aliasUsageInAccessorsOfClass.ts] //// + +=== aliasUsage1_main.ts === import Backbone = require("./aliasUsage1_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsage1_main.ts, 0, 0)) @@ -38,7 +40,7 @@ class C2 { >moduleA : Symbol(moduleA, Decl(aliasUsage1_main.ts, 0, 52)) } } -=== tests/cases/compiler/aliasUsage1_backbone.ts === +=== aliasUsage1_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsage1_backbone.ts, 0, 0)) @@ -46,7 +48,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsage1_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsage1_moduleA.ts === +=== aliasUsage1_moduleA.ts === import Backbone = require("./aliasUsage1_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsage1_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.types b/tests/baselines/reference/aliasUsageInAccessorsOfClass.types index e5dfdfd63660a..a534418a71b58 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.types +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsage1_main.ts === +//// [tests/cases/compiler/aliasUsageInAccessorsOfClass.ts] //// + +=== aliasUsage1_main.ts === import Backbone = require("./aliasUsage1_backbone"); >Backbone : typeof Backbone @@ -36,7 +38,7 @@ class C2 { >moduleA : typeof moduleA } } -=== tests/cases/compiler/aliasUsage1_backbone.ts === +=== aliasUsage1_backbone.ts === export class Model { >Model : Model @@ -44,7 +46,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsage1_moduleA.ts === +=== aliasUsage1_moduleA.ts === import Backbone = require("./aliasUsage1_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInArray.symbols b/tests/baselines/reference/aliasUsageInArray.symbols index 367cd05545a0f..4e51343ab9a78 100644 --- a/tests/baselines/reference/aliasUsageInArray.symbols +++ b/tests/baselines/reference/aliasUsageInArray.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInArray_main.ts === +//// [tests/cases/compiler/aliasUsageInArray.ts] //// + +=== aliasUsageInArray_main.ts === import Backbone = require("./aliasUsageInArray_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInArray_main.ts, 0, 0)) @@ -25,7 +27,7 @@ var xs2: typeof moduleA[] = [moduleA]; >moduleA : Symbol(moduleA, Decl(aliasUsageInArray_main.ts, 0, 58)) >moduleA : Symbol(moduleA, Decl(aliasUsageInArray_main.ts, 0, 58)) -=== tests/cases/compiler/aliasUsageInArray_backbone.ts === +=== aliasUsageInArray_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInArray_backbone.ts, 0, 0)) @@ -33,7 +35,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInArray_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInArray_moduleA.ts === +=== aliasUsageInArray_moduleA.ts === import Backbone = require("./aliasUsageInArray_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInArray_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInArray.types b/tests/baselines/reference/aliasUsageInArray.types index 168bb0cf6f873..ef621c72e2697 100644 --- a/tests/baselines/reference/aliasUsageInArray.types +++ b/tests/baselines/reference/aliasUsageInArray.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInArray_main.ts === +//// [tests/cases/compiler/aliasUsageInArray.ts] //// + +=== aliasUsageInArray_main.ts === import Backbone = require("./aliasUsageInArray_backbone"); >Backbone : typeof Backbone @@ -24,7 +26,7 @@ var xs2: typeof moduleA[] = [moduleA]; >[moduleA] : (typeof moduleA)[] >moduleA : typeof moduleA -=== tests/cases/compiler/aliasUsageInArray_backbone.ts === +=== aliasUsageInArray_backbone.ts === export class Model { >Model : Model @@ -32,7 +34,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInArray_moduleA.ts === +=== aliasUsageInArray_moduleA.ts === import Backbone = require("./aliasUsageInArray_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.symbols b/tests/baselines/reference/aliasUsageInFunctionExpression.symbols index a7a1f5d4593e0..0d4a0a17068c0 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.symbols +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInFunctionExpression_main.ts === +//// [tests/cases/compiler/aliasUsageInFunctionExpression.ts] //// + +=== aliasUsageInFunctionExpression_main.ts === import Backbone = require("./aliasUsageInFunctionExpression_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInFunctionExpression_main.ts, 0, 0)) @@ -25,7 +27,7 @@ f = (x) => moduleA; >x : Symbol(x, Decl(aliasUsageInFunctionExpression_main.ts, 6, 5)) >moduleA : Symbol(moduleA, Decl(aliasUsageInFunctionExpression_main.ts, 0, 71)) -=== tests/cases/compiler/aliasUsageInFunctionExpression_backbone.ts === +=== aliasUsageInFunctionExpression_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 0)) @@ -33,7 +35,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInFunctionExpression_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInFunctionExpression_moduleA.ts === +=== aliasUsageInFunctionExpression_moduleA.ts === import Backbone = require("./aliasUsageInFunctionExpression_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInFunctionExpression_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.types b/tests/baselines/reference/aliasUsageInFunctionExpression.types index df5266e5db07e..5fde45279e6fd 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.types +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInFunctionExpression_main.ts === +//// [tests/cases/compiler/aliasUsageInFunctionExpression.ts] //// + +=== aliasUsageInFunctionExpression_main.ts === import Backbone = require("./aliasUsageInFunctionExpression_backbone"); >Backbone : typeof Backbone @@ -25,7 +27,7 @@ f = (x) => moduleA; >x : IHasVisualizationModel >moduleA : typeof moduleA -=== tests/cases/compiler/aliasUsageInFunctionExpression_backbone.ts === +=== aliasUsageInFunctionExpression_backbone.ts === export class Model { >Model : Model @@ -33,7 +35,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInFunctionExpression_moduleA.ts === +=== aliasUsageInFunctionExpression_moduleA.ts === import Backbone = require("./aliasUsageInFunctionExpression_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.symbols b/tests/baselines/reference/aliasUsageInGenericFunction.symbols index e44059e6907fc..116682b0097fc 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.symbols +++ b/tests/baselines/reference/aliasUsageInGenericFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInGenericFunction_main.ts === +//// [tests/cases/compiler/aliasUsageInGenericFunction.ts] //// + +=== aliasUsageInGenericFunction_main.ts === import Backbone = require("./aliasUsageInGenericFunction_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_main.ts, 0, 0)) @@ -37,7 +39,7 @@ var r2 = foo({ a: null }); >a : Symbol(a, Decl(aliasUsageInGenericFunction_main.ts, 9, 14)) >IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 1, 66)) -=== tests/cases/compiler/aliasUsageInGenericFunction_backbone.ts === +=== aliasUsageInGenericFunction_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0)) @@ -45,7 +47,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInGenericFunction_moduleA.ts === +=== aliasUsageInGenericFunction_moduleA.ts === import Backbone = require("./aliasUsageInGenericFunction_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.types b/tests/baselines/reference/aliasUsageInGenericFunction.types index 93d52ba560566..d52d7404b56ee 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.types +++ b/tests/baselines/reference/aliasUsageInGenericFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInGenericFunction_main.ts === +//// [tests/cases/compiler/aliasUsageInGenericFunction.ts] //// + +=== aliasUsageInGenericFunction_main.ts === import Backbone = require("./aliasUsageInGenericFunction_backbone"); >Backbone : typeof Backbone @@ -36,7 +38,7 @@ var r2 = foo({ a: null }); >a : IHasVisualizationModel >null : IHasVisualizationModel -=== tests/cases/compiler/aliasUsageInGenericFunction_backbone.ts === +=== aliasUsageInGenericFunction_backbone.ts === export class Model { >Model : Model @@ -44,7 +46,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInGenericFunction_moduleA.ts === +=== aliasUsageInGenericFunction_moduleA.ts === import Backbone = require("./aliasUsageInGenericFunction_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.symbols b/tests/baselines/reference/aliasUsageInIndexerOfClass.symbols index 3e13b71ea4f37..da052272c1e8e 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.symbols +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInIndexerOfClass_main.ts === +//// [tests/cases/compiler/aliasUsageInIndexerOfClass.ts] //// + +=== aliasUsageInIndexerOfClass_main.ts === import Backbone = require("./aliasUsageInIndexerOfClass_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInIndexerOfClass_main.ts, 0, 0)) @@ -36,7 +38,7 @@ class N2 { >x : Symbol(N2.x, Decl(aliasUsageInIndexerOfClass_main.ts, 10, 33)) >IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInIndexerOfClass_main.ts, 1, 65)) } -=== tests/cases/compiler/aliasUsageInIndexerOfClass_backbone.ts === +=== aliasUsageInIndexerOfClass_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 0)) @@ -44,7 +46,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInIndexerOfClass_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA.ts === +=== aliasUsageInIndexerOfClass_moduleA.ts === import Backbone = require("./aliasUsageInIndexerOfClass_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInIndexerOfClass_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.types b/tests/baselines/reference/aliasUsageInIndexerOfClass.types index 240fb6cbc1d95..f1d04e4df4007 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.types +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInIndexerOfClass_main.ts === +//// [tests/cases/compiler/aliasUsageInIndexerOfClass.ts] //// + +=== aliasUsageInIndexerOfClass_main.ts === import Backbone = require("./aliasUsageInIndexerOfClass_backbone"); >Backbone : typeof Backbone @@ -32,7 +34,7 @@ class N2 { x: IHasVisualizationModel; >x : IHasVisualizationModel } -=== tests/cases/compiler/aliasUsageInIndexerOfClass_backbone.ts === +=== aliasUsageInIndexerOfClass_backbone.ts === export class Model { >Model : Model @@ -40,7 +42,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInIndexerOfClass_moduleA.ts === +=== aliasUsageInIndexerOfClass_moduleA.ts === import Backbone = require("./aliasUsageInIndexerOfClass_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.symbols b/tests/baselines/reference/aliasUsageInObjectLiteral.symbols index 161617e00036b..85e4e604223c8 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.symbols +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInObjectLiteral_main.ts === +//// [tests/cases/compiler/aliasUsageInObjectLiteral.ts] //// + +=== aliasUsageInObjectLiteral_main.ts === import Backbone = require("./aliasUsageInObjectLiteral_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInObjectLiteral_main.ts, 0, 0)) @@ -37,7 +39,7 @@ var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } }; >z : Symbol(z, Decl(aliasUsageInObjectLiteral_main.ts, 7, 52)) >moduleA : Symbol(moduleA, Decl(aliasUsageInObjectLiteral_main.ts, 0, 66)) -=== tests/cases/compiler/aliasUsageInObjectLiteral_backbone.ts === +=== aliasUsageInObjectLiteral_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 0)) @@ -45,7 +47,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInObjectLiteral_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInObjectLiteral_moduleA.ts === +=== aliasUsageInObjectLiteral_moduleA.ts === import Backbone = require("./aliasUsageInObjectLiteral_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInObjectLiteral_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.types b/tests/baselines/reference/aliasUsageInObjectLiteral.types index 40d4de4b747f5..f523ac40b7f5c 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.types +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInObjectLiteral_main.ts === +//// [tests/cases/compiler/aliasUsageInObjectLiteral.ts] //// + +=== aliasUsageInObjectLiteral_main.ts === import Backbone = require("./aliasUsageInObjectLiteral_backbone"); >Backbone : typeof Backbone @@ -37,7 +39,7 @@ var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } }; >z : typeof moduleA >moduleA : typeof moduleA -=== tests/cases/compiler/aliasUsageInObjectLiteral_backbone.ts === +=== aliasUsageInObjectLiteral_backbone.ts === export class Model { >Model : Model @@ -45,7 +47,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInObjectLiteral_moduleA.ts === +=== aliasUsageInObjectLiteral_moduleA.ts === import Backbone = require("./aliasUsageInObjectLiteral_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInOrExpression.symbols b/tests/baselines/reference/aliasUsageInOrExpression.symbols index 2d9f55ec27458..8c56640fb27a2 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.symbols +++ b/tests/baselines/reference/aliasUsageInOrExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInOrExpression_main.ts === +//// [tests/cases/compiler/aliasUsageInOrExpression.ts] //// + +=== aliasUsageInOrExpression_main.ts === import Backbone = require("./aliasUsageInOrExpression_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInOrExpression_main.ts, 0, 0)) @@ -53,7 +55,7 @@ var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x >x : Symbol(x, Decl(aliasUsageInOrExpression_main.ts, 10, 78)) >moduleA : Symbol(moduleA, Decl(aliasUsageInOrExpression_main.ts, 0, 65)) -=== tests/cases/compiler/aliasUsageInOrExpression_backbone.ts === +=== aliasUsageInOrExpression_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInOrExpression_backbone.ts, 0, 0)) @@ -61,7 +63,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInOrExpression_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInOrExpression_moduleA.ts === +=== aliasUsageInOrExpression_moduleA.ts === import Backbone = require("./aliasUsageInOrExpression_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInOrExpression_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInOrExpression.types b/tests/baselines/reference/aliasUsageInOrExpression.types index 6a0573e8d5cca..53dcc3aeb8a4c 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.types +++ b/tests/baselines/reference/aliasUsageInOrExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInOrExpression_main.ts === +//// [tests/cases/compiler/aliasUsageInOrExpression.ts] //// + +=== aliasUsageInOrExpression_main.ts === import Backbone = require("./aliasUsageInOrExpression_backbone"); >Backbone : typeof Backbone @@ -53,7 +55,7 @@ var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x >x : typeof moduleA >moduleA : typeof moduleA -=== tests/cases/compiler/aliasUsageInOrExpression_backbone.ts === +=== aliasUsageInOrExpression_backbone.ts === export class Model { >Model : Model @@ -61,7 +63,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInOrExpression_moduleA.ts === +=== aliasUsageInOrExpression_moduleA.ts === import Backbone = require("./aliasUsageInOrExpression_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.symbols b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.symbols index 77dbb058371e9..b749c1b763a59 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.symbols +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_main.ts === +//// [tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause.ts] //// + +=== aliasUsageInTypeArgumentOfExtendsClause_main.ts === import Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 0, 0)) @@ -32,7 +34,7 @@ class D extends C { >x : Symbol(D.x, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 8, 43)) >moduleA : Symbol(moduleA, Decl(aliasUsageInTypeArgumentOfExtendsClause_main.ts, 0, 80)) } -=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone.ts === +=== aliasUsageInTypeArgumentOfExtendsClause_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 0)) @@ -40,7 +42,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInTypeArgumentOfExtendsClause_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts === +=== aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts === import Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.types b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.types index 4b3a75435ae5e..f98597059a6f3 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.types +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_main.ts === +//// [tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause.ts] //// + +=== aliasUsageInTypeArgumentOfExtendsClause_main.ts === import Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); >Backbone : typeof Backbone @@ -26,7 +28,7 @@ class D extends C { >x : typeof moduleA >moduleA : typeof moduleA } -=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_backbone.ts === +=== aliasUsageInTypeArgumentOfExtendsClause_backbone.ts === export class Model { >Model : Model @@ -34,7 +36,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts === +=== aliasUsageInTypeArgumentOfExtendsClause_moduleA.ts === import Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.symbols b/tests/baselines/reference/aliasUsageInVarAssignment.symbols index 671cbfc3082b3..75f43602fbc3a 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.symbols +++ b/tests/baselines/reference/aliasUsageInVarAssignment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInVarAssignment_main.ts === +//// [tests/cases/compiler/aliasUsageInVarAssignment.ts] //// + +=== aliasUsageInVarAssignment_main.ts === import Backbone = require("./aliasUsageInVarAssignment_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInVarAssignment_main.ts, 0, 0)) @@ -23,7 +25,7 @@ var m: typeof moduleA = i; >moduleA : Symbol(moduleA, Decl(aliasUsageInVarAssignment_main.ts, 0, 66)) >i : Symbol(i, Decl(aliasUsageInVarAssignment_main.ts, 5, 3)) -=== tests/cases/compiler/aliasUsageInVarAssignment_backbone.ts === +=== aliasUsageInVarAssignment_backbone.ts === export class Model { >Model : Symbol(Model, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 0)) @@ -31,7 +33,7 @@ export class Model { >someData : Symbol(Model.someData, Decl(aliasUsageInVarAssignment_backbone.ts, 0, 20)) } -=== tests/cases/compiler/aliasUsageInVarAssignment_moduleA.ts === +=== aliasUsageInVarAssignment_moduleA.ts === import Backbone = require("./aliasUsageInVarAssignment_backbone"); >Backbone : Symbol(Backbone, Decl(aliasUsageInVarAssignment_moduleA.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.types b/tests/baselines/reference/aliasUsageInVarAssignment.types index 679bd1be14c38..766880a0dc40a 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.types +++ b/tests/baselines/reference/aliasUsageInVarAssignment.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsageInVarAssignment_main.ts === +//// [tests/cases/compiler/aliasUsageInVarAssignment.ts] //// + +=== aliasUsageInVarAssignment_main.ts === import Backbone = require("./aliasUsageInVarAssignment_backbone"); >Backbone : typeof Backbone @@ -20,7 +22,7 @@ var m: typeof moduleA = i; >moduleA : typeof moduleA >i : IHasVisualizationModel -=== tests/cases/compiler/aliasUsageInVarAssignment_backbone.ts === +=== aliasUsageInVarAssignment_backbone.ts === export class Model { >Model : Model @@ -28,7 +30,7 @@ export class Model { >someData : string } -=== tests/cases/compiler/aliasUsageInVarAssignment_moduleA.ts === +=== aliasUsageInVarAssignment_moduleA.ts === import Backbone = require("./aliasUsageInVarAssignment_backbone"); >Backbone : typeof Backbone diff --git a/tests/baselines/reference/aliasUsedAsNameValue.symbols b/tests/baselines/reference/aliasUsedAsNameValue.symbols index 314780eba7cf3..eff54fdc1ff79 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.symbols +++ b/tests/baselines/reference/aliasUsedAsNameValue.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsedAsNameValue_2.ts === +//// [tests/cases/compiler/aliasUsedAsNameValue.ts] //// + +=== aliasUsedAsNameValue_2.ts === /// /// import mod = require("./aliasUsedAsNameValue_0"); @@ -18,11 +20,11 @@ export var a = function () { >mod : Symbol(mod, Decl(aliasUsedAsNameValue_2.ts, 0, 0)) } -=== tests/cases/compiler/aliasUsedAsNameValue_0.ts === +=== aliasUsedAsNameValue_0.ts === export var id: number; >id : Symbol(id, Decl(aliasUsedAsNameValue_0.ts, 0, 10)) -=== tests/cases/compiler/aliasUsedAsNameValue_1.ts === +=== aliasUsedAsNameValue_1.ts === export function b(a: any): any { return null; } >b : Symbol(b, Decl(aliasUsedAsNameValue_1.ts, 0, 0)) >a : Symbol(a, Decl(aliasUsedAsNameValue_1.ts, 0, 18)) diff --git a/tests/baselines/reference/aliasUsedAsNameValue.types b/tests/baselines/reference/aliasUsedAsNameValue.types index 845a00ce69fc4..a6525e7a7892b 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.types +++ b/tests/baselines/reference/aliasUsedAsNameValue.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasUsedAsNameValue_2.ts === +//// [tests/cases/compiler/aliasUsedAsNameValue.ts] //// + +=== aliasUsedAsNameValue_2.ts === /// /// import mod = require("./aliasUsedAsNameValue_0"); @@ -20,11 +22,11 @@ export var a = function () { >mod : typeof mod } -=== tests/cases/compiler/aliasUsedAsNameValue_0.ts === +=== aliasUsedAsNameValue_0.ts === export var id: number; >id : number -=== tests/cases/compiler/aliasUsedAsNameValue_1.ts === +=== aliasUsedAsNameValue_1.ts === export function b(a: any): any { return null; } >b : (a: any) => any >a : any diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt index 1a9d7d26168da..e582f9b2efd59 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts(2,9): error TS2304: Cannot find name 'b'. +aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts(2,9): error TS2304: Cannot find name 'b'. -==== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts (1 errors) ==== +==== aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts (1 errors) ==== import moduleA = require("./aliasWithInterfaceExportAssignmentUsedInVarInitializer_0"); var d = b.q3; ~ !!! error TS2304: Cannot find name 'b'. -==== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts (0 errors) ==== +==== aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts (0 errors) ==== interface c { q3: number; } diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.symbols b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.symbols index 5d4ac0be473c9..8a1afba39b75e 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.symbols +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.symbols @@ -1,11 +1,13 @@ -=== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts === +//// [tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer.ts] //// + +=== aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts === import moduleA = require("./aliasWithInterfaceExportAssignmentUsedInVarInitializer_0"); >moduleA : Symbol(moduleA, Decl(aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts, 0, 0)) var d = b.q3; >d : Symbol(d, Decl(aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts, 1, 3)) -=== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts === +=== aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts === interface c { >c : Symbol(c, Decl(aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.types b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.types index 78c7bf7203a30..b659236a88a2b 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.types +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts === +//// [tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer.ts] //// + +=== aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts === import moduleA = require("./aliasWithInterfaceExportAssignmentUsedInVarInitializer_0"); >moduleA : any @@ -8,7 +10,7 @@ var d = b.q3; >b : any >q3 : any -=== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts === +=== aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts === interface c { q3: number; >q3 : number diff --git a/tests/baselines/reference/aliasesInSystemModule1.errors.txt b/tests/baselines/reference/aliasesInSystemModule1.errors.txt index 26bb962a51caf..cbd259f770a6a 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +aliasesInSystemModule1.ts(1,24): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/aliasesInSystemModule1.ts (1 errors) ==== +==== aliasesInSystemModule1.ts (1 errors) ==== import alias = require('foo'); ~~~~~ !!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? diff --git a/tests/baselines/reference/aliasesInSystemModule1.js b/tests/baselines/reference/aliasesInSystemModule1.js index 468ff805b2dde..aadd403fdd842 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.js +++ b/tests/baselines/reference/aliasesInSystemModule1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasesInSystemModule1.ts] //// + //// [aliasesInSystemModule1.ts] import alias = require('foo'); import cls = alias.Class; diff --git a/tests/baselines/reference/aliasesInSystemModule1.symbols b/tests/baselines/reference/aliasesInSystemModule1.symbols index fe5f4a550a60b..d776b86b271ad 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.symbols +++ b/tests/baselines/reference/aliasesInSystemModule1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasesInSystemModule1.ts === +//// [tests/cases/compiler/aliasesInSystemModule1.ts] //// + +=== aliasesInSystemModule1.ts === import alias = require('foo'); >alias : Symbol(alias, Decl(aliasesInSystemModule1.ts, 0, 0)) diff --git a/tests/baselines/reference/aliasesInSystemModule1.types b/tests/baselines/reference/aliasesInSystemModule1.types index 14ed376f20b98..e65125f13a223 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.types +++ b/tests/baselines/reference/aliasesInSystemModule1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasesInSystemModule1.ts === +//// [tests/cases/compiler/aliasesInSystemModule1.ts] //// + +=== aliasesInSystemModule1.ts === import alias = require('foo'); >alias : any diff --git a/tests/baselines/reference/aliasesInSystemModule2.errors.txt b/tests/baselines/reference/aliasesInSystemModule2.errors.txt index d6066dd2e0cc0..e484e65dd8a43 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +aliasesInSystemModule2.ts(1,21): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/aliasesInSystemModule2.ts (1 errors) ==== +==== aliasesInSystemModule2.ts (1 errors) ==== import {alias} from "foo"; ~~~~~ !!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? diff --git a/tests/baselines/reference/aliasesInSystemModule2.js b/tests/baselines/reference/aliasesInSystemModule2.js index af7208d5c99ec..787c999e03e48 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.js +++ b/tests/baselines/reference/aliasesInSystemModule2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/aliasesInSystemModule2.ts] //// + //// [aliasesInSystemModule2.ts] import {alias} from "foo"; import cls = alias.Class; diff --git a/tests/baselines/reference/aliasesInSystemModule2.symbols b/tests/baselines/reference/aliasesInSystemModule2.symbols index c40b025710468..b664cba3db0d0 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.symbols +++ b/tests/baselines/reference/aliasesInSystemModule2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasesInSystemModule2.ts === +//// [tests/cases/compiler/aliasesInSystemModule2.ts] //// + +=== aliasesInSystemModule2.ts === import {alias} from "foo"; >alias : Symbol(alias, Decl(aliasesInSystemModule2.ts, 0, 8)) diff --git a/tests/baselines/reference/aliasesInSystemModule2.types b/tests/baselines/reference/aliasesInSystemModule2.types index 1000972122257..6138515cd4adb 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.types +++ b/tests/baselines/reference/aliasesInSystemModule2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/aliasesInSystemModule2.ts === +//// [tests/cases/compiler/aliasesInSystemModule2.ts] //// + +=== aliasesInSystemModule2.ts === import {alias} from "foo"; >alias : any diff --git a/tests/baselines/reference/allowImportClausesToMergeWithTypes.errors.txt b/tests/baselines/reference/allowImportClausesToMergeWithTypes.errors.txt index 864ac1e6335bc..6332efd83cfd8 100644 --- a/tests/baselines/reference/allowImportClausesToMergeWithTypes.errors.txt +++ b/tests/baselines/reference/allowImportClausesToMergeWithTypes.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/index.ts(9,10): error TS2749: 'originalZZZ' refers to a value, but is being used as a type here. Did you mean 'typeof originalZZZ'? +index.ts(9,10): error TS2749: 'originalZZZ' refers to a value, but is being used as a type here. Did you mean 'typeof originalZZZ'? -==== tests/cases/compiler/b.ts (0 errors) ==== +==== b.ts (0 errors) ==== export const zzz = 123; export default zzz; -==== tests/cases/compiler/a.ts (0 errors) ==== +==== a.ts (0 errors) ==== export default interface zzz { x: string; } @@ -17,7 +17,7 @@ tests/cases/compiler/index.ts(9,10): error TS2749: 'originalZZZ' refers to a val export { zzz as default }; -==== tests/cases/compiler/index.ts (1 errors) ==== +==== index.ts (1 errors) ==== import zzz from "./a"; const x: zzz = { x: "" }; diff --git a/tests/baselines/reference/allowImportClausesToMergeWithTypes.symbols b/tests/baselines/reference/allowImportClausesToMergeWithTypes.symbols index af6bdfccb99cb..d54c3fda88ece 100644 --- a/tests/baselines/reference/allowImportClausesToMergeWithTypes.symbols +++ b/tests/baselines/reference/allowImportClausesToMergeWithTypes.symbols @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.ts === +//// [tests/cases/compiler/allowImportClausesToMergeWithTypes.ts] //// + +=== b.ts === export const zzz = 123; >zzz : Symbol(zzz, Decl(b.ts, 0, 12)) export default zzz; >zzz : Symbol(zzz, Decl(b.ts, 0, 12)) -=== tests/cases/compiler/a.ts === +=== a.ts === export default interface zzz { >zzz : Symbol(zzz, Decl(a.ts, 0, 0), Decl(a.ts, 9, 8)) @@ -28,7 +30,7 @@ export { zzz as default }; >zzz : Symbol(zzz, Decl(a.ts, 0, 0), Decl(a.ts, 4, 6)) >default : Symbol(zzz, Decl(a.ts, 0, 0), Decl(a.ts, 9, 8)) -=== tests/cases/compiler/index.ts === +=== index.ts === import zzz from "./a"; >zzz : Symbol(zzz, Decl(index.ts, 0, 6)) diff --git a/tests/baselines/reference/allowImportClausesToMergeWithTypes.types b/tests/baselines/reference/allowImportClausesToMergeWithTypes.types index 1848fcb9fe52b..1cbd992fc0644 100644 --- a/tests/baselines/reference/allowImportClausesToMergeWithTypes.types +++ b/tests/baselines/reference/allowImportClausesToMergeWithTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.ts === +//// [tests/cases/compiler/allowImportClausesToMergeWithTypes.ts] //// + +=== b.ts === export const zzz = 123; >zzz : 123 >123 : 123 @@ -6,7 +8,7 @@ export const zzz = 123; export default zzz; >zzz : 123 -=== tests/cases/compiler/a.ts === +=== a.ts === export default interface zzz { x: string; >x : string @@ -28,7 +30,7 @@ export { zzz as default }; >zzz : 123 >default : 123 -=== tests/cases/compiler/index.ts === +=== index.ts === import zzz from "./a"; >zzz : 123 diff --git a/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=node16).errors.txt b/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=node16).errors.txt index 755f0d6eebda9..ceabedf3fbace 100644 --- a/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=node16).errors.txt +++ b/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=node16).errors.txt @@ -1,6 +1,8 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations. +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. ==== /ts.ts (0 errors) ==== export {}; diff --git a/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt b/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt index 755f0d6eebda9..8ddb7869e9e07 100644 --- a/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt +++ b/tests/baselines/reference/allowImportingTsExtensions(moduleresolution=nodenext).errors.txt @@ -1,6 +1,8 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. /c.ts(1,16): error TS2307: Cannot find module './thisfiledoesnotexist.ts' or its corresponding type declarations. +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. ==== /ts.ts (0 errors) ==== export {}; diff --git a/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt new file mode 100644 index 0000000000000..28178a4108074 --- /dev/null +++ b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=node16).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000000..568b93c852e25 --- /dev/null +++ b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=false,moduleresolution=nodenext).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt new file mode 100644 index 0000000000000..28178a4108074 --- /dev/null +++ b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=node16).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. + + +!!! error TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt new file mode 100644 index 0000000000000..568b93c852e25 --- /dev/null +++ b/tests/baselines/reference/allowImportingTypesDtsExtension(allowimportingtsextensions=true,moduleresolution=nodenext).errors.txt @@ -0,0 +1,19 @@ +error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. + + +!!! error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'. +==== /types.d.ts (0 errors) ==== + export declare type User = { + name: string; + } + +==== /a.ts (0 errors) ==== + import type { User } from "./types.d.ts"; + export type { User } from "./types.d.ts"; + + export const user: User = { name: "John" }; + + export function getUser(): import("./types.d.ts").User { + return user; + } + \ No newline at end of file diff --git a/tests/baselines/reference/allowJsClassThisTypeCrash.symbols b/tests/baselines/reference/allowJsClassThisTypeCrash.symbols index 2f72ed43e2266..769ca4bef70b8 100644 --- a/tests/baselines/reference/allowJsClassThisTypeCrash.symbols +++ b/tests/baselines/reference/allowJsClassThisTypeCrash.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/app.js === +//// [tests/cases/compiler/allowJsClassThisTypeCrash.ts] //// + +=== app.js === const f = function() {}; >f : Symbol(f, Decl(app.js, 0, 5)) diff --git a/tests/baselines/reference/allowJsClassThisTypeCrash.types b/tests/baselines/reference/allowJsClassThisTypeCrash.types index 7c136950f3d69..4ace4176830bc 100644 --- a/tests/baselines/reference/allowJsClassThisTypeCrash.types +++ b/tests/baselines/reference/allowJsClassThisTypeCrash.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/app.js === +//// [tests/cases/compiler/allowJsClassThisTypeCrash.ts] //// + +=== app.js === const f = function() {}; >f : () => void >function() {} : () => void diff --git a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt index b3a3e81fea162..a89b8c2068887 100644 --- a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt +++ b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/app.js(6,7): error TS2322: Type 'number' is not assignable to type 'WatchHandler'. +app.js(6,7): error TS2322: Type 'number' is not assignable to type 'WatchHandler'. -==== tests/cases/compiler/func.ts (0 errors) ==== +==== func.ts (0 errors) ==== interface ComponentOptions { watch: Record>; } type WatchHandler = (val: T) => void; declare function extend(options: ComponentOptions<{}>): void; export var vextend = extend; -==== tests/cases/compiler/app.js (1 errors) ==== +==== app.js (1 errors) ==== import {vextend} from './func'; // hover on vextend export var a = vextend({ diff --git a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.symbols b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.symbols index 0926d38c1c457..bf2bef8cf58ee 100644 --- a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.symbols +++ b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/func.ts === +//// [tests/cases/compiler/allowJscheckJsTypeParameterNoCrash.ts] //// + +=== func.ts === interface ComponentOptions { >ComponentOptions : Symbol(ComponentOptions, Decl(func.ts, 0, 0)) >V : Symbol(V, Decl(func.ts, 0, 27)) @@ -23,7 +25,7 @@ export var vextend = extend; >vextend : Symbol(vextend, Decl(func.ts, 5, 10)) >extend : Symbol(extend, Decl(func.ts, 3, 40)) -=== tests/cases/compiler/app.js === +=== app.js === import {vextend} from './func'; >vextend : Symbol(vextend, Decl(app.js, 0, 8)) diff --git a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.types b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.types index 0d8afb198d9b9..ad91934fc0402 100644 --- a/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.types +++ b/tests/baselines/reference/allowJscheckJsTypeParameterNoCrash.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/func.ts === +//// [tests/cases/compiler/allowJscheckJsTypeParameterNoCrash.ts] //// + +=== func.ts === interface ComponentOptions { watch: Record>; >watch : Record> @@ -15,7 +17,7 @@ export var vextend = extend; >vextend : (options: ComponentOptions<{}>) => void >extend : (options: ComponentOptions<{}>) => void -=== tests/cases/compiler/app.js === +=== app.js === import {vextend} from './func'; >vextend : (options: ComponentOptions<{}>) => void diff --git a/tests/baselines/reference/allowSyntheticDefaultImports1.symbols b/tests/baselines/reference/allowSyntheticDefaultImports1.symbols index 5ee2812ab59c6..09a70f450d515 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports1.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports1.ts] //// + +=== a.ts === import Namespace from "./b"; >Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) @@ -8,7 +10,7 @@ export var x = new Namespace.Foo(); >Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) >Foo : Symbol(Namespace.Foo, Decl(b.d.ts, 0, 0)) -=== tests/cases/compiler/b.d.ts === +=== b.d.ts === export class Foo { >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports1.types b/tests/baselines/reference/allowSyntheticDefaultImports1.types index c8092331a4784..e270b599a2b66 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports1.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports1.ts] //// + +=== a.ts === import Namespace from "./b"; >Namespace : typeof Namespace @@ -9,7 +11,7 @@ export var x = new Namespace.Foo(); >Namespace : typeof Namespace >Foo : typeof Namespace.Foo -=== tests/cases/compiler/b.d.ts === +=== b.d.ts === export class Foo { >Foo : Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImports10.errors.txt b/tests/baselines/reference/allowSyntheticDefaultImports10.errors.txt index b03fd005547ec..601d677df4394 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports10.errors.txt +++ b/tests/baselines/reference/allowSyntheticDefaultImports10.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/a.ts(2,5): error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'. -tests/cases/compiler/a.ts(3,5): error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'. +a.ts(2,5): error TS2339: Property 'default' does not exist on type 'typeof import("b")'. +a.ts(3,5): error TS2339: Property 'default' does not exist on type 'typeof import("b")'. -==== tests/cases/compiler/a.ts (2 errors) ==== +==== a.ts (2 errors) ==== import Foo = require("./b"); Foo.default.bar(); ~~~~~~~ -!!! error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'. +!!! error TS2339: Property 'default' does not exist on type 'typeof import("b")'. Foo.default.default.foo(); ~~~~~~~ -!!! error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'. -==== tests/cases/compiler/b.d.ts (0 errors) ==== +!!! error TS2339: Property 'default' does not exist on type 'typeof import("b")'. +==== b.d.ts (0 errors) ==== export function foo(); export function bar(); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports10.symbols b/tests/baselines/reference/allowSyntheticDefaultImports10.symbols index 5c079cd8f74f8..4df8c6b52ae2b 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports10.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports10.ts] //// + +=== a.ts === import Foo = require("./b"); >Foo : Symbol(Foo, Decl(a.ts, 0, 0)) @@ -8,7 +10,7 @@ Foo.default.bar(); Foo.default.default.foo(); >Foo : Symbol(Foo, Decl(a.ts, 0, 0)) -=== tests/cases/compiler/b.d.ts === +=== b.d.ts === export function foo(); >foo : Symbol(foo, Decl(b.d.ts, 0, 0)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports10.types b/tests/baselines/reference/allowSyntheticDefaultImports10.types index 3262dfd66b740..6dfbaf896225d 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports10.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports10.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports10.ts] //// + +=== a.ts === import Foo = require("./b"); >Foo : typeof Foo @@ -20,7 +22,7 @@ Foo.default.default.foo(); >default : any >foo : any -=== tests/cases/compiler/b.d.ts === +=== b.d.ts === export function foo(); >foo : () => any diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.symbols b/tests/baselines/reference/allowSyntheticDefaultImports2.symbols index a2b33c94d82a5..1c76ba2db984a 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports2.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports2.ts] //// + +=== a.ts === import Namespace from "./b"; >Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) @@ -8,7 +10,7 @@ export var x = new Namespace.Foo(); >Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) >Foo : Symbol(Namespace.Foo, Decl(b.d.ts, 0, 0)) -=== tests/cases/compiler/b.d.ts === +=== b.d.ts === export class Foo { >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.types b/tests/baselines/reference/allowSyntheticDefaultImports2.types index 420c19b7c1dd7..41368bdb2e4d9 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports2.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports2.ts] //// + +=== a.ts === import Namespace from "./b"; >Namespace : typeof Namespace @@ -9,7 +11,7 @@ export var x = new Namespace.Foo(); >Namespace : typeof Namespace >Foo : typeof Namespace.Foo -=== tests/cases/compiler/b.d.ts === +=== b.d.ts === export class Foo { >Foo : Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt b/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt index 551355e5cce06..127332623a9e8 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/a.ts(1,8): error TS1192: Module '"tests/cases/compiler/b"' has no default export. +a.ts(1,8): error TS1192: Module '"b"' has no default export. -==== tests/cases/compiler/a.ts (1 errors) ==== +==== a.ts (1 errors) ==== import Namespace from "./b"; ~~~~~~~~~ -!!! error TS1192: Module '"tests/cases/compiler/b"' has no default export. +!!! error TS1192: Module '"b"' has no default export. export var x = new Namespace.Foo(); -==== tests/cases/compiler/b.ts (0 errors) ==== +==== b.ts (0 errors) ==== export class Foo { member: string; } diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.symbols b/tests/baselines/reference/allowSyntheticDefaultImports3.symbols index 4d5add178c8e0..69183b2f808b1 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports3.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports3.ts] //// + +=== a.ts === import Namespace from "./b"; >Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) @@ -6,7 +8,7 @@ export var x = new Namespace.Foo(); >x : Symbol(x, Decl(a.ts, 1, 10)) >Namespace : Symbol(Namespace, Decl(a.ts, 0, 6)) -=== tests/cases/compiler/b.ts === +=== b.ts === export class Foo { >Foo : Symbol(Foo, Decl(b.ts, 0, 0)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.types b/tests/baselines/reference/allowSyntheticDefaultImports3.types index e7af1777f16f0..23169ce294bd6 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports3.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports3.ts] //// + +=== a.ts === import Namespace from "./b"; >Namespace : any @@ -9,7 +11,7 @@ export var x = new Namespace.Foo(); >Namespace : any >Foo : any -=== tests/cases/compiler/b.ts === +=== b.ts === export class Foo { >Foo : Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImports4.symbols b/tests/baselines/reference/allowSyntheticDefaultImports4.symbols index 22887d48bd9cf..2d02d479bb360 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports4.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports4.ts] //// + +=== b.d.ts === declare class Foo { >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) @@ -8,7 +10,7 @@ declare class Foo { export = Foo; >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) -=== tests/cases/compiler/a.ts === +=== a.ts === import Foo from "./b"; >Foo : Symbol(Foo, Decl(a.ts, 0, 6)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports4.types b/tests/baselines/reference/allowSyntheticDefaultImports4.types index 5922abeb43f77..2ce04ddd64f72 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports4.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports4.ts] //// + +=== b.d.ts === declare class Foo { >Foo : Foo @@ -8,7 +10,7 @@ declare class Foo { export = Foo; >Foo : Foo -=== tests/cases/compiler/a.ts === +=== a.ts === import Foo from "./b"; >Foo : typeof Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.symbols b/tests/baselines/reference/allowSyntheticDefaultImports5.symbols index 22887d48bd9cf..49957dd753d27 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports5.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports5.ts] //// + +=== b.d.ts === declare class Foo { >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) @@ -8,7 +10,7 @@ declare class Foo { export = Foo; >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) -=== tests/cases/compiler/a.ts === +=== a.ts === import Foo from "./b"; >Foo : Symbol(Foo, Decl(a.ts, 0, 6)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.types b/tests/baselines/reference/allowSyntheticDefaultImports5.types index 5922abeb43f77..3d228d66b1b4b 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports5.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports5.ts] //// + +=== b.d.ts === declare class Foo { >Foo : Foo @@ -8,7 +10,7 @@ declare class Foo { export = Foo; >Foo : Foo -=== tests/cases/compiler/a.ts === +=== a.ts === import Foo from "./b"; >Foo : typeof Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt b/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt index fedd9b350ff9f..e464ac761f0c3 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/a.ts(1,8): error TS1259: Module '"tests/cases/compiler/b"' can only be default-imported using the 'esModuleInterop' flag +a.ts(1,8): error TS1259: Module '"b"' can only be default-imported using the 'esModuleInterop' flag -==== tests/cases/compiler/b.d.ts (0 errors) ==== +==== b.d.ts (0 errors) ==== declare class Foo { member: string; } export = Foo; -==== tests/cases/compiler/a.ts (1 errors) ==== +==== a.ts (1 errors) ==== import Foo from "./b"; ~~~ -!!! error TS1259: Module '"tests/cases/compiler/b"' can only be default-imported using the 'esModuleInterop' flag -!!! related TS2594 tests/cases/compiler/b.d.ts:4:1: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. +!!! error TS1259: Module '"b"' can only be default-imported using the 'esModuleInterop' flag +!!! related TS2594 b.d.ts:4:1: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. export var x = new Foo(); \ No newline at end of file diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.symbols b/tests/baselines/reference/allowSyntheticDefaultImports6.symbols index 22887d48bd9cf..708de387d5137 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports6.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports6.ts] //// + +=== b.d.ts === declare class Foo { >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) @@ -8,7 +10,7 @@ declare class Foo { export = Foo; >Foo : Symbol(Foo, Decl(b.d.ts, 0, 0)) -=== tests/cases/compiler/a.ts === +=== a.ts === import Foo from "./b"; >Foo : Symbol(Foo, Decl(a.ts, 0, 6)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.types b/tests/baselines/reference/allowSyntheticDefaultImports6.types index 8a70a0eef8c8e..76b9439c3ec43 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports6.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports6.ts] //// + +=== b.d.ts === declare class Foo { >Foo : Foo @@ -8,7 +10,7 @@ declare class Foo { export = Foo; >Foo : Foo -=== tests/cases/compiler/a.ts === +=== a.ts === import Foo from "./b"; >Foo : any diff --git a/tests/baselines/reference/allowSyntheticDefaultImports7.symbols b/tests/baselines/reference/allowSyntheticDefaultImports7.symbols index f89304251127d..527f04c7de690 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports7.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports7.symbols @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports7.ts] //// + +=== b.d.ts === export function foo(); >foo : Symbol(foo, Decl(b.d.ts, 0, 0)) export function bar(); >bar : Symbol(bar, Decl(b.d.ts, 0, 22)) -=== tests/cases/compiler/a.ts === +=== a.ts === import { default as Foo } from "./b"; >default : Symbol(Foo, Decl(b.d.ts, 0, 0)) >Foo : Symbol(Foo, Decl(a.ts, 0, 8)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports7.types b/tests/baselines/reference/allowSyntheticDefaultImports7.types index 69ce39e6dc6e6..a40ef4819056f 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports7.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports7.types @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports7.ts] //// + +=== b.d.ts === export function foo(); >foo : () => any export function bar(); >bar : () => any -=== tests/cases/compiler/a.ts === +=== a.ts === import { default as Foo } from "./b"; >default : typeof Foo >Foo : typeof Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImports8.errors.txt b/tests/baselines/reference/allowSyntheticDefaultImports8.errors.txt index ea5a7ddf30e7b..4b35802264116 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports8.errors.txt +++ b/tests/baselines/reference/allowSyntheticDefaultImports8.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/a.ts(1,10): error TS2305: Module '"./b"' has no exported member 'default'. +a.ts(1,10): error TS2305: Module '"./b"' has no exported member 'default'. -==== tests/cases/compiler/b.d.ts (0 errors) ==== +==== b.d.ts (0 errors) ==== export function foo(); export function bar(); -==== tests/cases/compiler/a.ts (1 errors) ==== +==== a.ts (1 errors) ==== import { default as Foo } from "./b"; ~~~~~~~ !!! error TS2305: Module '"./b"' has no exported member 'default'. diff --git a/tests/baselines/reference/allowSyntheticDefaultImports8.symbols b/tests/baselines/reference/allowSyntheticDefaultImports8.symbols index bd55792c1ec6d..2d1277b09db40 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports8.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports8.symbols @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports8.ts] //// + +=== b.d.ts === export function foo(); >foo : Symbol(foo, Decl(b.d.ts, 0, 0)) export function bar(); >bar : Symbol(bar, Decl(b.d.ts, 0, 22)) -=== tests/cases/compiler/a.ts === +=== a.ts === import { default as Foo } from "./b"; >Foo : Symbol(Foo, Decl(a.ts, 0, 8)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports8.types b/tests/baselines/reference/allowSyntheticDefaultImports8.types index 38d2c03fba9bc..b3b156c89c865 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports8.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports8.types @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports8.ts] //// + +=== b.d.ts === export function foo(); >foo : () => any export function bar(); >bar : () => any -=== tests/cases/compiler/a.ts === +=== a.ts === import { default as Foo } from "./b"; >default : any >Foo : any diff --git a/tests/baselines/reference/allowSyntheticDefaultImports9.symbols b/tests/baselines/reference/allowSyntheticDefaultImports9.symbols index f89304251127d..42ffded75e012 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports9.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImports9.symbols @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports9.ts] //// + +=== b.d.ts === export function foo(); >foo : Symbol(foo, Decl(b.d.ts, 0, 0)) export function bar(); >bar : Symbol(bar, Decl(b.d.ts, 0, 22)) -=== tests/cases/compiler/a.ts === +=== a.ts === import { default as Foo } from "./b"; >default : Symbol(Foo, Decl(b.d.ts, 0, 0)) >Foo : Symbol(Foo, Decl(a.ts, 0, 8)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImports9.types b/tests/baselines/reference/allowSyntheticDefaultImports9.types index 69ce39e6dc6e6..1eeb43985f1be 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports9.types +++ b/tests/baselines/reference/allowSyntheticDefaultImports9.types @@ -1,11 +1,13 @@ -=== tests/cases/compiler/b.d.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImports9.ts] //// + +=== b.d.ts === export function foo(); >foo : () => any export function bar(); >bar : () => any -=== tests/cases/compiler/a.ts === +=== a.ts === import { default as Foo } from "./b"; >default : typeof Foo >Foo : typeof Foo diff --git a/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.symbols b/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.symbols index 4b1cd3b370ed1..9b54a930b6e62 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.symbols +++ b/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/color.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.ts] //// + +=== color.ts === interface Color { >Color : Symbol(Color, Decl(color.ts, 0, 0)) @@ -8,7 +10,7 @@ interface Color { export default Color; >Color : Symbol(Color, Decl(color.ts, 0, 0)) -=== tests/cases/compiler/file1.ts === +=== file1.ts === import Color from "./color"; >Color : Symbol(Color, Decl(file1.ts, 0, 6)) @@ -16,7 +18,7 @@ export declare function styled(): Color; >styled : Symbol(styled, Decl(file1.ts, 0, 28)) >Color : Symbol(Color, Decl(file1.ts, 0, 6)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === import { styled } from "./file1"; >styled : Symbol(styled, Decl(file2.ts, 0, 8)) diff --git a/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.types b/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.types index a13afabff371f..0c816c7b0301d 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.types +++ b/tests/baselines/reference/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/color.ts === +//// [tests/cases/compiler/allowSyntheticDefaultImportsCanPaintCrossModuleDeclaration.ts] //// + +=== color.ts === interface Color { c: string; >c : string @@ -6,19 +8,19 @@ interface Color { export default Color; >Color : Color -=== tests/cases/compiler/file1.ts === +=== file1.ts === import Color from "./color"; >Color : any export declare function styled(): Color; >styled : () => Color -=== tests/cases/compiler/file2.ts === +=== file2.ts === import { styled } from "./file1"; ->styled : () => import("tests/cases/compiler/color").default +>styled : () => import("color").default export const A = styled(); ->A : import("tests/cases/compiler/color").default ->styled() : import("tests/cases/compiler/color").default ->styled : () => import("tests/cases/compiler/color").default +>A : import("color").default +>styled() : import("color").default +>styled : () => import("color").default diff --git a/tests/baselines/reference/allowsImportingTsExtension.errors.txt b/tests/baselines/reference/allowsImportingTsExtension.errors.txt new file mode 100644 index 0000000000000..d66055353d5da --- /dev/null +++ b/tests/baselines/reference/allowsImportingTsExtension.errors.txt @@ -0,0 +1,40 @@ +b.ts(2,16): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. +b.ts(3,30): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. +b.ts(5,25): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. +c.ts(2,16): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? +c.ts(3,30): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? +c.ts(5,25): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? + + +==== a.ts (0 errors) ==== + export class A {} + +==== a.d.ts (0 errors) ==== + export class A {} + +==== b.ts (3 errors) ==== + import type { A } from "./a.ts"; // ok + import {} from "./a.ts"; // error + ~~~~~~~~ +!!! error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. + import { type A as _A } from "./a.ts"; // error + ~~~~~~~~ +!!! error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. + type __A = import("./a.ts").A; // ok + const aPromise = import("./a.ts"); // error + ~~~~~~~~ +!!! error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled. + +==== c.ts (3 errors) ==== + import type { A } from "./a.d.ts"; // ok + import {} from "./a.d.ts"; // error + ~~~~~~~~~~ +!!! error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? + import { type A as _A } from "./a.d.ts"; // error + ~~~~~~~~~~ +!!! error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? + type __A = import("./a.d.ts").A; // ok + const aPromise = import("./a.d.ts"); // error + ~~~~~~~~~~ +!!! error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './a.js' instead? + \ No newline at end of file diff --git a/tests/baselines/reference/allowsImportingTsExtension.js b/tests/baselines/reference/allowsImportingTsExtension.js new file mode 100644 index 0000000000000..1eab22395c687 --- /dev/null +++ b/tests/baselines/reference/allowsImportingTsExtension.js @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/externalModules/typeOnly/allowsImportingTsExtension.ts] //// + +//// [a.ts] +export class A {} + +//// [a.d.ts] +export class A {} + +//// [b.ts] +import type { A } from "./a.ts"; // ok +import {} from "./a.ts"; // error +import { type A as _A } from "./a.ts"; // error +type __A = import("./a.ts").A; // ok +const aPromise = import("./a.ts"); // error + +//// [c.ts] +import type { A } from "./a.d.ts"; // ok +import {} from "./a.d.ts"; // error +import { type A as _A } from "./a.d.ts"; // error +type __A = import("./a.d.ts").A; // ok +const aPromise = import("./a.d.ts"); // error + + +//// [a.js] +export class A { +} +//// [b.js] +const aPromise = import("./a.ts"); // error +export {}; +//// [c.js] +const aPromise = import("./a.d.ts"); // error +export {}; diff --git a/tests/baselines/reference/allowsImportingTsExtension.symbols b/tests/baselines/reference/allowsImportingTsExtension.symbols new file mode 100644 index 0000000000000..a08e00fcf5407 --- /dev/null +++ b/tests/baselines/reference/allowsImportingTsExtension.symbols @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/externalModules/typeOnly/allowsImportingTsExtension.ts] //// + +=== a.ts === +export class A {} +>A : Symbol(A, Decl(a.ts, 0, 0)) + +=== a.d.ts === +export class A {} +>A : Symbol(A, Decl(a.d.ts, 0, 0)) + +=== b.ts === +import type { A } from "./a.ts"; // ok +>A : Symbol(A, Decl(b.ts, 0, 13)) + +import {} from "./a.ts"; // error +import { type A as _A } from "./a.ts"; // error +>A : Symbol(A, Decl(a.ts, 0, 0)) +>_A : Symbol(_A, Decl(b.ts, 2, 8)) + +type __A = import("./a.ts").A; // ok +>__A : Symbol(__A, Decl(b.ts, 2, 38)) +>A : Symbol(A, Decl(a.ts, 0, 0)) + +const aPromise = import("./a.ts"); // error +>aPromise : Symbol(aPromise, Decl(b.ts, 4, 5)) +>"./a.ts" : Symbol("a", Decl(a.ts, 0, 0)) + +=== c.ts === +import type { A } from "./a.d.ts"; // ok +>A : Symbol(A, Decl(c.ts, 0, 13)) + +import {} from "./a.d.ts"; // error +import { type A as _A } from "./a.d.ts"; // error +>A : Symbol(A, Decl(a.ts, 0, 0)) +>_A : Symbol(_A, Decl(c.ts, 2, 8)) + +type __A = import("./a.d.ts").A; // ok +>__A : Symbol(__A, Decl(c.ts, 2, 40)) +>A : Symbol(A, Decl(a.ts, 0, 0)) + +const aPromise = import("./a.d.ts"); // error +>aPromise : Symbol(aPromise, Decl(c.ts, 4, 5)) +>"./a.d.ts" : Symbol("a", Decl(a.ts, 0, 0)) + diff --git a/tests/baselines/reference/allowsImportingTsExtension.types b/tests/baselines/reference/allowsImportingTsExtension.types new file mode 100644 index 0000000000000..5bb9a4172f680 --- /dev/null +++ b/tests/baselines/reference/allowsImportingTsExtension.types @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/externalModules/typeOnly/allowsImportingTsExtension.ts] //// + +=== a.ts === +export class A {} +>A : A + +=== a.d.ts === +export class A {} +>A : A + +=== b.ts === +import type { A } from "./a.ts"; // ok +>A : A + +import {} from "./a.ts"; // error +import { type A as _A } from "./a.ts"; // error +>A : typeof A +>_A : typeof A + +type __A = import("./a.ts").A; // ok +>__A : A + +const aPromise = import("./a.ts"); // error +>aPromise : Promise +>import("./a.ts") : Promise +>"./a.ts" : "./a.ts" + +=== c.ts === +import type { A } from "./a.d.ts"; // ok +>A : A + +import {} from "./a.d.ts"; // error +import { type A as _A } from "./a.d.ts"; // error +>A : typeof A +>_A : typeof A + +type __A = import("./a.d.ts").A; // ok +>__A : A + +const aPromise = import("./a.d.ts"); // error +>aPromise : Promise +>import("./a.d.ts") : Promise +>"./a.d.ts" : "./a.d.ts" + diff --git a/tests/baselines/reference/alwaysStrict.errors.txt b/tests/baselines/reference/alwaysStrict.errors.txt index 55ec2eb5880e4..e4d2a12520382 100644 --- a/tests/baselines/reference/alwaysStrict.errors.txt +++ b/tests/baselines/reference/alwaysStrict.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/alwaysStrict.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +alwaysStrict.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. -==== tests/cases/compiler/alwaysStrict.ts (1 errors) ==== +==== alwaysStrict.ts (1 errors) ==== function f() { var arguments = []; ~~~~~~~~~ diff --git a/tests/baselines/reference/alwaysStrict.js b/tests/baselines/reference/alwaysStrict.js index c3580ec2c1cd7..29755b6126d4e 100644 --- a/tests/baselines/reference/alwaysStrict.js +++ b/tests/baselines/reference/alwaysStrict.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrict.ts] //// + //// [alwaysStrict.ts] function f() { var arguments = []; diff --git a/tests/baselines/reference/alwaysStrict.symbols b/tests/baselines/reference/alwaysStrict.symbols index f045db29e466f..eddcdf3b80baa 100644 --- a/tests/baselines/reference/alwaysStrict.symbols +++ b/tests/baselines/reference/alwaysStrict.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrict.ts === +//// [tests/cases/compiler/alwaysStrict.ts] //// + +=== alwaysStrict.ts === function f() { >f : Symbol(f, Decl(alwaysStrict.ts, 0, 0)) diff --git a/tests/baselines/reference/alwaysStrict.types b/tests/baselines/reference/alwaysStrict.types index 4cf345a244a31..f4810960b0516 100644 --- a/tests/baselines/reference/alwaysStrict.types +++ b/tests/baselines/reference/alwaysStrict.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrict.ts === +//// [tests/cases/compiler/alwaysStrict.ts] //// + +=== alwaysStrict.ts === function f() { >f : () => void diff --git a/tests/baselines/reference/alwaysStrictAlreadyUseStrict.js b/tests/baselines/reference/alwaysStrictAlreadyUseStrict.js index cc3be45dedc8d..169acc4688834 100644 --- a/tests/baselines/reference/alwaysStrictAlreadyUseStrict.js +++ b/tests/baselines/reference/alwaysStrictAlreadyUseStrict.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts] //// + //// [alwaysStrictAlreadyUseStrict.ts] "use strict" function f() { diff --git a/tests/baselines/reference/alwaysStrictAlreadyUseStrict.symbols b/tests/baselines/reference/alwaysStrictAlreadyUseStrict.symbols index 143f579b94df1..e0157e25881c4 100644 --- a/tests/baselines/reference/alwaysStrictAlreadyUseStrict.symbols +++ b/tests/baselines/reference/alwaysStrictAlreadyUseStrict.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts === +//// [tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts] //// + +=== alwaysStrictAlreadyUseStrict.ts === "use strict" function f() { >f : Symbol(f, Decl(alwaysStrictAlreadyUseStrict.ts, 0, 12)) diff --git a/tests/baselines/reference/alwaysStrictAlreadyUseStrict.types b/tests/baselines/reference/alwaysStrictAlreadyUseStrict.types index 0181b40de27d1..37f8675b93e6b 100644 --- a/tests/baselines/reference/alwaysStrictAlreadyUseStrict.types +++ b/tests/baselines/reference/alwaysStrictAlreadyUseStrict.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts === +//// [tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts] //// + +=== alwaysStrictAlreadyUseStrict.ts === "use strict" >"use strict" : "use strict" diff --git a/tests/baselines/reference/alwaysStrictES6.errors.txt b/tests/baselines/reference/alwaysStrictES6.errors.txt index f59c9a3c0408f..03b1c64bebac8 100644 --- a/tests/baselines/reference/alwaysStrictES6.errors.txt +++ b/tests/baselines/reference/alwaysStrictES6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/alwaysStrictES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. +alwaysStrictES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. -==== tests/cases/compiler/alwaysStrictES6.ts (1 errors) ==== +==== alwaysStrictES6.ts (1 errors) ==== function f() { var arguments = []; ~~~~~~~~~ diff --git a/tests/baselines/reference/alwaysStrictES6.js b/tests/baselines/reference/alwaysStrictES6.js index 7b2e0e28e9ec3..7afe1bc0f1052 100644 --- a/tests/baselines/reference/alwaysStrictES6.js +++ b/tests/baselines/reference/alwaysStrictES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictES6.ts] //// + //// [alwaysStrictES6.ts] function f() { var arguments = []; diff --git a/tests/baselines/reference/alwaysStrictES6.symbols b/tests/baselines/reference/alwaysStrictES6.symbols index 540146bdad2a1..201938d760f58 100644 --- a/tests/baselines/reference/alwaysStrictES6.symbols +++ b/tests/baselines/reference/alwaysStrictES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictES6.ts === +//// [tests/cases/compiler/alwaysStrictES6.ts] //// + +=== alwaysStrictES6.ts === function f() { >f : Symbol(f, Decl(alwaysStrictES6.ts, 0, 0)) diff --git a/tests/baselines/reference/alwaysStrictES6.types b/tests/baselines/reference/alwaysStrictES6.types index 832656d54bcfa..08367c4310eae 100644 --- a/tests/baselines/reference/alwaysStrictES6.types +++ b/tests/baselines/reference/alwaysStrictES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictES6.ts === +//// [tests/cases/compiler/alwaysStrictES6.ts] //// + +=== alwaysStrictES6.ts === function f() { >f : () => void diff --git a/tests/baselines/reference/alwaysStrictModule.errors.txt b/tests/baselines/reference/alwaysStrictModule.errors.txt index 61e3db4a4825d..d3fa738698d47 100644 --- a/tests/baselines/reference/alwaysStrictModule.errors.txt +++ b/tests/baselines/reference/alwaysStrictModule.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/alwaysStrictModule.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +alwaysStrictModule.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. -==== tests/cases/compiler/alwaysStrictModule.ts (1 errors) ==== +==== alwaysStrictModule.ts (1 errors) ==== module M { export function f() { var arguments = []; diff --git a/tests/baselines/reference/alwaysStrictModule.js b/tests/baselines/reference/alwaysStrictModule.js index f5c5835df5f1e..8d1a406d4b3cb 100644 --- a/tests/baselines/reference/alwaysStrictModule.js +++ b/tests/baselines/reference/alwaysStrictModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictModule.ts] //// + //// [alwaysStrictModule.ts] module M { export function f() { diff --git a/tests/baselines/reference/alwaysStrictModule.symbols b/tests/baselines/reference/alwaysStrictModule.symbols index 0814d039bc690..8e3f76ef47187 100644 --- a/tests/baselines/reference/alwaysStrictModule.symbols +++ b/tests/baselines/reference/alwaysStrictModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule.ts === +//// [tests/cases/compiler/alwaysStrictModule.ts] //// + +=== alwaysStrictModule.ts === module M { >M : Symbol(M, Decl(alwaysStrictModule.ts, 0, 0)) diff --git a/tests/baselines/reference/alwaysStrictModule.types b/tests/baselines/reference/alwaysStrictModule.types index 20d3a43bc1a02..639c482bc3956 100644 --- a/tests/baselines/reference/alwaysStrictModule.types +++ b/tests/baselines/reference/alwaysStrictModule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule.ts === +//// [tests/cases/compiler/alwaysStrictModule.ts] //// + +=== alwaysStrictModule.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/alwaysStrictModule2.errors.txt b/tests/baselines/reference/alwaysStrictModule2.errors.txt index ef43d82f33d48..54481a89df317 100644 --- a/tests/baselines/reference/alwaysStrictModule2.errors.txt +++ b/tests/baselines/reference/alwaysStrictModule2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. -tests/cases/compiler/b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. -==== tests/cases/compiler/a.ts (1 errors) ==== +==== a.ts (1 errors) ==== module M { export function f() { var arguments = []; @@ -11,7 +11,7 @@ tests/cases/compiler/b.ts(3,13): error TS1100: Invalid use of 'arguments' in str } } -==== tests/cases/compiler/b.ts (1 errors) ==== +==== b.ts (1 errors) ==== module M { export function f2() { var arguments = []; diff --git a/tests/baselines/reference/alwaysStrictModule2.symbols b/tests/baselines/reference/alwaysStrictModule2.symbols index e25fc11ec193b..43ad606a4085e 100644 --- a/tests/baselines/reference/alwaysStrictModule2.symbols +++ b/tests/baselines/reference/alwaysStrictModule2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/alwaysStrictModule2.ts] //// + +=== a.ts === module M { >M : Symbol(M, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) @@ -10,7 +12,7 @@ module M { } } -=== tests/cases/compiler/b.ts === +=== b.ts === module M { >M : Symbol(M, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) diff --git a/tests/baselines/reference/alwaysStrictModule2.types b/tests/baselines/reference/alwaysStrictModule2.types index 494c38b90f98c..ddf13f957e655 100644 --- a/tests/baselines/reference/alwaysStrictModule2.types +++ b/tests/baselines/reference/alwaysStrictModule2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/alwaysStrictModule2.ts] //// + +=== a.ts === module M { >M : typeof M @@ -11,7 +13,7 @@ module M { } } -=== tests/cases/compiler/b.ts === +=== b.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/alwaysStrictModule3.js b/tests/baselines/reference/alwaysStrictModule3.js index 9ba8db7052c75..4665cfb4f06c9 100644 --- a/tests/baselines/reference/alwaysStrictModule3.js +++ b/tests/baselines/reference/alwaysStrictModule3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictModule3.ts] //// + //// [alwaysStrictModule3.ts] // module ES2015 export const a = 1; diff --git a/tests/baselines/reference/alwaysStrictModule3.symbols b/tests/baselines/reference/alwaysStrictModule3.symbols index 0e615b13b9d0f..a3122277d1b15 100644 --- a/tests/baselines/reference/alwaysStrictModule3.symbols +++ b/tests/baselines/reference/alwaysStrictModule3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule3.ts === +//// [tests/cases/compiler/alwaysStrictModule3.ts] //// + +=== alwaysStrictModule3.ts === // module ES2015 export const a = 1; >a : Symbol(a, Decl(alwaysStrictModule3.ts, 1, 12)) diff --git a/tests/baselines/reference/alwaysStrictModule3.types b/tests/baselines/reference/alwaysStrictModule3.types index 2c972c392eade..80274812d5500 100644 --- a/tests/baselines/reference/alwaysStrictModule3.types +++ b/tests/baselines/reference/alwaysStrictModule3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule3.ts === +//// [tests/cases/compiler/alwaysStrictModule3.ts] //// + +=== alwaysStrictModule3.ts === // module ES2015 export const a = 1; >a : 1 diff --git a/tests/baselines/reference/alwaysStrictModule4.js b/tests/baselines/reference/alwaysStrictModule4.js index 9929ab6626a96..826f9a5e669e0 100644 --- a/tests/baselines/reference/alwaysStrictModule4.js +++ b/tests/baselines/reference/alwaysStrictModule4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictModule4.ts] //// + //// [alwaysStrictModule4.ts] // Module commonjs export const a = 1 diff --git a/tests/baselines/reference/alwaysStrictModule4.symbols b/tests/baselines/reference/alwaysStrictModule4.symbols index aaaf3d5c11d98..d05d3070a7c71 100644 --- a/tests/baselines/reference/alwaysStrictModule4.symbols +++ b/tests/baselines/reference/alwaysStrictModule4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule4.ts === +//// [tests/cases/compiler/alwaysStrictModule4.ts] //// + +=== alwaysStrictModule4.ts === // Module commonjs export const a = 1 >a : Symbol(a, Decl(alwaysStrictModule4.ts, 1, 12)) diff --git a/tests/baselines/reference/alwaysStrictModule4.types b/tests/baselines/reference/alwaysStrictModule4.types index 134aebd585f9b..670332ac13b91 100644 --- a/tests/baselines/reference/alwaysStrictModule4.types +++ b/tests/baselines/reference/alwaysStrictModule4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule4.ts === +//// [tests/cases/compiler/alwaysStrictModule4.ts] //// + +=== alwaysStrictModule4.ts === // Module commonjs export const a = 1 >a : 1 diff --git a/tests/baselines/reference/alwaysStrictModule5.js b/tests/baselines/reference/alwaysStrictModule5.js index 664bc63462750..724dfc1f9b5f3 100644 --- a/tests/baselines/reference/alwaysStrictModule5.js +++ b/tests/baselines/reference/alwaysStrictModule5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictModule5.ts] //// + //// [alwaysStrictModule5.ts] // Targeting ES6 export const a = 1; diff --git a/tests/baselines/reference/alwaysStrictModule5.symbols b/tests/baselines/reference/alwaysStrictModule5.symbols index cab5143a74077..902fb04e3679d 100644 --- a/tests/baselines/reference/alwaysStrictModule5.symbols +++ b/tests/baselines/reference/alwaysStrictModule5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule5.ts === +//// [tests/cases/compiler/alwaysStrictModule5.ts] //// + +=== alwaysStrictModule5.ts === // Targeting ES6 export const a = 1; >a : Symbol(a, Decl(alwaysStrictModule5.ts, 1, 12)) diff --git a/tests/baselines/reference/alwaysStrictModule5.types b/tests/baselines/reference/alwaysStrictModule5.types index 8193c57ee1249..d8731d68d11c2 100644 --- a/tests/baselines/reference/alwaysStrictModule5.types +++ b/tests/baselines/reference/alwaysStrictModule5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule5.ts === +//// [tests/cases/compiler/alwaysStrictModule5.ts] //// + +=== alwaysStrictModule5.ts === // Targeting ES6 export const a = 1; >a : 1 diff --git a/tests/baselines/reference/alwaysStrictModule6.js b/tests/baselines/reference/alwaysStrictModule6.js index 3455822de26ab..f2ce673c3034c 100644 --- a/tests/baselines/reference/alwaysStrictModule6.js +++ b/tests/baselines/reference/alwaysStrictModule6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictModule6.ts] //// + //// [alwaysStrictModule6.ts] // Targeting ES5 export const a = 1; diff --git a/tests/baselines/reference/alwaysStrictModule6.symbols b/tests/baselines/reference/alwaysStrictModule6.symbols index 33ed3c37cf418..24da65b84e825 100644 --- a/tests/baselines/reference/alwaysStrictModule6.symbols +++ b/tests/baselines/reference/alwaysStrictModule6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule6.ts === +//// [tests/cases/compiler/alwaysStrictModule6.ts] //// + +=== alwaysStrictModule6.ts === // Targeting ES5 export const a = 1; >a : Symbol(a, Decl(alwaysStrictModule6.ts, 1, 12)) diff --git a/tests/baselines/reference/alwaysStrictModule6.types b/tests/baselines/reference/alwaysStrictModule6.types index dc6e6e347662c..e357771442d7f 100644 --- a/tests/baselines/reference/alwaysStrictModule6.types +++ b/tests/baselines/reference/alwaysStrictModule6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictModule6.ts === +//// [tests/cases/compiler/alwaysStrictModule6.ts] //// + +=== alwaysStrictModule6.ts === // Targeting ES5 export const a = 1; >a : 1 diff --git a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.errors.txt b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.errors.txt index 75df661fc9715..18bfbcc29791e 100644 --- a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.errors.txt +++ b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.errors.txt @@ -1,11 +1,11 @@ error TS5053: Option 'noImplicitUseStrict' cannot be specified with option 'alwaysStrict'. error TS5101: Option 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. !!! error TS5053: Option 'noImplicitUseStrict' cannot be specified with option 'alwaysStrict'. !!! error TS5101: Option 'noImplicitUseStrict' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== +==== alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== module M { export function f() { var arguments = []; diff --git a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.js b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.js index ff5a1166a89f4..e2bb3b3962866 100644 --- a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.js +++ b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts] //// + //// [alwaysStrictNoImplicitUseStrict.ts] module M { export function f() { diff --git a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.symbols b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.symbols index 3b799d34f6e22..d01ffc0a84c20 100644 --- a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.symbols +++ b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts === +//// [tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts] //// + +=== alwaysStrictNoImplicitUseStrict.ts === module M { >M : Symbol(M, Decl(alwaysStrictNoImplicitUseStrict.ts, 0, 0)) diff --git a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.types b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.types index 3ce5e15ed3a6a..ed33e733e6233 100644 --- a/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.types +++ b/tests/baselines/reference/alwaysStrictNoImplicitUseStrict.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts === +//// [tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts] //// + +=== alwaysStrictNoImplicitUseStrict.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/ambient.symbols b/tests/baselines/reference/ambient.symbols index ce7d34b405286..b67b02a524213 100644 --- a/tests/baselines/reference/ambient.symbols +++ b/tests/baselines/reference/ambient.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/typeOnly/ambient.ts] //// + === /a.ts === export class A { a!: string } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/ambient.types b/tests/baselines/reference/ambient.types index 8f6695e7482b1..7610d03bc993c 100644 --- a/tests/baselines/reference/ambient.types +++ b/tests/baselines/reference/ambient.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/typeOnly/ambient.ts] //// + === /a.ts === export class A { a!: string } >A : A diff --git a/tests/baselines/reference/ambientAccessors(target=es3).errors.txt b/tests/baselines/reference/ambientAccessors(target=es3).errors.txt index 8e365237fd925..8924a0b2a1831 100644 --- a/tests/baselines/reference/ambientAccessors(target=es3).errors.txt +++ b/tests/baselines/reference/ambientAccessors(target=es3).errors.txt @@ -2,7 +2,7 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in Typ !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts (0 errors) ==== +==== ambientAccessors.ts (0 errors) ==== // ok to use accessors in ambient class in ES3 declare class C { static get a(): string; diff --git a/tests/baselines/reference/ambientAccessors(target=es3).js b/tests/baselines/reference/ambientAccessors(target=es3).js index 4ddebd5e0eb12..f9835d3460dd9 100644 --- a/tests/baselines/reference/ambientAccessors(target=es3).js +++ b/tests/baselines/reference/ambientAccessors(target=es3).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts] //// + //// [ambientAccessors.ts] // ok to use accessors in ambient class in ES3 declare class C { diff --git a/tests/baselines/reference/ambientAccessors(target=es3).symbols b/tests/baselines/reference/ambientAccessors(target=es3).symbols index a73d3dcdabd76..3937cede3ede5 100644 --- a/tests/baselines/reference/ambientAccessors(target=es3).symbols +++ b/tests/baselines/reference/ambientAccessors(target=es3).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts] //// + +=== ambientAccessors.ts === // ok to use accessors in ambient class in ES3 declare class C { >C : Symbol(C, Decl(ambientAccessors.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientAccessors(target=es3).types b/tests/baselines/reference/ambientAccessors(target=es3).types index 48b4f03823d8e..5771c198f55e3 100644 --- a/tests/baselines/reference/ambientAccessors(target=es3).types +++ b/tests/baselines/reference/ambientAccessors(target=es3).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts] //// + +=== ambientAccessors.ts === // ok to use accessors in ambient class in ES3 declare class C { >C : C diff --git a/tests/baselines/reference/ambientAccessors(target=es5).js b/tests/baselines/reference/ambientAccessors(target=es5).js index 4ddebd5e0eb12..f9835d3460dd9 100644 --- a/tests/baselines/reference/ambientAccessors(target=es5).js +++ b/tests/baselines/reference/ambientAccessors(target=es5).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts] //// + //// [ambientAccessors.ts] // ok to use accessors in ambient class in ES3 declare class C { diff --git a/tests/baselines/reference/ambientAccessors(target=es5).symbols b/tests/baselines/reference/ambientAccessors(target=es5).symbols index a73d3dcdabd76..3937cede3ede5 100644 --- a/tests/baselines/reference/ambientAccessors(target=es5).symbols +++ b/tests/baselines/reference/ambientAccessors(target=es5).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts] //// + +=== ambientAccessors.ts === // ok to use accessors in ambient class in ES3 declare class C { >C : Symbol(C, Decl(ambientAccessors.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientAccessors(target=es5).types b/tests/baselines/reference/ambientAccessors(target=es5).types index 48b4f03823d8e..5771c198f55e3 100644 --- a/tests/baselines/reference/ambientAccessors(target=es5).types +++ b/tests/baselines/reference/ambientAccessors(target=es5).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/ambientAccessors.ts] //// + +=== ambientAccessors.ts === // ok to use accessors in ambient class in ES3 declare class C { >C : C diff --git a/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols b/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols index 652b3eee3cbb1..5fc91e51e9b6b 100644 --- a/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols +++ b/tests/baselines/reference/ambientClassDeclarationWithExtends.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientClassDeclarationExtends_singleFile.ts === +//// [tests/cases/compiler/ambientClassDeclarationWithExtends.ts] //// + +=== ambientClassDeclarationExtends_singleFile.ts === declare class A { } >A : Symbol(A, Decl(ambientClassDeclarationExtends_singleFile.ts, 0, 0)) @@ -25,7 +27,7 @@ var d: C = new D(); >C : Symbol(C, Decl(ambientClassDeclarationExtends_singleFile.ts, 1, 29)) >D : Symbol(D, Decl(ambientClassDeclarationExtends_singleFile.ts, 5, 1), Decl(ambientClassDeclarationExtends_singleFile.ts, 6, 22)) -=== tests/cases/compiler/ambientClassDeclarationExtends_file1.ts === +=== ambientClassDeclarationExtends_file1.ts === declare class E { >E : Symbol(E, Decl(ambientClassDeclarationExtends_file1.ts, 0, 0)) @@ -36,7 +38,7 @@ namespace F { var y; } >F : Symbol(F, Decl(ambientClassDeclarationExtends_file1.ts, 2, 1), Decl(ambientClassDeclarationExtends_file2.ts, 0, 0)) >y : Symbol(y, Decl(ambientClassDeclarationExtends_file1.ts, 3, 17)) -=== tests/cases/compiler/ambientClassDeclarationExtends_file2.ts === +=== ambientClassDeclarationExtends_file2.ts === declare class F extends E { } >F : Symbol(F, Decl(ambientClassDeclarationExtends_file1.ts, 2, 1), Decl(ambientClassDeclarationExtends_file2.ts, 0, 0)) >E : Symbol(E, Decl(ambientClassDeclarationExtends_file1.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientClassDeclarationWithExtends.types b/tests/baselines/reference/ambientClassDeclarationWithExtends.types index cd29836ce59a1..c49df653858bc 100644 --- a/tests/baselines/reference/ambientClassDeclarationWithExtends.types +++ b/tests/baselines/reference/ambientClassDeclarationWithExtends.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientClassDeclarationExtends_singleFile.ts === +//// [tests/cases/compiler/ambientClassDeclarationWithExtends.ts] //// + +=== ambientClassDeclarationExtends_singleFile.ts === declare class A { } >A : A @@ -25,7 +27,7 @@ var d: C = new D(); >new D() : D >D : typeof D -=== tests/cases/compiler/ambientClassDeclarationExtends_file1.ts === +=== ambientClassDeclarationExtends_file1.ts === declare class E { >E : E @@ -36,7 +38,7 @@ namespace F { var y; } >F : typeof F >y : any -=== tests/cases/compiler/ambientClassDeclarationExtends_file2.ts === +=== ambientClassDeclarationExtends_file2.ts === declare class F extends E { } >F : F >E : E diff --git a/tests/baselines/reference/ambientClassDeclaredBeforeBase.symbols b/tests/baselines/reference/ambientClassDeclaredBeforeBase.symbols index 6ed3e374e5590..537c980cd0dd7 100644 --- a/tests/baselines/reference/ambientClassDeclaredBeforeBase.symbols +++ b/tests/baselines/reference/ambientClassDeclaredBeforeBase.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.d.ts === +//// [tests/cases/compiler/ambientClassDeclaredBeforeBase.ts] //// + +=== a.d.ts === declare namespace ns { >ns : Symbol(ns, Decl(a.d.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientClassDeclaredBeforeBase.types b/tests/baselines/reference/ambientClassDeclaredBeforeBase.types index 2e3e5b453e07b..bcb3073dbaacf 100644 --- a/tests/baselines/reference/ambientClassDeclaredBeforeBase.types +++ b/tests/baselines/reference/ambientClassDeclaredBeforeBase.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.d.ts === +//// [tests/cases/compiler/ambientClassDeclaredBeforeBase.ts] //// + +=== a.d.ts === declare namespace ns { >ns : typeof ns diff --git a/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.js b/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.js index 417aedc4abcbd..65fa42abc0c1c 100644 --- a/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.js +++ b/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientClassMergesOverloadsWithInterface.ts] //// + //// [ambientClassMergesOverloadsWithInterface.ts] declare class C { baz(): any; diff --git a/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.symbols b/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.symbols index 224edf38cee44..7905d78c16893 100644 --- a/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.symbols +++ b/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientClassMergesOverloadsWithInterface.ts === +//// [tests/cases/compiler/ambientClassMergesOverloadsWithInterface.ts] //// + +=== ambientClassMergesOverloadsWithInterface.ts === declare class C { >C : Symbol(C, Decl(ambientClassMergesOverloadsWithInterface.ts, 0, 0), Decl(ambientClassMergesOverloadsWithInterface.ts, 3, 1)) diff --git a/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.types b/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.types index 4faedc6901e93..9cb0a23104f8c 100644 --- a/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.types +++ b/tests/baselines/reference/ambientClassMergesOverloadsWithInterface.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientClassMergesOverloadsWithInterface.ts === +//// [tests/cases/compiler/ambientClassMergesOverloadsWithInterface.ts] //// + +=== ambientClassMergesOverloadsWithInterface.ts === declare class C { >C : C diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.js b/tests/baselines/reference/ambientClassOverloadForFunction.js index 402eca63381c4..cda770e893fdc 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.js +++ b/tests/baselines/reference/ambientClassOverloadForFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientClassOverloadForFunction.ts] //// + //// [ambientClassOverloadForFunction.ts] declare class foo{}; function foo() { return null; } diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.symbols b/tests/baselines/reference/ambientClassOverloadForFunction.symbols index db83743745bd6..86489ada58c27 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.symbols +++ b/tests/baselines/reference/ambientClassOverloadForFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientClassOverloadForFunction.ts === +//// [tests/cases/compiler/ambientClassOverloadForFunction.ts] //// + +=== ambientClassOverloadForFunction.ts === declare class foo{}; >foo : Symbol(foo, Decl(ambientClassOverloadForFunction.ts, 0, 20), Decl(ambientClassOverloadForFunction.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.types b/tests/baselines/reference/ambientClassOverloadForFunction.types index e4e00ac57a037..6b9e9e0ab49ff 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.types +++ b/tests/baselines/reference/ambientClassOverloadForFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientClassOverloadForFunction.ts === +//// [tests/cases/compiler/ambientClassOverloadForFunction.ts] //// + +=== ambientClassOverloadForFunction.ts === declare class foo{}; >foo : foo diff --git a/tests/baselines/reference/ambientConstLiterals.js b/tests/baselines/reference/ambientConstLiterals.js index c5c0fbaafbc01..8b35d43487203 100644 --- a/tests/baselines/reference/ambientConstLiterals.js +++ b/tests/baselines/reference/ambientConstLiterals.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientConstLiterals.ts] //// + //// [ambientConstLiterals.ts] function f(x: T): T { return x; diff --git a/tests/baselines/reference/ambientConstLiterals.symbols b/tests/baselines/reference/ambientConstLiterals.symbols index 482300a321863..b93a0f81589ea 100644 --- a/tests/baselines/reference/ambientConstLiterals.symbols +++ b/tests/baselines/reference/ambientConstLiterals.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientConstLiterals.ts === +//// [tests/cases/compiler/ambientConstLiterals.ts] //// + +=== ambientConstLiterals.ts === function f(x: T): T { >f : Symbol(f, Decl(ambientConstLiterals.ts, 0, 0)) >T : Symbol(T, Decl(ambientConstLiterals.ts, 0, 11)) diff --git a/tests/baselines/reference/ambientConstLiterals.types b/tests/baselines/reference/ambientConstLiterals.types index 2f7e3b678b0a1..feaf8b6c46634 100644 --- a/tests/baselines/reference/ambientConstLiterals.types +++ b/tests/baselines/reference/ambientConstLiterals.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientConstLiterals.ts === +//// [tests/cases/compiler/ambientConstLiterals.ts] //// + +=== ambientConstLiterals.ts === function f(x: T): T { >f : (x: T) => T >x : T diff --git a/tests/baselines/reference/ambientDeclarations.js b/tests/baselines/reference/ambientDeclarations.js index 729ecf7d45e21..81a8c6617c7a5 100644 --- a/tests/baselines/reference/ambientDeclarations.js +++ b/tests/baselines/reference/ambientDeclarations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientDeclarations.ts] //// + //// [ambientDeclarations.ts] // Ambient variable without type annotation declare var n; diff --git a/tests/baselines/reference/ambientDeclarations.symbols b/tests/baselines/reference/ambientDeclarations.symbols index b4a6c394a9181..34ac406420228 100644 --- a/tests/baselines/reference/ambientDeclarations.symbols +++ b/tests/baselines/reference/ambientDeclarations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientDeclarations.ts === +//// [tests/cases/conformance/ambient/ambientDeclarations.ts] //// + +=== ambientDeclarations.ts === // Ambient variable without type annotation declare var n; >n : Symbol(n, Decl(ambientDeclarations.ts, 1, 11)) diff --git a/tests/baselines/reference/ambientDeclarations.types b/tests/baselines/reference/ambientDeclarations.types index 1ed180abaf57d..4fc1734004d04 100644 --- a/tests/baselines/reference/ambientDeclarations.types +++ b/tests/baselines/reference/ambientDeclarations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientDeclarations.ts === +//// [tests/cases/conformance/ambient/ambientDeclarations.ts] //// + +=== ambientDeclarations.ts === // Ambient variable without type annotation declare var n; >n : any diff --git a/tests/baselines/reference/ambientDeclarationsExternal.symbols b/tests/baselines/reference/ambientDeclarationsExternal.symbols index f0d2ec28221cc..652851fd46f61 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.symbols +++ b/tests/baselines/reference/ambientDeclarationsExternal.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/consumer.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsExternal.ts] //// + +=== consumer.ts === /// import imp1 = require('equ'); >imp1 : Symbol(imp1, Decl(consumer.ts, 0, 0)) @@ -17,7 +19,7 @@ var n = imp3.x; var n: number; >n : Symbol(n, Decl(consumer.ts, 6, 3), Decl(consumer.ts, 7, 3)) -=== tests/cases/conformance/ambient/decls.ts === +=== decls.ts === // Ambient external module with export assignment declare module 'equ' { >'equ' : Symbol("equ", Decl(decls.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientDeclarationsExternal.types b/tests/baselines/reference/ambientDeclarationsExternal.types index be62a31835475..e6ac69b13e1ba 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.types +++ b/tests/baselines/reference/ambientDeclarationsExternal.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/consumer.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsExternal.ts] //// + +=== consumer.ts === /// import imp1 = require('equ'); >imp1 : any @@ -17,7 +19,7 @@ var n = imp3.x; var n: number; >n : number -=== tests/cases/conformance/ambient/decls.ts === +=== decls.ts === // Ambient external module with export assignment declare module 'equ' { >'equ' : typeof import("equ") diff --git a/tests/baselines/reference/ambientDeclarationsPatterns.symbols b/tests/baselines/reference/ambientDeclarationsPatterns.symbols index 22fc293787269..07c3f55676e4a 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns.symbols +++ b/tests/baselines/reference/ambientDeclarationsPatterns.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns.ts] //// + +=== user.ts === /// import {foo, baz} from "foobarbaz"; >foo : Symbol(foo, Decl(user.ts, 1, 8)) @@ -23,7 +25,7 @@ foo(fileText); >foo : Symbol(foo, Decl(user.ts, 1, 8)) >fileText : Symbol(fileText, Decl(user.ts, 8, 6)) -=== tests/cases/conformance/ambient/declarations.d.ts === +=== declarations.d.ts === declare module "foo*baz" { >"foo*baz" : Symbol("foo*baz", Decl(declarations.d.ts, 0, 0), Decl(declarations.d.ts, 2, 1)) diff --git a/tests/baselines/reference/ambientDeclarationsPatterns.types b/tests/baselines/reference/ambientDeclarationsPatterns.types index b3ea307d8c257..79fed70a90bb0 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns.types +++ b/tests/baselines/reference/ambientDeclarationsPatterns.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns.ts] //// + +=== user.ts === /// import {foo, baz} from "foobarbaz"; >foo : (s: string) => void @@ -26,7 +28,7 @@ foo(fileText); >foo : (s: string) => void >fileText : string -=== tests/cases/conformance/ambient/declarations.d.ts === +=== declarations.d.ts === declare module "foo*baz" { >"foo*baz" : typeof import("foo*baz") diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.errors.txt b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.errors.txt index 7cc9f3617c034..fb1f34c02a272 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.errors.txt @@ -1,19 +1,19 @@ -tests/cases/conformance/ambient/testB.ts(1,22): error TS2305: Module '"*.foo"' has no exported member 'onlyInA'. +testB.ts(1,22): error TS2305: Module '"*.foo"' has no exported member 'onlyInA'. -==== tests/cases/conformance/ambient/types.ts (0 errors) ==== +==== types.ts (0 errors) ==== declare module "*.foo" { let everywhere: string; } -==== tests/cases/conformance/ambient/testA.ts (0 errors) ==== +==== testA.ts (0 errors) ==== import { everywhere, onlyInA } from "a.foo"; declare module "a.foo" { let onlyInA: number; } -==== tests/cases/conformance/ambient/testB.ts (1 errors) ==== +==== testB.ts (1 errors) ==== import { everywhere, onlyInA } from "b.foo"; // Error ~~~~~~~ !!! error TS2305: Module '"*.foo"' has no exported member 'onlyInA'. diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.symbols b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.symbols index aba5c7e23f142..c83976c66995c 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.symbols +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/types.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging1.ts] //// + +=== types.ts === declare module "*.foo" { >"*.foo" : Symbol("*.foo", Decl(types.ts, 0, 0)) @@ -7,7 +9,7 @@ declare module "*.foo" { } -=== tests/cases/conformance/ambient/testA.ts === +=== testA.ts === import { everywhere, onlyInA } from "a.foo"; >everywhere : Symbol(everywhere, Decl(testA.ts, 0, 8)) >onlyInA : Symbol(onlyInA, Decl(testA.ts, 0, 20)) @@ -19,7 +21,7 @@ declare module "a.foo" { >onlyInA : Symbol(onlyInA, Decl(testA.ts, 2, 5)) } -=== tests/cases/conformance/ambient/testB.ts === +=== testB.ts === import { everywhere, onlyInA } from "b.foo"; // Error >everywhere : Symbol(everywhere, Decl(testB.ts, 0, 8)) >onlyInA : Symbol(onlyInA, Decl(testB.ts, 0, 20)) diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.types b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.types index 4e3f190f16261..29bca24353341 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging1.types +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/types.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging1.ts] //// + +=== types.ts === declare module "*.foo" { >"*.foo" : typeof import("*.foo") @@ -7,7 +9,7 @@ declare module "*.foo" { } -=== tests/cases/conformance/ambient/testA.ts === +=== testA.ts === import { everywhere, onlyInA } from "a.foo"; >everywhere : string >onlyInA : number @@ -19,7 +21,7 @@ declare module "a.foo" { >onlyInA : number } -=== tests/cases/conformance/ambient/testB.ts === +=== testB.ts === import { everywhere, onlyInA } from "b.foo"; // Error >everywhere : string >onlyInA : any diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.errors.txt b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.errors.txt index 67c44a528b534..3ebb73ba0a2f1 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/ambient/testB.ts(1,22): error TS2305: Module '"*.foo"' has no exported member 'onlyInA'. -tests/cases/conformance/ambient/testB.ts(1,31): error TS2305: Module '"*.foo"' has no exported member 'alsoOnlyInA'. +testB.ts(1,22): error TS2305: Module '"*.foo"' has no exported member 'onlyInA'. +testB.ts(1,31): error TS2305: Module '"*.foo"' has no exported member 'alsoOnlyInA'. -==== tests/cases/conformance/ambient/types.ts (0 errors) ==== +==== types.ts (0 errors) ==== declare module "*.foo" { let everywhere: string; } -==== tests/cases/conformance/ambient/testA.ts (0 errors) ==== +==== testA.ts (0 errors) ==== import { everywhere, onlyInA, alsoOnlyInA } from "a.foo"; declare module "a.foo" { let onlyInA: number; } -==== tests/cases/conformance/ambient/testB.ts (2 errors) ==== +==== testB.ts (2 errors) ==== import { everywhere, onlyInA, alsoOnlyInA } from "b.foo"; // Error ~~~~~~~ !!! error TS2305: Module '"*.foo"' has no exported member 'onlyInA'. diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.symbols b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.symbols index 447cd999c981e..924967823577b 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.symbols +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/types.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging2.ts] //// + +=== types.ts === declare module "*.foo" { >"*.foo" : Symbol("*.foo", Decl(types.ts, 0, 0)) @@ -7,7 +9,7 @@ declare module "*.foo" { } -=== tests/cases/conformance/ambient/testA.ts === +=== testA.ts === import { everywhere, onlyInA, alsoOnlyInA } from "a.foo"; >everywhere : Symbol(everywhere, Decl(testA.ts, 0, 8)) >onlyInA : Symbol(onlyInA, Decl(testA.ts, 0, 20)) @@ -20,7 +22,7 @@ declare module "a.foo" { >onlyInA : Symbol(onlyInA, Decl(testA.ts, 2, 5)) } -=== tests/cases/conformance/ambient/testB.ts === +=== testB.ts === import { everywhere, onlyInA, alsoOnlyInA } from "b.foo"; // Error >everywhere : Symbol(everywhere, Decl(testB.ts, 0, 8)) >onlyInA : Symbol(onlyInA, Decl(testB.ts, 0, 20)) diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.types b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.types index b4f0d50db1989..e044aff6b6448 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging2.types +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/types.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging2.ts] //// + +=== types.ts === declare module "*.foo" { >"*.foo" : typeof import("*.foo") @@ -7,7 +9,7 @@ declare module "*.foo" { } -=== tests/cases/conformance/ambient/testA.ts === +=== testA.ts === import { everywhere, onlyInA, alsoOnlyInA } from "a.foo"; >everywhere : string >onlyInA : number @@ -20,7 +22,7 @@ declare module "a.foo" { >onlyInA : number } -=== tests/cases/conformance/ambient/testB.ts === +=== testB.ts === import { everywhere, onlyInA, alsoOnlyInA } from "b.foo"; // Error >everywhere : string >onlyInA : any diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.errors.txt b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.errors.txt index ce32367fd3cf3..78ed9d8169164 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/ambient/test.ts(6,6): error TS2339: Property 'a' does not exist on type 'OhNo'. +test.ts(6,6): error TS2339: Property 'a' does not exist on type 'OhNo'. -==== tests/cases/conformance/ambient/types.ts (0 errors) ==== +==== types.ts (0 errors) ==== declare module "*.foo" { export interface OhNo { star: string } } -==== tests/cases/conformance/ambient/test.ts (1 errors) ==== +==== test.ts (1 errors) ==== declare module "a.foo" { export interface OhNo { a: string } } diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.symbols b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.symbols index 141a17b698909..252ab8065a298 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.symbols +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/types.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging3.ts] //// + +=== types.ts === declare module "*.foo" { >"*.foo" : Symbol("*.foo", Decl(types.ts, 0, 0)) @@ -7,7 +9,7 @@ declare module "*.foo" { >star : Symbol(OhNo.star, Decl(types.ts, 1, 25)) } -=== tests/cases/conformance/ambient/test.ts === +=== test.ts === declare module "a.foo" { >"a.foo" : Symbol("a.foo", Decl(test.ts, 0, 0), Decl(types.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.types b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.types index df731d94fc96a..94a9ba9ce85dd 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_merging3.types +++ b/tests/baselines/reference/ambientDeclarationsPatterns_merging3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/types.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_merging3.ts] //// + +=== types.ts === declare module "*.foo" { >"*.foo" : typeof import("*.foo") @@ -6,7 +8,7 @@ declare module "*.foo" { >star : string } -=== tests/cases/conformance/ambient/test.ts === +=== test.ts === declare module "a.foo" { >"a.foo" : typeof import("a.foo") diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt index b40365e9b8eae..f84d93cf86345 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts(1,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character. +ambientDeclarationsPatterns_tooManyAsterisks.ts(1,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character. -==== tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts (1 errors) ==== +==== ambientDeclarationsPatterns_tooManyAsterisks.ts (1 errors) ==== declare module "too*many*asterisks" { } ~~~~~~~~~~~~~~~~~~~~ !!! error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character. diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js index a664eb84dc5aa..912a1132ba3e5 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js +++ b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts] //// + //// [ambientDeclarationsPatterns_tooManyAsterisks.ts] declare module "too*many*asterisks" { } diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.symbols b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.symbols index 1ebc29ee92a30..e32cd4c823809 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.symbols +++ b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts] //// + +=== ambientDeclarationsPatterns_tooManyAsterisks.ts === declare module "too*many*asterisks" { } >"too*many*asterisks" : Symbol("too*many*asterisks", Decl(ambientDeclarationsPatterns_tooManyAsterisks.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.types b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.types index 5d2e087ca2312..e2a466abc947a 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.types +++ b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts === +//// [tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts] //// + +=== ambientDeclarationsPatterns_tooManyAsterisks.ts === declare module "too*many*asterisks" { } >"too*many*asterisks" : typeof import("too*many*asterisks") diff --git a/tests/baselines/reference/ambientEnum1.errors.txt b/tests/baselines/reference/ambientEnum1.errors.txt index be8a19b34bad6..1cf44d61ab4c6 100644 --- a/tests/baselines/reference/ambientEnum1.errors.txt +++ b/tests/baselines/reference/ambientEnum1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. +ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. -==== tests/cases/compiler/ambientEnum1.ts (1 errors) ==== +==== ambientEnum1.ts (1 errors) ==== declare enum E1 { y = 4.23 } diff --git a/tests/baselines/reference/ambientEnum1.js b/tests/baselines/reference/ambientEnum1.js index 8a477ab99fabe..f79ceb09810ae 100644 --- a/tests/baselines/reference/ambientEnum1.js +++ b/tests/baselines/reference/ambientEnum1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnum1.ts] //// + //// [ambientEnum1.ts] declare enum E1 { y = 4.23 diff --git a/tests/baselines/reference/ambientEnum1.symbols b/tests/baselines/reference/ambientEnum1.symbols index 5ef8bfc3896e9..1d1aeac36b5dc 100644 --- a/tests/baselines/reference/ambientEnum1.symbols +++ b/tests/baselines/reference/ambientEnum1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnum1.ts === +//// [tests/cases/compiler/ambientEnum1.ts] //// + +=== ambientEnum1.ts === declare enum E1 { >E1 : Symbol(E1, Decl(ambientEnum1.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnum1.types b/tests/baselines/reference/ambientEnum1.types index bb2dd24513dd2..ddc6c0787c57a 100644 --- a/tests/baselines/reference/ambientEnum1.types +++ b/tests/baselines/reference/ambientEnum1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnum1.ts === +//// [tests/cases/compiler/ambientEnum1.ts] //// + +=== ambientEnum1.ts === declare enum E1 { >E1 : E1 diff --git a/tests/baselines/reference/ambientEnumDeclaration1.js b/tests/baselines/reference/ambientEnumDeclaration1.js index dcdb100e90696..392815014a0cf 100644 --- a/tests/baselines/reference/ambientEnumDeclaration1.js +++ b/tests/baselines/reference/ambientEnumDeclaration1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// + //// [ambientEnumDeclaration1.ts] // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. diff --git a/tests/baselines/reference/ambientEnumDeclaration1.symbols b/tests/baselines/reference/ambientEnumDeclaration1.symbols index 62e6250cf95ae..10dd174bc9de9 100644 --- a/tests/baselines/reference/ambientEnumDeclaration1.symbols +++ b/tests/baselines/reference/ambientEnumDeclaration1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientEnumDeclaration1.ts === +//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// + +=== ambientEnumDeclaration1.ts === // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. declare enum E { diff --git a/tests/baselines/reference/ambientEnumDeclaration1.types b/tests/baselines/reference/ambientEnumDeclaration1.types index 2157f7310625d..00018bf135b07 100644 --- a/tests/baselines/reference/ambientEnumDeclaration1.types +++ b/tests/baselines/reference/ambientEnumDeclaration1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientEnumDeclaration1.ts === +//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// + +=== ambientEnumDeclaration1.ts === // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. declare enum E { diff --git a/tests/baselines/reference/ambientEnumDeclaration2.js b/tests/baselines/reference/ambientEnumDeclaration2.js index 8ef6facfe6d0d..52b0c859f0c0c 100644 --- a/tests/baselines/reference/ambientEnumDeclaration2.js +++ b/tests/baselines/reference/ambientEnumDeclaration2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientEnumDeclaration2.ts] //// + //// [ambientEnumDeclaration2.ts] // In ambient enum declarations that specify no const modifier, enum member declarations // that omit a value are considered computed members (as opposed to having auto- incremented values assigned). diff --git a/tests/baselines/reference/ambientEnumDeclaration2.symbols b/tests/baselines/reference/ambientEnumDeclaration2.symbols index 7c4975f58786c..5f899a13b9e5b 100644 --- a/tests/baselines/reference/ambientEnumDeclaration2.symbols +++ b/tests/baselines/reference/ambientEnumDeclaration2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientEnumDeclaration2.ts === +//// [tests/cases/conformance/ambient/ambientEnumDeclaration2.ts] //// + +=== ambientEnumDeclaration2.ts === // In ambient enum declarations that specify no const modifier, enum member declarations // that omit a value are considered computed members (as opposed to having auto- incremented values assigned). diff --git a/tests/baselines/reference/ambientEnumDeclaration2.types b/tests/baselines/reference/ambientEnumDeclaration2.types index 95266f64d32bc..6e4e66a703efe 100644 --- a/tests/baselines/reference/ambientEnumDeclaration2.types +++ b/tests/baselines/reference/ambientEnumDeclaration2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientEnumDeclaration2.ts === +//// [tests/cases/conformance/ambient/ambientEnumDeclaration2.ts] //// + +=== ambientEnumDeclaration2.ts === // In ambient enum declarations that specify no const modifier, enum member declarations // that omit a value are considered computed members (as opposed to having auto- incremented values assigned). diff --git a/tests/baselines/reference/ambientEnumElementInitializer1.js b/tests/baselines/reference/ambientEnumElementInitializer1.js index 8a4801f48f594..6d149cc3789bb 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer1.js +++ b/tests/baselines/reference/ambientEnumElementInitializer1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnumElementInitializer1.ts] //// + //// [ambientEnumElementInitializer1.ts] declare enum E { e = 3 diff --git a/tests/baselines/reference/ambientEnumElementInitializer1.symbols b/tests/baselines/reference/ambientEnumElementInitializer1.symbols index 84eb56abcbce9..aff084342afe8 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer1.symbols +++ b/tests/baselines/reference/ambientEnumElementInitializer1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer1.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer1.ts] //// + +=== ambientEnumElementInitializer1.ts === declare enum E { >E : Symbol(E, Decl(ambientEnumElementInitializer1.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnumElementInitializer1.types b/tests/baselines/reference/ambientEnumElementInitializer1.types index 4fa9d5efdf76b..bffdf0907c4cb 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer1.types +++ b/tests/baselines/reference/ambientEnumElementInitializer1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer1.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer1.ts] //// + +=== ambientEnumElementInitializer1.ts === declare enum E { >E : E diff --git a/tests/baselines/reference/ambientEnumElementInitializer2.js b/tests/baselines/reference/ambientEnumElementInitializer2.js index 536b05a8f8b1f..1521ff937cc39 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer2.js +++ b/tests/baselines/reference/ambientEnumElementInitializer2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnumElementInitializer2.ts] //// + //// [ambientEnumElementInitializer2.ts] declare enum E { e = -3 // Negative diff --git a/tests/baselines/reference/ambientEnumElementInitializer2.symbols b/tests/baselines/reference/ambientEnumElementInitializer2.symbols index 04939d3389615..16d1c57cc038a 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer2.symbols +++ b/tests/baselines/reference/ambientEnumElementInitializer2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer2.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer2.ts] //// + +=== ambientEnumElementInitializer2.ts === declare enum E { >E : Symbol(E, Decl(ambientEnumElementInitializer2.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnumElementInitializer2.types b/tests/baselines/reference/ambientEnumElementInitializer2.types index 218863379d798..a478b62d15d98 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer2.types +++ b/tests/baselines/reference/ambientEnumElementInitializer2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer2.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer2.ts] //// + +=== ambientEnumElementInitializer2.ts === declare enum E { >E : E diff --git a/tests/baselines/reference/ambientEnumElementInitializer3.js b/tests/baselines/reference/ambientEnumElementInitializer3.js index 7a7a077ff8fce..c490d76afef61 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer3.js +++ b/tests/baselines/reference/ambientEnumElementInitializer3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnumElementInitializer3.ts] //// + //// [ambientEnumElementInitializer3.ts] declare enum E { e = 3.3 // Decimal diff --git a/tests/baselines/reference/ambientEnumElementInitializer3.symbols b/tests/baselines/reference/ambientEnumElementInitializer3.symbols index ee0d5e4daeac6..aca23dab613d0 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer3.symbols +++ b/tests/baselines/reference/ambientEnumElementInitializer3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer3.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer3.ts] //// + +=== ambientEnumElementInitializer3.ts === declare enum E { >E : Symbol(E, Decl(ambientEnumElementInitializer3.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnumElementInitializer3.types b/tests/baselines/reference/ambientEnumElementInitializer3.types index e4cf5678d7bb9..11c6fc73fe43a 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer3.types +++ b/tests/baselines/reference/ambientEnumElementInitializer3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer3.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer3.ts] //// + +=== ambientEnumElementInitializer3.ts === declare enum E { >E : E diff --git a/tests/baselines/reference/ambientEnumElementInitializer4.js b/tests/baselines/reference/ambientEnumElementInitializer4.js index 634c641f6b641..57c0c83c79238 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer4.js +++ b/tests/baselines/reference/ambientEnumElementInitializer4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnumElementInitializer4.ts] //// + //// [ambientEnumElementInitializer4.ts] declare enum E { e = 0xA diff --git a/tests/baselines/reference/ambientEnumElementInitializer4.symbols b/tests/baselines/reference/ambientEnumElementInitializer4.symbols index de17c6702bbe0..5a14cd9ff6312 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer4.symbols +++ b/tests/baselines/reference/ambientEnumElementInitializer4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer4.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer4.ts] //// + +=== ambientEnumElementInitializer4.ts === declare enum E { >E : Symbol(E, Decl(ambientEnumElementInitializer4.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnumElementInitializer4.types b/tests/baselines/reference/ambientEnumElementInitializer4.types index 2cd8c75600de6..ccce0f1db327a 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer4.types +++ b/tests/baselines/reference/ambientEnumElementInitializer4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer4.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer4.ts] //// + +=== ambientEnumElementInitializer4.ts === declare enum E { >E : E diff --git a/tests/baselines/reference/ambientEnumElementInitializer5.js b/tests/baselines/reference/ambientEnumElementInitializer5.js index 5f2c0c59daa30..c262e98e9b9e8 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer5.js +++ b/tests/baselines/reference/ambientEnumElementInitializer5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnumElementInitializer5.ts] //// + //// [ambientEnumElementInitializer5.ts] declare enum E { e = -0xA diff --git a/tests/baselines/reference/ambientEnumElementInitializer5.symbols b/tests/baselines/reference/ambientEnumElementInitializer5.symbols index 9c58db811f4db..73c682b4c1180 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer5.symbols +++ b/tests/baselines/reference/ambientEnumElementInitializer5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer5.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer5.ts] //// + +=== ambientEnumElementInitializer5.ts === declare enum E { >E : Symbol(E, Decl(ambientEnumElementInitializer5.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnumElementInitializer5.types b/tests/baselines/reference/ambientEnumElementInitializer5.types index 71919718a6e16..9f68ffc70f364 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer5.types +++ b/tests/baselines/reference/ambientEnumElementInitializer5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer5.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer5.ts] //// + +=== ambientEnumElementInitializer5.ts === declare enum E { >E : E diff --git a/tests/baselines/reference/ambientEnumElementInitializer6.js b/tests/baselines/reference/ambientEnumElementInitializer6.js index cc4001aba1b41..91b05182000cb 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer6.js +++ b/tests/baselines/reference/ambientEnumElementInitializer6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientEnumElementInitializer6.ts] //// + //// [ambientEnumElementInitializer6.ts] declare module M { enum E { diff --git a/tests/baselines/reference/ambientEnumElementInitializer6.symbols b/tests/baselines/reference/ambientEnumElementInitializer6.symbols index 3b0b6283ec9f5..47eb70491142e 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer6.symbols +++ b/tests/baselines/reference/ambientEnumElementInitializer6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer6.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer6.ts] //// + +=== ambientEnumElementInitializer6.ts === declare module M { >M : Symbol(M, Decl(ambientEnumElementInitializer6.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientEnumElementInitializer6.types b/tests/baselines/reference/ambientEnumElementInitializer6.types index 9caad2dde7aee..f852e992beec8 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer6.types +++ b/tests/baselines/reference/ambientEnumElementInitializer6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientEnumElementInitializer6.ts === +//// [tests/cases/compiler/ambientEnumElementInitializer6.ts] //// + +=== ambientEnumElementInitializer6.ts === declare module M { >M : typeof M diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index 05e72ccc879ad..ce20862cdb857 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/ambient/ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/ambient/ambientErrors.ts(20,24): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. -tests/cases/conformance/ambient/ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/conformance/ambient/ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -tests/cases/conformance/ambient/ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. -tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. +ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +ambientErrors.ts(20,24): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. +ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(35,19): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(40,14): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(41,22): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. +ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. -==== tests/cases/conformance/ambient/ambientErrors.ts (14 errors) ==== +==== ambientErrors.ts (14 errors) ==== // Ambient variable with an initializer declare var x = 4; ~ diff --git a/tests/baselines/reference/ambientErrors.js b/tests/baselines/reference/ambientErrors.js index c524a6cfe72fc..96925ad0096fa 100644 --- a/tests/baselines/reference/ambientErrors.js +++ b/tests/baselines/reference/ambientErrors.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientErrors.ts] //// + //// [ambientErrors.ts] // Ambient variable with an initializer declare var x = 4; diff --git a/tests/baselines/reference/ambientErrors.symbols b/tests/baselines/reference/ambientErrors.symbols index 308cce2b73449..c159b16a09885 100644 --- a/tests/baselines/reference/ambientErrors.symbols +++ b/tests/baselines/reference/ambientErrors.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientErrors.ts === +//// [tests/cases/conformance/ambient/ambientErrors.ts] //// + +=== ambientErrors.ts === // Ambient variable with an initializer declare var x = 4; >x : Symbol(x, Decl(ambientErrors.ts, 1, 11)) diff --git a/tests/baselines/reference/ambientErrors.types b/tests/baselines/reference/ambientErrors.types index 2fa301147972f..3e98e50e5ff78 100644 --- a/tests/baselines/reference/ambientErrors.types +++ b/tests/baselines/reference/ambientErrors.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientErrors.ts === +//// [tests/cases/conformance/ambient/ambientErrors.ts] //// + +=== ambientErrors.ts === // Ambient variable with an initializer declare var x = 4; >x : number diff --git a/tests/baselines/reference/ambientErrors1.errors.txt b/tests/baselines/reference/ambientErrors1.errors.txt index 5ae2b615eecf8..1e828f1fac118 100644 --- a/tests/baselines/reference/ambientErrors1.errors.txt +++ b/tests/baselines/reference/ambientErrors1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ambientErrors1.ts(1,17): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors1.ts(1,17): error TS1039: Initializers are not allowed in ambient contexts. -==== tests/cases/compiler/ambientErrors1.ts (1 errors) ==== +==== ambientErrors1.ts (1 errors) ==== declare var x = 4; ~ !!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/ambientErrors1.js b/tests/baselines/reference/ambientErrors1.js index 8605489d3dff2..2e941b4cd7f23 100644 --- a/tests/baselines/reference/ambientErrors1.js +++ b/tests/baselines/reference/ambientErrors1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientErrors1.ts] //// + //// [ambientErrors1.ts] declare var x = 4; diff --git a/tests/baselines/reference/ambientErrors1.symbols b/tests/baselines/reference/ambientErrors1.symbols index 65efc571619cd..4343062c05ecd 100644 --- a/tests/baselines/reference/ambientErrors1.symbols +++ b/tests/baselines/reference/ambientErrors1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientErrors1.ts === +//// [tests/cases/compiler/ambientErrors1.ts] //// + +=== ambientErrors1.ts === declare var x = 4; >x : Symbol(x, Decl(ambientErrors1.ts, 0, 11)) diff --git a/tests/baselines/reference/ambientErrors1.types b/tests/baselines/reference/ambientErrors1.types index edf186a9024eb..b33219ce8cfac 100644 --- a/tests/baselines/reference/ambientErrors1.types +++ b/tests/baselines/reference/ambientErrors1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientErrors1.ts === +//// [tests/cases/compiler/ambientErrors1.ts] //// + +=== ambientErrors1.ts === declare var x = 4; >x : number >4 : 4 diff --git a/tests/baselines/reference/ambientExportDefaultErrors.errors.txt b/tests/baselines/reference/ambientExportDefaultErrors.errors.txt index 246ff5147b2a1..4b31677c11549 100644 --- a/tests/baselines/reference/ambientExportDefaultErrors.errors.txt +++ b/tests/baselines/reference/ambientExportDefaultErrors.errors.txt @@ -1,29 +1,29 @@ -tests/cases/compiler/foo.d.ts(1,16): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. -tests/cases/compiler/foo2.d.ts(1,10): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. -tests/cases/compiler/indirection.d.ts(3,20): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. -tests/cases/compiler/indirection2.d.ts(3,14): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. +foo.d.ts(1,16): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. +foo2.d.ts(1,10): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. +indirection.d.ts(3,20): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. +indirection2.d.ts(3,14): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. -==== tests/cases/compiler/consumer.ts (0 errors) ==== +==== consumer.ts (0 errors) ==== /// /// import "indirect"; import "foo"; import "indirect2"; import "foo2"; -==== tests/cases/compiler/foo.d.ts (1 errors) ==== +==== foo.d.ts (1 errors) ==== export default 2 + 2; ~~~~~ !!! error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. export as namespace Foo; -==== tests/cases/compiler/foo2.d.ts (1 errors) ==== +==== foo2.d.ts (1 errors) ==== export = 2 + 2; ~~~~~ !!! error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. export as namespace Foo2; -==== tests/cases/compiler/indirection.d.ts (1 errors) ==== +==== indirection.d.ts (1 errors) ==== /// declare module "indirect" { export default typeof Foo.default; @@ -31,7 +31,7 @@ tests/cases/compiler/indirection2.d.ts(3,14): error TS2714: The expression of an !!! error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context. } -==== tests/cases/compiler/indirection2.d.ts (1 errors) ==== +==== indirection2.d.ts (1 errors) ==== /// declare module "indirect2" { export = typeof Foo2; diff --git a/tests/baselines/reference/ambientExportDefaultErrors.symbols b/tests/baselines/reference/ambientExportDefaultErrors.symbols index dec36cea65fd7..9096471561af7 100644 --- a/tests/baselines/reference/ambientExportDefaultErrors.symbols +++ b/tests/baselines/reference/ambientExportDefaultErrors.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/consumer.ts === +//// [tests/cases/compiler/ambientExportDefaultErrors.ts] //// + +=== consumer.ts === /// /// @@ -6,17 +8,17 @@ import "indirect"; import "foo"; import "indirect2"; import "foo2"; -=== tests/cases/compiler/foo.d.ts === +=== foo.d.ts === export default 2 + 2; export as namespace Foo; >Foo : Symbol(Foo, Decl(foo.d.ts, 0, 21)) -=== tests/cases/compiler/foo2.d.ts === +=== foo2.d.ts === export = 2 + 2; export as namespace Foo2; >Foo2 : Symbol(Foo2, Decl(foo2.d.ts, 0, 15)) -=== tests/cases/compiler/indirection.d.ts === +=== indirection.d.ts === /// declare module "indirect" { >"indirect" : Symbol("indirect", Decl(indirection.d.ts, 0, 0)) @@ -27,7 +29,7 @@ declare module "indirect" { >default : Symbol(Foo.default, Decl(foo.d.ts, 0, 0)) } -=== tests/cases/compiler/indirection2.d.ts === +=== indirection2.d.ts === /// declare module "indirect2" { >"indirect2" : Symbol("indirect2", Decl(indirection2.d.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExportDefaultErrors.types b/tests/baselines/reference/ambientExportDefaultErrors.types index c779d47eadb88..9602d7d5730d4 100644 --- a/tests/baselines/reference/ambientExportDefaultErrors.types +++ b/tests/baselines/reference/ambientExportDefaultErrors.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/consumer.ts === +//// [tests/cases/compiler/ambientExportDefaultErrors.ts] //// + +=== consumer.ts === /// /// @@ -6,16 +8,16 @@ import "indirect"; import "foo"; import "indirect2"; import "foo2"; -=== tests/cases/compiler/foo.d.ts === +=== foo.d.ts === export default 2 + 2; >2 + 2 : number >2 : 2 >2 : 2 export as namespace Foo; ->Foo : typeof import("tests/cases/compiler/foo") +>Foo : typeof import("foo") -=== tests/cases/compiler/foo2.d.ts === +=== foo2.d.ts === export = 2 + 2; >2 + 2 : number >2 : 2 @@ -24,7 +26,7 @@ export = 2 + 2; export as namespace Foo2; >Foo2 : number -=== tests/cases/compiler/indirection.d.ts === +=== indirection.d.ts === /// declare module "indirect" { >"indirect" : typeof import("indirect") @@ -36,7 +38,7 @@ declare module "indirect" { >default : number } -=== tests/cases/compiler/indirection2.d.ts === +=== indirection2.d.ts === /// declare module "indirect2" { >"indirect2" : typeof import("indirect2") diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index 9aec5403dcdb5..acd76e48f1fae 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,8 +1,8 @@ -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 TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +ambientExternalModuleInAnotherExternalModule.ts(4,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found. +ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== +==== ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== class D { } export = D; diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js index d6db77b6050ef..09fafb90e70fa 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts] //// + //// [ambientExternalModuleInAnotherExternalModule.ts] class D { } export = D; diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.symbols b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.symbols index 837de2d5ddc9f..e8d7e6ebd30ce 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.symbols +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts === +//// [tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts] //// + +=== ambientExternalModuleInAnotherExternalModule.ts === class D { } >D : Symbol(D, Decl(ambientExternalModuleInAnotherExternalModule.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.types b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.types index 3e0374e01aa55..2f25de375842d 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.types +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts === +//// [tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts] //// + +=== ambientExternalModuleInAnotherExternalModule.ts === class D { } >D : D diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt index c892c91bfd70d..ae9302d5286e6 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,5): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +ambientExternalModuleInsideNonAmbient.ts(2,5): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. +ambientExternalModuleInsideNonAmbient.ts(2,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts (2 errors) ==== +==== ambientExternalModuleInsideNonAmbient.ts (2 errors) ==== module M { export declare module "M" { } ~~~~~~ diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js index 0d06147e802e9..90c3592344698 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts] //// + //// [ambientExternalModuleInsideNonAmbient.ts] module M { export declare module "M" { } diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.symbols b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.symbols index bb83ea46ae1c3..b064ac0d62b2b 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.symbols +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts === +//// [tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts] //// + +=== ambientExternalModuleInsideNonAmbient.ts === module M { >M : Symbol(M, Decl(ambientExternalModuleInsideNonAmbient.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.types b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.types index 121b3bdbaed70..aecb12423d9d0 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.types +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts === +//// [tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbient.ts] //// + +=== ambientExternalModuleInsideNonAmbient.ts === module M { export declare module "M" { } >"M" : typeof import("M") diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt index 1599069e67d7e..dc26b6b3866a1 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. -tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2664: Invalid module name in augmentation, module 'M' cannot be found. +ambientExternalModuleInsideNonAmbientExternalModule.ts(1,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. +ambientExternalModuleInsideNonAmbientExternalModule.ts(1,23): error TS2664: Invalid module name in augmentation, module 'M' cannot be found. -==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (2 errors) ==== +==== ambientExternalModuleInsideNonAmbientExternalModule.ts (2 errors) ==== export declare module "M" { } ~~~~~~ !!! error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible. diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js index 0a53a3c4567c6..cfbcf7edfabcc 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts] //// + //// [ambientExternalModuleInsideNonAmbientExternalModule.ts] export declare module "M" { } diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.symbols b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.symbols index 8ef83c37ebfb6..0730dd9219d5e 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.symbols +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts === +//// [tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts] //// + +=== ambientExternalModuleInsideNonAmbientExternalModule.ts === export declare module "M" { } >"M" : Symbol("M", Decl(ambientExternalModuleInsideNonAmbientExternalModule.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.types b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.types index 9a4bb0c94efe4..4afe7f6368943 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.types +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts === +//// [tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts] //// + +=== ambientExternalModuleInsideNonAmbientExternalModule.ts === export declare module "M" { } >"M" : any diff --git a/tests/baselines/reference/ambientExternalModuleMerging.symbols b/tests/baselines/reference/ambientExternalModuleMerging.symbols index b99157b11422c..28fa6d9e9c683 100644 --- a/tests/baselines/reference/ambientExternalModuleMerging.symbols +++ b/tests/baselines/reference/ambientExternalModuleMerging.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientExternalModuleMerging_use.ts === +//// [tests/cases/conformance/ambient/ambientExternalModuleMerging.ts] //// + +=== ambientExternalModuleMerging_use.ts === import M = require("M"); >M : Symbol(M, Decl(ambientExternalModuleMerging_use.ts, 0, 0)) @@ -15,7 +17,7 @@ var y = M.y; >M : Symbol(M, Decl(ambientExternalModuleMerging_use.ts, 0, 0)) >y : Symbol(M.y, Decl(ambientExternalModuleMerging_declare.ts, 6, 14)) -=== tests/cases/conformance/ambient/ambientExternalModuleMerging_declare.ts === +=== ambientExternalModuleMerging_declare.ts === declare module "M" { >"M" : Symbol("M", Decl(ambientExternalModuleMerging_declare.ts, 0, 0), Decl(ambientExternalModuleMerging_declare.ts, 2, 1)) diff --git a/tests/baselines/reference/ambientExternalModuleMerging.types b/tests/baselines/reference/ambientExternalModuleMerging.types index fc40d94c65437..4b1cc7f1ae26c 100644 --- a/tests/baselines/reference/ambientExternalModuleMerging.types +++ b/tests/baselines/reference/ambientExternalModuleMerging.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientExternalModuleMerging_use.ts === +//// [tests/cases/conformance/ambient/ambientExternalModuleMerging.ts] //// + +=== ambientExternalModuleMerging_use.ts === import M = require("M"); >M : typeof M @@ -15,7 +17,7 @@ var y = M.y; >M : typeof M >y : string -=== tests/cases/conformance/ambient/ambientExternalModuleMerging_declare.ts === +=== ambientExternalModuleMerging_declare.ts === declare module "M" { >"M" : typeof import("M") diff --git a/tests/baselines/reference/ambientExternalModuleReopen.js b/tests/baselines/reference/ambientExternalModuleReopen.js index 85a37da411620..aa8b45cf292a8 100644 --- a/tests/baselines/reference/ambientExternalModuleReopen.js +++ b/tests/baselines/reference/ambientExternalModuleReopen.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientExternalModuleReopen.ts] //// + //// [ambientExternalModuleReopen.ts] declare module "fs" { var x: string; diff --git a/tests/baselines/reference/ambientExternalModuleReopen.symbols b/tests/baselines/reference/ambientExternalModuleReopen.symbols index 74bc430550b77..9695a1b5550ce 100644 --- a/tests/baselines/reference/ambientExternalModuleReopen.symbols +++ b/tests/baselines/reference/ambientExternalModuleReopen.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleReopen.ts === +//// [tests/cases/compiler/ambientExternalModuleReopen.ts] //// + +=== ambientExternalModuleReopen.ts === declare module "fs" { >"fs" : Symbol("fs", Decl(ambientExternalModuleReopen.ts, 0, 0), Decl(ambientExternalModuleReopen.ts, 2, 1)) diff --git a/tests/baselines/reference/ambientExternalModuleReopen.types b/tests/baselines/reference/ambientExternalModuleReopen.types index cbd1bda25b419..36c477e6329a2 100644 --- a/tests/baselines/reference/ambientExternalModuleReopen.types +++ b/tests/baselines/reference/ambientExternalModuleReopen.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleReopen.ts === +//// [tests/cases/compiler/ambientExternalModuleReopen.ts] //// + +=== ambientExternalModuleReopen.ts === declare module "fs" { >"fs" : typeof import("fs") diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols index 75fb494da1148..b962e3e5ba7e5 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_1.ts === +//// [tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts] //// + +=== ambientExternalModuleWithInternalImportDeclaration_1.ts === /// import A = require('M'); >A : Symbol(A, Decl(ambientExternalModuleWithInternalImportDeclaration_1.ts, 0, 0)) @@ -7,7 +9,7 @@ var c = new A(); >c : Symbol(c, Decl(ambientExternalModuleWithInternalImportDeclaration_1.ts, 2, 3)) >A : Symbol(A, Decl(ambientExternalModuleWithInternalImportDeclaration_1.ts, 0, 0)) -=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_0.ts === +=== ambientExternalModuleWithInternalImportDeclaration_0.ts === declare module 'M' { >'M' : Symbol("M", Decl(ambientExternalModuleWithInternalImportDeclaration_0.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types index 27a6610fcd568..b041ad108af4f 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_1.ts === +//// [tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts] //// + +=== ambientExternalModuleWithInternalImportDeclaration_1.ts === /// import A = require('M'); >A : typeof A @@ -8,7 +10,7 @@ var c = new A(); >new A() : A >A : typeof A -=== tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration_0.ts === +=== ambientExternalModuleWithInternalImportDeclaration_0.ts === declare module 'M' { >'M' : typeof import("M") diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt index 304081ff97fed..ca186aaf27669 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name. -tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule' or its corresponding type declarations. +ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name. +ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule' or its corresponding type declarations. -==== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ==== +==== ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ==== declare module "OuterModule" { import m2 = require("./SubModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.js b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.js index 07a9ad96b9ddc..10c7fecb2c8fc 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.js +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts] //// + //// [ambientExternalModuleWithRelativeExternalImportDeclaration.ts] declare module "OuterModule" { import m2 = require("./SubModule"); diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.symbols index 1341055b0a357..6de5a3b719d8f 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts === +//// [tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts] //// + +=== ambientExternalModuleWithRelativeExternalImportDeclaration.ts === declare module "OuterModule" { >"OuterModule" : Symbol("OuterModule", Decl(ambientExternalModuleWithRelativeExternalImportDeclaration.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.types b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.types index 2f3f341002909..66cfc553b3804 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.types +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts === +//// [tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts] //// + +=== ambientExternalModuleWithRelativeExternalImportDeclaration.ts === declare module "OuterModule" { >"OuterModule" : typeof import("OuterModule") diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt index b85a7ad11a9e8..c78dddd73742d 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient module declaration cannot specify relative module name. -tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient module declaration cannot specify relative module name. +ambientExternalModuleWithRelativeModuleName.ts(1,16): error TS2436: Ambient module declaration cannot specify relative module name. +ambientExternalModuleWithRelativeModuleName.ts(5,16): error TS2436: Ambient module declaration cannot specify relative module name. -==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ==== +==== ambientExternalModuleWithRelativeModuleName.ts (2 errors) ==== declare module "./relativeModule" { ~~~~~~~~~~~~~~~~~~ !!! error TS2436: Ambient module declaration cannot specify relative module name. diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.js b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.js index 9a4622a1b7e97..1dc10e694ca28 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.js +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts] //// + //// [ambientExternalModuleWithRelativeModuleName.ts] declare module "./relativeModule" { var x: string; diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.symbols b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.symbols index 350a84a0b4ae2..23ea543a20ff3 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts === +//// [tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts] //// + +=== ambientExternalModuleWithRelativeModuleName.ts === declare module "./relativeModule" { >"./relativeModule" : Symbol("./relativeModule", Decl(ambientExternalModuleWithRelativeModuleName.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.types b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.types index 2646b9ea0077c..db06089a54649 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.types +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts === +//// [tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts] //// + +=== ambientExternalModuleWithRelativeModuleName.ts === declare module "./relativeModule" { >"./relativeModule" : typeof import("./relativeModule") diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols index 625e5392893e1..104fed501be82 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_1.ts === +//// [tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts] //// + +=== ambientExternalModuleWithoutInternalImportDeclaration_1.ts === /// import A = require('M'); >A : Symbol(A, Decl(ambientExternalModuleWithoutInternalImportDeclaration_1.ts, 0, 0)) @@ -7,7 +9,7 @@ var c = new A(); >c : Symbol(c, Decl(ambientExternalModuleWithoutInternalImportDeclaration_1.ts, 2, 3)) >A : Symbol(A, Decl(ambientExternalModuleWithoutInternalImportDeclaration_1.ts, 0, 0)) -=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_0.ts === +=== ambientExternalModuleWithoutInternalImportDeclaration_0.ts === declare module 'M' { >'M' : Symbol("M", Decl(ambientExternalModuleWithoutInternalImportDeclaration_0.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types index fc2eb77491a64..e9cb8ba3c70ce 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_1.ts === +//// [tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts] //// + +=== ambientExternalModuleWithoutInternalImportDeclaration_1.ts === /// import A = require('M'); >A : typeof A @@ -8,7 +10,7 @@ var c = new A(); >new A() : A >A : typeof A -=== tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration_0.ts === +=== ambientExternalModuleWithoutInternalImportDeclaration_0.ts === declare module 'M' { >'M' : typeof import("M") diff --git a/tests/baselines/reference/ambientFundule.js b/tests/baselines/reference/ambientFundule.js index 85193977eda6f..deffb57f790b1 100644 --- a/tests/baselines/reference/ambientFundule.js +++ b/tests/baselines/reference/ambientFundule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientFundule.ts] //// + //// [ambientFundule.ts] declare function f(); declare module f { var x } diff --git a/tests/baselines/reference/ambientFundule.symbols b/tests/baselines/reference/ambientFundule.symbols index d1775c7c0f914..b8daf73847534 100644 --- a/tests/baselines/reference/ambientFundule.symbols +++ b/tests/baselines/reference/ambientFundule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientFundule.ts === +//// [tests/cases/compiler/ambientFundule.ts] //// + +=== ambientFundule.ts === declare function f(); >f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21)) diff --git a/tests/baselines/reference/ambientFundule.types b/tests/baselines/reference/ambientFundule.types index edd2290859c27..64681d69073cd 100644 --- a/tests/baselines/reference/ambientFundule.types +++ b/tests/baselines/reference/ambientFundule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientFundule.ts === +//// [tests/cases/compiler/ambientFundule.ts] //// + +=== ambientFundule.ts === declare function f(); >f : typeof f diff --git a/tests/baselines/reference/ambientGetters.errors.txt b/tests/baselines/reference/ambientGetters.errors.txt index b061f4b04f84c..f9b413134eb70 100644 --- a/tests/baselines/reference/ambientGetters.errors.txt +++ b/tests/baselines/reference/ambientGetters.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/ambientGetters.ts(6,18): error TS1183: An implementation cannot be declared in ambient contexts. +ambientGetters.ts(6,18): error TS1183: An implementation cannot be declared in ambient contexts. -==== tests/cases/compiler/ambientGetters.ts (1 errors) ==== +==== ambientGetters.ts (1 errors) ==== declare class A { get length() : number; } diff --git a/tests/baselines/reference/ambientGetters.js b/tests/baselines/reference/ambientGetters.js index db2310646afa8..df95e36dbfd3e 100644 --- a/tests/baselines/reference/ambientGetters.js +++ b/tests/baselines/reference/ambientGetters.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientGetters.ts] //// + //// [ambientGetters.ts] declare class A { get length() : number; diff --git a/tests/baselines/reference/ambientGetters.symbols b/tests/baselines/reference/ambientGetters.symbols index 39a34e1d10b5e..04d68bb5859f9 100644 --- a/tests/baselines/reference/ambientGetters.symbols +++ b/tests/baselines/reference/ambientGetters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientGetters.ts === +//// [tests/cases/compiler/ambientGetters.ts] //// + +=== ambientGetters.ts === declare class A { >A : Symbol(A, Decl(ambientGetters.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientGetters.types b/tests/baselines/reference/ambientGetters.types index 369742daba5ee..4b97199c88a1e 100644 --- a/tests/baselines/reference/ambientGetters.types +++ b/tests/baselines/reference/ambientGetters.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientGetters.ts === +//// [tests/cases/compiler/ambientGetters.ts] //// + +=== ambientGetters.ts === declare class A { >A : A diff --git a/tests/baselines/reference/ambientInsideNonAmbient.js b/tests/baselines/reference/ambientInsideNonAmbient.js index 9a3c5558e0732..fbaca80663999 100644 --- a/tests/baselines/reference/ambientInsideNonAmbient.js +++ b/tests/baselines/reference/ambientInsideNonAmbient.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientInsideNonAmbient.ts] //// + //// [ambientInsideNonAmbient.ts] module M { export declare var x; diff --git a/tests/baselines/reference/ambientInsideNonAmbient.symbols b/tests/baselines/reference/ambientInsideNonAmbient.symbols index 5a668ca9e43d5..b21f89af056a7 100644 --- a/tests/baselines/reference/ambientInsideNonAmbient.symbols +++ b/tests/baselines/reference/ambientInsideNonAmbient.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientInsideNonAmbient.ts === +//// [tests/cases/conformance/ambient/ambientInsideNonAmbient.ts] //// + +=== ambientInsideNonAmbient.ts === module M { >M : Symbol(M, Decl(ambientInsideNonAmbient.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientInsideNonAmbient.types b/tests/baselines/reference/ambientInsideNonAmbient.types index 21a60b4b54791..64a394e8746ea 100644 --- a/tests/baselines/reference/ambientInsideNonAmbient.types +++ b/tests/baselines/reference/ambientInsideNonAmbient.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientInsideNonAmbient.ts === +//// [tests/cases/conformance/ambient/ambientInsideNonAmbient.ts] //// + +=== ambientInsideNonAmbient.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js index f4ddf43614c39..78537cdaea9d9 100644 --- a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts] //// + //// [ambientInsideNonAmbientExternalModule.ts] export declare var x; export declare function f(); diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.symbols b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.symbols index 268aeab917142..80f10801cace7 100644 --- a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.symbols +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts === +//// [tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts] //// + +=== ambientInsideNonAmbientExternalModule.ts === export declare var x; >x : Symbol(x, Decl(ambientInsideNonAmbientExternalModule.ts, 0, 18)) diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types index d5484af061f7b..5de22ad0d1cae 100644 --- a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts === +//// [tests/cases/conformance/ambient/ambientInsideNonAmbientExternalModule.ts] //// + +=== ambientInsideNonAmbientExternalModule.ts === export declare var x; >x : any diff --git a/tests/baselines/reference/ambientModuleExports.js b/tests/baselines/reference/ambientModuleExports.js index 59c608a717469..5067df2a0608b 100644 --- a/tests/baselines/reference/ambientModuleExports.js +++ b/tests/baselines/reference/ambientModuleExports.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientModuleExports.ts] //// + //// [ambientModuleExports.ts] declare module Foo { function a():void; diff --git a/tests/baselines/reference/ambientModuleExports.symbols b/tests/baselines/reference/ambientModuleExports.symbols index 6af5b669cc96c..1fdab327d7a87 100644 --- a/tests/baselines/reference/ambientModuleExports.symbols +++ b/tests/baselines/reference/ambientModuleExports.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModuleExports.ts === +//// [tests/cases/compiler/ambientModuleExports.ts] //// + +=== ambientModuleExports.ts === declare module Foo { >Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientModuleExports.types b/tests/baselines/reference/ambientModuleExports.types index 3f096afa8381e..57f727d333f77 100644 --- a/tests/baselines/reference/ambientModuleExports.types +++ b/tests/baselines/reference/ambientModuleExports.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModuleExports.ts === +//// [tests/cases/compiler/ambientModuleExports.ts] //// + +=== ambientModuleExports.ts === declare module Foo { >Foo : typeof Foo diff --git a/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.js b/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.js index 4061095edff49..45a7d6e06e582 100644 --- a/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.js +++ b/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] //// + //// [ambientModuleWithClassDeclarationWithExtends.ts] declare module foo { class A { } diff --git a/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.symbols b/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.symbols index f24d3a102d523..f5161339f621d 100644 --- a/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.symbols +++ b/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts === +//// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] //// + +=== ambientModuleWithClassDeclarationWithExtends.ts === declare module foo { >foo : Symbol(foo, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.types b/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.types index 2708946518f58..bb42378d64441 100644 --- a/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.types +++ b/tests/baselines/reference/ambientModuleWithClassDeclarationWithExtends.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts === +//// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] //// + +=== ambientModuleWithClassDeclarationWithExtends.ts === declare module foo { >foo : typeof foo diff --git a/tests/baselines/reference/ambientModuleWithTemplateLiterals.js b/tests/baselines/reference/ambientModuleWithTemplateLiterals.js index e9c55fe7ca055..c57ef31e0c071 100644 --- a/tests/baselines/reference/ambientModuleWithTemplateLiterals.js +++ b/tests/baselines/reference/ambientModuleWithTemplateLiterals.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] //// + //// [ambientModuleWithTemplateLiterals.ts] declare module Foo { enum Bar { diff --git a/tests/baselines/reference/ambientModuleWithTemplateLiterals.symbols b/tests/baselines/reference/ambientModuleWithTemplateLiterals.symbols index 25086b1918e4c..df96ad10c3734 100644 --- a/tests/baselines/reference/ambientModuleWithTemplateLiterals.symbols +++ b/tests/baselines/reference/ambientModuleWithTemplateLiterals.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModuleWithTemplateLiterals.ts === +//// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] //// + +=== ambientModuleWithTemplateLiterals.ts === declare module Foo { >Foo : Symbol(Foo, Decl(ambientModuleWithTemplateLiterals.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientModuleWithTemplateLiterals.types b/tests/baselines/reference/ambientModuleWithTemplateLiterals.types index 05882261f2d0b..a57801abb2d68 100644 --- a/tests/baselines/reference/ambientModuleWithTemplateLiterals.types +++ b/tests/baselines/reference/ambientModuleWithTemplateLiterals.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModuleWithTemplateLiterals.ts === +//// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] //// + +=== ambientModuleWithTemplateLiterals.ts === declare module Foo { >Foo : typeof Foo diff --git a/tests/baselines/reference/ambientModules.js b/tests/baselines/reference/ambientModules.js index 7551ff2c6a2c3..cea5c21436c1d 100644 --- a/tests/baselines/reference/ambientModules.js +++ b/tests/baselines/reference/ambientModules.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientModules.ts] //// + //// [ambientModules.ts] declare module Foo.Bar { export var foo; }; Foo.Bar.foo = 5; diff --git a/tests/baselines/reference/ambientModules.symbols b/tests/baselines/reference/ambientModules.symbols index 776e36fa93302..1ef6c20a4fac1 100644 --- a/tests/baselines/reference/ambientModules.symbols +++ b/tests/baselines/reference/ambientModules.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModules.ts === +//// [tests/cases/compiler/ambientModules.ts] //// + +=== ambientModules.ts === declare module Foo.Bar { export var foo; }; >Foo : Symbol(Foo, Decl(ambientModules.ts, 0, 0)) >Bar : Symbol(Bar, Decl(ambientModules.ts, 0, 19)) diff --git a/tests/baselines/reference/ambientModules.types b/tests/baselines/reference/ambientModules.types index 5a0a8c663ab54..601805b48d5a6 100644 --- a/tests/baselines/reference/ambientModules.types +++ b/tests/baselines/reference/ambientModules.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientModules.ts === +//// [tests/cases/compiler/ambientModules.ts] //// + +=== ambientModules.ts === declare module Foo.Bar { export var foo; }; >Foo : typeof Foo >Bar : typeof Bar diff --git a/tests/baselines/reference/ambientNameRestrictions.js b/tests/baselines/reference/ambientNameRestrictions.js index 9a7971219825f..11ad18420f2d1 100644 --- a/tests/baselines/reference/ambientNameRestrictions.js +++ b/tests/baselines/reference/ambientNameRestrictions.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientNameRestrictions.ts] //// + //// [ambientNameRestrictions.ts] export declare namespace Foo { export var static: any; diff --git a/tests/baselines/reference/ambientNameRestrictions.symbols b/tests/baselines/reference/ambientNameRestrictions.symbols index d5b3fafaa5787..11e3be6884fd4 100644 --- a/tests/baselines/reference/ambientNameRestrictions.symbols +++ b/tests/baselines/reference/ambientNameRestrictions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientNameRestrictions.ts === +//// [tests/cases/compiler/ambientNameRestrictions.ts] //// + +=== ambientNameRestrictions.ts === export declare namespace Foo { >Foo : Symbol(Foo, Decl(ambientNameRestrictions.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientNameRestrictions.types b/tests/baselines/reference/ambientNameRestrictions.types index 705319392d8a0..c440b7f9940ab 100644 --- a/tests/baselines/reference/ambientNameRestrictions.types +++ b/tests/baselines/reference/ambientNameRestrictions.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientNameRestrictions.ts === +//// [tests/cases/compiler/ambientNameRestrictions.ts] //// + +=== ambientNameRestrictions.ts === export declare namespace Foo { >Foo : typeof Foo diff --git a/tests/baselines/reference/ambientPropertyDeclarationInJs.symbols b/tests/baselines/reference/ambientPropertyDeclarationInJs.symbols index ea7140db784ea..d5be35d3131f5 100644 --- a/tests/baselines/reference/ambientPropertyDeclarationInJs.symbols +++ b/tests/baselines/reference/ambientPropertyDeclarationInJs.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientPropertyDeclarationInJs.ts] //// + === /test.js === class Foo { >Foo : Symbol(Foo, Decl(test.js, 0, 0)) diff --git a/tests/baselines/reference/ambientPropertyDeclarationInJs.types b/tests/baselines/reference/ambientPropertyDeclarationInJs.types index 626075bd0291e..fbe93b2944742 100644 --- a/tests/baselines/reference/ambientPropertyDeclarationInJs.types +++ b/tests/baselines/reference/ambientPropertyDeclarationInJs.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientPropertyDeclarationInJs.ts] //// + === /test.js === class Foo { >Foo : Foo diff --git a/tests/baselines/reference/ambientRequireFunction.symbols b/tests/baselines/reference/ambientRequireFunction.symbols index 3fb2c754805c6..c9c5a0cf27954 100644 --- a/tests/baselines/reference/ambientRequireFunction.symbols +++ b/tests/baselines/reference/ambientRequireFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/app.js === +//// [tests/cases/compiler/ambientRequireFunction.ts] //// + +=== app.js === /// const fs = require("fs"); @@ -12,7 +14,7 @@ const text = fs.readFileSync("/a/b/c"); >fs : Symbol(fs, Decl(app.js, 2, 5)) >readFileSync : Symbol(fs.readFileSync, Decl(node.d.ts, 2, 21)) -=== tests/cases/compiler/node.d.ts === +=== node.d.ts === declare function require(moduleName: string): any; >require : Symbol(require, Decl(node.d.ts, 0, 0)) >moduleName : Symbol(moduleName, Decl(node.d.ts, 0, 25)) diff --git a/tests/baselines/reference/ambientRequireFunction.types b/tests/baselines/reference/ambientRequireFunction.types index 487305a139a33..f395972c32b7a 100644 --- a/tests/baselines/reference/ambientRequireFunction.types +++ b/tests/baselines/reference/ambientRequireFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/app.js === +//// [tests/cases/compiler/ambientRequireFunction.ts] //// + +=== app.js === /// const fs = require("fs"); @@ -15,7 +17,7 @@ const text = fs.readFileSync("/a/b/c"); >readFileSync : (s: string) => string >"/a/b/c" : "/a/b/c" -=== tests/cases/compiler/node.d.ts === +=== node.d.ts === declare function require(moduleName: string): any; >require : (moduleName: string) => any >moduleName : string diff --git a/tests/baselines/reference/ambientShorthand.symbols b/tests/baselines/reference/ambientShorthand.symbols index c2231ac5c3deb..03f11bc7e102b 100644 --- a/tests/baselines/reference/ambientShorthand.symbols +++ b/tests/baselines/reference/ambientShorthand.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientShorthand.ts] //// + +=== user.ts === /// import foo, {bar} from "jquery"; >foo : Symbol(foo, Decl(user.ts, 1, 6)) @@ -16,7 +18,7 @@ foo(bar, baz, boom); >baz : Symbol(baz, Decl(user.ts, 2, 6)) >boom : Symbol(boom, Decl(user.ts, 2, 26)) -=== tests/cases/conformance/ambient/declarations.d.ts === +=== declarations.d.ts === declare module "jquery" >"jquery" : Symbol("jquery", Decl(declarations.d.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientShorthand.types b/tests/baselines/reference/ambientShorthand.types index 4c93cc7fd8f0c..679857e2c7130 100644 --- a/tests/baselines/reference/ambientShorthand.types +++ b/tests/baselines/reference/ambientShorthand.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientShorthand.ts] //// + +=== user.ts === /// import foo, {bar} from "jquery"; >foo : any @@ -17,7 +19,7 @@ foo(bar, baz, boom); >baz : any >boom : any -=== tests/cases/conformance/ambient/declarations.d.ts === +=== declarations.d.ts === declare module "jquery" >"jquery" : any diff --git a/tests/baselines/reference/ambientShorthand_declarationEmit.js b/tests/baselines/reference/ambientShorthand_declarationEmit.js index 7220dd2b0a4cf..45f27c35b3f37 100644 --- a/tests/baselines/reference/ambientShorthand_declarationEmit.js +++ b/tests/baselines/reference/ambientShorthand_declarationEmit.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts] //// + //// [ambientShorthand_declarationEmit.ts] declare module "foo"; diff --git a/tests/baselines/reference/ambientShorthand_declarationEmit.symbols b/tests/baselines/reference/ambientShorthand_declarationEmit.symbols index f1eabac0e9ebb..9afeec9ed0608 100644 --- a/tests/baselines/reference/ambientShorthand_declarationEmit.symbols +++ b/tests/baselines/reference/ambientShorthand_declarationEmit.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts] //// + +=== ambientShorthand_declarationEmit.ts === declare module "foo"; >"foo" : Symbol("foo", Decl(ambientShorthand_declarationEmit.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientShorthand_declarationEmit.types b/tests/baselines/reference/ambientShorthand_declarationEmit.types index c5c8411bb0311..f5d6be263e9ed 100644 --- a/tests/baselines/reference/ambientShorthand_declarationEmit.types +++ b/tests/baselines/reference/ambientShorthand_declarationEmit.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts] //// + +=== ambientShorthand_declarationEmit.ts === declare module "foo"; >"foo" : any diff --git a/tests/baselines/reference/ambientShorthand_duplicate.symbols b/tests/baselines/reference/ambientShorthand_duplicate.symbols index 6d5716a193c49..a7405b7f85dad 100644 --- a/tests/baselines/reference/ambientShorthand_duplicate.symbols +++ b/tests/baselines/reference/ambientShorthand_duplicate.symbols @@ -1,10 +1,12 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_duplicate.ts] //// + +=== user.ts === /// /// import foo from "foo"; >foo : Symbol(foo, Decl(user.ts, 2, 6)) -=== tests/cases/conformance/ambient/declarations1.d.ts === +=== declarations1.d.ts === declare module "foo"; >"foo" : Symbol("foo", Decl(declarations1.d.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientShorthand_duplicate.types b/tests/baselines/reference/ambientShorthand_duplicate.types index 8abf9f7b230d7..539edc9096710 100644 --- a/tests/baselines/reference/ambientShorthand_duplicate.types +++ b/tests/baselines/reference/ambientShorthand_duplicate.types @@ -1,10 +1,12 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_duplicate.ts] //// + +=== user.ts === /// /// import foo from "foo"; >foo : any -=== tests/cases/conformance/ambient/declarations1.d.ts === +=== declarations1.d.ts === declare module "foo"; >"foo" : any diff --git a/tests/baselines/reference/ambientShorthand_merging.symbols b/tests/baselines/reference/ambientShorthand_merging.symbols index d37bdb060789d..99b0df1661649 100644 --- a/tests/baselines/reference/ambientShorthand_merging.symbols +++ b/tests/baselines/reference/ambientShorthand_merging.symbols @@ -1,11 +1,13 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_merging.ts] //// + +=== user.ts === /// /// import foo, {bar} from "foo"; >foo : Symbol(foo, Decl(user.ts, 2, 6)) >bar : Symbol(bar, Decl(user.ts, 2, 13)) -=== tests/cases/conformance/ambient/declarations1.d.ts === +=== declarations1.d.ts === declare module "foo"; >"foo" : Symbol("foo", Decl(declarations1.d.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientShorthand_merging.types b/tests/baselines/reference/ambientShorthand_merging.types index ad9827f47ebab..fe2575113506b 100644 --- a/tests/baselines/reference/ambientShorthand_merging.types +++ b/tests/baselines/reference/ambientShorthand_merging.types @@ -1,11 +1,13 @@ -=== tests/cases/conformance/ambient/user.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_merging.ts] //// + +=== user.ts === /// /// import foo, {bar} from "foo"; >foo : any >bar : any -=== tests/cases/conformance/ambient/declarations1.d.ts === +=== declarations1.d.ts === declare module "foo"; >"foo" : any diff --git a/tests/baselines/reference/ambientShorthand_reExport.symbols b/tests/baselines/reference/ambientShorthand_reExport.symbols index 992dc6af17190..0bbf6bfc39ed5 100644 --- a/tests/baselines/reference/ambientShorthand_reExport.symbols +++ b/tests/baselines/reference/ambientShorthand_reExport.symbols @@ -1,16 +1,18 @@ -=== tests/cases/conformance/ambient/declarations.d.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_reExport.ts] //// + +=== declarations.d.ts === declare module "jquery"; >"jquery" : Symbol("jquery", Decl(declarations.d.ts, 0, 0)) -=== tests/cases/conformance/ambient/reExportX.ts === +=== reExportX.ts === export {x} from "jquery"; >x : Symbol(x, Decl(reExportX.ts, 0, 8)) -=== tests/cases/conformance/ambient/reExportAll.ts === +=== reExportAll.ts === export * from "jquery"; -=== tests/cases/conformance/ambient/reExportUser.ts === +=== reExportUser.ts === import {x} from "./reExportX"; >x : Symbol(x, Decl(reExportUser.ts, 0, 8)) diff --git a/tests/baselines/reference/ambientShorthand_reExport.types b/tests/baselines/reference/ambientShorthand_reExport.types index 743552275ef24..392cbb573aedf 100644 --- a/tests/baselines/reference/ambientShorthand_reExport.types +++ b/tests/baselines/reference/ambientShorthand_reExport.types @@ -1,16 +1,18 @@ -=== tests/cases/conformance/ambient/declarations.d.ts === +//// [tests/cases/conformance/ambient/ambientShorthand_reExport.ts] //// + +=== declarations.d.ts === declare module "jquery"; >"jquery" : any -=== tests/cases/conformance/ambient/reExportX.ts === +=== reExportX.ts === export {x} from "jquery"; >x : any -=== tests/cases/conformance/ambient/reExportAll.ts === +=== reExportAll.ts === export * from "jquery"; -=== tests/cases/conformance/ambient/reExportUser.ts === +=== reExportUser.ts === import {x} from "./reExportX"; >x : any diff --git a/tests/baselines/reference/ambientStatement1.errors.txt b/tests/baselines/reference/ambientStatement1.errors.txt index 1a5fb6441136c..8ab93c1b1f56c 100644 --- a/tests/baselines/reference/ambientStatement1.errors.txt +++ b/tests/baselines/reference/ambientStatement1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ambientStatement1.ts(2,6): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientStatement1.ts(4,22): error TS1039: Initializers are not allowed in ambient contexts. +ambientStatement1.ts(2,6): error TS1036: Statements are not allowed in ambient contexts. +ambientStatement1.ts(4,22): error TS1039: Initializers are not allowed in ambient contexts. -==== tests/cases/compiler/ambientStatement1.ts (2 errors) ==== +==== ambientStatement1.ts (2 errors) ==== declare module M1 { while(true); ~~~~~ diff --git a/tests/baselines/reference/ambientStatement1.js b/tests/baselines/reference/ambientStatement1.js index f986f9717adea..60e5400465491 100644 --- a/tests/baselines/reference/ambientStatement1.js +++ b/tests/baselines/reference/ambientStatement1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientStatement1.ts] //// + //// [ambientStatement1.ts] declare module M1 { while(true); diff --git a/tests/baselines/reference/ambientStatement1.symbols b/tests/baselines/reference/ambientStatement1.symbols index 8e05372693c3b..408900b53697e 100644 --- a/tests/baselines/reference/ambientStatement1.symbols +++ b/tests/baselines/reference/ambientStatement1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientStatement1.ts === +//// [tests/cases/compiler/ambientStatement1.ts] //// + +=== ambientStatement1.ts === declare module M1 { >M1 : Symbol(M1, Decl(ambientStatement1.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientStatement1.types b/tests/baselines/reference/ambientStatement1.types index da6b2ffc445d3..7d52415ced24b 100644 --- a/tests/baselines/reference/ambientStatement1.types +++ b/tests/baselines/reference/ambientStatement1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientStatement1.ts === +//// [tests/cases/compiler/ambientStatement1.ts] //// + +=== ambientStatement1.ts === declare module M1 { >M1 : typeof M1 diff --git a/tests/baselines/reference/ambientWithStatements.errors.txt b/tests/baselines/reference/ambientWithStatements.errors.txt index c7cb28a0f4675..5201538571011 100644 --- a/tests/baselines/reference/ambientWithStatements.errors.txt +++ b/tests/baselines/reference/ambientWithStatements.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. -tests/cases/compiler/ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. -tests/cases/compiler/ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. -tests/cases/compiler/ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts. +ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body. +ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -==== tests/cases/compiler/ambientWithStatements.ts (4 errors) ==== +==== ambientWithStatements.ts (4 errors) ==== declare module M { break; ~~~~~ diff --git a/tests/baselines/reference/ambientWithStatements.js b/tests/baselines/reference/ambientWithStatements.js index 997916d0bf724..c2d3d23364702 100644 --- a/tests/baselines/reference/ambientWithStatements.js +++ b/tests/baselines/reference/ambientWithStatements.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambientWithStatements.ts] //// + //// [ambientWithStatements.ts] declare module M { break; diff --git a/tests/baselines/reference/ambientWithStatements.symbols b/tests/baselines/reference/ambientWithStatements.symbols index c5312f356ef7b..bf545c56ea676 100644 --- a/tests/baselines/reference/ambientWithStatements.symbols +++ b/tests/baselines/reference/ambientWithStatements.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientWithStatements.ts === +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +=== ambientWithStatements.ts === declare module M { >M : Symbol(M, Decl(ambientWithStatements.ts, 0, 0)) diff --git a/tests/baselines/reference/ambientWithStatements.types b/tests/baselines/reference/ambientWithStatements.types index 92f510a112445..6040eb295a74f 100644 --- a/tests/baselines/reference/ambientWithStatements.types +++ b/tests/baselines/reference/ambientWithStatements.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambientWithStatements.ts === +//// [tests/cases/compiler/ambientWithStatements.ts] //// + +=== ambientWithStatements.ts === declare module M { >M : typeof M diff --git a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.js b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.js index 6937384136dda..9f7661c7a5579 100644 --- a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.js +++ b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambiguousCallsWhereReturnTypesAgree.ts] //// + //// [ambiguousCallsWhereReturnTypesAgree.ts] class TestClass { public bar(x: string): void; diff --git a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.symbols b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.symbols index 9dcf5c515e256..d39fa5c3de940 100644 --- a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.symbols +++ b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousCallsWhereReturnTypesAgree.ts === +//// [tests/cases/compiler/ambiguousCallsWhereReturnTypesAgree.ts] //// + +=== ambiguousCallsWhereReturnTypesAgree.ts === class TestClass { >TestClass : Symbol(TestClass, Decl(ambiguousCallsWhereReturnTypesAgree.ts, 0, 0)) diff --git a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types index b3153722ee32a..f18767df960c0 100644 --- a/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types +++ b/tests/baselines/reference/ambiguousCallsWhereReturnTypesAgree.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousCallsWhereReturnTypesAgree.ts === +//// [tests/cases/compiler/ambiguousCallsWhereReturnTypesAgree.ts] //// + +=== ambiguousCallsWhereReturnTypesAgree.ts === class TestClass { >TestClass : TestClass diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt b/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt index 54b463109b140..c20870e1ebf64 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt +++ b/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/ambiguousGenericAssertion1.ts(4,10): error TS1109: Expression expected. -tests/cases/compiler/ambiguousGenericAssertion1.ts(4,15): error TS2304: Cannot find name 'x'. -tests/cases/compiler/ambiguousGenericAssertion1.ts(4,16): error TS1005: ')' expected. -tests/cases/compiler/ambiguousGenericAssertion1.ts(4,19): error TS1005: ',' expected. -tests/cases/compiler/ambiguousGenericAssertion1.ts(4,21): error TS1005: ';' expected. +ambiguousGenericAssertion1.ts(4,10): error TS1109: Expression expected. +ambiguousGenericAssertion1.ts(4,15): error TS2304: Cannot find name 'x'. +ambiguousGenericAssertion1.ts(4,16): error TS1005: ')' expected. +ambiguousGenericAssertion1.ts(4,19): error TS1005: ',' expected. +ambiguousGenericAssertion1.ts(4,21): error TS1005: ';' expected. -==== tests/cases/compiler/ambiguousGenericAssertion1.ts (5 errors) ==== +==== ambiguousGenericAssertion1.ts (5 errors) ==== function f(x: T): T { return null; } var r = (x: T) => x; var r2 = < (x: T) => T>f; // valid diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.js b/tests/baselines/reference/ambiguousGenericAssertion1.js index 8d40873036caa..8cfd823941f07 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.js +++ b/tests/baselines/reference/ambiguousGenericAssertion1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambiguousGenericAssertion1.ts] //// + //// [ambiguousGenericAssertion1.ts] function f(x: T): T { return null; } var r = (x: T) => x; diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.symbols b/tests/baselines/reference/ambiguousGenericAssertion1.symbols index dab5bcbc4eb6c..b996414ad5cde 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.symbols +++ b/tests/baselines/reference/ambiguousGenericAssertion1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousGenericAssertion1.ts === +//// [tests/cases/compiler/ambiguousGenericAssertion1.ts] //// + +=== ambiguousGenericAssertion1.ts === function f(x: T): T { return null; } >f : Symbol(f, Decl(ambiguousGenericAssertion1.ts, 0, 0)) >T : Symbol(T, Decl(ambiguousGenericAssertion1.ts, 0, 11)) diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.types b/tests/baselines/reference/ambiguousGenericAssertion1.types index a89795fb3c4b8..7a7d991589736 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.types +++ b/tests/baselines/reference/ambiguousGenericAssertion1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousGenericAssertion1.ts === +//// [tests/cases/compiler/ambiguousGenericAssertion1.ts] //// + +=== ambiguousGenericAssertion1.ts === function f(x: T): T { return null; } >f : (x: T) => T >x : T diff --git a/tests/baselines/reference/ambiguousOverload.errors.txt b/tests/baselines/reference/ambiguousOverload.errors.txt index 936e6e71220c4..0583cac1dc0b1 100644 --- a/tests/baselines/reference/ambiguousOverload.errors.txt +++ b/tests/baselines/reference/ambiguousOverload.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ambiguousOverload.ts(5,5): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/ambiguousOverload.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'. +ambiguousOverload.ts(5,5): error TS2322: Type 'number' is not assignable to type 'string'. +ambiguousOverload.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/ambiguousOverload.ts (2 errors) ==== +==== ambiguousOverload.ts (2 errors) ==== function foof(bar: string, y): number; function foof(bar: string, x): string; function foof(bar: any): any { return bar }; diff --git a/tests/baselines/reference/ambiguousOverload.js b/tests/baselines/reference/ambiguousOverload.js index 642f09dca1683..725b7dafa9039 100644 --- a/tests/baselines/reference/ambiguousOverload.js +++ b/tests/baselines/reference/ambiguousOverload.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambiguousOverload.ts] //// + //// [ambiguousOverload.ts] function foof(bar: string, y): number; function foof(bar: string, x): string; diff --git a/tests/baselines/reference/ambiguousOverload.symbols b/tests/baselines/reference/ambiguousOverload.symbols index cddb82a70781e..f22bb913ae247 100644 --- a/tests/baselines/reference/ambiguousOverload.symbols +++ b/tests/baselines/reference/ambiguousOverload.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousOverload.ts === +//// [tests/cases/compiler/ambiguousOverload.ts] //// + +=== ambiguousOverload.ts === function foof(bar: string, y): number; >foof : Symbol(foof, Decl(ambiguousOverload.ts, 0, 0), Decl(ambiguousOverload.ts, 0, 38), Decl(ambiguousOverload.ts, 1, 38)) >bar : Symbol(bar, Decl(ambiguousOverload.ts, 0, 14)) diff --git a/tests/baselines/reference/ambiguousOverload.types b/tests/baselines/reference/ambiguousOverload.types index afc28157d4c82..4649498d350a2 100644 --- a/tests/baselines/reference/ambiguousOverload.types +++ b/tests/baselines/reference/ambiguousOverload.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousOverload.ts === +//// [tests/cases/compiler/ambiguousOverload.ts] //// + +=== ambiguousOverload.ts === function foof(bar: string, y): number; >foof : { (bar: string, y: any): number; (bar: string, x: any): string; } >bar : string diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 640be084fbaca..da03893c9e486 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/ambiguousOverloadResolution.ts] //// + //// [ambiguousOverloadResolution.ts] class A { } class B extends A { x: number; } diff --git a/tests/baselines/reference/ambiguousOverloadResolution.symbols b/tests/baselines/reference/ambiguousOverloadResolution.symbols index 46711a1d14223..9206cd04a18a0 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.symbols +++ b/tests/baselines/reference/ambiguousOverloadResolution.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousOverloadResolution.ts === +//// [tests/cases/compiler/ambiguousOverloadResolution.ts] //// + +=== ambiguousOverloadResolution.ts === class A { } >A : Symbol(A, Decl(ambiguousOverloadResolution.ts, 0, 0)) diff --git a/tests/baselines/reference/ambiguousOverloadResolution.types b/tests/baselines/reference/ambiguousOverloadResolution.types index 8bdfeb7dd92d6..d5b2265a11d99 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.types +++ b/tests/baselines/reference/ambiguousOverloadResolution.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/ambiguousOverloadResolution.ts === +//// [tests/cases/compiler/ambiguousOverloadResolution.ts] //// + +=== ambiguousOverloadResolution.ts === class A { } >A : A diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt index e79d8d4d56ef6..23e57a706ce04 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.errors.txt @@ -4,13 +4,13 @@ error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. -==== tests/cases/compiler/Class.ts (0 errors) ==== +==== Class.ts (0 errors) ==== import { Configurable } from "./Configurable" export class HiddenClass {} export class ActualClass extends Configurable(HiddenClass) {} -==== tests/cases/compiler/Configurable.ts (0 errors) ==== +==== Configurable.ts (0 errors) ==== export type Constructor = { new(...args: any[]): T; } diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.symbols b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.symbols index e3754a46eed49..fd3f66def18cf 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.symbols +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/Class.ts === +//// [tests/cases/compiler/amdDeclarationEmitNoExtraDeclare.ts] //// + +=== Class.ts === import { Configurable } from "./Configurable" >Configurable : Symbol(Configurable, Decl(Class.ts, 0, 8)) @@ -10,7 +12,7 @@ export class ActualClass extends Configurable(HiddenClass) {} >Configurable : Symbol(Configurable, Decl(Class.ts, 0, 8)) >HiddenClass : Symbol(HiddenClass, Decl(Class.ts, 0, 45)) -=== tests/cases/compiler/Configurable.ts === +=== Configurable.ts === export type Constructor = { >Constructor : Symbol(Constructor, Decl(Configurable.ts, 0, 0)) >T : Symbol(T, Decl(Configurable.ts, 0, 24)) diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types index 88bc9971caddc..2685dcf1bebb0 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/Class.ts === +//// [tests/cases/compiler/amdDeclarationEmitNoExtraDeclare.ts] //// + +=== Class.ts === import { Configurable } from "./Configurable" ->Configurable : >(base: T) => T +>Configurable : >(base: T) => T export class HiddenClass {} >HiddenClass : HiddenClass @@ -8,10 +10,10 @@ export class HiddenClass {} export class ActualClass extends Configurable(HiddenClass) {} >ActualClass : ActualClass >Configurable(HiddenClass) : HiddenClass ->Configurable : >(base: T) => T +>Configurable : >(base: T) => T >HiddenClass : typeof HiddenClass -=== tests/cases/compiler/Configurable.ts === +=== Configurable.ts === export type Constructor = { >Constructor : Constructor diff --git a/tests/baselines/reference/amdDependencyComment1.errors.txt b/tests/baselines/reference/amdDependencyComment1.errors.txt index 9806527857445..00c706f38089e 100644 --- a/tests/baselines/reference/amdDependencyComment1.errors.txt +++ b/tests/baselines/reference/amdDependencyComment1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. -==== tests/cases/compiler/amdDependencyComment1.ts (1 errors) ==== +==== amdDependencyComment1.ts (1 errors) ==== /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyComment1.js b/tests/baselines/reference/amdDependencyComment1.js index 7951ae9d5a9bb..86a25964b7a93 100644 --- a/tests/baselines/reference/amdDependencyComment1.js +++ b/tests/baselines/reference/amdDependencyComment1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdDependencyComment1.ts] //// + //// [amdDependencyComment1.ts] /// diff --git a/tests/baselines/reference/amdDependencyComment1.symbols b/tests/baselines/reference/amdDependencyComment1.symbols index 01502620ab93d..15ed066e79e15 100644 --- a/tests/baselines/reference/amdDependencyComment1.symbols +++ b/tests/baselines/reference/amdDependencyComment1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyComment1.ts === +//// [tests/cases/compiler/amdDependencyComment1.ts] //// + +=== amdDependencyComment1.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyComment1.types b/tests/baselines/reference/amdDependencyComment1.types index c81dfa5d470b9..906cd203210ef 100644 --- a/tests/baselines/reference/amdDependencyComment1.types +++ b/tests/baselines/reference/amdDependencyComment1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyComment1.ts === +//// [tests/cases/compiler/amdDependencyComment1.ts] //// + +=== amdDependencyComment1.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index bc5a84f5a4b80..535952ab28c83 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +amdDependencyComment2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ==== +==== amdDependencyComment2.ts (1 errors) ==== /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyComment2.js b/tests/baselines/reference/amdDependencyComment2.js index c6d5f4d1b5376..1a8e54d5ddbaa 100644 --- a/tests/baselines/reference/amdDependencyComment2.js +++ b/tests/baselines/reference/amdDependencyComment2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdDependencyComment2.ts] //// + //// [amdDependencyComment2.ts] /// diff --git a/tests/baselines/reference/amdDependencyComment2.symbols b/tests/baselines/reference/amdDependencyComment2.symbols index 0a8fdc9875aa3..300d246f1fd11 100644 --- a/tests/baselines/reference/amdDependencyComment2.symbols +++ b/tests/baselines/reference/amdDependencyComment2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyComment2.ts === +//// [tests/cases/compiler/amdDependencyComment2.ts] //// + +=== amdDependencyComment2.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyComment2.types b/tests/baselines/reference/amdDependencyComment2.types index 88e98fb6764df..e0a0aa6f7842b 100644 --- a/tests/baselines/reference/amdDependencyComment2.types +++ b/tests/baselines/reference/amdDependencyComment2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyComment2.ts === +//// [tests/cases/compiler/amdDependencyComment2.ts] //// + +=== amdDependencyComment2.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName1.errors.txt b/tests/baselines/reference/amdDependencyCommentName1.errors.txt index c5a8b31c814b4..10efca68a7a19 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. -==== tests/cases/compiler/amdDependencyCommentName1.ts (1 errors) ==== +==== amdDependencyCommentName1.ts (1 errors) ==== /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName1.js b/tests/baselines/reference/amdDependencyCommentName1.js index f69808c6759c4..8acd9de790c6c 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.js +++ b/tests/baselines/reference/amdDependencyCommentName1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdDependencyCommentName1.ts] //// + //// [amdDependencyCommentName1.ts] /// diff --git a/tests/baselines/reference/amdDependencyCommentName1.symbols b/tests/baselines/reference/amdDependencyCommentName1.symbols index bea7334dd43d6..1fd7912ae5729 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.symbols +++ b/tests/baselines/reference/amdDependencyCommentName1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName1.ts === +//// [tests/cases/compiler/amdDependencyCommentName1.ts] //// + +=== amdDependencyCommentName1.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName1.types b/tests/baselines/reference/amdDependencyCommentName1.types index da083613b796a..0be8c8da09d14 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.types +++ b/tests/baselines/reference/amdDependencyCommentName1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName1.ts === +//// [tests/cases/compiler/amdDependencyCommentName1.ts] //// + +=== amdDependencyCommentName1.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName2.errors.txt b/tests/baselines/reference/amdDependencyCommentName2.errors.txt index abaa2fb8943a3..0efc3677edaae 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +amdDependencyCommentName2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ==== +==== amdDependencyCommentName2.ts (1 errors) ==== /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName2.js b/tests/baselines/reference/amdDependencyCommentName2.js index fcbbc4c4612de..9175a553c6431 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.js +++ b/tests/baselines/reference/amdDependencyCommentName2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdDependencyCommentName2.ts] //// + //// [amdDependencyCommentName2.ts] /// diff --git a/tests/baselines/reference/amdDependencyCommentName2.symbols b/tests/baselines/reference/amdDependencyCommentName2.symbols index 302c9cdb4613f..c8a3a400cef9b 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.symbols +++ b/tests/baselines/reference/amdDependencyCommentName2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName2.ts === +//// [tests/cases/compiler/amdDependencyCommentName2.ts] //// + +=== amdDependencyCommentName2.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName2.types b/tests/baselines/reference/amdDependencyCommentName2.types index a90deec21871f..29770996c236b 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.types +++ b/tests/baselines/reference/amdDependencyCommentName2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName2.ts === +//// [tests/cases/compiler/amdDependencyCommentName2.ts] //// + +=== amdDependencyCommentName2.ts === /// import m1 = require("m2") diff --git a/tests/baselines/reference/amdDependencyCommentName3.errors.txt b/tests/baselines/reference/amdDependencyCommentName3.errors.txt index 4c1d06f75f95b..da2433c64e3ce 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +amdDependencyCommentName3.ts(5,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ==== +==== amdDependencyCommentName3.ts (1 errors) ==== /// /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName3.js b/tests/baselines/reference/amdDependencyCommentName3.js index 72d8244706443..cb40ea5d95f0a 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.js +++ b/tests/baselines/reference/amdDependencyCommentName3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdDependencyCommentName3.ts] //// + //// [amdDependencyCommentName3.ts] /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName3.symbols b/tests/baselines/reference/amdDependencyCommentName3.symbols index 43c677c1270c7..b323a8f290bc5 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.symbols +++ b/tests/baselines/reference/amdDependencyCommentName3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName3.ts === +//// [tests/cases/compiler/amdDependencyCommentName3.ts] //// + +=== amdDependencyCommentName3.ts === /// /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName3.types b/tests/baselines/reference/amdDependencyCommentName3.types index caa6360875d48..d45151f4a8ed6 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.types +++ b/tests/baselines/reference/amdDependencyCommentName3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName3.ts === +//// [tests/cases/compiler/amdDependencyCommentName3.ts] //// + +=== amdDependencyCommentName3.ts === /// /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName4.errors.txt b/tests/baselines/reference/amdDependencyCommentName4.errors.txt index 1571024d0b388..6788d6c3b3286 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName4.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2792: Cannot find module 'aliasedModule1'. Did you mean to set the 'moduleResolution' option to 'nodenext', 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 'nodenext', 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 'nodenext', 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 'nodenext', or to add aliases to the 'paths' option? +amdDependencyCommentName4.ts(8,21): error TS2792: Cannot find module 'aliasedModule1'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +amdDependencyCommentName4.ts(11,26): error TS2792: Cannot find module 'aliasedModule2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +amdDependencyCommentName4.ts(14,15): error TS2792: Cannot find module 'aliasedModule3'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +amdDependencyCommentName4.ts(17,21): error TS2792: Cannot find module 'aliasedModule4'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ==== +==== amdDependencyCommentName4.ts (4 errors) ==== /// /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName4.js b/tests/baselines/reference/amdDependencyCommentName4.js index b050b58aa8e49..99baf7967226e 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.js +++ b/tests/baselines/reference/amdDependencyCommentName4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdDependencyCommentName4.ts] //// + //// [amdDependencyCommentName4.ts] /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName4.symbols b/tests/baselines/reference/amdDependencyCommentName4.symbols index 5b7e58c81783e..5a1871e33a60b 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.symbols +++ b/tests/baselines/reference/amdDependencyCommentName4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName4.ts === +//// [tests/cases/compiler/amdDependencyCommentName4.ts] //// + +=== amdDependencyCommentName4.ts === /// /// /// diff --git a/tests/baselines/reference/amdDependencyCommentName4.types b/tests/baselines/reference/amdDependencyCommentName4.types index 19042f96d672a..f3bcee83bee29 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.types +++ b/tests/baselines/reference/amdDependencyCommentName4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdDependencyCommentName4.ts === +//// [tests/cases/compiler/amdDependencyCommentName4.ts] //// + +=== amdDependencyCommentName4.ts === /// /// /// diff --git a/tests/baselines/reference/amdImportAsPrimaryExpression.symbols b/tests/baselines/reference/amdImportAsPrimaryExpression.symbols index 9ab71defd863d..dd3f3adefa9fb 100644 --- a/tests/baselines/reference/amdImportAsPrimaryExpression.symbols +++ b/tests/baselines/reference/amdImportAsPrimaryExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/foo_1.ts === +//// [tests/cases/conformance/externalModules/amdImportAsPrimaryExpression.ts] //// + +=== foo_1.ts === import foo = require("./foo_0"); >foo : Symbol(foo, Decl(foo_1.ts, 0, 0)) @@ -12,7 +14,7 @@ if(foo.E1.A === 0){ // Should cause runtime import - interesting optimization possibility, as gets inlined to 0. } -=== tests/cases/conformance/externalModules/foo_0.ts === +=== foo_0.ts === export enum E1 { >E1 : Symbol(E1, Decl(foo_0.ts, 0, 0)) diff --git a/tests/baselines/reference/amdImportAsPrimaryExpression.types b/tests/baselines/reference/amdImportAsPrimaryExpression.types index acfe27369f529..78bd482d51334 100644 --- a/tests/baselines/reference/amdImportAsPrimaryExpression.types +++ b/tests/baselines/reference/amdImportAsPrimaryExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/foo_1.ts === +//// [tests/cases/conformance/externalModules/amdImportAsPrimaryExpression.ts] //// + +=== foo_1.ts === import foo = require("./foo_0"); >foo : typeof foo @@ -14,7 +16,7 @@ if(foo.E1.A === 0){ // Should cause runtime import - interesting optimization possibility, as gets inlined to 0. } -=== tests/cases/conformance/externalModules/foo_0.ts === +=== foo_0.ts === export enum E1 { >E1 : E1 diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index e2c5aae28ed32..c6f5699f6d1ae 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -36,13 +36,14 @@ define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.E1 = exports.C1 = void 0; - var C1 = exports.C1 = /** @class */ (function () { + var C1 = /** @class */ (function () { function C1() { this.m1 = 42; } C1.s1 = true; return C1; }()); + exports.C1 = C1; var E1; (function (E1) { E1[E1["A"] = 0] = "A"; diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.symbols b/tests/baselines/reference/amdImportNotAsPrimaryExpression.symbols index a04bd7077c163..9b11d1ba4e0b8 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.symbols +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/foo_1.ts === +//// [tests/cases/conformance/externalModules/amdImportNotAsPrimaryExpression.ts] //// + +=== foo_1.ts === import foo = require("./foo_0"); >foo : Symbol(foo, Decl(foo_1.ts, 0, 0)) @@ -38,7 +40,7 @@ var e: number = 0; >foo : Symbol(foo, Decl(foo_1.ts, 0, 0)) >E1 : Symbol(foo.E1, Decl(foo_0.ts, 14, 1)) -=== tests/cases/conformance/externalModules/foo_0.ts === +=== foo_0.ts === export class C1 { >C1 : Symbol(C1, Decl(foo_0.ts, 0, 0)) diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.types b/tests/baselines/reference/amdImportNotAsPrimaryExpression.types index 80808ae12d6bf..4d6f1473a8543 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.types +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/foo_1.ts === +//// [tests/cases/conformance/externalModules/amdImportNotAsPrimaryExpression.ts] //// + +=== foo_1.ts === import foo = require("./foo_0"); >foo : typeof foo @@ -39,7 +41,7 @@ var e: number = 0; >foo : any >0 : 0 -=== tests/cases/conformance/externalModules/foo_0.ts === +=== foo_0.ts === export class C1 { >C1 : C1 diff --git a/tests/baselines/reference/amdLikeInputDeclarationEmit.js b/tests/baselines/reference/amdLikeInputDeclarationEmit.js index a34697f4f3e4f..584a304216a35 100644 --- a/tests/baselines/reference/amdLikeInputDeclarationEmit.js +++ b/tests/baselines/reference/amdLikeInputDeclarationEmit.js @@ -33,7 +33,7 @@ define("lib/ExtendedClass", ["deps/BaseClass"], //// [ExtendedClass.d.ts] -/// +/// export = ExtendedClass; declare const ExtendedClass: new () => { f: () => "something"; diff --git a/tests/baselines/reference/amdLikeInputDeclarationEmit.symbols b/tests/baselines/reference/amdLikeInputDeclarationEmit.symbols index 4b9e455840f1a..9446b6ee0152f 100644 --- a/tests/baselines/reference/amdLikeInputDeclarationEmit.symbols +++ b/tests/baselines/reference/amdLikeInputDeclarationEmit.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/typing.d.ts === +//// [tests/cases/compiler/amdLikeInputDeclarationEmit.ts] //// + +=== typing.d.ts === declare function define(name: string, modules: string[], ready: (...modules: unknown[]) => T); >define : Symbol(define, Decl(typing.d.ts, 0, 0)) >T : Symbol(T, Decl(typing.d.ts, 0, 24)) @@ -8,7 +10,7 @@ declare function define(name: string, modules: string[], ready: (...m >modules : Symbol(modules, Decl(typing.d.ts, 0, 76)) >T : Symbol(T, Decl(typing.d.ts, 0, 24)) -=== tests/cases/compiler/deps/BaseClass.d.ts === +=== deps/BaseClass.d.ts === declare module "deps/BaseClass" { >"deps/BaseClass" : Symbol("deps/BaseClass", Decl(BaseClass.d.ts, 0, 0)) @@ -26,7 +28,7 @@ declare module "deps/BaseClass" { export = BaseClass; >BaseClass : Symbol(BaseClass, Decl(BaseClass.d.ts, 0, 33)) } -=== tests/cases/compiler/ExtendedClass.js === +=== ExtendedClass.js === define("lib/ExtendedClass", ["deps/BaseClass"], >define : Symbol(define, Decl(typing.d.ts, 0, 0)) diff --git a/tests/baselines/reference/amdLikeInputDeclarationEmit.types b/tests/baselines/reference/amdLikeInputDeclarationEmit.types index 6bf0319f5e200..2956e1fa257cc 100644 --- a/tests/baselines/reference/amdLikeInputDeclarationEmit.types +++ b/tests/baselines/reference/amdLikeInputDeclarationEmit.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/typing.d.ts === +//// [tests/cases/compiler/amdLikeInputDeclarationEmit.ts] //// + +=== typing.d.ts === declare function define(name: string, modules: string[], ready: (...modules: unknown[]) => T); >define : (name: string, modules: string[], ready: (...modules: unknown[]) => T) => any >name : string @@ -6,7 +8,7 @@ declare function define(name: string, modules: string[], ready: (...m >ready : (...modules: unknown[]) => T >modules : unknown[] -=== tests/cases/compiler/deps/BaseClass.d.ts === +=== deps/BaseClass.d.ts === declare module "deps/BaseClass" { >"deps/BaseClass" : typeof import("deps/BaseClass") @@ -20,7 +22,7 @@ declare module "deps/BaseClass" { export = BaseClass; >BaseClass : BaseClass } -=== tests/cases/compiler/ExtendedClass.js === +=== ExtendedClass.js === define("lib/ExtendedClass", ["deps/BaseClass"], >define("lib/ExtendedClass", ["deps/BaseClass"], /** * {typeof import("deps/BaseClass")} * @param {typeof import("deps/BaseClass")} BaseClass * @returns */(BaseClass) => { const ExtendedClass = BaseClass.extends({ f: function() { return "something"; } }); // Exports the module in a way tsc recognize class export const module = {}; module.exports = ExtendedClass return module.exports;}) : any >define : (name: string, modules: string[], ready: (...modules: unknown[]) => T) => any diff --git a/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.symbols b/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.symbols index 69eaee002f24a..28301cc599658 100644 --- a/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.symbols +++ b/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.symbols @@ -1,9 +1,11 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/amdModuleBundleNoDuplicateDeclarationEmitComments.ts] //// + +=== file1.ts === /// export class Foo {} >Foo : Symbol(Foo, Decl(file1.ts, 0, 0)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// export class Bar {} >Bar : Symbol(Bar, Decl(file2.ts, 0, 0)) diff --git a/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.types b/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.types index d90ff85e5fbed..761db7a46c296 100644 --- a/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.types +++ b/tests/baselines/reference/amdModuleBundleNoDuplicateDeclarationEmitComments.types @@ -1,9 +1,11 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/amdModuleBundleNoDuplicateDeclarationEmitComments.ts] //// + +=== file1.ts === /// export class Foo {} >Foo : Foo -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// export class Bar {} >Bar : Bar diff --git a/tests/baselines/reference/amdModuleConstEnumUsage.symbols b/tests/baselines/reference/amdModuleConstEnumUsage.symbols index d6831b01814e8..a7d5984100cb7 100644 --- a/tests/baselines/reference/amdModuleConstEnumUsage.symbols +++ b/tests/baselines/reference/amdModuleConstEnumUsage.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdModuleConstEnumUsage.ts] //// + === /proj/defs/cc.ts === export const enum CharCode { >CharCode : Symbol(CharCode, Decl(cc.ts, 0, 0)) diff --git a/tests/baselines/reference/amdModuleConstEnumUsage.types b/tests/baselines/reference/amdModuleConstEnumUsage.types index 2070c5733a064..d8a35afb4bac1 100644 --- a/tests/baselines/reference/amdModuleConstEnumUsage.types +++ b/tests/baselines/reference/amdModuleConstEnumUsage.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdModuleConstEnumUsage.ts] //// + === /proj/defs/cc.ts === export const enum CharCode { >CharCode : CharCode diff --git a/tests/baselines/reference/amdModuleName1.js b/tests/baselines/reference/amdModuleName1.js index 4fc15202c0dc2..8d2f54823c9d7 100644 --- a/tests/baselines/reference/amdModuleName1.js +++ b/tests/baselines/reference/amdModuleName1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdModuleName1.ts] //// + //// [amdModuleName1.ts] /// class Foo { diff --git a/tests/baselines/reference/amdModuleName1.symbols b/tests/baselines/reference/amdModuleName1.symbols index d6e44acf93a2b..94fa1ac808fe7 100644 --- a/tests/baselines/reference/amdModuleName1.symbols +++ b/tests/baselines/reference/amdModuleName1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdModuleName1.ts === +//// [tests/cases/compiler/amdModuleName1.ts] //// + +=== amdModuleName1.ts === /// class Foo { >Foo : Symbol(Foo, Decl(amdModuleName1.ts, 0, 0)) diff --git a/tests/baselines/reference/amdModuleName1.types b/tests/baselines/reference/amdModuleName1.types index f7384ddf05703..55aada86f70c9 100644 --- a/tests/baselines/reference/amdModuleName1.types +++ b/tests/baselines/reference/amdModuleName1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdModuleName1.ts === +//// [tests/cases/compiler/amdModuleName1.ts] //// + +=== amdModuleName1.ts === /// class Foo { >Foo : Foo diff --git a/tests/baselines/reference/amdModuleName2.errors.txt b/tests/baselines/reference/amdModuleName2.errors.txt index cf7fb82ae102c..90f9378392567 100644 --- a/tests/baselines/reference/amdModuleName2.errors.txt +++ b/tests/baselines/reference/amdModuleName2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdModuleName2.ts(2,1): error TS2458: An AMD module cannot have multiple name assignments. +amdModuleName2.ts(2,1): error TS2458: An AMD module cannot have multiple name assignments. -==== tests/cases/compiler/amdModuleName2.ts (1 errors) ==== +==== amdModuleName2.ts (1 errors) ==== /// /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/amdModuleName2.js b/tests/baselines/reference/amdModuleName2.js index 7e65e8a4d18be..9bfaff9e0cb46 100644 --- a/tests/baselines/reference/amdModuleName2.js +++ b/tests/baselines/reference/amdModuleName2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/amdModuleName2.ts] //// + //// [amdModuleName2.ts] /// /// diff --git a/tests/baselines/reference/amdModuleName2.symbols b/tests/baselines/reference/amdModuleName2.symbols index 48c8e3fbdb4e1..7f4ae205ea358 100644 --- a/tests/baselines/reference/amdModuleName2.symbols +++ b/tests/baselines/reference/amdModuleName2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdModuleName2.ts === +//// [tests/cases/compiler/amdModuleName2.ts] //// + +=== amdModuleName2.ts === /// /// class Foo { diff --git a/tests/baselines/reference/amdModuleName2.types b/tests/baselines/reference/amdModuleName2.types index 7989db303ffcf..af7b8dad5eae2 100644 --- a/tests/baselines/reference/amdModuleName2.types +++ b/tests/baselines/reference/amdModuleName2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/amdModuleName2.ts === +//// [tests/cases/compiler/amdModuleName2.ts] //// + +=== amdModuleName2.ts === /// /// class Foo { diff --git a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.symbols b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.symbols index 44e6e8e56343c..3671e808253a9 100644 --- a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.symbols +++ b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/salsa/Compilation.js === +//// [tests/cases/conformance/salsa/annotatedThisPropertyInitializerDoesntNarrow.ts] //// + +=== Compilation.js === // from webpack/lib/Compilation.js and filed at #26427 /** @param {{ [s: string]: number }} map */ function mappy(map) {} diff --git a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types index 2772c19c75cf1..f257b2b453176 100644 --- a/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types +++ b/tests/baselines/reference/annotatedThisPropertyInitializerDoesntNarrow.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/salsa/Compilation.js === +//// [tests/cases/conformance/salsa/annotatedThisPropertyInitializerDoesntNarrow.ts] //// + +=== Compilation.js === // from webpack/lib/Compilation.js and filed at #26427 /** @param {{ [s: string]: number }} map */ function mappy(map) {} diff --git a/tests/baselines/reference/anonClassDeclarationEmitIsAnon.symbols b/tests/baselines/reference/anonClassDeclarationEmitIsAnon.symbols index f2988d8cb2e6d..9ae8075916d93 100644 --- a/tests/baselines/reference/anonClassDeclarationEmitIsAnon.symbols +++ b/tests/baselines/reference/anonClassDeclarationEmitIsAnon.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/wrapClass.ts === +//// [tests/cases/compiler/anonClassDeclarationEmitIsAnon.ts] //// + +=== wrapClass.ts === export function wrapClass(param: any) { >wrapClass : Symbol(wrapClass, Decl(wrapClass.ts, 0, 0)) >param : Symbol(param, Decl(wrapClass.ts, 0, 26)) @@ -40,7 +42,7 @@ export function Timestamped(Base: TBase) { }; } -=== tests/cases/compiler/index.ts === +=== index.ts === import { wrapClass, Timestamped } from "./wrapClass"; >wrapClass : Symbol(wrapClass, Decl(index.ts, 0, 8)) >Timestamped : Symbol(Timestamped, Decl(index.ts, 0, 19)) diff --git a/tests/baselines/reference/anonClassDeclarationEmitIsAnon.types b/tests/baselines/reference/anonClassDeclarationEmitIsAnon.types index 038b0a49bfbaa..16dbdb5d04c91 100644 --- a/tests/baselines/reference/anonClassDeclarationEmitIsAnon.types +++ b/tests/baselines/reference/anonClassDeclarationEmitIsAnon.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/wrapClass.ts === +//// [tests/cases/compiler/anonClassDeclarationEmitIsAnon.ts] //// + +=== wrapClass.ts === export function wrapClass(param: any) { >wrapClass : (param: any) => typeof Wrapped >param : any @@ -38,10 +40,10 @@ export function Timestamped(Base: TBase) { }; } -=== tests/cases/compiler/index.ts === +=== index.ts === import { wrapClass, Timestamped } from "./wrapClass"; >wrapClass : (param: any) => typeof Wrapped ->Timestamped : >(Base: TBase) => { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & TBase +>Timestamped : >(Base: TBase) => { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & TBase export default wrapClass(0); >wrapClass(0) : typeof Wrapped @@ -61,7 +63,7 @@ export class User { export class TimestampedUser extends Timestamped(User) { >TimestampedUser : TimestampedUser >Timestamped(User) : Timestamped.(Anonymous class) & User ->Timestamped : >(Base: TBase) => { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & TBase +>Timestamped : >(Base: TBase) => { new (...args: any[]): (Anonymous class); prototype: Timestamped.(Anonymous class); } & TBase >User : typeof User constructor() { diff --git a/tests/baselines/reference/anonterface.js b/tests/baselines/reference/anonterface.js index 3c4e04cd23c82..76e205aeefaa1 100644 --- a/tests/baselines/reference/anonterface.js +++ b/tests/baselines/reference/anonterface.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anonterface.ts] //// + //// [anonterface.ts] module M { export class C { diff --git a/tests/baselines/reference/anonterface.symbols b/tests/baselines/reference/anonterface.symbols index 56d6b6a09b81b..5491336c74534 100644 --- a/tests/baselines/reference/anonterface.symbols +++ b/tests/baselines/reference/anonterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonterface.ts === +//// [tests/cases/compiler/anonterface.ts] //// + +=== anonterface.ts === module M { >M : Symbol(M, Decl(anonterface.ts, 0, 0)) diff --git a/tests/baselines/reference/anonterface.types b/tests/baselines/reference/anonterface.types index a6c244b28859f..74274684848d7 100644 --- a/tests/baselines/reference/anonterface.types +++ b/tests/baselines/reference/anonterface.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonterface.ts === +//// [tests/cases/compiler/anonterface.ts] //// + +=== anonterface.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js index 4acb488a36b44..c9f5abde58580 100644 --- a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js +++ b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.ts] //// + //// [anonymousClassDeclarationDoesntPrintWithReadonly.ts] export class X { constructor(readonly a: number) { } diff --git a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.symbols b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.symbols index b450e1b3b83f1..9631ea8227bfc 100644 --- a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.symbols +++ b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.ts === +//// [tests/cases/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.ts] //// + +=== anonymousClassDeclarationDoesntPrintWithReadonly.ts === export class X { >X : Symbol(X, Decl(anonymousClassDeclarationDoesntPrintWithReadonly.ts, 0, 0)) diff --git a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.types b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.types index f84a4418f14d6..cfcbf818ecad5 100644 --- a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.types +++ b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.ts === +//// [tests/cases/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.ts] //// + +=== anonymousClassDeclarationDoesntPrintWithReadonly.ts === export class X { >X : X diff --git a/tests/baselines/reference/anonymousClassExpression1.js b/tests/baselines/reference/anonymousClassExpression1.js index 7223b816b9031..19d56aa17bfff 100644 --- a/tests/baselines/reference/anonymousClassExpression1.js +++ b/tests/baselines/reference/anonymousClassExpression1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anonymousClassExpression1.ts] //// + //// [anonymousClassExpression1.ts] function f() { return typeof class {} === "function"; diff --git a/tests/baselines/reference/anonymousClassExpression1.symbols b/tests/baselines/reference/anonymousClassExpression1.symbols index 114bfc96097a2..1c170b46d3183 100644 --- a/tests/baselines/reference/anonymousClassExpression1.symbols +++ b/tests/baselines/reference/anonymousClassExpression1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousClassExpression1.ts === +//// [tests/cases/compiler/anonymousClassExpression1.ts] //// + +=== anonymousClassExpression1.ts === function f() { >f : Symbol(f, Decl(anonymousClassExpression1.ts, 0, 0)) diff --git a/tests/baselines/reference/anonymousClassExpression1.types b/tests/baselines/reference/anonymousClassExpression1.types index 2e761d10afd92..4e4c63e0c0e88 100644 --- a/tests/baselines/reference/anonymousClassExpression1.types +++ b/tests/baselines/reference/anonymousClassExpression1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousClassExpression1.ts === +//// [tests/cases/compiler/anonymousClassExpression1.ts] //// + +=== anonymousClassExpression1.ts === function f() { >f : () => boolean diff --git a/tests/baselines/reference/anonymousClassExpression2.errors.txt b/tests/baselines/reference/anonymousClassExpression2.errors.txt index fb8bec4e315ef..63e5b4f5181a2 100644 --- a/tests/baselines/reference/anonymousClassExpression2.errors.txt +++ b/tests/baselines/reference/anonymousClassExpression2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/anonymousClassExpression2.ts(13,18): error TS2551: Property 'methodA' does not exist on type 'B'. Did you mean 'methodB'? +anonymousClassExpression2.ts(13,18): error TS2551: Property 'methodA' does not exist on type 'B'. Did you mean 'methodB'? -==== tests/cases/compiler/anonymousClassExpression2.ts (1 errors) ==== +==== anonymousClassExpression2.ts (1 errors) ==== // Fixes #14860 // note: repros with `while (0);` too // but it's less inscrutable and more obvious to put it *inside* the loop @@ -17,7 +17,7 @@ tests/cases/compiler/anonymousClassExpression2.ts(13,18): error TS2551: Property this.methodA; // error ~~~~~~~ !!! error TS2551: Property 'methodA' does not exist on type 'B'. Did you mean 'methodB'? -!!! related TS2728 tests/cases/compiler/anonymousClassExpression2.ts:12:9: 'methodB' is declared here. +!!! related TS2728 anonymousClassExpression2.ts:12:9: 'methodB' is declared here. this.methodB; // ok } } diff --git a/tests/baselines/reference/anonymousClassExpression2.js b/tests/baselines/reference/anonymousClassExpression2.js index 275ce0bd527fe..78ebb7c647468 100644 --- a/tests/baselines/reference/anonymousClassExpression2.js +++ b/tests/baselines/reference/anonymousClassExpression2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anonymousClassExpression2.ts] //// + //// [anonymousClassExpression2.ts] // Fixes #14860 // note: repros with `while (0);` too diff --git a/tests/baselines/reference/anonymousClassExpression2.symbols b/tests/baselines/reference/anonymousClassExpression2.symbols index 70a193deff7ae..4566e09b2042d 100644 --- a/tests/baselines/reference/anonymousClassExpression2.symbols +++ b/tests/baselines/reference/anonymousClassExpression2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousClassExpression2.ts === +//// [tests/cases/compiler/anonymousClassExpression2.ts] //// + +=== anonymousClassExpression2.ts === // Fixes #14860 // note: repros with `while (0);` too // but it's less inscrutable and more obvious to put it *inside* the loop diff --git a/tests/baselines/reference/anonymousClassExpression2.types b/tests/baselines/reference/anonymousClassExpression2.types index f26f8e497ca10..305204555ae6e 100644 --- a/tests/baselines/reference/anonymousClassExpression2.types +++ b/tests/baselines/reference/anonymousClassExpression2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousClassExpression2.ts === +//// [tests/cases/compiler/anonymousClassExpression2.ts] //// + +=== anonymousClassExpression2.ts === // Fixes #14860 // note: repros with `while (0);` too // but it's less inscrutable and more obvious to put it *inside* the loop diff --git a/tests/baselines/reference/anonymousDefaultExportsAmd.symbols b/tests/baselines/reference/anonymousDefaultExportsAmd.symbols index 57117df986e64..39d4e2dc4ff3e 100644 --- a/tests/baselines/reference/anonymousDefaultExportsAmd.symbols +++ b/tests/baselines/reference/anonymousDefaultExportsAmd.symbols @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsAmd/a.ts === +//// [tests/cases/conformance/es6/moduleExportsAmd/anonymousDefaultExportsAmd.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsAmd/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsAmd.types b/tests/baselines/reference/anonymousDefaultExportsAmd.types index 57117df986e64..39d4e2dc4ff3e 100644 --- a/tests/baselines/reference/anonymousDefaultExportsAmd.types +++ b/tests/baselines/reference/anonymousDefaultExportsAmd.types @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsAmd/a.ts === +//// [tests/cases/conformance/es6/moduleExportsAmd/anonymousDefaultExportsAmd.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsAmd/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsCommonjs.symbols b/tests/baselines/reference/anonymousDefaultExportsCommonjs.symbols index 1263951a0a261..412d62d33f032 100644 --- a/tests/baselines/reference/anonymousDefaultExportsCommonjs.symbols +++ b/tests/baselines/reference/anonymousDefaultExportsCommonjs.symbols @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsCommonjs/a.ts === +//// [tests/cases/conformance/es6/moduleExportsCommonjs/anonymousDefaultExportsCommonjs.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsCommonjs/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsCommonjs.types b/tests/baselines/reference/anonymousDefaultExportsCommonjs.types index 1263951a0a261..412d62d33f032 100644 --- a/tests/baselines/reference/anonymousDefaultExportsCommonjs.types +++ b/tests/baselines/reference/anonymousDefaultExportsCommonjs.types @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsCommonjs/a.ts === +//// [tests/cases/conformance/es6/moduleExportsCommonjs/anonymousDefaultExportsCommonjs.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsCommonjs/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsSystem.symbols b/tests/baselines/reference/anonymousDefaultExportsSystem.symbols index 16e79f7bf4d95..153b41e51c9e0 100644 --- a/tests/baselines/reference/anonymousDefaultExportsSystem.symbols +++ b/tests/baselines/reference/anonymousDefaultExportsSystem.symbols @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsSystem/a.ts === +//// [tests/cases/conformance/es6/moduleExportsSystem/anonymousDefaultExportsSystem.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsSystem/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsSystem.types b/tests/baselines/reference/anonymousDefaultExportsSystem.types index 16e79f7bf4d95..153b41e51c9e0 100644 --- a/tests/baselines/reference/anonymousDefaultExportsSystem.types +++ b/tests/baselines/reference/anonymousDefaultExportsSystem.types @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsSystem/a.ts === +//// [tests/cases/conformance/es6/moduleExportsSystem/anonymousDefaultExportsSystem.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsSystem/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsUmd.symbols b/tests/baselines/reference/anonymousDefaultExportsUmd.symbols index 73f8025c8a5f8..5755996e37dd5 100644 --- a/tests/baselines/reference/anonymousDefaultExportsUmd.symbols +++ b/tests/baselines/reference/anonymousDefaultExportsUmd.symbols @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsUmd/a.ts === +//// [tests/cases/conformance/es6/moduleExportsUmd/anonymousDefaultExportsUmd.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsUmd/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousDefaultExportsUmd.types b/tests/baselines/reference/anonymousDefaultExportsUmd.types index 73f8025c8a5f8..5755996e37dd5 100644 --- a/tests/baselines/reference/anonymousDefaultExportsUmd.types +++ b/tests/baselines/reference/anonymousDefaultExportsUmd.types @@ -1,7 +1,9 @@ -=== tests/cases/conformance/es6/moduleExportsUmd/a.ts === +//// [tests/cases/conformance/es6/moduleExportsUmd/anonymousDefaultExportsUmd.ts] //// + +=== a.ts === export default class {} -=== tests/cases/conformance/es6/moduleExportsUmd/b.ts === +=== b.ts === export default function() {} diff --git a/tests/baselines/reference/anonymousModules.errors.txt b/tests/baselines/reference/anonymousModules.errors.txt index 419eb5d3d3e9b..9ed762464d9a5 100644 --- a/tests/baselines/reference/anonymousModules.errors.txt +++ b/tests/baselines/reference/anonymousModules.errors.txt @@ -1,12 +1,12 @@ -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 TS1437: Namespace must be given a name. -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 TS1437: Namespace must be given a name. -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 TS1437: Namespace must be given a name. +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`. +anonymousModules.ts(1,8): error TS1437: Namespace must be given a name. +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`. +anonymousModules.ts(4,9): error TS1437: Namespace must be given a name. +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`. +anonymousModules.ts(10,9): error TS1437: Namespace must be given a name. -==== tests/cases/compiler/anonymousModules.ts (6 errors) ==== +==== anonymousModules.ts (6 errors) ==== module { ~~~~~~ !!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. diff --git a/tests/baselines/reference/anonymousModules.js b/tests/baselines/reference/anonymousModules.js index 5270594e8ee99..179b05c2c8805 100644 --- a/tests/baselines/reference/anonymousModules.js +++ b/tests/baselines/reference/anonymousModules.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anonymousModules.ts] //// + //// [anonymousModules.ts] module { export var foo = 1; diff --git a/tests/baselines/reference/anonymousModules.symbols b/tests/baselines/reference/anonymousModules.symbols index 1967e2466488a..33789bc61826f 100644 --- a/tests/baselines/reference/anonymousModules.symbols +++ b/tests/baselines/reference/anonymousModules.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousModules.ts === +//// [tests/cases/compiler/anonymousModules.ts] //// + +=== anonymousModules.ts === module { export var foo = 1; >foo : Symbol(foo, Decl(anonymousModules.ts, 1, 11)) diff --git a/tests/baselines/reference/anonymousModules.types b/tests/baselines/reference/anonymousModules.types index d06ff96ba37c5..a7fdb5d433782 100644 --- a/tests/baselines/reference/anonymousModules.types +++ b/tests/baselines/reference/anonymousModules.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anonymousModules.ts === +//// [tests/cases/compiler/anonymousModules.ts] //// + +=== anonymousModules.ts === module { >module : any diff --git a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js index 00afef4f1b942..6bc2b2b59e6c6 100644 --- a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js +++ b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts] //// + //// [anyAndUnknownHaveFalsyComponents.ts] declare let x1: any; const y1 = x1 && 3; diff --git a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols index 862e3d145504f..9d9466f9f374d 100644 --- a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols +++ b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts === +//// [tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts] //// + +=== anyAndUnknownHaveFalsyComponents.ts === declare let x1: any; >x1 : Symbol(x1, Decl(anyAndUnknownHaveFalsyComponents.ts, 0, 11)) diff --git a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types index 34757366c3584..be4db81234b12 100644 --- a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types +++ b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts === +//// [tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts] //// + +=== anyAndUnknownHaveFalsyComponents.ts === declare let x1: any; >x1 : any diff --git a/tests/baselines/reference/anyAsConstructor.errors.txt b/tests/baselines/reference/anyAsConstructor.errors.txt index 147d795790618..49ba4c0ec7b54 100644 --- a/tests/baselines/reference/anyAsConstructor.errors.txt +++ b/tests/baselines/reference/anyAsConstructor.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/any/anyAsConstructor.ts(10,9): error TS2347: Untyped function calls may not accept type arguments. +anyAsConstructor.ts(10,9): error TS2347: Untyped function calls may not accept type arguments. -==== tests/cases/conformance/types/any/anyAsConstructor.ts (1 errors) ==== +==== anyAsConstructor.ts (1 errors) ==== // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsConstructor.js b/tests/baselines/reference/anyAsConstructor.js index 2dfa9a5398b95..52e6fdd48a5aa 100644 --- a/tests/baselines/reference/anyAsConstructor.js +++ b/tests/baselines/reference/anyAsConstructor.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/any/anyAsConstructor.ts] //// + //// [anyAsConstructor.ts] // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsConstructor.symbols b/tests/baselines/reference/anyAsConstructor.symbols index 440d77730da1a..7ca2b0ef54835 100644 --- a/tests/baselines/reference/anyAsConstructor.symbols +++ b/tests/baselines/reference/anyAsConstructor.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyAsConstructor.ts === +//// [tests/cases/conformance/types/any/anyAsConstructor.ts] //// + +=== anyAsConstructor.ts === // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsConstructor.types b/tests/baselines/reference/anyAsConstructor.types index 56ae4315b750e..d0b99d5630e42 100644 --- a/tests/baselines/reference/anyAsConstructor.types +++ b/tests/baselines/reference/anyAsConstructor.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyAsConstructor.ts === +//// [tests/cases/conformance/types/any/anyAsConstructor.ts] //// + +=== anyAsConstructor.ts === // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsFunctionCall.js b/tests/baselines/reference/anyAsFunctionCall.js index 9b1e0852de991..bb7714cc48dc0 100644 --- a/tests/baselines/reference/anyAsFunctionCall.js +++ b/tests/baselines/reference/anyAsFunctionCall.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/any/anyAsFunctionCall.ts] //// + //// [anyAsFunctionCall.ts] // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsFunctionCall.symbols b/tests/baselines/reference/anyAsFunctionCall.symbols index 14aeb993a6d64..c1b56e64d17b6 100644 --- a/tests/baselines/reference/anyAsFunctionCall.symbols +++ b/tests/baselines/reference/anyAsFunctionCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyAsFunctionCall.ts === +//// [tests/cases/conformance/types/any/anyAsFunctionCall.ts] //// + +=== anyAsFunctionCall.ts === // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsFunctionCall.types b/tests/baselines/reference/anyAsFunctionCall.types index 42d0f9fc9509b..cd623bef05d8a 100644 --- a/tests/baselines/reference/anyAsFunctionCall.types +++ b/tests/baselines/reference/anyAsFunctionCall.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyAsFunctionCall.ts === +//// [tests/cases/conformance/types/any/anyAsFunctionCall.ts] //// + +=== anyAsFunctionCall.ts === // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt b/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt index 9dbee62e079a3..93bd28361b362 100644 --- a/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt +++ b/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(5,9): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(6,9): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(9,9): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts(10,9): error TS2347: Untyped function calls may not accept type arguments. +anyAsGenericFunctionCall.ts(5,9): error TS2347: Untyped function calls may not accept type arguments. +anyAsGenericFunctionCall.ts(6,9): error TS2347: Untyped function calls may not accept type arguments. +anyAsGenericFunctionCall.ts(9,9): error TS2347: Untyped function calls may not accept type arguments. +anyAsGenericFunctionCall.ts(10,9): error TS2347: Untyped function calls may not accept type arguments. -==== tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts (4 errors) ==== +==== anyAsGenericFunctionCall.ts (4 errors) ==== // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsGenericFunctionCall.js b/tests/baselines/reference/anyAsGenericFunctionCall.js index 085e1065a07c2..742c22380c830 100644 --- a/tests/baselines/reference/anyAsGenericFunctionCall.js +++ b/tests/baselines/reference/anyAsGenericFunctionCall.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts] //// + //// [anyAsGenericFunctionCall.ts] // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsGenericFunctionCall.symbols b/tests/baselines/reference/anyAsGenericFunctionCall.symbols index be29f1def4447..04981894e9fff 100644 --- a/tests/baselines/reference/anyAsGenericFunctionCall.symbols +++ b/tests/baselines/reference/anyAsGenericFunctionCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts === +//// [tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts] //// + +=== anyAsGenericFunctionCall.ts === // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsGenericFunctionCall.types b/tests/baselines/reference/anyAsGenericFunctionCall.types index 5d63e3dc11d11..a7b3cc606ea48 100644 --- a/tests/baselines/reference/anyAsGenericFunctionCall.types +++ b/tests/baselines/reference/anyAsGenericFunctionCall.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts === +//// [tests/cases/conformance/types/any/anyAsGenericFunctionCall.ts] //// + +=== anyAsGenericFunctionCall.ts === // any is considered an untyped function call // can be called except with type arguments which is an error diff --git a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js index a6b26d3890e40..cbb8d921a64b1 100644 --- a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js +++ b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts] //// + //// [anyAsReturnTypeForNewOnCall.ts] function Point(x, y) { diff --git a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.symbols b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.symbols index d6d6719240d44..f282888566979 100644 --- a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.symbols +++ b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts === +//// [tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts] //// + +=== anyAsReturnTypeForNewOnCall.ts === function Point(x, y) { >Point : Symbol(Point, Decl(anyAsReturnTypeForNewOnCall.ts, 0, 0)) >x : Symbol(x, Decl(anyAsReturnTypeForNewOnCall.ts, 0, 15)) diff --git a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types index 2ae57579835a2..1c62b1f6ec6a4 100644 --- a/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types +++ b/tests/baselines/reference/anyAsReturnTypeForNewOnCall.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts === +//// [tests/cases/compiler/anyAsReturnTypeForNewOnCall.ts] //// + +=== anyAsReturnTypeForNewOnCall.ts === function Point(x, y) { >Point : (x: any, y: any) => void >x : any diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.js b/tests/baselines/reference/anyAssignabilityInInheritance.js index 6871d6738aca7..1cb580caee7e2 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.js +++ b/tests/baselines/reference/anyAssignabilityInInheritance.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts] //// + //// [anyAssignabilityInInheritance.ts] // any is not a subtype of any other types, errors expected on all the below derived classes unless otherwise noted diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.symbols b/tests/baselines/reference/anyAssignabilityInInheritance.symbols index 3d0a7cdd6a4af..57ddd85d22898 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.symbols +++ b/tests/baselines/reference/anyAssignabilityInInheritance.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts] //// + +=== anyAssignabilityInInheritance.ts === // any is not a subtype of any other types, errors expected on all the below derived classes unless otherwise noted interface I { diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.types b/tests/baselines/reference/anyAssignabilityInInheritance.types index 4f9e8fdc9c99e..91802c6e0adb7 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.types +++ b/tests/baselines/reference/anyAssignabilityInInheritance.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts] //// + +=== anyAssignabilityInInheritance.ts === // any is not a subtype of any other types, errors expected on all the below derived classes unless otherwise noted interface I { diff --git a/tests/baselines/reference/anyAssignableToEveryType.js b/tests/baselines/reference/anyAssignableToEveryType.js index eff97905e4f4a..82f1f33bfe1c6 100644 --- a/tests/baselines/reference/anyAssignableToEveryType.js +++ b/tests/baselines/reference/anyAssignableToEveryType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts] //// + //// [anyAssignableToEveryType.ts] var a: any; diff --git a/tests/baselines/reference/anyAssignableToEveryType.symbols b/tests/baselines/reference/anyAssignableToEveryType.symbols index ffc2018793f43..64b78525adbb7 100644 --- a/tests/baselines/reference/anyAssignableToEveryType.symbols +++ b/tests/baselines/reference/anyAssignableToEveryType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts] //// + +=== anyAssignableToEveryType.ts === var a: any; >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) diff --git a/tests/baselines/reference/anyAssignableToEveryType.types b/tests/baselines/reference/anyAssignableToEveryType.types index 17d8ddea49728..72cf1d93a7421 100644 --- a/tests/baselines/reference/anyAssignableToEveryType.types +++ b/tests/baselines/reference/anyAssignableToEveryType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType.ts] //// + +=== anyAssignableToEveryType.ts === var a: any; >a : any diff --git a/tests/baselines/reference/anyAssignableToEveryType2.js b/tests/baselines/reference/anyAssignableToEveryType2.js index 28b4ab7148d90..10c5d2982cd42 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.js +++ b/tests/baselines/reference/anyAssignableToEveryType2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts] //// + //// [anyAssignableToEveryType2.ts] // any is not a subtype of any other types, but is assignable, all the below should work diff --git a/tests/baselines/reference/anyAssignableToEveryType2.symbols b/tests/baselines/reference/anyAssignableToEveryType2.symbols index b021466bd46c6..c9a7a4e8746c9 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.symbols +++ b/tests/baselines/reference/anyAssignableToEveryType2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts] //// + +=== anyAssignableToEveryType2.ts === // any is not a subtype of any other types, but is assignable, all the below should work interface I { diff --git a/tests/baselines/reference/anyAssignableToEveryType2.types b/tests/baselines/reference/anyAssignableToEveryType2.types index 146251c4a7a84..62025a7a55828 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.types +++ b/tests/baselines/reference/anyAssignableToEveryType2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts] //// + +=== anyAssignableToEveryType2.ts === // any is not a subtype of any other types, but is assignable, all the below should work interface I { diff --git a/tests/baselines/reference/anyDeclare.errors.txt b/tests/baselines/reference/anyDeclare.errors.txt index 8eda3672f24a7..cfbb06ee70413 100644 --- a/tests/baselines/reference/anyDeclare.errors.txt +++ b/tests/baselines/reference/anyDeclare.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/anyDeclare.ts(3,9): error TS2300: Duplicate identifier 'myFn'. -tests/cases/compiler/anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'. +anyDeclare.ts(3,9): error TS2300: Duplicate identifier 'myFn'. +anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'. -==== tests/cases/compiler/anyDeclare.ts (2 errors) ==== +==== anyDeclare.ts (2 errors) ==== declare var x: any; module myMod { var myFn; diff --git a/tests/baselines/reference/anyDeclare.js b/tests/baselines/reference/anyDeclare.js index 8bb2f55eb84a9..295e93e72eebc 100644 --- a/tests/baselines/reference/anyDeclare.js +++ b/tests/baselines/reference/anyDeclare.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyDeclare.ts] //// + //// [anyDeclare.ts] declare var x: any; module myMod { diff --git a/tests/baselines/reference/anyDeclare.symbols b/tests/baselines/reference/anyDeclare.symbols index 8975677a7c227..56d3e51027a7d 100644 --- a/tests/baselines/reference/anyDeclare.symbols +++ b/tests/baselines/reference/anyDeclare.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyDeclare.ts === +//// [tests/cases/compiler/anyDeclare.ts] //// + +=== anyDeclare.ts === declare var x: any; >x : Symbol(x, Decl(anyDeclare.ts, 0, 11)) diff --git a/tests/baselines/reference/anyDeclare.types b/tests/baselines/reference/anyDeclare.types index 6d1e85a4ae861..e4a7c89ba1aeb 100644 --- a/tests/baselines/reference/anyDeclare.types +++ b/tests/baselines/reference/anyDeclare.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyDeclare.ts === +//// [tests/cases/compiler/anyDeclare.ts] //// + +=== anyDeclare.ts === declare var x: any; >x : any diff --git a/tests/baselines/reference/anyIdenticalToItself.errors.txt b/tests/baselines/reference/anyIdenticalToItself.errors.txt index c16df4ff731ed..29cc151affa27 100644 --- a/tests/baselines/reference/anyIdenticalToItself.errors.txt +++ b/tests/baselines/reference/anyIdenticalToItself.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/anyIdenticalToItself.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. +anyIdenticalToItself.ts(1,10): error TS2394: This overload signature is not compatible with its implementation signature. -==== tests/cases/compiler/anyIdenticalToItself.ts (1 errors) ==== +==== anyIdenticalToItself.ts (1 errors) ==== function foo(x: any); ~~~ !!! error TS2394: This overload signature is not compatible with its implementation signature. -!!! related TS2750 tests/cases/compiler/anyIdenticalToItself.ts:3:10: The implementation signature is declared here. +!!! related TS2750 anyIdenticalToItself.ts:3:10: The implementation signature is declared here. function foo(x: any); function foo(x: any, y: number) { } diff --git a/tests/baselines/reference/anyIdenticalToItself.js b/tests/baselines/reference/anyIdenticalToItself.js index 6ec3d0d43e619..f987b7a1fcdd4 100644 --- a/tests/baselines/reference/anyIdenticalToItself.js +++ b/tests/baselines/reference/anyIdenticalToItself.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyIdenticalToItself.ts] //// + //// [anyIdenticalToItself.ts] function foo(x: any); function foo(x: any); diff --git a/tests/baselines/reference/anyIdenticalToItself.symbols b/tests/baselines/reference/anyIdenticalToItself.symbols index f09459d6bfc6a..72daa999f13d1 100644 --- a/tests/baselines/reference/anyIdenticalToItself.symbols +++ b/tests/baselines/reference/anyIdenticalToItself.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIdenticalToItself.ts === +//// [tests/cases/compiler/anyIdenticalToItself.ts] //// + +=== anyIdenticalToItself.ts === function foo(x: any); >foo : Symbol(foo, Decl(anyIdenticalToItself.ts, 0, 0), Decl(anyIdenticalToItself.ts, 0, 21), Decl(anyIdenticalToItself.ts, 1, 21)) >x : Symbol(x, Decl(anyIdenticalToItself.ts, 0, 13)) diff --git a/tests/baselines/reference/anyIdenticalToItself.types b/tests/baselines/reference/anyIdenticalToItself.types index fa71f579cbb73..237361b479199 100644 --- a/tests/baselines/reference/anyIdenticalToItself.types +++ b/tests/baselines/reference/anyIdenticalToItself.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIdenticalToItself.ts === +//// [tests/cases/compiler/anyIdenticalToItself.ts] //// + +=== anyIdenticalToItself.ts === function foo(x: any); >foo : { (x: any): any; (x: any): any; } >x : any diff --git a/tests/baselines/reference/anyIndexedAccessArrayNoException.errors.txt b/tests/baselines/reference/anyIndexedAccessArrayNoException.errors.txt index e207468122bc0..99c33b083d737 100644 --- a/tests/baselines/reference/anyIndexedAccessArrayNoException.errors.txt +++ b/tests/baselines/reference/anyIndexedAccessArrayNoException.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/anyIndexedAccessArrayNoException.ts(1,12): error TS2538: Type '[]' cannot be used as an index type. +anyIndexedAccessArrayNoException.ts(1,12): error TS2538: Type '[]' cannot be used as an index type. -==== tests/cases/compiler/anyIndexedAccessArrayNoException.ts (1 errors) ==== +==== anyIndexedAccessArrayNoException.ts (1 errors) ==== var x: any[[]]; ~~ !!! error TS2538: Type '[]' cannot be used as an index type. diff --git a/tests/baselines/reference/anyIndexedAccessArrayNoException.js b/tests/baselines/reference/anyIndexedAccessArrayNoException.js index d42bc54deb4f9..8765f4bd55936 100644 --- a/tests/baselines/reference/anyIndexedAccessArrayNoException.js +++ b/tests/baselines/reference/anyIndexedAccessArrayNoException.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyIndexedAccessArrayNoException.ts] //// + //// [anyIndexedAccessArrayNoException.ts] var x: any[[]]; diff --git a/tests/baselines/reference/anyIndexedAccessArrayNoException.symbols b/tests/baselines/reference/anyIndexedAccessArrayNoException.symbols index 31e706cb8cd1a..b2c7072a7cb45 100644 --- a/tests/baselines/reference/anyIndexedAccessArrayNoException.symbols +++ b/tests/baselines/reference/anyIndexedAccessArrayNoException.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIndexedAccessArrayNoException.ts === +//// [tests/cases/compiler/anyIndexedAccessArrayNoException.ts] //// + +=== anyIndexedAccessArrayNoException.ts === var x: any[[]]; >x : Symbol(x, Decl(anyIndexedAccessArrayNoException.ts, 0, 3)) diff --git a/tests/baselines/reference/anyIndexedAccessArrayNoException.types b/tests/baselines/reference/anyIndexedAccessArrayNoException.types index b915911ca614d..e114485c046a5 100644 --- a/tests/baselines/reference/anyIndexedAccessArrayNoException.types +++ b/tests/baselines/reference/anyIndexedAccessArrayNoException.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIndexedAccessArrayNoException.ts === +//// [tests/cases/compiler/anyIndexedAccessArrayNoException.ts] //// + +=== anyIndexedAccessArrayNoException.ts === var x: any[[]]; >x : any diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.js b/tests/baselines/reference/anyInferenceAnonymousFunctions.js index df921965994d7..b53bac5c9f3fb 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.js +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyInferenceAnonymousFunctions.ts] //// + //// [anyInferenceAnonymousFunctions.ts] var paired: any[]; diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols index 941b19b32392b..82e6aa329f0d2 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyInferenceAnonymousFunctions.ts === +//// [tests/cases/compiler/anyInferenceAnonymousFunctions.ts] //// + +=== anyInferenceAnonymousFunctions.ts === var paired: any[]; >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.types b/tests/baselines/reference/anyInferenceAnonymousFunctions.types index d5f693b5453b4..ca25c17da26b9 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.types +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyInferenceAnonymousFunctions.ts === +//// [tests/cases/compiler/anyInferenceAnonymousFunctions.ts] //// + +=== anyInferenceAnonymousFunctions.ts === var paired: any[]; >paired : any[] diff --git a/tests/baselines/reference/anyIsAssignableToObject.js b/tests/baselines/reference/anyIsAssignableToObject.js index fc333cb15e06b..f132f9bc052c0 100644 --- a/tests/baselines/reference/anyIsAssignableToObject.js +++ b/tests/baselines/reference/anyIsAssignableToObject.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyIsAssignableToObject.ts] //// + //// [anyIsAssignableToObject.ts] interface P { p: {}; diff --git a/tests/baselines/reference/anyIsAssignableToObject.symbols b/tests/baselines/reference/anyIsAssignableToObject.symbols index 15478466d5be7..3b0512a5be337 100644 --- a/tests/baselines/reference/anyIsAssignableToObject.symbols +++ b/tests/baselines/reference/anyIsAssignableToObject.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIsAssignableToObject.ts === +//// [tests/cases/compiler/anyIsAssignableToObject.ts] //// + +=== anyIsAssignableToObject.ts === interface P { >P : Symbol(P, Decl(anyIsAssignableToObject.ts, 0, 0)) diff --git a/tests/baselines/reference/anyIsAssignableToObject.types b/tests/baselines/reference/anyIsAssignableToObject.types index 537da916cf7ed..d1c2ad8f4cc71 100644 --- a/tests/baselines/reference/anyIsAssignableToObject.types +++ b/tests/baselines/reference/anyIsAssignableToObject.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIsAssignableToObject.ts === +//// [tests/cases/compiler/anyIsAssignableToObject.ts] //// + +=== anyIsAssignableToObject.ts === interface P { p: {}; >p : {} diff --git a/tests/baselines/reference/anyIsAssignableToVoid.js b/tests/baselines/reference/anyIsAssignableToVoid.js index 75e6e979ac3ff..5aa2bda86ee2e 100644 --- a/tests/baselines/reference/anyIsAssignableToVoid.js +++ b/tests/baselines/reference/anyIsAssignableToVoid.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyIsAssignableToVoid.ts] //// + //// [anyIsAssignableToVoid.ts] interface P { p: void; diff --git a/tests/baselines/reference/anyIsAssignableToVoid.symbols b/tests/baselines/reference/anyIsAssignableToVoid.symbols index 50545c05d5678..31ceb7c31ee00 100644 --- a/tests/baselines/reference/anyIsAssignableToVoid.symbols +++ b/tests/baselines/reference/anyIsAssignableToVoid.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIsAssignableToVoid.ts === +//// [tests/cases/compiler/anyIsAssignableToVoid.ts] //// + +=== anyIsAssignableToVoid.ts === interface P { >P : Symbol(P, Decl(anyIsAssignableToVoid.ts, 0, 0)) diff --git a/tests/baselines/reference/anyIsAssignableToVoid.types b/tests/baselines/reference/anyIsAssignableToVoid.types index 93f10a0c28f57..98956fb4de667 100644 --- a/tests/baselines/reference/anyIsAssignableToVoid.types +++ b/tests/baselines/reference/anyIsAssignableToVoid.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyIsAssignableToVoid.ts === +//// [tests/cases/compiler/anyIsAssignableToVoid.ts] //// + +=== anyIsAssignableToVoid.ts === interface P { p: void; >p : void diff --git a/tests/baselines/reference/anyMappedTypesError.errors.txt b/tests/baselines/reference/anyMappedTypesError.errors.txt index e1442c15723a2..c2eff08c4dbe1 100644 --- a/tests/baselines/reference/anyMappedTypesError.errors.txt +++ b/tests/baselines/reference/anyMappedTypesError.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/anyMappedTypesError.ts(1,12): error TS7039: Mapped object type implicitly has an 'any' template type. +anyMappedTypesError.ts(1,12): error TS7039: Mapped object type implicitly has an 'any' template type. -==== tests/cases/compiler/anyMappedTypesError.ts (1 errors) ==== +==== anyMappedTypesError.ts (1 errors) ==== type Foo = {[P in "bar"]}; ~~~~~~~~~~~~~~ !!! error TS7039: Mapped object type implicitly has an 'any' template type. \ No newline at end of file diff --git a/tests/baselines/reference/anyMappedTypesError.js b/tests/baselines/reference/anyMappedTypesError.js index 8797d2cfc0e69..a4f361804e1ec 100644 --- a/tests/baselines/reference/anyMappedTypesError.js +++ b/tests/baselines/reference/anyMappedTypesError.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyMappedTypesError.ts] //// + //// [anyMappedTypesError.ts] type Foo = {[P in "bar"]}; diff --git a/tests/baselines/reference/anyMappedTypesError.symbols b/tests/baselines/reference/anyMappedTypesError.symbols index 0e9a425aad39f..bf954f7ed840f 100644 --- a/tests/baselines/reference/anyMappedTypesError.symbols +++ b/tests/baselines/reference/anyMappedTypesError.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyMappedTypesError.ts === +//// [tests/cases/compiler/anyMappedTypesError.ts] //// + +=== anyMappedTypesError.ts === type Foo = {[P in "bar"]}; >Foo : Symbol(Foo, Decl(anyMappedTypesError.ts, 0, 0)) >P : Symbol(P, Decl(anyMappedTypesError.ts, 0, 13)) diff --git a/tests/baselines/reference/anyMappedTypesError.types b/tests/baselines/reference/anyMappedTypesError.types index e30f65d142ec1..c5c3f59a7a496 100644 --- a/tests/baselines/reference/anyMappedTypesError.types +++ b/tests/baselines/reference/anyMappedTypesError.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyMappedTypesError.ts === +//// [tests/cases/compiler/anyMappedTypesError.ts] //// + +=== anyMappedTypesError.ts === type Foo = {[P in "bar"]}; >Foo : { bar: any; } diff --git a/tests/baselines/reference/anyPlusAny1.js b/tests/baselines/reference/anyPlusAny1.js index 4b28a1d22e26b..328a2e7024e5e 100644 --- a/tests/baselines/reference/anyPlusAny1.js +++ b/tests/baselines/reference/anyPlusAny1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/anyPlusAny1.ts] //// + //// [anyPlusAny1.ts] var x: any; x.name = "hello"; diff --git a/tests/baselines/reference/anyPlusAny1.symbols b/tests/baselines/reference/anyPlusAny1.symbols index 3b33a11987ecc..f6bf31ad885e4 100644 --- a/tests/baselines/reference/anyPlusAny1.symbols +++ b/tests/baselines/reference/anyPlusAny1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyPlusAny1.ts === +//// [tests/cases/compiler/anyPlusAny1.ts] //// + +=== anyPlusAny1.ts === var x: any; >x : Symbol(x, Decl(anyPlusAny1.ts, 0, 3)) diff --git a/tests/baselines/reference/anyPlusAny1.types b/tests/baselines/reference/anyPlusAny1.types index 67323a10fd6be..23cba40eb4a29 100644 --- a/tests/baselines/reference/anyPlusAny1.types +++ b/tests/baselines/reference/anyPlusAny1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/anyPlusAny1.ts === +//// [tests/cases/compiler/anyPlusAny1.ts] //// + +=== anyPlusAny1.ts === var x: any; >x : any diff --git a/tests/baselines/reference/anyPropertyAccess.js b/tests/baselines/reference/anyPropertyAccess.js index aa3298acfbe82..c197c44b60834 100644 --- a/tests/baselines/reference/anyPropertyAccess.js +++ b/tests/baselines/reference/anyPropertyAccess.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/any/anyPropertyAccess.ts] //// + //// [anyPropertyAccess.ts] var x: any; var a = x.foo; diff --git a/tests/baselines/reference/anyPropertyAccess.symbols b/tests/baselines/reference/anyPropertyAccess.symbols index e99b494853ef4..c01cd08ee9a42 100644 --- a/tests/baselines/reference/anyPropertyAccess.symbols +++ b/tests/baselines/reference/anyPropertyAccess.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyPropertyAccess.ts === +//// [tests/cases/conformance/types/any/anyPropertyAccess.ts] //// + +=== anyPropertyAccess.ts === var x: any; >x : Symbol(x, Decl(anyPropertyAccess.ts, 0, 3)) diff --git a/tests/baselines/reference/anyPropertyAccess.types b/tests/baselines/reference/anyPropertyAccess.types index 9b9e5ab84ac8e..b890c1431b2a5 100644 --- a/tests/baselines/reference/anyPropertyAccess.types +++ b/tests/baselines/reference/anyPropertyAccess.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/anyPropertyAccess.ts === +//// [tests/cases/conformance/types/any/anyPropertyAccess.ts] //// + +=== anyPropertyAccess.ts === var x: any; >x : any diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index ee5fed651ed51..4571351e5a9cc 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -619,6 +619,7 @@ declare namespace ts { */ renameLocation?: Location; renameFilename?: string; + notApplicableReason?: string; } /** * Organize imports by: @@ -1829,6 +1830,11 @@ declare namespace ts { * coupled with `replacementSpan` to replace a dotted access with a bracket access. */ insertText?: string; + /** + * A string that should be used when filtering a set of + * completion items. + */ + filterText?: string; /** * `insertText` should be interpreted as a snippet if true. */ @@ -2118,12 +2124,16 @@ declare namespace ts { arguments: InlayHintsRequestArgs; } interface InlayHintItem { - text: string; + text: string | InlayHintItemDisplayPart[]; position: Location; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; } + interface InlayHintItemDisplayPart { + text: string; + span?: FileSpan; + } interface InlayHintsResponse extends Response { body?: InlayHintItem[]; } @@ -2826,6 +2836,7 @@ declare namespace ts { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly autoImportFileExcludePatterns?: string[]; /** * Indicates whether imports should be organized in a case-insensitive manner. @@ -3394,7 +3405,7 @@ declare namespace ts { markAsDirty(): void; getScriptFileNames(): string[]; getLanguageService(): never; - getModuleResolutionHostForAutoImportProvider(): never; + getHostForAutoImportProvider(): never; getProjectReferences(): readonly ts.ProjectReference[] | undefined; getTypeAcquisition(): TypeAcquisition; } @@ -4061,7 +4072,7 @@ declare namespace ts { responseRequired?: boolean; } } - const versionMajorMinor = "5.1"; + const versionMajorMinor = "5.2"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -4251,211 +4262,212 @@ declare namespace ts { UndefinedKeyword = 157, UniqueKeyword = 158, UnknownKeyword = 159, - FromKeyword = 160, - GlobalKeyword = 161, - BigIntKeyword = 162, - OverrideKeyword = 163, - OfKeyword = 164, - QualifiedName = 165, - ComputedPropertyName = 166, - TypeParameter = 167, - Parameter = 168, - Decorator = 169, - PropertySignature = 170, - PropertyDeclaration = 171, - MethodSignature = 172, - MethodDeclaration = 173, - ClassStaticBlockDeclaration = 174, - Constructor = 175, - GetAccessor = 176, - SetAccessor = 177, - CallSignature = 178, - ConstructSignature = 179, - IndexSignature = 180, - TypePredicate = 181, - TypeReference = 182, - FunctionType = 183, - ConstructorType = 184, - TypeQuery = 185, - TypeLiteral = 186, - ArrayType = 187, - TupleType = 188, - OptionalType = 189, - RestType = 190, - UnionType = 191, - IntersectionType = 192, - ConditionalType = 193, - InferType = 194, - ParenthesizedType = 195, - ThisType = 196, - TypeOperator = 197, - IndexedAccessType = 198, - MappedType = 199, - LiteralType = 200, - NamedTupleMember = 201, - TemplateLiteralType = 202, - TemplateLiteralTypeSpan = 203, - ImportType = 204, - ObjectBindingPattern = 205, - ArrayBindingPattern = 206, - BindingElement = 207, - ArrayLiteralExpression = 208, - ObjectLiteralExpression = 209, - PropertyAccessExpression = 210, - ElementAccessExpression = 211, - CallExpression = 212, - NewExpression = 213, - TaggedTemplateExpression = 214, - TypeAssertionExpression = 215, - ParenthesizedExpression = 216, - FunctionExpression = 217, - ArrowFunction = 218, - DeleteExpression = 219, - TypeOfExpression = 220, - VoidExpression = 221, - AwaitExpression = 222, - PrefixUnaryExpression = 223, - PostfixUnaryExpression = 224, - BinaryExpression = 225, - ConditionalExpression = 226, - TemplateExpression = 227, - YieldExpression = 228, - SpreadElement = 229, - ClassExpression = 230, - OmittedExpression = 231, - ExpressionWithTypeArguments = 232, - AsExpression = 233, - NonNullExpression = 234, - MetaProperty = 235, - SyntheticExpression = 236, - SatisfiesExpression = 237, - TemplateSpan = 238, - SemicolonClassElement = 239, - Block = 240, - EmptyStatement = 241, - VariableStatement = 242, - ExpressionStatement = 243, - IfStatement = 244, - DoStatement = 245, - WhileStatement = 246, - ForStatement = 247, - ForInStatement = 248, - ForOfStatement = 249, - ContinueStatement = 250, - BreakStatement = 251, - ReturnStatement = 252, - WithStatement = 253, - SwitchStatement = 254, - LabeledStatement = 255, - ThrowStatement = 256, - TryStatement = 257, - DebuggerStatement = 258, - VariableDeclaration = 259, - VariableDeclarationList = 260, - FunctionDeclaration = 261, - ClassDeclaration = 262, - InterfaceDeclaration = 263, - TypeAliasDeclaration = 264, - EnumDeclaration = 265, - ModuleDeclaration = 266, - ModuleBlock = 267, - CaseBlock = 268, - NamespaceExportDeclaration = 269, - ImportEqualsDeclaration = 270, - ImportDeclaration = 271, - ImportClause = 272, - NamespaceImport = 273, - NamedImports = 274, - ImportSpecifier = 275, - ExportAssignment = 276, - ExportDeclaration = 277, - NamedExports = 278, - NamespaceExport = 279, - ExportSpecifier = 280, - MissingDeclaration = 281, - ExternalModuleReference = 282, - JsxElement = 283, - JsxSelfClosingElement = 284, - JsxOpeningElement = 285, - JsxClosingElement = 286, - JsxFragment = 287, - JsxOpeningFragment = 288, - JsxClosingFragment = 289, - JsxAttribute = 290, - JsxAttributes = 291, - JsxSpreadAttribute = 292, - JsxExpression = 293, - JsxNamespacedName = 294, - CaseClause = 295, - DefaultClause = 296, - HeritageClause = 297, - CatchClause = 298, - AssertClause = 299, - AssertEntry = 300, - ImportTypeAssertionContainer = 301, - PropertyAssignment = 302, - ShorthandPropertyAssignment = 303, - SpreadAssignment = 304, - EnumMember = 305, - /** @deprecated */ UnparsedPrologue = 306, - /** @deprecated */ UnparsedPrepend = 307, - /** @deprecated */ UnparsedText = 308, - /** @deprecated */ UnparsedInternalText = 309, - /** @deprecated */ UnparsedSyntheticReference = 310, - SourceFile = 311, - Bundle = 312, - /** @deprecated */ UnparsedSource = 313, - /** @deprecated */ InputFiles = 314, - JSDocTypeExpression = 315, - JSDocNameReference = 316, - JSDocMemberName = 317, - JSDocAllType = 318, - JSDocUnknownType = 319, - JSDocNullableType = 320, - JSDocNonNullableType = 321, - JSDocOptionalType = 322, - JSDocFunctionType = 323, - JSDocVariadicType = 324, - JSDocNamepathType = 325, - JSDoc = 326, + UsingKeyword = 160, + FromKeyword = 161, + GlobalKeyword = 162, + BigIntKeyword = 163, + OverrideKeyword = 164, + OfKeyword = 165, + QualifiedName = 166, + ComputedPropertyName = 167, + TypeParameter = 168, + Parameter = 169, + Decorator = 170, + PropertySignature = 171, + PropertyDeclaration = 172, + MethodSignature = 173, + MethodDeclaration = 174, + ClassStaticBlockDeclaration = 175, + Constructor = 176, + GetAccessor = 177, + SetAccessor = 178, + CallSignature = 179, + ConstructSignature = 180, + IndexSignature = 181, + TypePredicate = 182, + TypeReference = 183, + FunctionType = 184, + ConstructorType = 185, + TypeQuery = 186, + TypeLiteral = 187, + ArrayType = 188, + TupleType = 189, + OptionalType = 190, + RestType = 191, + UnionType = 192, + IntersectionType = 193, + ConditionalType = 194, + InferType = 195, + ParenthesizedType = 196, + ThisType = 197, + TypeOperator = 198, + IndexedAccessType = 199, + MappedType = 200, + LiteralType = 201, + NamedTupleMember = 202, + TemplateLiteralType = 203, + TemplateLiteralTypeSpan = 204, + ImportType = 205, + ObjectBindingPattern = 206, + ArrayBindingPattern = 207, + BindingElement = 208, + ArrayLiteralExpression = 209, + ObjectLiteralExpression = 210, + PropertyAccessExpression = 211, + ElementAccessExpression = 212, + CallExpression = 213, + NewExpression = 214, + TaggedTemplateExpression = 215, + TypeAssertionExpression = 216, + ParenthesizedExpression = 217, + FunctionExpression = 218, + ArrowFunction = 219, + DeleteExpression = 220, + TypeOfExpression = 221, + VoidExpression = 222, + AwaitExpression = 223, + PrefixUnaryExpression = 224, + PostfixUnaryExpression = 225, + BinaryExpression = 226, + ConditionalExpression = 227, + TemplateExpression = 228, + YieldExpression = 229, + SpreadElement = 230, + ClassExpression = 231, + OmittedExpression = 232, + ExpressionWithTypeArguments = 233, + AsExpression = 234, + NonNullExpression = 235, + MetaProperty = 236, + SyntheticExpression = 237, + SatisfiesExpression = 238, + TemplateSpan = 239, + SemicolonClassElement = 240, + Block = 241, + EmptyStatement = 242, + VariableStatement = 243, + ExpressionStatement = 244, + IfStatement = 245, + DoStatement = 246, + WhileStatement = 247, + ForStatement = 248, + ForInStatement = 249, + ForOfStatement = 250, + ContinueStatement = 251, + BreakStatement = 252, + ReturnStatement = 253, + WithStatement = 254, + SwitchStatement = 255, + LabeledStatement = 256, + ThrowStatement = 257, + TryStatement = 258, + DebuggerStatement = 259, + VariableDeclaration = 260, + VariableDeclarationList = 261, + FunctionDeclaration = 262, + ClassDeclaration = 263, + InterfaceDeclaration = 264, + TypeAliasDeclaration = 265, + EnumDeclaration = 266, + ModuleDeclaration = 267, + ModuleBlock = 268, + CaseBlock = 269, + NamespaceExportDeclaration = 270, + ImportEqualsDeclaration = 271, + ImportDeclaration = 272, + ImportClause = 273, + NamespaceImport = 274, + NamedImports = 275, + ImportSpecifier = 276, + ExportAssignment = 277, + ExportDeclaration = 278, + NamedExports = 279, + NamespaceExport = 280, + ExportSpecifier = 281, + MissingDeclaration = 282, + ExternalModuleReference = 283, + JsxElement = 284, + JsxSelfClosingElement = 285, + JsxOpeningElement = 286, + JsxClosingElement = 287, + JsxFragment = 288, + JsxOpeningFragment = 289, + JsxClosingFragment = 290, + JsxAttribute = 291, + JsxAttributes = 292, + JsxSpreadAttribute = 293, + JsxExpression = 294, + JsxNamespacedName = 295, + CaseClause = 296, + DefaultClause = 297, + HeritageClause = 298, + CatchClause = 299, + AssertClause = 300, + AssertEntry = 301, + ImportTypeAssertionContainer = 302, + PropertyAssignment = 303, + ShorthandPropertyAssignment = 304, + SpreadAssignment = 305, + EnumMember = 306, + /** @deprecated */ UnparsedPrologue = 307, + /** @deprecated */ UnparsedPrepend = 308, + /** @deprecated */ UnparsedText = 309, + /** @deprecated */ UnparsedInternalText = 310, + /** @deprecated */ UnparsedSyntheticReference = 311, + SourceFile = 312, + Bundle = 313, + /** @deprecated */ UnparsedSource = 314, + /** @deprecated */ InputFiles = 315, + JSDocTypeExpression = 316, + JSDocNameReference = 317, + JSDocMemberName = 318, + JSDocAllType = 319, + JSDocUnknownType = 320, + JSDocNullableType = 321, + JSDocNonNullableType = 322, + JSDocOptionalType = 323, + JSDocFunctionType = 324, + JSDocVariadicType = 325, + JSDocNamepathType = 326, + JSDoc = 327, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 326, - JSDocText = 327, - JSDocTypeLiteral = 328, - JSDocSignature = 329, - JSDocLink = 330, - JSDocLinkCode = 331, - JSDocLinkPlain = 332, - JSDocTag = 333, - JSDocAugmentsTag = 334, - JSDocImplementsTag = 335, - JSDocAuthorTag = 336, - JSDocDeprecatedTag = 337, - JSDocClassTag = 338, - JSDocPublicTag = 339, - JSDocPrivateTag = 340, - JSDocProtectedTag = 341, - JSDocReadonlyTag = 342, - JSDocOverrideTag = 343, - JSDocCallbackTag = 344, - JSDocOverloadTag = 345, - JSDocEnumTag = 346, - JSDocParameterTag = 347, - JSDocReturnTag = 348, - JSDocThisTag = 349, - JSDocTypeTag = 350, - JSDocTemplateTag = 351, - JSDocTypedefTag = 352, - JSDocSeeTag = 353, - JSDocPropertyTag = 354, - JSDocThrowsTag = 355, - JSDocSatisfiesTag = 356, - SyntaxList = 357, - NotEmittedStatement = 358, - PartiallyEmittedExpression = 359, - CommaListExpression = 360, - SyntheticReferenceExpression = 361, - Count = 362, + JSDocComment = 327, + JSDocText = 328, + JSDocTypeLiteral = 329, + JSDocSignature = 330, + JSDocLink = 331, + JSDocLinkCode = 332, + JSDocLinkPlain = 333, + JSDocTag = 334, + JSDocAugmentsTag = 335, + JSDocImplementsTag = 336, + JSDocAuthorTag = 337, + JSDocDeprecatedTag = 338, + JSDocClassTag = 339, + JSDocPublicTag = 340, + JSDocPrivateTag = 341, + JSDocProtectedTag = 342, + JSDocReadonlyTag = 343, + JSDocOverrideTag = 344, + JSDocCallbackTag = 345, + JSDocOverloadTag = 346, + JSDocEnumTag = 347, + JSDocParameterTag = 348, + JSDocReturnTag = 349, + JSDocThisTag = 350, + JSDocTypeTag = 351, + JSDocTemplateTag = 352, + JSDocTypedefTag = 353, + JSDocSeeTag = 354, + JSDocPropertyTag = 355, + JSDocThrowsTag = 356, + JSDocSatisfiesTag = 357, + SyntaxList = 358, + NotEmittedStatement = 359, + PartiallyEmittedExpression = 360, + CommaListExpression = 361, + SyntheticReferenceExpression = 362, + Count = 363, FirstAssignment = 64, LastAssignment = 79, FirstCompoundAssignment = 65, @@ -4463,15 +4475,15 @@ declare namespace ts { FirstReservedWord = 83, LastReservedWord = 118, FirstKeyword = 83, - LastKeyword = 164, + LastKeyword = 165, FirstFutureReservedWord = 119, LastFutureReservedWord = 127, - FirstTypeNode = 181, - LastTypeNode = 204, + FirstTypeNode = 182, + LastTypeNode = 205, FirstPunctuation = 19, LastPunctuation = 79, FirstToken = 0, - LastToken = 164, + LastToken = 165, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 9, @@ -4480,19 +4492,19 @@ declare namespace ts { LastTemplateToken = 18, FirstBinaryOperator = 30, LastBinaryOperator = 79, - FirstStatement = 242, - LastStatement = 258, - FirstNode = 165, - FirstJSDocNode = 315, - LastJSDocNode = 356, - FirstJSDocTagNode = 333, - LastJSDocTagNode = 356 + FirstStatement = 243, + LastStatement = 259, + FirstNode = 166, + FirstJSDocNode = 316, + LastJSDocNode = 357, + FirstJSDocTagNode = 334, + LastJSDocTagNode = 357 } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; 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.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | 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; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | 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.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | 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; + type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | 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.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | 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.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; 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; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -4502,32 +4514,35 @@ declare namespace ts { None = 0, Let = 1, Const = 2, - NestedNamespace = 4, - Synthesized = 8, - Namespace = 16, - OptionalChain = 32, - ExportContext = 64, - ContainsThis = 128, - HasImplicitReturn = 256, - HasExplicitReturn = 512, - GlobalAugmentation = 1024, - HasAsyncFunctions = 2048, - DisallowInContext = 4096, - YieldContext = 8192, - DecoratorContext = 16384, - AwaitContext = 32768, - DisallowConditionalTypesContext = 65536, - ThisNodeHasError = 131072, - JavaScriptFile = 262144, - ThisNodeOrAnySubNodesHasError = 524288, - HasAggregatedChildData = 1048576, - JSDoc = 8388608, - JsonFile = 67108864, - BlockScoped = 3, - ReachabilityCheckFlags = 768, - ReachabilityAndEmitFlags = 2816, - ContextFlags = 50720768, - TypeExcludesFlags = 40960 + Using = 4, + AwaitUsing = 6, + NestedNamespace = 8, + Synthesized = 16, + Namespace = 32, + OptionalChain = 64, + ExportContext = 128, + ContainsThis = 256, + HasImplicitReturn = 512, + HasExplicitReturn = 1024, + GlobalAugmentation = 2048, + HasAsyncFunctions = 4096, + DisallowInContext = 8192, + YieldContext = 16384, + DecoratorContext = 32768, + AwaitContext = 65536, + DisallowConditionalTypesContext = 131072, + ThisNodeHasError = 262144, + JavaScriptFile = 524288, + ThisNodeOrAnySubNodesHasError = 1048576, + HasAggregatedChildData = 2097152, + JSDoc = 16777216, + JsonFile = 134217728, + BlockScoped = 7, + Constant = 6, + ReachabilityCheckFlags = 1536, + ReachabilityAndEmitFlags = 5632, + ContextFlags = 101441536, + TypeExcludesFlags = 81920 } enum ModifierFlags { None = 0, @@ -4691,7 +4706,7 @@ declare namespace ts { type EntityName = Identifier | QualifiedName; type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; type MemberName = Identifier | PrivateIdentifier; - type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression; + type DeclarationName = PropertyName | JsxAttributeName | StringLiteralLike | ElementAccessExpression | BindingPattern | EntityNameExpression; interface Declaration extends Node { _declarationBrand: any; } @@ -5038,7 +5053,7 @@ declare namespace ts { readonly kind: SyntaxKind.StringLiteral; } type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; - type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; + type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral | JsxNamespacedName; interface TemplateLiteralTypeNode extends TypeNode { kind: SyntaxKind.TemplateLiteralType; readonly head: TemplateHead; @@ -5397,14 +5412,14 @@ declare namespace ts { type JsxAttributeName = Identifier | JsxNamespacedName; type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName; interface JsxTagNamePropertyAccess extends PropertyAccessExpression { - readonly expression: JsxTagNameExpression; + readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; } interface JsxAttributes extends PrimaryExpression, Declaration { readonly properties: NodeArray; readonly kind: SyntaxKind.JsxAttributes; readonly parent: JsxOpeningLikeElement; } - interface JsxNamespacedName extends PrimaryExpression { + interface JsxNamespacedName extends Node { readonly kind: SyntaxKind.JsxNamespacedName; readonly name: Identifier; readonly namespace: Identifier; @@ -5445,7 +5460,6 @@ declare namespace ts { type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; interface JsxSpreadAttribute extends ObjectLiteralElement { readonly kind: SyntaxKind.JsxSpreadAttribute; - readonly name: PropertyName; readonly parent: JsxAttributes; readonly expression: Expression; } @@ -6265,7 +6279,7 @@ declare namespace ts { getSourceFileByPath(path: Path): SourceFile | undefined; getCurrentDirectory(): string; } - interface ParseConfigHost { + interface ParseConfigHost extends ModuleResolutionHost { useCaseSensitiveFileNames: boolean; readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; /** @@ -6942,7 +6956,7 @@ declare namespace ts { hasRestElement: boolean; combinedFlags: ElementFlags; readonly: boolean; - labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; + labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]; } interface TupleTypeReference extends TypeReference { target: TupleType; @@ -7583,7 +7597,14 @@ declare namespace ts { All = 15, ExcludeJSDocTypeAssertion = 16 } - type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; + type ImmediatelyInvokedFunctionExpression = CallExpression & { + readonly expression: FunctionExpression; + }; + type ImmediatelyInvokedArrowFunction = CallExpression & { + readonly expression: ParenthesizedExpression & { + readonly expression: ArrowFunction; + }; + }; interface NodeFactory { createNodeArray(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray; createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; @@ -8053,8 +8074,8 @@ declare namespace ts { createPostfixDecrement(operand: Expression): PostfixUnaryExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; createVoidZero(): VoidExpression; createExportDefault(expression: Expression): ExportAssignment; createExternalModuleExport(exportName: Identifier): ExportDeclaration; @@ -8384,6 +8405,7 @@ declare namespace ts { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; readonly organizeImportsIgnoreCase?: "auto" | boolean; @@ -10190,7 +10212,7 @@ declare namespace ts { * arguments for any interactive action before offering it. */ getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string, includeInteractiveActions?: boolean): ApplicableRefactorInfo[]; - getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, includeInteractiveActions?: InteractiveRefactorArguments): RefactorEditInfo | undefined; + getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo | undefined; getMoveToRefactoringFileSuggestions(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): { newFileName: string; files: string[]; @@ -10366,12 +10388,17 @@ declare namespace ts { Enum = "Enum" } interface InlayHint { - text: string; + text: string | InlayHintDisplayPart[]; position: number; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; } + interface InlayHintDisplayPart { + text: string; + span?: TextSpan; + file?: string; + } interface TodoCommentDescriptor { text: string; priority: number; @@ -10480,6 +10507,7 @@ declare namespace ts { renameFilename?: string; renameLocation?: number; commands?: CodeActionCommand[]; + notApplicableReason?: string; } type RefactorTriggerReason = "implicit" | "invoked"; interface TextInsertion { @@ -10801,6 +10829,7 @@ declare namespace ts { kindModifiers?: string; sortText: string; insertText?: string; + filterText?: string; isSnippet?: true; /** * An optional span that indicates the text to be replaced by this completion item. @@ -10960,6 +10989,10 @@ declare namespace ts { variableElement = "var", /** Inside function */ localVariableElement = "local var", + /** using foo = ... */ + variableUsingElement = "using", + /** await using foo = ... */ + variableAwaitUsingElement = "await using", /** * Inside module and script only * function f() { } diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index debe70be3206c..09abb27b97058 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 = "5.1"; + const versionMajorMinor = "5.2"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -204,211 +204,212 @@ declare namespace ts { UndefinedKeyword = 157, UniqueKeyword = 158, UnknownKeyword = 159, - FromKeyword = 160, - GlobalKeyword = 161, - BigIntKeyword = 162, - OverrideKeyword = 163, - OfKeyword = 164, - QualifiedName = 165, - ComputedPropertyName = 166, - TypeParameter = 167, - Parameter = 168, - Decorator = 169, - PropertySignature = 170, - PropertyDeclaration = 171, - MethodSignature = 172, - MethodDeclaration = 173, - ClassStaticBlockDeclaration = 174, - Constructor = 175, - GetAccessor = 176, - SetAccessor = 177, - CallSignature = 178, - ConstructSignature = 179, - IndexSignature = 180, - TypePredicate = 181, - TypeReference = 182, - FunctionType = 183, - ConstructorType = 184, - TypeQuery = 185, - TypeLiteral = 186, - ArrayType = 187, - TupleType = 188, - OptionalType = 189, - RestType = 190, - UnionType = 191, - IntersectionType = 192, - ConditionalType = 193, - InferType = 194, - ParenthesizedType = 195, - ThisType = 196, - TypeOperator = 197, - IndexedAccessType = 198, - MappedType = 199, - LiteralType = 200, - NamedTupleMember = 201, - TemplateLiteralType = 202, - TemplateLiteralTypeSpan = 203, - ImportType = 204, - ObjectBindingPattern = 205, - ArrayBindingPattern = 206, - BindingElement = 207, - ArrayLiteralExpression = 208, - ObjectLiteralExpression = 209, - PropertyAccessExpression = 210, - ElementAccessExpression = 211, - CallExpression = 212, - NewExpression = 213, - TaggedTemplateExpression = 214, - TypeAssertionExpression = 215, - ParenthesizedExpression = 216, - FunctionExpression = 217, - ArrowFunction = 218, - DeleteExpression = 219, - TypeOfExpression = 220, - VoidExpression = 221, - AwaitExpression = 222, - PrefixUnaryExpression = 223, - PostfixUnaryExpression = 224, - BinaryExpression = 225, - ConditionalExpression = 226, - TemplateExpression = 227, - YieldExpression = 228, - SpreadElement = 229, - ClassExpression = 230, - OmittedExpression = 231, - ExpressionWithTypeArguments = 232, - AsExpression = 233, - NonNullExpression = 234, - MetaProperty = 235, - SyntheticExpression = 236, - SatisfiesExpression = 237, - TemplateSpan = 238, - SemicolonClassElement = 239, - Block = 240, - EmptyStatement = 241, - VariableStatement = 242, - ExpressionStatement = 243, - IfStatement = 244, - DoStatement = 245, - WhileStatement = 246, - ForStatement = 247, - ForInStatement = 248, - ForOfStatement = 249, - ContinueStatement = 250, - BreakStatement = 251, - ReturnStatement = 252, - WithStatement = 253, - SwitchStatement = 254, - LabeledStatement = 255, - ThrowStatement = 256, - TryStatement = 257, - DebuggerStatement = 258, - VariableDeclaration = 259, - VariableDeclarationList = 260, - FunctionDeclaration = 261, - ClassDeclaration = 262, - InterfaceDeclaration = 263, - TypeAliasDeclaration = 264, - EnumDeclaration = 265, - ModuleDeclaration = 266, - ModuleBlock = 267, - CaseBlock = 268, - NamespaceExportDeclaration = 269, - ImportEqualsDeclaration = 270, - ImportDeclaration = 271, - ImportClause = 272, - NamespaceImport = 273, - NamedImports = 274, - ImportSpecifier = 275, - ExportAssignment = 276, - ExportDeclaration = 277, - NamedExports = 278, - NamespaceExport = 279, - ExportSpecifier = 280, - MissingDeclaration = 281, - ExternalModuleReference = 282, - JsxElement = 283, - JsxSelfClosingElement = 284, - JsxOpeningElement = 285, - JsxClosingElement = 286, - JsxFragment = 287, - JsxOpeningFragment = 288, - JsxClosingFragment = 289, - JsxAttribute = 290, - JsxAttributes = 291, - JsxSpreadAttribute = 292, - JsxExpression = 293, - JsxNamespacedName = 294, - CaseClause = 295, - DefaultClause = 296, - HeritageClause = 297, - CatchClause = 298, - AssertClause = 299, - AssertEntry = 300, - ImportTypeAssertionContainer = 301, - PropertyAssignment = 302, - ShorthandPropertyAssignment = 303, - SpreadAssignment = 304, - EnumMember = 305, - /** @deprecated */ UnparsedPrologue = 306, - /** @deprecated */ UnparsedPrepend = 307, - /** @deprecated */ UnparsedText = 308, - /** @deprecated */ UnparsedInternalText = 309, - /** @deprecated */ UnparsedSyntheticReference = 310, - SourceFile = 311, - Bundle = 312, - /** @deprecated */ UnparsedSource = 313, - /** @deprecated */ InputFiles = 314, - JSDocTypeExpression = 315, - JSDocNameReference = 316, - JSDocMemberName = 317, - JSDocAllType = 318, - JSDocUnknownType = 319, - JSDocNullableType = 320, - JSDocNonNullableType = 321, - JSDocOptionalType = 322, - JSDocFunctionType = 323, - JSDocVariadicType = 324, - JSDocNamepathType = 325, - JSDoc = 326, + UsingKeyword = 160, + FromKeyword = 161, + GlobalKeyword = 162, + BigIntKeyword = 163, + OverrideKeyword = 164, + OfKeyword = 165, + QualifiedName = 166, + ComputedPropertyName = 167, + TypeParameter = 168, + Parameter = 169, + Decorator = 170, + PropertySignature = 171, + PropertyDeclaration = 172, + MethodSignature = 173, + MethodDeclaration = 174, + ClassStaticBlockDeclaration = 175, + Constructor = 176, + GetAccessor = 177, + SetAccessor = 178, + CallSignature = 179, + ConstructSignature = 180, + IndexSignature = 181, + TypePredicate = 182, + TypeReference = 183, + FunctionType = 184, + ConstructorType = 185, + TypeQuery = 186, + TypeLiteral = 187, + ArrayType = 188, + TupleType = 189, + OptionalType = 190, + RestType = 191, + UnionType = 192, + IntersectionType = 193, + ConditionalType = 194, + InferType = 195, + ParenthesizedType = 196, + ThisType = 197, + TypeOperator = 198, + IndexedAccessType = 199, + MappedType = 200, + LiteralType = 201, + NamedTupleMember = 202, + TemplateLiteralType = 203, + TemplateLiteralTypeSpan = 204, + ImportType = 205, + ObjectBindingPattern = 206, + ArrayBindingPattern = 207, + BindingElement = 208, + ArrayLiteralExpression = 209, + ObjectLiteralExpression = 210, + PropertyAccessExpression = 211, + ElementAccessExpression = 212, + CallExpression = 213, + NewExpression = 214, + TaggedTemplateExpression = 215, + TypeAssertionExpression = 216, + ParenthesizedExpression = 217, + FunctionExpression = 218, + ArrowFunction = 219, + DeleteExpression = 220, + TypeOfExpression = 221, + VoidExpression = 222, + AwaitExpression = 223, + PrefixUnaryExpression = 224, + PostfixUnaryExpression = 225, + BinaryExpression = 226, + ConditionalExpression = 227, + TemplateExpression = 228, + YieldExpression = 229, + SpreadElement = 230, + ClassExpression = 231, + OmittedExpression = 232, + ExpressionWithTypeArguments = 233, + AsExpression = 234, + NonNullExpression = 235, + MetaProperty = 236, + SyntheticExpression = 237, + SatisfiesExpression = 238, + TemplateSpan = 239, + SemicolonClassElement = 240, + Block = 241, + EmptyStatement = 242, + VariableStatement = 243, + ExpressionStatement = 244, + IfStatement = 245, + DoStatement = 246, + WhileStatement = 247, + ForStatement = 248, + ForInStatement = 249, + ForOfStatement = 250, + ContinueStatement = 251, + BreakStatement = 252, + ReturnStatement = 253, + WithStatement = 254, + SwitchStatement = 255, + LabeledStatement = 256, + ThrowStatement = 257, + TryStatement = 258, + DebuggerStatement = 259, + VariableDeclaration = 260, + VariableDeclarationList = 261, + FunctionDeclaration = 262, + ClassDeclaration = 263, + InterfaceDeclaration = 264, + TypeAliasDeclaration = 265, + EnumDeclaration = 266, + ModuleDeclaration = 267, + ModuleBlock = 268, + CaseBlock = 269, + NamespaceExportDeclaration = 270, + ImportEqualsDeclaration = 271, + ImportDeclaration = 272, + ImportClause = 273, + NamespaceImport = 274, + NamedImports = 275, + ImportSpecifier = 276, + ExportAssignment = 277, + ExportDeclaration = 278, + NamedExports = 279, + NamespaceExport = 280, + ExportSpecifier = 281, + MissingDeclaration = 282, + ExternalModuleReference = 283, + JsxElement = 284, + JsxSelfClosingElement = 285, + JsxOpeningElement = 286, + JsxClosingElement = 287, + JsxFragment = 288, + JsxOpeningFragment = 289, + JsxClosingFragment = 290, + JsxAttribute = 291, + JsxAttributes = 292, + JsxSpreadAttribute = 293, + JsxExpression = 294, + JsxNamespacedName = 295, + CaseClause = 296, + DefaultClause = 297, + HeritageClause = 298, + CatchClause = 299, + AssertClause = 300, + AssertEntry = 301, + ImportTypeAssertionContainer = 302, + PropertyAssignment = 303, + ShorthandPropertyAssignment = 304, + SpreadAssignment = 305, + EnumMember = 306, + /** @deprecated */ UnparsedPrologue = 307, + /** @deprecated */ UnparsedPrepend = 308, + /** @deprecated */ UnparsedText = 309, + /** @deprecated */ UnparsedInternalText = 310, + /** @deprecated */ UnparsedSyntheticReference = 311, + SourceFile = 312, + Bundle = 313, + /** @deprecated */ UnparsedSource = 314, + /** @deprecated */ InputFiles = 315, + JSDocTypeExpression = 316, + JSDocNameReference = 317, + JSDocMemberName = 318, + JSDocAllType = 319, + JSDocUnknownType = 320, + JSDocNullableType = 321, + JSDocNonNullableType = 322, + JSDocOptionalType = 323, + JSDocFunctionType = 324, + JSDocVariadicType = 325, + JSDocNamepathType = 326, + JSDoc = 327, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 326, - JSDocText = 327, - JSDocTypeLiteral = 328, - JSDocSignature = 329, - JSDocLink = 330, - JSDocLinkCode = 331, - JSDocLinkPlain = 332, - JSDocTag = 333, - JSDocAugmentsTag = 334, - JSDocImplementsTag = 335, - JSDocAuthorTag = 336, - JSDocDeprecatedTag = 337, - JSDocClassTag = 338, - JSDocPublicTag = 339, - JSDocPrivateTag = 340, - JSDocProtectedTag = 341, - JSDocReadonlyTag = 342, - JSDocOverrideTag = 343, - JSDocCallbackTag = 344, - JSDocOverloadTag = 345, - JSDocEnumTag = 346, - JSDocParameterTag = 347, - JSDocReturnTag = 348, - JSDocThisTag = 349, - JSDocTypeTag = 350, - JSDocTemplateTag = 351, - JSDocTypedefTag = 352, - JSDocSeeTag = 353, - JSDocPropertyTag = 354, - JSDocThrowsTag = 355, - JSDocSatisfiesTag = 356, - SyntaxList = 357, - NotEmittedStatement = 358, - PartiallyEmittedExpression = 359, - CommaListExpression = 360, - SyntheticReferenceExpression = 361, - Count = 362, + JSDocComment = 327, + JSDocText = 328, + JSDocTypeLiteral = 329, + JSDocSignature = 330, + JSDocLink = 331, + JSDocLinkCode = 332, + JSDocLinkPlain = 333, + JSDocTag = 334, + JSDocAugmentsTag = 335, + JSDocImplementsTag = 336, + JSDocAuthorTag = 337, + JSDocDeprecatedTag = 338, + JSDocClassTag = 339, + JSDocPublicTag = 340, + JSDocPrivateTag = 341, + JSDocProtectedTag = 342, + JSDocReadonlyTag = 343, + JSDocOverrideTag = 344, + JSDocCallbackTag = 345, + JSDocOverloadTag = 346, + JSDocEnumTag = 347, + JSDocParameterTag = 348, + JSDocReturnTag = 349, + JSDocThisTag = 350, + JSDocTypeTag = 351, + JSDocTemplateTag = 352, + JSDocTypedefTag = 353, + JSDocSeeTag = 354, + JSDocPropertyTag = 355, + JSDocThrowsTag = 356, + JSDocSatisfiesTag = 357, + SyntaxList = 358, + NotEmittedStatement = 359, + PartiallyEmittedExpression = 360, + CommaListExpression = 361, + SyntheticReferenceExpression = 362, + Count = 363, FirstAssignment = 64, LastAssignment = 79, FirstCompoundAssignment = 65, @@ -416,15 +417,15 @@ declare namespace ts { FirstReservedWord = 83, LastReservedWord = 118, FirstKeyword = 83, - LastKeyword = 164, + LastKeyword = 165, FirstFutureReservedWord = 119, LastFutureReservedWord = 127, - FirstTypeNode = 181, - LastTypeNode = 204, + FirstTypeNode = 182, + LastTypeNode = 205, FirstPunctuation = 19, LastPunctuation = 79, FirstToken = 0, - LastToken = 164, + LastToken = 165, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 9, @@ -433,19 +434,19 @@ declare namespace ts { LastTemplateToken = 18, FirstBinaryOperator = 30, LastBinaryOperator = 79, - FirstStatement = 242, - LastStatement = 258, - FirstNode = 165, - FirstJSDocNode = 315, - LastJSDocNode = 356, - FirstJSDocTagNode = 333, - LastJSDocTagNode = 356 + FirstStatement = 243, + LastStatement = 259, + FirstNode = 166, + FirstJSDocNode = 316, + LastJSDocNode = 357, + FirstJSDocTagNode = 334, + LastJSDocTagNode = 357 } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; 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.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | 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; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | 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.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | 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; + type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | 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.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | 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.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; 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; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -455,32 +456,35 @@ declare namespace ts { None = 0, Let = 1, Const = 2, - NestedNamespace = 4, - Synthesized = 8, - Namespace = 16, - OptionalChain = 32, - ExportContext = 64, - ContainsThis = 128, - HasImplicitReturn = 256, - HasExplicitReturn = 512, - GlobalAugmentation = 1024, - HasAsyncFunctions = 2048, - DisallowInContext = 4096, - YieldContext = 8192, - DecoratorContext = 16384, - AwaitContext = 32768, - DisallowConditionalTypesContext = 65536, - ThisNodeHasError = 131072, - JavaScriptFile = 262144, - ThisNodeOrAnySubNodesHasError = 524288, - HasAggregatedChildData = 1048576, - JSDoc = 8388608, - JsonFile = 67108864, - BlockScoped = 3, - ReachabilityCheckFlags = 768, - ReachabilityAndEmitFlags = 2816, - ContextFlags = 50720768, - TypeExcludesFlags = 40960 + Using = 4, + AwaitUsing = 6, + NestedNamespace = 8, + Synthesized = 16, + Namespace = 32, + OptionalChain = 64, + ExportContext = 128, + ContainsThis = 256, + HasImplicitReturn = 512, + HasExplicitReturn = 1024, + GlobalAugmentation = 2048, + HasAsyncFunctions = 4096, + DisallowInContext = 8192, + YieldContext = 16384, + DecoratorContext = 32768, + AwaitContext = 65536, + DisallowConditionalTypesContext = 131072, + ThisNodeHasError = 262144, + JavaScriptFile = 524288, + ThisNodeOrAnySubNodesHasError = 1048576, + HasAggregatedChildData = 2097152, + JSDoc = 16777216, + JsonFile = 134217728, + BlockScoped = 7, + Constant = 6, + ReachabilityCheckFlags = 1536, + ReachabilityAndEmitFlags = 5632, + ContextFlags = 101441536, + TypeExcludesFlags = 81920 } enum ModifierFlags { None = 0, @@ -644,7 +648,7 @@ declare namespace ts { type EntityName = Identifier | QualifiedName; type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; type MemberName = Identifier | PrivateIdentifier; - type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression; + type DeclarationName = PropertyName | JsxAttributeName | StringLiteralLike | ElementAccessExpression | BindingPattern | EntityNameExpression; interface Declaration extends Node { _declarationBrand: any; } @@ -991,7 +995,7 @@ declare namespace ts { readonly kind: SyntaxKind.StringLiteral; } type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; - type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; + type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral | JsxNamespacedName; interface TemplateLiteralTypeNode extends TypeNode { kind: SyntaxKind.TemplateLiteralType; readonly head: TemplateHead; @@ -1350,14 +1354,14 @@ declare namespace ts { type JsxAttributeName = Identifier | JsxNamespacedName; type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName; interface JsxTagNamePropertyAccess extends PropertyAccessExpression { - readonly expression: JsxTagNameExpression; + readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; } interface JsxAttributes extends PrimaryExpression, Declaration { readonly properties: NodeArray; readonly kind: SyntaxKind.JsxAttributes; readonly parent: JsxOpeningLikeElement; } - interface JsxNamespacedName extends PrimaryExpression { + interface JsxNamespacedName extends Node { readonly kind: SyntaxKind.JsxNamespacedName; readonly name: Identifier; readonly namespace: Identifier; @@ -1398,7 +1402,6 @@ declare namespace ts { type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; interface JsxSpreadAttribute extends ObjectLiteralElement { readonly kind: SyntaxKind.JsxSpreadAttribute; - readonly name: PropertyName; readonly parent: JsxAttributes; readonly expression: Expression; } @@ -2218,7 +2221,7 @@ declare namespace ts { getSourceFileByPath(path: Path): SourceFile | undefined; getCurrentDirectory(): string; } - interface ParseConfigHost { + interface ParseConfigHost extends ModuleResolutionHost { useCaseSensitiveFileNames: boolean; readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; /** @@ -2895,7 +2898,7 @@ declare namespace ts { hasRestElement: boolean; combinedFlags: ElementFlags; readonly: boolean; - labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; + labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]; } interface TupleTypeReference extends TypeReference { target: TupleType; @@ -3536,7 +3539,14 @@ declare namespace ts { All = 15, ExcludeJSDocTypeAssertion = 16 } - type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; + type ImmediatelyInvokedFunctionExpression = CallExpression & { + readonly expression: FunctionExpression; + }; + type ImmediatelyInvokedArrowFunction = CallExpression & { + readonly expression: ParenthesizedExpression & { + readonly expression: ArrowFunction; + }; + }; interface NodeFactory { createNodeArray(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray; createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; @@ -4006,8 +4016,8 @@ declare namespace ts { createPostfixDecrement(operand: Expression): PostfixUnaryExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; createVoidZero(): VoidExpression; createExportDefault(expression: Expression): ExportAssignment; createExternalModuleExport(exportName: Identifier): ExportDeclaration; @@ -4337,6 +4347,7 @@ declare namespace ts { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; readonly organizeImportsIgnoreCase?: "auto" | boolean; @@ -6227,7 +6238,7 @@ declare namespace ts { * arguments for any interactive action before offering it. */ getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string, includeInteractiveActions?: boolean): ApplicableRefactorInfo[]; - getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, includeInteractiveActions?: InteractiveRefactorArguments): RefactorEditInfo | undefined; + getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo | undefined; getMoveToRefactoringFileSuggestions(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): { newFileName: string; files: string[]; @@ -6403,12 +6414,17 @@ declare namespace ts { Enum = "Enum" } interface InlayHint { - text: string; + text: string | InlayHintDisplayPart[]; position: number; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; } + interface InlayHintDisplayPart { + text: string; + span?: TextSpan; + file?: string; + } interface TodoCommentDescriptor { text: string; priority: number; @@ -6517,6 +6533,7 @@ declare namespace ts { renameFilename?: string; renameLocation?: number; commands?: CodeActionCommand[]; + notApplicableReason?: string; } type RefactorTriggerReason = "implicit" | "invoked"; interface TextInsertion { @@ -6838,6 +6855,7 @@ declare namespace ts { kindModifiers?: string; sortText: string; insertText?: string; + filterText?: string; isSnippet?: true; /** * An optional span that indicates the text to be replaced by this completion item. @@ -6997,6 +7015,10 @@ declare namespace ts { variableElement = "var", /** Inside function */ localVariableElement = "local var", + /** using foo = ... */ + variableUsingElement = "using", + /** await using foo = ... */ + variableAwaitUsingElement = "await using", /** * Inside module and script only * function f() { } diff --git a/tests/baselines/reference/apparentTypeSubtyping.errors.txt b/tests/baselines/reference/apparentTypeSubtyping.errors.txt index ca2f0765d6211..19b55197ec454 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.errors.txt +++ b/tests/baselines/reference/apparentTypeSubtyping.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(10,5): error TS2416: Property 'x' in type 'Derived' is not assignable to the same property in base type 'Base'. +apparentTypeSubtyping.ts(10,5): error TS2416: Property 'x' in type 'Derived' is not assignable to the same property in base type 'Base'. Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. -==== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts (1 errors) ==== +==== apparentTypeSubtyping.ts (1 errors) ==== // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 7aa0f6e37462d..aef1ab7d1badc 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts] //// + //// [apparentTypeSubtyping.ts] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSubtyping.symbols b/tests/baselines/reference/apparentTypeSubtyping.symbols index 39735afec7f1a..8450c89b27b0b 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.symbols +++ b/tests/baselines/reference/apparentTypeSubtyping.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts === +//// [tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts] //// + +=== apparentTypeSubtyping.ts === // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSubtyping.types b/tests/baselines/reference/apparentTypeSubtyping.types index 9fa8469027c3f..ef523b8f5d67b 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.types +++ b/tests/baselines/reference/apparentTypeSubtyping.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts === +//// [tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts] //// + +=== apparentTypeSubtyping.ts === // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSupertype.errors.txt b/tests/baselines/reference/apparentTypeSupertype.errors.txt index a4a8ccc0a8bdd..12a6c2e0e412d 100644 --- a/tests/baselines/reference/apparentTypeSupertype.errors.txt +++ b/tests/baselines/reference/apparentTypeSupertype.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(10,5): error TS2416: Property 'x' in type 'Derived' is not assignable to the same property in base type 'Base'. +apparentTypeSupertype.ts(10,5): error TS2416: Property 'x' in type 'Derived' is not assignable to the same property in base type 'Base'. Type 'U' is not assignable to type 'string'. Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. -==== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts (1 errors) ==== +==== apparentTypeSupertype.ts (1 errors) ==== // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index 213b16448fe6a..e7dcffde189b0 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts] //// + //// [apparentTypeSupertype.ts] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSupertype.symbols b/tests/baselines/reference/apparentTypeSupertype.symbols index 6d10e77693ef5..59a1b913d711b 100644 --- a/tests/baselines/reference/apparentTypeSupertype.symbols +++ b/tests/baselines/reference/apparentTypeSupertype.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts === +//// [tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts] //// + +=== apparentTypeSupertype.ts === // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/apparentTypeSupertype.types b/tests/baselines/reference/apparentTypeSupertype.types index 1c1d28d65945d..7793919781ae3 100644 --- a/tests/baselines/reference/apparentTypeSupertype.types +++ b/tests/baselines/reference/apparentTypeSupertype.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts === +//// [tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts] //// + +=== apparentTypeSupertype.ts === // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: diff --git a/tests/baselines/reference/argsInScope.js b/tests/baselines/reference/argsInScope.js index 4ddfe09f13aed..6ba6be2e7c4d4 100644 --- a/tests/baselines/reference/argsInScope.js +++ b/tests/baselines/reference/argsInScope.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argsInScope.ts] //// + //// [argsInScope.ts] class C { P(ii:number, j:number, k:number) { diff --git a/tests/baselines/reference/argsInScope.symbols b/tests/baselines/reference/argsInScope.symbols index 70ccd3d825baf..801c777d88b41 100644 --- a/tests/baselines/reference/argsInScope.symbols +++ b/tests/baselines/reference/argsInScope.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argsInScope.ts === +//// [tests/cases/compiler/argsInScope.ts] //// + +=== argsInScope.ts === class C { >C : Symbol(C, Decl(argsInScope.ts, 0, 0)) diff --git a/tests/baselines/reference/argsInScope.types b/tests/baselines/reference/argsInScope.types index dacc66be9120a..438f87ea02fcd 100644 --- a/tests/baselines/reference/argsInScope.types +++ b/tests/baselines/reference/argsInScope.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argsInScope.ts === +//// [tests/cases/compiler/argsInScope.ts] //// + +=== argsInScope.ts === class C { >C : C diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt b/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt index 8dc476ee78918..ab629cbf13786 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt +++ b/tests/baselines/reference/argumentExpressionContextualTyping.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts(16,5): error TS2345: Argument of type '(string | number | boolean)[]' is not assignable to parameter of type '[string, number, boolean]'. +argumentExpressionContextualTyping.ts(16,5): error TS2345: Argument of type '(string | number | boolean)[]' is not assignable to parameter of type '[string, number, boolean]'. Target requires 3 element(s) but source may have fewer. -tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts(17,5): error TS2345: Argument of type '[string, number, true, ...(string | number | boolean)[]]' is not assignable to parameter of type '[string, number, boolean]'. +argumentExpressionContextualTyping.ts(17,5): error TS2345: Argument of type '[string, number, true, ...(string | number | boolean)[]]' is not assignable to parameter of type '[string, number, boolean]'. Target allows only 3 element(s) but source may have more. -tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts(18,5): error TS2345: Argument of type '{ x: (string | number)[]; y: { c: boolean; d: string; e: number; }; }' is not assignable to parameter of type '{ x: [any, any]; y: { c: any; d: any; e: any; }; }'. +argumentExpressionContextualTyping.ts(18,5): error TS2345: Argument of type '{ x: (string | number)[]; y: { c: boolean; d: string; e: number; }; }' is not assignable to parameter of type '{ x: [any, any]; y: { c: any; d: any; e: any; }; }'. Types of property 'x' are incompatible. Type '(string | number)[]' is not assignable to type '[any, any]'. Target requires 2 element(s) but source may have fewer. -==== tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts (3 errors) ==== +==== argumentExpressionContextualTyping.ts (3 errors) ==== // In a typed function call, argument expressions are contextually typed by their corresponding parameter types. function foo({x: [a, b], y: {c, d, e}}) { } function bar({x: [a, b = 10], y: {c, d, e = { f:1 }}}) { } diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.js b/tests/baselines/reference/argumentExpressionContextualTyping.js index d883a2307c167..4c73d0e458679 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.js +++ b/tests/baselines/reference/argumentExpressionContextualTyping.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts] //// + //// [argumentExpressionContextualTyping.ts] // In a typed function call, argument expressions are contextually typed by their corresponding parameter types. function foo({x: [a, b], y: {c, d, e}}) { } diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.symbols b/tests/baselines/reference/argumentExpressionContextualTyping.symbols index 9ed7d130795ba..d5ed50a95c5bc 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.symbols +++ b/tests/baselines/reference/argumentExpressionContextualTyping.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts === +//// [tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts] //// + +=== argumentExpressionContextualTyping.ts === // In a typed function call, argument expressions are contextually typed by their corresponding parameter types. function foo({x: [a, b], y: {c, d, e}}) { } >foo : Symbol(foo, Decl(argumentExpressionContextualTyping.ts, 0, 0)) diff --git a/tests/baselines/reference/argumentExpressionContextualTyping.types b/tests/baselines/reference/argumentExpressionContextualTyping.types index f5a6af5250277..7f2a00182a805 100644 --- a/tests/baselines/reference/argumentExpressionContextualTyping.types +++ b/tests/baselines/reference/argumentExpressionContextualTyping.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts === +//// [tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts] //// + +=== argumentExpressionContextualTyping.ts === // In a typed function call, argument expressions are contextually typed by their corresponding parameter types. function foo({x: [a, b], y: {c, d, e}}) { } >foo : ({ x: [a, b], y: { c, d, e } }: { x: [any, any]; y: { c: any; d: any; e: any; }; }) => void diff --git a/tests/baselines/reference/arguments.errors.txt b/tests/baselines/reference/arguments.errors.txt index 882477aaac901..2183d67f8724e 100644 --- a/tests/baselines/reference/arguments.errors.txt +++ b/tests/baselines/reference/arguments.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/arguments.ts(6,8): error TS2304: Cannot find name 'arguments'. -tests/cases/compiler/arguments.ts(9,25): error TS2304: Cannot find name 'arguments'. -tests/cases/compiler/arguments.ts(10,23): error TS2304: Cannot find name 'arguments'. -tests/cases/compiler/arguments.ts(11,19): error TS2304: Cannot find name 'arguments'. -tests/cases/compiler/arguments.ts(12,23): error TS2304: Cannot find name 'arguments'. -tests/cases/compiler/arguments.ts(13,34): error TS2304: Cannot find name 'arguments'. +arguments.ts(6,8): error TS2304: Cannot find name 'arguments'. +arguments.ts(9,25): error TS2304: Cannot find name 'arguments'. +arguments.ts(10,23): error TS2304: Cannot find name 'arguments'. +arguments.ts(11,19): error TS2304: Cannot find name 'arguments'. +arguments.ts(12,23): error TS2304: Cannot find name 'arguments'. +arguments.ts(13,34): error TS2304: Cannot find name 'arguments'. -==== tests/cases/compiler/arguments.ts (6 errors) ==== +==== arguments.ts (6 errors) ==== function f() { var x=arguments[12]; (() => arguments)(); diff --git a/tests/baselines/reference/arguments.js b/tests/baselines/reference/arguments.js index 3dd362506c6cb..8e008f9182160 100644 --- a/tests/baselines/reference/arguments.js +++ b/tests/baselines/reference/arguments.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arguments.ts] //// + //// [arguments.ts] function f() { var x=arguments[12]; diff --git a/tests/baselines/reference/arguments.symbols b/tests/baselines/reference/arguments.symbols index 770077a90b2bc..e6907e9109413 100644 --- a/tests/baselines/reference/arguments.symbols +++ b/tests/baselines/reference/arguments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arguments.ts === +//// [tests/cases/compiler/arguments.ts] //// + +=== arguments.ts === function f() { >f : Symbol(f, Decl(arguments.ts, 0, 0)) diff --git a/tests/baselines/reference/arguments.types b/tests/baselines/reference/arguments.types index a46f4b3015e42..fc2fd1d50800a 100644 --- a/tests/baselines/reference/arguments.types +++ b/tests/baselines/reference/arguments.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arguments.ts === +//// [tests/cases/compiler/arguments.ts] //// + +=== arguments.ts === function f() { >f : () => void diff --git a/tests/baselines/reference/argumentsAsPropertyName.js b/tests/baselines/reference/argumentsAsPropertyName.js index a4197c0a1d249..2b65bf195afd0 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.js +++ b/tests/baselines/reference/argumentsAsPropertyName.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsAsPropertyName.ts] //// + //// [argumentsAsPropertyName.ts] // target: es5 type MyType = { diff --git a/tests/baselines/reference/argumentsAsPropertyName.symbols b/tests/baselines/reference/argumentsAsPropertyName.symbols index f55ac5741b69b..fed2818b0eca6 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.symbols +++ b/tests/baselines/reference/argumentsAsPropertyName.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsAsPropertyName.ts === +//// [tests/cases/compiler/argumentsAsPropertyName.ts] //// + +=== argumentsAsPropertyName.ts === // target: es5 type MyType = { >MyType : Symbol(MyType, Decl(argumentsAsPropertyName.ts, 0, 0)) diff --git a/tests/baselines/reference/argumentsAsPropertyName.types b/tests/baselines/reference/argumentsAsPropertyName.types index b5753c3da720f..0815b6116902d 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.types +++ b/tests/baselines/reference/argumentsAsPropertyName.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsAsPropertyName.ts === +//// [tests/cases/compiler/argumentsAsPropertyName.ts] //// + +=== argumentsAsPropertyName.ts === // target: es5 type MyType = { >MyType : { arguments: Array; } diff --git a/tests/baselines/reference/argumentsAsPropertyName2.js b/tests/baselines/reference/argumentsAsPropertyName2.js index 878178ed39c2b..29243412d7419 100644 --- a/tests/baselines/reference/argumentsAsPropertyName2.js +++ b/tests/baselines/reference/argumentsAsPropertyName2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsAsPropertyName2.ts] //// + //// [argumentsAsPropertyName2.ts] // target: es5 diff --git a/tests/baselines/reference/argumentsAsPropertyName2.symbols b/tests/baselines/reference/argumentsAsPropertyName2.symbols index a9d73f1faa5fd..64e3793cb3184 100644 --- a/tests/baselines/reference/argumentsAsPropertyName2.symbols +++ b/tests/baselines/reference/argumentsAsPropertyName2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsAsPropertyName2.ts === +//// [tests/cases/compiler/argumentsAsPropertyName2.ts] //// + +=== argumentsAsPropertyName2.ts === // target: es5 function foo() { diff --git a/tests/baselines/reference/argumentsAsPropertyName2.types b/tests/baselines/reference/argumentsAsPropertyName2.types index 488edd8ea0d54..d8c73449582a1 100644 --- a/tests/baselines/reference/argumentsAsPropertyName2.types +++ b/tests/baselines/reference/argumentsAsPropertyName2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsAsPropertyName2.ts === +//// [tests/cases/compiler/argumentsAsPropertyName2.ts] //// + +=== argumentsAsPropertyName2.ts === // target: es5 function foo() { diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index 89ef8ded91c64..6f0eacb5dff5a 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. +argumentsBindsToFunctionScopeArgumentList.ts(3,5): error TS2322: Type 'number' is not assignable to type 'IArguments'. -==== tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== +==== argumentsBindsToFunctionScopeArgumentList.ts (1 errors) ==== var arguments = 10; function foo(a) { arguments = 10; /// This shouldnt be of type number and result in error. diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js index 9a5b13f74f36d..b18f1cc7d05f8 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + //// [argumentsBindsToFunctionScopeArgumentList.ts] var arguments = 10; function foo(a) { diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols index f8741f53c8428..a7c67c1447cce 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts === +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +=== argumentsBindsToFunctionScopeArgumentList.ts === var arguments = 10; >arguments : Symbol(arguments, Decl(argumentsBindsToFunctionScopeArgumentList.ts, 0, 3)) diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types index 4aecd3bc4be3e..eafe3ade4ecec 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts === +//// [tests/cases/compiler/argumentsBindsToFunctionScopeArgumentList.ts] //// + +=== argumentsBindsToFunctionScopeArgumentList.ts === var arguments = 10; >arguments : number >10 : 10 diff --git a/tests/baselines/reference/argumentsObjectCreatesRestForJs.symbols b/tests/baselines/reference/argumentsObjectCreatesRestForJs.symbols index 6a95dbc86d82e..7cb5a02934ca5 100644 --- a/tests/baselines/reference/argumentsObjectCreatesRestForJs.symbols +++ b/tests/baselines/reference/argumentsObjectCreatesRestForJs.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/main.js === +//// [tests/cases/compiler/argumentsObjectCreatesRestForJs.ts] //// + +=== main.js === function allRest() { arguments; } >allRest : Symbol(allRest, Decl(main.js, 0, 0)) >arguments : Symbol(arguments) diff --git a/tests/baselines/reference/argumentsObjectCreatesRestForJs.types b/tests/baselines/reference/argumentsObjectCreatesRestForJs.types index 28cdfcda4132c..9c84123f9c8b9 100644 --- a/tests/baselines/reference/argumentsObjectCreatesRestForJs.types +++ b/tests/baselines/reference/argumentsObjectCreatesRestForJs.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/main.js === +//// [tests/cases/compiler/argumentsObjectCreatesRestForJs.ts] //// + +=== main.js === function allRest() { arguments; } >allRest : (...args: any[]) => void >arguments : IArguments diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES5.errors.txt b/tests/baselines/reference/argumentsObjectIterator01_ES5.errors.txt index 2a7be0262cf4b..cf3b237869343 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES5.errors.txt +++ b/tests/baselines/reference/argumentsObjectIterator01_ES5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/argumentsObjectIterator01_ES5.ts(3,21): error TS2495: Type 'IArguments' is not an array type or a string type. +argumentsObjectIterator01_ES5.ts(3,21): error TS2495: Type 'IArguments' is not an array type or a string type. -==== tests/cases/compiler/argumentsObjectIterator01_ES5.ts (1 errors) ==== +==== argumentsObjectIterator01_ES5.ts (1 errors) ==== function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { let result = []; for (let arg of arguments) { diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES5.js b/tests/baselines/reference/argumentsObjectIterator01_ES5.js index 02b0a059a350b..25980e36dd272 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES5.js +++ b/tests/baselines/reference/argumentsObjectIterator01_ES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsObjectIterator01_ES5.ts] //// + //// [argumentsObjectIterator01_ES5.ts] function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { let result = []; diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES5.symbols b/tests/baselines/reference/argumentsObjectIterator01_ES5.symbols index 0e6abeadb8a5a..f4685e4f83589 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES5.symbols +++ b/tests/baselines/reference/argumentsObjectIterator01_ES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator01_ES5.ts === +//// [tests/cases/compiler/argumentsObjectIterator01_ES5.ts] //// + +=== argumentsObjectIterator01_ES5.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : Symbol(doubleAndReturnAsArray, Decl(argumentsObjectIterator01_ES5.ts, 0, 0)) >x : Symbol(x, Decl(argumentsObjectIterator01_ES5.ts, 0, 32)) diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES5.types b/tests/baselines/reference/argumentsObjectIterator01_ES5.types index 60ca2090880c8..a707b5381da58 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES5.types +++ b/tests/baselines/reference/argumentsObjectIterator01_ES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator01_ES5.ts === +//// [tests/cases/compiler/argumentsObjectIterator01_ES5.ts] //// + +=== argumentsObjectIterator01_ES5.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : (x: number, y: number, z: number) => [number, number, number] >x : number diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES6.js b/tests/baselines/reference/argumentsObjectIterator01_ES6.js index ade88debd87cf..13f198a7cb9bf 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES6.js +++ b/tests/baselines/reference/argumentsObjectIterator01_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsObjectIterator01_ES6.ts] //// + //// [argumentsObjectIterator01_ES6.ts] function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { let result = []; diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols b/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols index aaa7431408bf9..829af69b5fdde 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols +++ b/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator01_ES6.ts === +//// [tests/cases/compiler/argumentsObjectIterator01_ES6.ts] //// + +=== argumentsObjectIterator01_ES6.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : Symbol(doubleAndReturnAsArray, Decl(argumentsObjectIterator01_ES6.ts, 0, 0)) >x : Symbol(x, Decl(argumentsObjectIterator01_ES6.ts, 0, 32)) diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES6.types b/tests/baselines/reference/argumentsObjectIterator01_ES6.types index a4f1b83896b97..bc1a305d04a79 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES6.types +++ b/tests/baselines/reference/argumentsObjectIterator01_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator01_ES6.ts === +//// [tests/cases/compiler/argumentsObjectIterator01_ES6.ts] //// + +=== argumentsObjectIterator01_ES6.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : (x: number, y: number, z: number) => [number, number, number] >x : number diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES5.errors.txt b/tests/baselines/reference/argumentsObjectIterator02_ES5.errors.txt index 1448a605ce0ad..24813298ef3f2 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES5.errors.txt +++ b/tests/baselines/reference/argumentsObjectIterator02_ES5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' 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. +argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' 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. -==== tests/cases/compiler/argumentsObjectIterator02_ES5.ts (1 errors) ==== +==== argumentsObjectIterator02_ES5.ts (1 errors) ==== function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { let blah = arguments[Symbol.iterator]; ~~~~~~ diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES5.js b/tests/baselines/reference/argumentsObjectIterator02_ES5.js index ae8675d97453b..418475942c596 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES5.js +++ b/tests/baselines/reference/argumentsObjectIterator02_ES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsObjectIterator02_ES5.ts] //// + //// [argumentsObjectIterator02_ES5.ts] function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { let blah = arguments[Symbol.iterator]; diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES5.symbols b/tests/baselines/reference/argumentsObjectIterator02_ES5.symbols index e6bf00161e448..bcd93c4a3cd42 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES5.symbols +++ b/tests/baselines/reference/argumentsObjectIterator02_ES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator02_ES5.ts === +//// [tests/cases/compiler/argumentsObjectIterator02_ES5.ts] //// + +=== argumentsObjectIterator02_ES5.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : Symbol(doubleAndReturnAsArray, Decl(argumentsObjectIterator02_ES5.ts, 0, 0)) >x : Symbol(x, Decl(argumentsObjectIterator02_ES5.ts, 0, 32)) diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES5.types b/tests/baselines/reference/argumentsObjectIterator02_ES5.types index 0cfa15d902108..91871742b2d5b 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES5.types +++ b/tests/baselines/reference/argumentsObjectIterator02_ES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator02_ES5.ts === +//// [tests/cases/compiler/argumentsObjectIterator02_ES5.ts] //// + +=== argumentsObjectIterator02_ES5.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : (x: number, y: number, z: number) => [number, number, number] >x : number diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES6.js b/tests/baselines/reference/argumentsObjectIterator02_ES6.js index 1155ab929eab5..66ec96865e46c 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES6.js +++ b/tests/baselines/reference/argumentsObjectIterator02_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsObjectIterator02_ES6.ts] //// + //// [argumentsObjectIterator02_ES6.ts] function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { let blah = arguments[Symbol.iterator]; diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols b/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols index 1e1f8f120c08e..ae6a13edef6a9 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols +++ b/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator02_ES6.ts === +//// [tests/cases/compiler/argumentsObjectIterator02_ES6.ts] //// + +=== argumentsObjectIterator02_ES6.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : Symbol(doubleAndReturnAsArray, Decl(argumentsObjectIterator02_ES6.ts, 0, 0)) >x : Symbol(x, Decl(argumentsObjectIterator02_ES6.ts, 0, 32)) diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES6.types b/tests/baselines/reference/argumentsObjectIterator02_ES6.types index 07aa33168f15a..28ea6a9c71106 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES6.types +++ b/tests/baselines/reference/argumentsObjectIterator02_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator02_ES6.ts === +//// [tests/cases/compiler/argumentsObjectIterator02_ES6.ts] //// + +=== argumentsObjectIterator02_ES6.ts === function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { >doubleAndReturnAsArray : (x: number, y: number, z: number) => [number, number, number] >x : number diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES5.errors.txt b/tests/baselines/reference/argumentsObjectIterator03_ES5.errors.txt index d8e58482655f7..1ebdbfa1596c2 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES5.errors.txt +++ b/tests/baselines/reference/argumentsObjectIterator03_ES5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/argumentsObjectIterator03_ES5.ts(2,9): error TS2461: Type 'IArguments' is not an array type. +argumentsObjectIterator03_ES5.ts(2,9): error TS2461: Type 'IArguments' is not an array type. -==== tests/cases/compiler/argumentsObjectIterator03_ES5.ts (1 errors) ==== +==== argumentsObjectIterator03_ES5.ts (1 errors) ==== function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { let [x, y, z] = arguments; ~~~~~~~~~ diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES5.js b/tests/baselines/reference/argumentsObjectIterator03_ES5.js index 837808a6d926d..56492b7277331 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES5.js +++ b/tests/baselines/reference/argumentsObjectIterator03_ES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsObjectIterator03_ES5.ts] //// + //// [argumentsObjectIterator03_ES5.ts] function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { let [x, y, z] = arguments; diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES5.symbols b/tests/baselines/reference/argumentsObjectIterator03_ES5.symbols index ff829062f5ed1..94bcac6fc7ba1 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES5.symbols +++ b/tests/baselines/reference/argumentsObjectIterator03_ES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator03_ES5.ts === +//// [tests/cases/compiler/argumentsObjectIterator03_ES5.ts] //// + +=== argumentsObjectIterator03_ES5.ts === function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { >asReversedTuple : Symbol(asReversedTuple, Decl(argumentsObjectIterator03_ES5.ts, 0, 0)) >a : Symbol(a, Decl(argumentsObjectIterator03_ES5.ts, 0, 25)) diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES5.types b/tests/baselines/reference/argumentsObjectIterator03_ES5.types index cdedc6b01bdec..a01bbe096a5a1 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES5.types +++ b/tests/baselines/reference/argumentsObjectIterator03_ES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator03_ES5.ts === +//// [tests/cases/compiler/argumentsObjectIterator03_ES5.ts] //// + +=== argumentsObjectIterator03_ES5.ts === function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { >asReversedTuple : (a: number, b: string, c: boolean) => [boolean, string, number] >a : number diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES6.js b/tests/baselines/reference/argumentsObjectIterator03_ES6.js index 789bcc9390d51..39815757c9442 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES6.js +++ b/tests/baselines/reference/argumentsObjectIterator03_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsObjectIterator03_ES6.ts] //// + //// [argumentsObjectIterator03_ES6.ts] function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { let [x, y, z] = arguments; diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES6.symbols b/tests/baselines/reference/argumentsObjectIterator03_ES6.symbols index 21ad6d052f1de..dad1978ef7682 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES6.symbols +++ b/tests/baselines/reference/argumentsObjectIterator03_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator03_ES6.ts === +//// [tests/cases/compiler/argumentsObjectIterator03_ES6.ts] //// + +=== argumentsObjectIterator03_ES6.ts === function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { >asReversedTuple : Symbol(asReversedTuple, Decl(argumentsObjectIterator03_ES6.ts, 0, 0)) >a : Symbol(a, Decl(argumentsObjectIterator03_ES6.ts, 0, 25)) diff --git a/tests/baselines/reference/argumentsObjectIterator03_ES6.types b/tests/baselines/reference/argumentsObjectIterator03_ES6.types index 5318f7692ea35..71b4a987a3c49 100644 --- a/tests/baselines/reference/argumentsObjectIterator03_ES6.types +++ b/tests/baselines/reference/argumentsObjectIterator03_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsObjectIterator03_ES6.ts === +//// [tests/cases/compiler/argumentsObjectIterator03_ES6.ts] //// + +=== argumentsObjectIterator03_ES6.ts === function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { >asReversedTuple : (a: number, b: string, c: boolean) => [boolean, string, number] >a : number diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode1.errors.txt b/tests/baselines/reference/argumentsPropertyNameInJsMode1.errors.txt index ac1633442243e..3bca806b6238b 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode1.errors.txt +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/a.js(9,7): error TS2554: Expected 0-1 arguments, but got 3. +a.js(9,7): error TS2554: Expected 0-1 arguments, but got 3. -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== const foo = { f1: (params) => { } } diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode1.js b/tests/baselines/reference/argumentsPropertyNameInJsMode1.js index 7589f1bedc325..e01cb9303c2d3 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode1.js +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsPropertyNameInJsMode1.ts] //// + //// [a.js] const foo = { f1: (params) => { } diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode1.symbols b/tests/baselines/reference/argumentsPropertyNameInJsMode1.symbols index 508d78501c65a..9c5e0f8e8c01b 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode1.symbols +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/argumentsPropertyNameInJsMode1.ts] //// + +=== a.js === const foo = { >foo : Symbol(foo, Decl(a.js, 0, 5)) diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode1.types b/tests/baselines/reference/argumentsPropertyNameInJsMode1.types index ceb83fe65db48..0532ba743133e 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode1.types +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/argumentsPropertyNameInJsMode1.ts] //// + +=== a.js === const foo = { >foo : { f1: (params: any) => void; } >{ f1: (params) => { }} : { f1: (params: any) => void; } diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode2.js b/tests/baselines/reference/argumentsPropertyNameInJsMode2.js index a1e6a1a361e86..c32df3f1b4bb4 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode2.js +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsPropertyNameInJsMode2.ts] //// + //// [a.js] function f(x) { arguments; diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode2.symbols b/tests/baselines/reference/argumentsPropertyNameInJsMode2.symbols index 7675a88efb38c..18fcee0940ad9 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode2.symbols +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/argumentsPropertyNameInJsMode2.ts] //// + +=== a.js === function f(x) { >f : Symbol(f, Decl(a.js, 0, 0)) >x : Symbol(x, Decl(a.js, 0, 11)) diff --git a/tests/baselines/reference/argumentsPropertyNameInJsMode2.types b/tests/baselines/reference/argumentsPropertyNameInJsMode2.types index 104a4c4c650a1..69118fb66ba65 100644 --- a/tests/baselines/reference/argumentsPropertyNameInJsMode2.types +++ b/tests/baselines/reference/argumentsPropertyNameInJsMode2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/argumentsPropertyNameInJsMode2.ts] //// + +=== a.js === function f(x) { >f : (x: any, ...args: any[]) => void >x : any diff --git a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.js index d5e50ae78cb01..d435a564e44ad 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor1_Js.ts] //// + //// [a.js] class A { /** diff --git a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.symbols index 93a05fdae9fcc..1e224db0f6f39 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor1_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types index e5af557f694b2..3c02f4aa763d6 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor1_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor1_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.js index b9ff6f1f95f53..48767a638e525 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor2_Js.ts] //// + //// [a.js] class A { /** diff --git a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.symbols index 8c57e8978977f..a28881da6ef3f 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor2_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types index 11d31ed941dc5..8e1333a737872 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor2_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor2_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.js index 6c2fd18136b82..cbca85c60470a 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor3_Js.ts] //// + //// [a.js] class A { get arguments() { diff --git a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.symbols index 1daf9971624eb..8e3b7570c278d 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor3_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types index 4b6557cd1b972..995585dc573cf 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor3_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor3_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.js index ae51fceeca19c..f7b61ea9ace64 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor4_Js.ts] //// + //// [a.js] class A { /** diff --git a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.symbols index 131426bfe2cb1..bc53687b9f1a4 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor4_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types index 8b43e3d7ddb8a..7ab9056758810 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor4_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor4_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.js index 148a15c2978e6..d3a79c828ddf5 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor5_Js.ts] //// + //// [a.js] const bar = { arguments: {} diff --git a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.symbols index 3ed1c58a4a099..3e91c110d9c5f 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor5_Js.ts] //// + === /a.js === const bar = { >bar : Symbol(bar, Decl(a.js, 0, 5)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types index 0629cc868c200..f1072a762b0cf 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor5_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor5_Js.ts] //// + === /a.js === const bar = { >bar : { arguments: {}; } diff --git a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.js index 14ea6dfb8f424..0d7b5cc6a6940 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor6_Js.ts] //// + //// [a.js] class A { constructor() { diff --git a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.symbols index 09608b772c52c..c0b4c634c1f96 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor6_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types index af93a74e105a4..c8434f59957e5 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor6_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor6_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.js b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.js index d94ec834445f4..5fa03c9b1042b 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.js +++ b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor7_Js.ts] //// + //// [a.js] class A { constructor() { diff --git a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.symbols b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.symbols index 35ee8a81d98e3..9640df92b4561 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor7_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types index bf4fb7d4a7b04..25f345353d487 100644 --- a/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types +++ b/tests/baselines/reference/argumentsReferenceInConstructor7_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInConstructor7_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInMethod1_Js.js b/tests/baselines/reference/argumentsReferenceInMethod1_Js.js index 1daff0bb9d115..b5864817af5ab 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod1_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod1_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod1_Js.ts] //// + //// [a.js] class A { /** diff --git a/tests/baselines/reference/argumentsReferenceInMethod1_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod1_Js.symbols index 3f32602d9c55f..c912642c0f0b4 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod1_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod1_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod1_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod1_Js.types b/tests/baselines/reference/argumentsReferenceInMethod1_Js.types index 828e96065df4c..4f755f158ef94 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod1_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod1_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod1_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInMethod2_Js.js b/tests/baselines/reference/argumentsReferenceInMethod2_Js.js index 2f7a5f5dbc689..d2de1c8d44813 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod2_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod2_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod2_Js.ts] //// + //// [a.js] class A { /** diff --git a/tests/baselines/reference/argumentsReferenceInMethod2_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod2_Js.symbols index 5d01debb66022..e059fe6964aa8 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod2_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod2_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod2_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod2_Js.types b/tests/baselines/reference/argumentsReferenceInMethod2_Js.types index dae5b75fe5dcd..ef56ece216091 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod2_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod2_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod2_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInMethod3_Js.js b/tests/baselines/reference/argumentsReferenceInMethod3_Js.js index b183392017405..33a44f7a99f22 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod3_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod3_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod3_Js.ts] //// + //// [a.js] class A { get arguments() { diff --git a/tests/baselines/reference/argumentsReferenceInMethod3_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod3_Js.symbols index 580e9aa98e8fc..4f134e689c7ff 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod3_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod3_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod3_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod3_Js.types b/tests/baselines/reference/argumentsReferenceInMethod3_Js.types index 641078846e71b..11bed143a5833 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod3_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod3_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod3_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInMethod4_Js.js b/tests/baselines/reference/argumentsReferenceInMethod4_Js.js index 3b2c0f71da355..e01ac01a44271 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod4_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod4_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod4_Js.ts] //// + //// [a.js] class A { /** diff --git a/tests/baselines/reference/argumentsReferenceInMethod4_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod4_Js.symbols index cbbecd4989b8e..ec87991dba5d4 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod4_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod4_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod4_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod4_Js.types b/tests/baselines/reference/argumentsReferenceInMethod4_Js.types index 0e9130147413d..b4ed30e2822a6 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod4_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod4_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod4_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInMethod5_Js.js b/tests/baselines/reference/argumentsReferenceInMethod5_Js.js index 65ce6a129ecb7..4e1d7c797b9d4 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod5_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod5_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod5_Js.ts] //// + //// [a.js] const bar = { arguments: {} diff --git a/tests/baselines/reference/argumentsReferenceInMethod5_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod5_Js.symbols index 22d7f10555002..9d9a0c7cd0f1d 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod5_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod5_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod5_Js.ts] //// + === /a.js === const bar = { >bar : Symbol(bar, Decl(a.js, 0, 5)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod5_Js.types b/tests/baselines/reference/argumentsReferenceInMethod5_Js.types index edc563a2a27bd..22c389fe69bda 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod5_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod5_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod5_Js.ts] //// + === /a.js === const bar = { >bar : { arguments: {}; } diff --git a/tests/baselines/reference/argumentsReferenceInMethod6_Js.js b/tests/baselines/reference/argumentsReferenceInMethod6_Js.js index 904981e5e46e4..c351f653e7b37 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod6_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod6_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod6_Js.ts] //// + //// [a.js] class A { m() { diff --git a/tests/baselines/reference/argumentsReferenceInMethod6_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod6_Js.symbols index a38774b679595..097c1f7f08607 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod6_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod6_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod6_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod6_Js.types b/tests/baselines/reference/argumentsReferenceInMethod6_Js.types index 6874875e316bb..4359ff853a1f1 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod6_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod6_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod6_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInMethod7_Js.js b/tests/baselines/reference/argumentsReferenceInMethod7_Js.js index a7926a3252d7a..1acc1eecb3d8c 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod7_Js.js +++ b/tests/baselines/reference/argumentsReferenceInMethod7_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod7_Js.ts] //// + //// [a.js] class A { m() { diff --git a/tests/baselines/reference/argumentsReferenceInMethod7_Js.symbols b/tests/baselines/reference/argumentsReferenceInMethod7_Js.symbols index 630ffe9c05f0d..a67bfd2bf1531 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod7_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInMethod7_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod7_Js.ts] //// + === /a.js === class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/argumentsReferenceInMethod7_Js.types b/tests/baselines/reference/argumentsReferenceInMethod7_Js.types index eda08df6a3ea3..7bbefeadd6465 100644 --- a/tests/baselines/reference/argumentsReferenceInMethod7_Js.types +++ b/tests/baselines/reference/argumentsReferenceInMethod7_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInMethod7_Js.ts] //// + === /a.js === class A { >A : A diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js index 39c849a90ec4e..d2b7a2997e9e9 100644 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + //// [a.js] const a = () => { return { diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols index e2e56a3cb37b4..aa97a19bca110 100644 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + === /a.js === const a = () => { >a : Symbol(a, Decl(a.js, 0, 5)) diff --git a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types index 8be8786acc810..c29b02354c562 100644 --- a/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types +++ b/tests/baselines/reference/argumentsReferenceInObjectLiteral_Js.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsReferenceInObjectLiteral_Js.ts] //// + === /a.js === const a = () => { >a : () => { arguments: any[]; } diff --git a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt index b96c642c819ef..092e0dd26945e 100644 --- a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt +++ b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/argumentsSpreadRestIterables.tsx(1,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/argumentsSpreadRestIterables.tsx(8,21): error TS2461: Type '"hello"' is not an array type. -tests/cases/compiler/argumentsSpreadRestIterables.tsx(10,27): error TS2461: Type '"hello"' is not an array type. -tests/cases/compiler/argumentsSpreadRestIterables.tsx(15,19): error TS2461: Type '"hello"' is not an array type. -tests/cases/compiler/argumentsSpreadRestIterables.tsx(17,25): error TS2461: Type '"hello"' is not an array type. +argumentsSpreadRestIterables.tsx(1,22): error TS2304: Cannot find name 'Iterable'. +argumentsSpreadRestIterables.tsx(8,21): error TS2461: Type '"hello"' is not an array type. +argumentsSpreadRestIterables.tsx(10,27): error TS2461: Type '"hello"' is not an array type. +argumentsSpreadRestIterables.tsx(15,19): error TS2461: Type '"hello"' is not an array type. +argumentsSpreadRestIterables.tsx(17,25): error TS2461: Type '"hello"' is not an array type. -==== tests/cases/compiler/argumentsSpreadRestIterables.tsx (5 errors) ==== +==== argumentsSpreadRestIterables.tsx (5 errors) ==== declare const itNum: Iterable ~~~~~~~~ !!! error TS2304: Cannot find name 'Iterable'. diff --git a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).symbols b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).symbols index 6724774a315e7..a510923bc7ac1 100644 --- a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).symbols +++ b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsSpreadRestIterables.tsx === +//// [tests/cases/compiler/argumentsSpreadRestIterables.tsx] //// + +=== argumentsSpreadRestIterables.tsx === declare const itNum: Iterable >itNum : Symbol(itNum, Decl(argumentsSpreadRestIterables.tsx, 0, 13)) >Iterable : Symbol(Iterable) diff --git a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).types b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).types index 401fd666b9040..85114134650e5 100644 --- a/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).types +++ b/tests/baselines/reference/argumentsSpreadRestIterables(target=es5).types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsSpreadRestIterables.tsx === +//// [tests/cases/compiler/argumentsSpreadRestIterables.tsx] //// + +=== argumentsSpreadRestIterables.tsx === declare const itNum: Iterable >itNum : Iterable diff --git a/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).symbols b/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).symbols index b37a980224fde..9cd2c9a290d99 100644 --- a/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).symbols +++ b/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsSpreadRestIterables.tsx === +//// [tests/cases/compiler/argumentsSpreadRestIterables.tsx] //// + +=== argumentsSpreadRestIterables.tsx === declare const itNum: Iterable >itNum : Symbol(itNum, Decl(argumentsSpreadRestIterables.tsx, 0, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) diff --git a/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).types b/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).types index a1543ea0d3054..c4a7d5f3e659e 100644 --- a/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).types +++ b/tests/baselines/reference/argumentsSpreadRestIterables(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsSpreadRestIterables.tsx === +//// [tests/cases/compiler/argumentsSpreadRestIterables.tsx] //// + +=== argumentsSpreadRestIterables.tsx === declare const itNum: Iterable >itNum : Iterable diff --git a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt index 3cd9988e78de3..d29aaadb27dfb 100644 --- a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt +++ b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(3,10): error TS2815: 'arguments' cannot be referenced in property initializers. -tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(9,10): error TS2815: 'arguments' cannot be referenced in property initializers. -tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(15,15): error TS2815: 'arguments' cannot be referenced in property initializers. -tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(21,15): error TS2815: 'arguments' cannot be referenced in property initializers. +argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(3,10): error TS2815: 'arguments' cannot be referenced in property initializers. +argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(9,10): error TS2815: 'arguments' cannot be referenced in property initializers. +argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(15,15): error TS2815: 'arguments' cannot be referenced in property initializers. +argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(21,15): error TS2815: 'arguments' cannot be referenced in property initializers. -==== tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts (4 errors) ==== +==== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts (4 errors) ==== function A() { return class T { a = arguments diff --git a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js index a162ab0cb8430..e6f9aca3ad495 100644 --- a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js +++ b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts] //// + //// [argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts] function A() { return class T { diff --git a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols index b087127c45773..63d14a38fa3e1 100644 --- a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols +++ b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts === +//// [tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts] //// + +=== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts === function A() { >A : Symbol(A, Decl(argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts, 0, 0)) diff --git a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types index d68759ae2f99d..0aec081db122f 100644 --- a/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types +++ b/tests/baselines/reference/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts === +//// [tests/cases/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts] //// + +=== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts === function A() { >A : () => typeof T diff --git a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.js b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.js index 23c534a8c5384..8567411cce3bb 100644 --- a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.js +++ b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/argumentsUsedInObjectLiteralProperty.ts] //// + //// [argumentsUsedInObjectLiteralProperty.ts] class A { public static createSelectableViewModel(initialState?: any, selectedValue?: any) { diff --git a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols index 6e5651875eaab..c3e25df9be7bb 100644 --- a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols +++ b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsUsedInObjectLiteralProperty.ts === +//// [tests/cases/compiler/argumentsUsedInObjectLiteralProperty.ts] //// + +=== argumentsUsedInObjectLiteralProperty.ts === class A { >A : Symbol(A, Decl(argumentsUsedInObjectLiteralProperty.ts, 0, 0)) diff --git a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types index 697858534db5a..1688f47b8c3b2 100644 --- a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types +++ b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/argumentsUsedInObjectLiteralProperty.ts === +//// [tests/cases/compiler/argumentsUsedInObjectLiteralProperty.ts] //// + +=== argumentsUsedInObjectLiteralProperty.ts === class A { >A : A diff --git a/tests/baselines/reference/arithAssignTyping.errors.txt b/tests/baselines/reference/arithAssignTyping.errors.txt index 143ad5cdaf8e8..e2427b4745d73 100644 --- a/tests/baselines/reference/arithAssignTyping.errors.txt +++ b/tests/baselines/reference/arithAssignTyping.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/arithAssignTyping.ts(3,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(4,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(5,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(6,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(7,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(8,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(9,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(10,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(11,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(12,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(13,1): error TS2629: Cannot assign to 'f' because it is a class. -tests/cases/compiler/arithAssignTyping.ts(14,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(3,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(4,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(5,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(6,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(7,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(8,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(9,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(10,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(11,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(12,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(13,1): error TS2629: Cannot assign to 'f' because it is a class. +arithAssignTyping.ts(14,1): error TS2629: Cannot assign to 'f' because it is a class. -==== tests/cases/compiler/arithAssignTyping.ts (12 errors) ==== +==== arithAssignTyping.ts (12 errors) ==== class f { } f += ''; // error diff --git a/tests/baselines/reference/arithAssignTyping.js b/tests/baselines/reference/arithAssignTyping.js index 7bb31b2804533..66785837bc56d 100644 --- a/tests/baselines/reference/arithAssignTyping.js +++ b/tests/baselines/reference/arithAssignTyping.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arithAssignTyping.ts] //// + //// [arithAssignTyping.ts] class f { } diff --git a/tests/baselines/reference/arithAssignTyping.symbols b/tests/baselines/reference/arithAssignTyping.symbols index 2b65b6f813259..28b3736bc12bd 100644 --- a/tests/baselines/reference/arithAssignTyping.symbols +++ b/tests/baselines/reference/arithAssignTyping.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arithAssignTyping.ts === +//// [tests/cases/compiler/arithAssignTyping.ts] //// + +=== arithAssignTyping.ts === class f { } >f : Symbol(f, Decl(arithAssignTyping.ts, 0, 0)) diff --git a/tests/baselines/reference/arithAssignTyping.types b/tests/baselines/reference/arithAssignTyping.types index ffecb1399de39..1d25760da7ab1 100644 --- a/tests/baselines/reference/arithAssignTyping.types +++ b/tests/baselines/reference/arithAssignTyping.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arithAssignTyping.ts === +//// [tests/cases/compiler/arithAssignTyping.ts] //// + +=== arithAssignTyping.ts === class f { } >f : f diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt index ac526ccc5a93d..ff669a0970ec6 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/arithmeticOnInvalidTypes.ts(3,9): error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(4,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(4,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(5,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(5,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(6,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes.ts(6,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes.ts(3,9): error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. +arithmeticOnInvalidTypes.ts(4,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes.ts(4,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes.ts(5,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes.ts(5,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes.ts(6,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes.ts(6,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/compiler/arithmeticOnInvalidTypes.ts (7 errors) ==== +==== arithmeticOnInvalidTypes.ts (7 errors) ==== var x: Number; var y: Number; var z = x + y; diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.js b/tests/baselines/reference/arithmeticOnInvalidTypes.js index f9cf056ba2353..9cb3dfa524a47 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.js +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arithmeticOnInvalidTypes.ts] //// + //// [arithmeticOnInvalidTypes.ts] var x: Number; var y: Number; diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.symbols b/tests/baselines/reference/arithmeticOnInvalidTypes.symbols index 23d286285eed1..3ffa5dc2c0a00 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.symbols +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arithmeticOnInvalidTypes.ts === +//// [tests/cases/compiler/arithmeticOnInvalidTypes.ts] //// + +=== arithmeticOnInvalidTypes.ts === var x: Number; >x : Symbol(x, Decl(arithmeticOnInvalidTypes.ts, 0, 3)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.types b/tests/baselines/reference/arithmeticOnInvalidTypes.types index 1bbf8bc58f6e1..fee658d26493a 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.types +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arithmeticOnInvalidTypes.ts === +//// [tests/cases/compiler/arithmeticOnInvalidTypes.ts] //// + +=== arithmeticOnInvalidTypes.ts === var x: Number; >x : Number diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt index f4dd0cd7852e7..57c825e11a96d 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(2,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(3,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(3,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(4,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(4,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(5,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/arithmeticOnInvalidTypes2.ts(5,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes2.ts(2,14): error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. +arithmeticOnInvalidTypes2.ts(3,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes2.ts(3,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes2.ts(4,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes2.ts(4,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes2.ts(5,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOnInvalidTypes2.ts(5,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/compiler/arithmeticOnInvalidTypes2.ts (7 errors) ==== +==== arithmeticOnInvalidTypes2.ts (7 errors) ==== var obj = function f(a: T, b: T) { var z1 = a + b; ~~~~~ diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes2.js b/tests/baselines/reference/arithmeticOnInvalidTypes2.js index 38a54d6615f70..a449340adfde3 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes2.js +++ b/tests/baselines/reference/arithmeticOnInvalidTypes2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arithmeticOnInvalidTypes2.ts] //// + //// [arithmeticOnInvalidTypes2.ts] var obj = function f(a: T, b: T) { var z1 = a + b; diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes2.symbols b/tests/baselines/reference/arithmeticOnInvalidTypes2.symbols index be6784d11f06d..f643c176a28fb 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes2.symbols +++ b/tests/baselines/reference/arithmeticOnInvalidTypes2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arithmeticOnInvalidTypes2.ts === +//// [tests/cases/compiler/arithmeticOnInvalidTypes2.ts] //// + +=== arithmeticOnInvalidTypes2.ts === var obj = function f(a: T, b: T) { >obj : Symbol(obj, Decl(arithmeticOnInvalidTypes2.ts, 0, 3)) >f : Symbol(f, Decl(arithmeticOnInvalidTypes2.ts, 0, 9)) diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes2.types b/tests/baselines/reference/arithmeticOnInvalidTypes2.types index ed1e67d6eae65..0fa2f9d800dee 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes2.types +++ b/tests/baselines/reference/arithmeticOnInvalidTypes2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arithmeticOnInvalidTypes2.ts === +//// [tests/cases/compiler/arithmeticOnInvalidTypes2.ts] //// + +=== arithmeticOnInvalidTypes2.ts === var obj = function f(a: T, b: T) { >obj : (a: T, b: T) => T >function f(a: T, b: T) { var z1 = a + b; var z2 = a - b; var z3 = a * b; var z4 = a / b; return a;} : (a: T, b: T) => T diff --git a/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.js b/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.js index 7cb45f63230dd..f2cef2c8e2791 100644 --- a/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.js +++ b/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithAnyAndNumber.ts] //// + //// [arithmeticOperatorWithAnyAndNumber.ts] var a: any; var b: number; diff --git a/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.symbols b/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.symbols index e45db3637f0ce..3b1b836b373d0 100644 --- a/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithAnyAndNumber.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithAnyAndNumber.ts] //// + +=== arithmeticOperatorWithAnyAndNumber.ts === var a: any; >a : Symbol(a, Decl(arithmeticOperatorWithAnyAndNumber.ts, 0, 3)) diff --git a/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.types b/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.types index eeaf6a0ab385b..8f017f0436da8 100644 --- a/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.types +++ b/tests/baselines/reference/arithmeticOperatorWithAnyAndNumber.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithAnyAndNumber.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithAnyAndNumber.ts] //// + +=== arithmeticOperatorWithAnyAndNumber.ts === var a: any; >a : any diff --git a/tests/baselines/reference/arithmeticOperatorWithEnum.js b/tests/baselines/reference/arithmeticOperatorWithEnum.js index 3572f3ecc41e4..23bdb09964f37 100644 --- a/tests/baselines/reference/arithmeticOperatorWithEnum.js +++ b/tests/baselines/reference/arithmeticOperatorWithEnum.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnum.ts] //// + //// [arithmeticOperatorWithEnum.ts] // operands of an enum type are treated as having the primitive type Number. diff --git a/tests/baselines/reference/arithmeticOperatorWithEnum.symbols b/tests/baselines/reference/arithmeticOperatorWithEnum.symbols index 066f429a181bc..3dddb33333752 100644 --- a/tests/baselines/reference/arithmeticOperatorWithEnum.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithEnum.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnum.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnum.ts] //// + +=== arithmeticOperatorWithEnum.ts === // operands of an enum type are treated as having the primitive type Number. enum E { diff --git a/tests/baselines/reference/arithmeticOperatorWithEnum.types b/tests/baselines/reference/arithmeticOperatorWithEnum.types index 1658349126d33..7248144e2876f 100644 --- a/tests/baselines/reference/arithmeticOperatorWithEnum.types +++ b/tests/baselines/reference/arithmeticOperatorWithEnum.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnum.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnum.ts] //// + +=== arithmeticOperatorWithEnum.ts === // operands of an enum type are treated as having the primitive type Number. enum E { diff --git a/tests/baselines/reference/arithmeticOperatorWithEnumUnion.js b/tests/baselines/reference/arithmeticOperatorWithEnumUnion.js index 95bc0b866c91c..d25ed239166d1 100644 --- a/tests/baselines/reference/arithmeticOperatorWithEnumUnion.js +++ b/tests/baselines/reference/arithmeticOperatorWithEnumUnion.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnumUnion.ts] //// + //// [arithmeticOperatorWithEnumUnion.ts] // operands of an enum type are treated as having the primitive type Number. diff --git a/tests/baselines/reference/arithmeticOperatorWithEnumUnion.symbols b/tests/baselines/reference/arithmeticOperatorWithEnumUnion.symbols index 0fa9a5b8fe316..c022860cde33a 100644 --- a/tests/baselines/reference/arithmeticOperatorWithEnumUnion.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithEnumUnion.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnumUnion.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnumUnion.ts] //// + +=== arithmeticOperatorWithEnumUnion.ts === // operands of an enum type are treated as having the primitive type Number. enum E { diff --git a/tests/baselines/reference/arithmeticOperatorWithEnumUnion.types b/tests/baselines/reference/arithmeticOperatorWithEnumUnion.types index 871480b292806..395d905fb9938 100644 --- a/tests/baselines/reference/arithmeticOperatorWithEnumUnion.types +++ b/tests/baselines/reference/arithmeticOperatorWithEnumUnion.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnumUnion.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithEnumUnion.ts] //// + +=== arithmeticOperatorWithEnumUnion.ts === // operands of an enum type are treated as having the primitive type Number. enum E { diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt index cfcd2cded798c..7fe239623fa97 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt @@ -1,563 +1,563 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(15,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(17,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(18,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(19,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(22,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(24,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(24,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(25,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(25,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(26,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(29,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(31,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(32,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(33,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(36,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(37,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(38,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(39,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(40,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(42,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(43,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(44,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(45,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(45,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(46,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(46,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(47,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(50,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(50,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(52,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(53,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(54,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(54,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(57,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(59,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(60,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(61,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(67,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(72,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(74,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(75,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(76,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(78,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(79,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(79,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(80,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(81,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(82,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(83,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(86,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(88,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(89,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(90,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(92,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(93,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(93,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(94,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(95,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(95,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(96,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(96,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(97,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(97,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(100,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(101,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(102,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(102,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(103,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(103,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(104,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(104,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(107,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(109,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(109,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(110,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(110,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(111,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(111,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(114,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(116,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(117,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(118,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(121,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(129,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(131,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(132,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(133,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(135,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(136,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(136,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(137,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(138,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(138,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(139,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(139,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(140,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(143,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(145,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(146,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(147,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(150,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(152,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(152,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(153,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(153,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(154,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(154,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(156,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(157,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(159,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(160,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(160,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(161,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(161,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(163,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(164,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(164,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(165,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(166,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(166,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(167,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(167,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(168,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(168,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(171,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(173,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(174,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(175,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(178,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(180,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(181,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(182,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(186,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(188,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(189,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(190,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(192,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(193,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(193,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(194,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(195,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(195,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(196,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(196,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(197,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(197,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(200,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(202,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(203,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(204,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(206,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(207,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(207,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(208,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(209,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(209,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(210,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(210,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(211,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(211,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(213,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(214,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(214,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(215,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(216,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(216,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(217,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(217,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(218,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(218,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(220,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(221,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(221,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(222,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(223,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(223,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(224,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(224,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(225,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(225,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(228,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(230,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(231,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(232,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(235,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(237,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(238,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(239,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(243,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(245,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(246,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(247,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(249,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(250,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(250,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(251,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(252,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(252,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(253,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(253,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(254,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(254,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(257,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(259,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(260,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(261,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(263,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(264,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(264,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(265,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(266,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(266,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(267,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(267,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(268,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(268,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(270,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(271,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(271,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(272,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(273,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(273,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(274,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(274,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(275,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(275,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(277,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(278,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(278,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(279,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(280,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(280,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(281,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(281,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(282,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(282,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(285,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(287,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(288,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(289,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(292,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(294,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(295,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(296,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(300,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(302,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(303,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(304,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(306,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(307,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(307,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(308,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(309,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(309,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(310,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(310,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(311,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(311,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(314,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(316,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(317,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(318,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(320,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(321,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(321,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(322,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(323,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(323,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(324,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(324,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(325,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(325,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(327,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(328,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(328,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(329,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(330,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(330,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(331,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(331,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(332,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(332,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(334,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(335,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(335,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(336,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(337,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(337,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(338,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(338,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(339,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(339,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(342,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(344,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(345,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(346,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(349,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(351,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(352,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(353,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(357,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(359,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(360,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(361,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(363,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(364,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(364,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(365,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(366,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(366,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(367,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(367,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(368,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(368,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(371,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(373,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(374,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(375,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(377,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(378,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(378,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(379,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(380,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(380,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(381,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(381,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(382,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(382,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(384,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(385,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(385,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(386,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(387,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(387,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(388,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(388,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(389,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(389,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(391,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(392,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(392,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(393,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(394,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(394,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(395,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(395,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(396,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(396,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(399,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(401,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(402,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(403,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(406,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(408,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(409,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(410,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(414,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(416,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(417,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(418,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(420,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(421,12): error TS2447: The '&' operator is not allowed for boolean types. Consider using '&&' instead. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(422,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(423,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(423,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(424,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(424,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(425,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(425,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(428,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(430,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(431,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(432,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(434,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(435,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(435,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(436,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(437,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(437,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(438,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(438,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(439,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(439,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(441,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(442,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(442,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(443,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(444,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(444,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(445,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(445,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(446,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(446,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(448,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(449,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(449,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(450,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(451,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(451,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(452,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(452,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(453,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(453,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(456,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(458,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(459,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(460,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(463,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(465,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(466,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(467,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(471,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(473,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(474,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(475,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(477,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(478,12): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(479,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(480,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(480,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(481,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(481,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(482,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(482,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(485,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(487,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(488,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(489,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(491,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(492,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(492,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(493,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(494,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(494,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(495,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(495,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(496,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(496,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(498,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(499,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(499,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(500,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(501,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(501,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(502,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(502,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(503,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(503,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(505,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(506,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(506,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(507,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(508,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(508,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(509,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(509,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(510,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(510,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(513,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(515,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(516,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(517,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(520,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(522,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(523,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(524,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(528,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(530,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(531,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(532,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(534,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(535,13): error TS2447: The '|' operator is not allowed for boolean types. Consider using '||' instead. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(536,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(537,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(537,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(538,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(538,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(539,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(539,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(542,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(544,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(545,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(546,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(548,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(549,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(549,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(550,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(551,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(551,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(552,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(552,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(553,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(553,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(555,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(556,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(556,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(557,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(558,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(558,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(559,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(559,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(560,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(560,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(562,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(563,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(563,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(564,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(565,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(565,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(566,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(566,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(567,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(567,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(570,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(572,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(573,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(574,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(577,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(579,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(580,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts(581,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(15,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(17,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(18,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(19,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(22,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(24,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(24,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(25,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(25,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(26,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(29,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(31,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(32,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(33,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(36,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(37,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(38,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(39,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(40,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(42,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(43,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(44,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(45,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(45,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(46,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(46,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(47,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(50,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(50,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(52,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(53,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(54,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(54,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(57,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(59,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(60,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(61,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(67,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(72,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(74,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(75,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(76,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(78,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(79,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(79,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(80,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(81,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(82,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(83,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(86,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(88,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(89,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(90,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(92,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(93,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(93,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(94,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(95,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(95,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(96,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(96,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(97,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(97,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(100,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(101,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(102,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(102,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(103,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(103,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(104,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(104,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(107,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(109,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(109,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(110,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(110,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(111,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(111,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(114,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(116,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(117,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(118,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(121,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(129,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(131,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(132,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(133,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(135,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(136,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(136,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(137,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(138,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(138,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(139,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(139,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(140,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(143,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(145,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(146,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(147,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(150,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(152,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(152,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(153,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(153,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(154,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(154,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(156,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(157,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(159,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(160,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(160,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(161,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(161,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(163,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(164,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(164,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(165,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(166,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(166,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(167,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(167,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(168,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(168,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(171,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(173,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(174,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(175,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(178,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(180,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(181,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(182,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(186,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(188,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(189,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(190,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(192,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(193,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(193,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(194,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(195,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(195,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(196,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(196,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(197,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(197,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(200,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(202,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(203,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(204,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(206,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(207,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(207,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(208,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(209,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(209,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(210,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(210,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(211,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(211,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(213,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(214,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(214,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(215,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(216,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(216,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(217,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(217,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(218,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(218,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(220,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(221,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(221,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(222,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(223,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(223,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(224,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(224,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(225,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(225,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(228,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(230,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(231,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(232,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(235,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(237,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(238,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(239,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(243,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(245,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(246,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(247,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(249,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(250,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(250,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(251,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(252,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(252,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(253,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(253,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(254,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(254,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(257,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(259,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(260,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(261,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(263,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(264,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(264,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(265,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(266,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(266,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(267,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(267,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(268,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(268,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(270,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(271,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(271,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(272,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(273,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(273,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(274,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(274,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(275,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(275,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(277,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(278,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(278,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(279,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(280,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(280,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(281,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(281,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(282,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(282,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(285,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(287,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(288,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(289,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(292,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(294,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(295,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(296,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(300,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(302,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(303,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(304,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(306,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(307,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(307,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(308,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(309,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(309,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(310,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(310,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(311,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(311,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(314,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(316,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(317,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(318,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(320,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(321,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(321,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(322,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(323,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(323,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(324,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(324,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(325,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(325,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(327,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(328,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(328,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(329,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(330,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(330,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(331,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(331,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(332,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(332,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(334,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(335,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(335,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(336,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(337,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(337,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(338,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(338,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(339,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(339,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(342,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(344,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(345,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(346,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(349,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(351,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(352,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(353,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(357,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(359,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(360,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(361,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(363,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(364,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(364,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(365,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(366,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(366,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(367,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(367,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(368,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(368,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(371,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(373,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(374,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(375,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(377,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(378,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(378,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(379,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(380,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(380,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(381,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(381,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(382,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(382,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(384,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(385,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(385,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(386,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(387,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(387,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(388,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(388,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(389,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(389,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(391,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(392,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(392,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(393,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(394,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(394,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(395,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(395,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(396,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(396,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(399,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(401,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(402,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(403,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(406,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(408,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(409,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(410,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(414,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(416,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(417,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(418,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(420,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(421,12): error TS2447: The '&' operator is not allowed for boolean types. Consider using '&&' instead. +arithmeticOperatorWithInvalidOperands.ts(422,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(423,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(423,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(424,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(424,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(425,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(425,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(428,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(430,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(431,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(432,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(434,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(435,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(435,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(436,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(437,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(437,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(438,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(438,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(439,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(439,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(441,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(442,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(442,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(443,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(444,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(444,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(445,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(445,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(446,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(446,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(448,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(449,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(449,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(450,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(451,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(451,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(452,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(452,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(453,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(453,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(456,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(458,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(459,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(460,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(463,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(465,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(466,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(467,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(471,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(473,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(474,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(475,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(477,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(478,12): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. +arithmeticOperatorWithInvalidOperands.ts(479,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(480,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(480,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(481,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(481,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(482,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(482,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(485,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(487,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(488,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(489,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(491,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(492,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(492,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(493,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(494,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(494,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(495,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(495,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(496,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(496,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(498,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(499,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(499,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(500,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(501,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(501,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(502,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(502,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(503,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(503,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(505,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(506,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(506,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(507,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(508,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(508,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(509,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(509,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(510,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(510,16): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(513,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(515,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(516,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(517,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(520,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(522,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(523,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(524,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(528,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(530,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(531,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(532,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(534,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(535,13): error TS2447: The '|' operator is not allowed for boolean types. Consider using '||' instead. +arithmeticOperatorWithInvalidOperands.ts(536,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(537,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(537,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(538,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(538,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(539,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(539,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(542,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(544,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(545,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(546,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(548,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(549,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(549,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(550,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(551,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(551,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(552,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(552,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(553,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(553,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(555,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(556,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(556,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(557,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(558,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(558,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(559,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(559,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(560,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(560,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(562,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(563,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(563,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(564,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(565,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(565,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(566,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(566,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(567,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(567,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(570,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(572,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(573,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(574,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(577,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(579,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(580,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithInvalidOperands.ts(581,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts (557 errors) ==== +==== arithmeticOperatorWithInvalidOperands.ts (557 errors) ==== // these operators require their operands to be of type Any, the Number primitive type, or // an enum type enum E { a, b, c } diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js index 974e9930103d7..691081b53722b 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts] //// + //// [arithmeticOperatorWithInvalidOperands.ts] // these operators require their operands to be of type Any, the Number primitive type, or // an enum type diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols index 57b6917cb8994..b087cff2b360d 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts] //// + +=== arithmeticOperatorWithInvalidOperands.ts === // these operators require their operands to be of type Any, the Number primitive type, or // an enum type enum E { a, b, c } diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types index e26b18af908d7..8e7fb50b13183 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithInvalidOperands.ts] //// + +=== arithmeticOperatorWithInvalidOperands.ts === // these operators require their operands to be of type Any, the Number primitive type, or // an enum type enum E { a, b, c } diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt index 6c527e4f41d69..2d254bda40710 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt @@ -1,246 +1,246 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,20): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,20): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,21): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,12): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,13): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,13): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,13): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,13): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,13): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,13): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,20): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(9,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(10,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(11,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(13,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(14,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(15,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(17,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(18,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(19,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(21,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(22,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(23,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(26,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(27,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(28,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(30,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(31,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(32,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(34,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(35,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(36,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(38,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(39,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(40,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(43,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(44,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(45,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(47,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(48,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(49,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(51,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(52,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(53,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(55,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(56,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(57,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(60,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(61,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(62,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(64,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(65,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(66,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(68,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(69,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(70,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(72,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(73,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(74,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(79,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(81,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(82,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(83,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(85,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(89,20): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(90,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(91,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(95,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(96,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(98,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(99,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(100,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(102,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(103,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(106,20): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(107,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(108,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(111,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(115,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(116,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(117,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(119,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(120,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(121,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(123,21): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(124,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(125,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(128,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(129,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(130,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(132,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(133,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(134,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(136,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(137,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(138,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(140,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(141,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(142,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(145,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(146,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(147,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(149,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(150,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(151,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(153,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(154,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,12): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(155,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(157,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(158,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(159,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,13): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(162,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,13): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(163,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,13): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(164,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(166,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(167,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(168,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,13): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(170,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,13): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(171,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,13): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(172,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(174,20): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(175,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithNullValueAndInvalidOperands.ts(176,18): error TS18050: The value 'null' cannot be used here. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts (240 errors) ==== +==== arithmeticOperatorWithNullValueAndInvalidOperands.ts (240 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js index b277abb668d86..244abd14561e6 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts] //// + //// [arithmeticOperatorWithNullValueAndInvalidOperands.ts] // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols index c5ece2c7eb899..09060fcd5f1ca 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts] //// + +=== arithmeticOperatorWithNullValueAndInvalidOperands.ts === // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types index ed46ac23e91b8..d6404365e2fbc 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndInvalidOperands.ts] //// + +=== arithmeticOperatorWithNullValueAndInvalidOperands.ts === // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt index 3e6c56cd67688..dbb3c8ee7036a 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.errors.txt @@ -1,86 +1,86 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(13,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(14,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(15,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(16,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(17,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(18,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(19,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(20,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(23,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(24,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(25,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(26,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(27,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(28,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(29,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(30,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(33,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(34,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(35,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(36,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(37,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(38,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(39,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(40,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(43,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(44,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(45,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(46,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(47,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(48,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(49,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(50,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(53,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(54,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(55,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(56,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(57,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(58,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(59,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(60,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(63,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(64,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(65,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(66,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(67,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(68,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(69,16): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(70,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(73,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(74,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(75,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(76,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(77,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(78,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(79,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(80,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(83,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(84,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(85,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(86,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(87,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(88,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(89,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(90,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(93,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(94,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(95,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(96,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(97,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(98,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(99,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(100,17): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(103,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(104,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(105,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(106,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(107,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(108,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(109,15): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts(110,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(13,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(14,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(15,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(16,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(17,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(18,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(19,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(20,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(23,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(24,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(25,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(26,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(27,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(28,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(29,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(30,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(33,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(34,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(35,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(36,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(37,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(38,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(39,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(40,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(43,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(44,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(45,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(46,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(47,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(48,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(49,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(50,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(53,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(54,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(55,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(56,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(57,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(58,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(59,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(60,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(63,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(64,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(65,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(66,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(67,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(68,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(69,16): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(70,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(73,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(74,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(75,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(76,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(77,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(78,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(79,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(80,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(83,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(84,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(85,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(86,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(87,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(88,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(89,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(90,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(93,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(94,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(95,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(96,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(97,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(98,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(99,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(100,17): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(103,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(104,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(105,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(106,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(107,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(108,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(109,15): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithNullValueAndValidOperands.ts(110,17): error TS18050: The value 'null' cannot be used here. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts (80 errors) ==== +==== arithmeticOperatorWithNullValueAndValidOperands.ts (80 errors) ==== // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js index 0c30e8d048492..fa3b897c3cc54 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts] //// + //// [arithmeticOperatorWithNullValueAndValidOperands.ts] // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols index fe7e683bb8c88..971e192d68aa7 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts] //// + +=== arithmeticOperatorWithNullValueAndValidOperands.ts === // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types index 889898446b5cb..4219204277804 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndValidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithNullValueAndValidOperands.ts] //// + +=== arithmeticOperatorWithNullValueAndValidOperands.ts === // If one operand is the null or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index 796b6288f8194..3a88fc64a3cad 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -1,86 +1,86 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,23): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,23): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,23): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,24): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,24): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,19): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,24): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,24): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,20): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,20): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,25): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,25): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,23): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,23): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,18): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,11): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,23): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(8,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(9,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(10,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(11,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(14,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(15,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(16,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(17,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(20,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(21,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(22,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(23,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(26,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(27,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(28,24): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(29,24): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(32,19): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(33,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(34,24): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(35,24): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(38,20): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(39,20): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(40,25): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(41,25): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(44,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(45,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(46,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(47,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(50,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(51,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(52,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(53,23): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(56,18): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,11): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(57,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(58,23): error TS18050: The value 'null' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts(59,23): error TS18050: The value 'undefined' cannot be used here. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts (80 errors) ==== +==== arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts (80 errors) ==== // operator * var ra1 = null * null; ~~~~ diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.js b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.js index f1421a6b5c974..6c8e9babfbfb3 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.js +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts] //// + //// [arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts] // operator * var ra1 = null * null; diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.symbols b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.symbols index 4ee959cef79d4..967a9c165eef7 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts] //// + +=== arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts === // operator * var ra1 = null * null; >ra1 : Symbol(ra1, Decl(arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts, 1, 3)) diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.types b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.types index 6a468f0ac6190..31825f73b801f 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.types +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts] //// + +=== arithmeticOperatorWithOnlyNullValueOrUndefinedValue.ts === // operator * var ra1 = null * null; >ra1 : number diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt index fc939a5216e22..8d895278b97f7 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt @@ -1,186 +1,186 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(9,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(10,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(11,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(12,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(13,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(14,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(15,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(16,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(17,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(18,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(20,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(21,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(22,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(23,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(24,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(25,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(26,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(27,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(28,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(29,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(31,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(31,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(32,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(32,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(33,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(33,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(34,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(34,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(35,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(35,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(36,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(36,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(37,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(37,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(38,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(38,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(39,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(39,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(40,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(40,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(42,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(42,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(43,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(43,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(44,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(44,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(45,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(45,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(46,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(46,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(47,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(47,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(48,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(48,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(49,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(49,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(50,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(50,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(51,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(51,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(53,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(54,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(55,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(56,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(57,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(58,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(59,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(60,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(61,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(62,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(64,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(65,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(66,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(67,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(68,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(69,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(70,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(71,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(72,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(73,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(75,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(75,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(76,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(76,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(77,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(78,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(79,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(79,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(80,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(80,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(81,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(81,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(82,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(82,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(83,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(83,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(84,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(84,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(86,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(87,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(88,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(88,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(89,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(89,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(90,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(90,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(91,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(91,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(92,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(92,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(93,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(93,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(94,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(95,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(95,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(97,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(97,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(98,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(98,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(99,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(99,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(100,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(100,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(101,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(101,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(102,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(102,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(103,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(103,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(104,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(105,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(105,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(106,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(106,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(108,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(108,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(109,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(109,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(110,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(110,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(111,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(111,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(112,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(113,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(114,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(114,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(115,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(115,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(116,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(116,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(117,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(117,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(119,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(119,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(120,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(120,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(121,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(121,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(122,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(122,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(123,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(123,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(124,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(124,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(125,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(125,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(126,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(126,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(127,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(127,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(128,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts(128,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(9,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(10,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(11,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(12,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(13,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(14,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(15,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(16,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(17,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(18,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(20,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(21,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(22,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(23,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(24,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(25,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(26,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(27,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(28,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(29,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(31,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(31,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(32,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(32,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(33,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(33,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(34,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(34,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(35,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(35,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(36,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(36,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(37,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(37,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(38,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(38,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(39,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(39,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(40,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(40,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(42,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(42,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(43,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(43,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(44,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(44,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(45,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(45,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(46,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(46,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(47,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(47,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(48,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(48,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(49,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(49,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(50,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(50,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(51,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(51,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(53,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(54,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(55,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(56,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(57,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(58,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(59,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(60,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(61,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(62,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(64,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(65,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(66,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(67,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(68,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(69,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(70,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(71,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(72,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(73,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(75,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(75,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(76,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(76,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(77,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(77,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(78,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(78,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(79,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(79,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(80,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(80,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(81,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(81,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(82,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(82,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(83,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(83,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(84,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(84,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(86,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(86,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(87,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(87,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(88,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(88,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(89,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(89,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(90,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(90,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(91,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(91,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(92,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(92,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(93,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(93,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(94,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(94,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(95,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(95,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(97,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(97,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(98,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(98,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(99,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(99,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(100,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(100,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(101,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(101,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(102,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(102,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(103,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(103,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(104,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(104,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(105,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(105,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(106,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(106,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(108,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(108,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(109,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(109,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(110,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(110,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(111,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(111,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(112,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(112,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(113,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(113,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(114,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(114,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(115,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(115,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(116,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(116,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(117,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(117,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(119,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(119,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(120,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(120,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(121,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(121,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(122,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(122,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(123,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(123,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(124,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(124,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(125,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(125,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(126,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(126,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(127,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(127,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(128,17): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithTypeParameter.ts(128,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts (180 errors) ==== +==== arithmeticOperatorWithTypeParameter.ts (180 errors) ==== // type parameter type is not valid for arithmetic operand function foo(t: T) { var a: any; diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js index 94475b88fd807..6c76194913b6e 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts] //// + //// [arithmeticOperatorWithTypeParameter.ts] // type parameter type is not valid for arithmetic operand function foo(t: T) { diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols index 24f058e530eb4..4228f2ffad0a5 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts] //// + +=== arithmeticOperatorWithTypeParameter.ts === // type parameter type is not valid for arithmetic operand function foo(t: T) { >foo : Symbol(foo, Decl(arithmeticOperatorWithTypeParameter.ts, 0, 0)) diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types index bc77ea54c81b5..85f2b0e7cff5d 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithTypeParameter.ts] //// + +=== arithmeticOperatorWithTypeParameter.ts === // type parameter type is not valid for arithmetic operand function foo(t: T) { >foo : (t: T) => void diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt index aad82ba30827a..2597dbc861257 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -1,246 +1,246 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,20): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,20): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,21): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,12): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,13): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,13): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,13): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,13): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,13): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,13): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,20): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(9,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(10,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(11,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(13,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(14,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(15,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(17,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(18,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(19,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(21,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(22,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(23,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(26,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(27,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(28,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(30,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(31,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(32,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(34,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(35,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(36,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(38,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(39,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(40,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(43,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(44,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(45,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(47,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(48,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(49,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(51,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(52,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(53,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(55,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(56,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(57,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(60,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(61,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(62,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(64,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(65,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(66,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(68,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(69,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(70,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(72,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(73,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(74,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(77,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(78,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(79,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(81,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(82,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(83,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(85,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(86,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(87,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(89,20): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(90,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(91,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(94,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(95,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(96,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(98,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(99,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(100,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(102,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(103,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(104,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(106,20): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(107,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(108,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(111,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(112,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(113,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(115,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(116,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(117,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(119,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(120,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(121,26): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(123,21): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(124,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(125,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(128,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(129,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(130,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(132,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(133,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(134,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(136,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(137,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(138,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(140,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(141,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(142,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(145,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(146,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(147,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(149,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(150,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(151,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(153,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(154,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,12): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(155,24): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(157,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(158,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(159,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,13): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(162,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,13): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(163,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,13): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(164,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(166,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(167,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(168,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,13): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(170,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,13): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(171,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,13): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(172,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(174,20): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(175,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,13): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts(176,18): error TS18050: The value 'undefined' cannot be used here. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts (240 errors) ==== +==== arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts (240 errors) ==== // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js index b64c2d9dc0945..e50c37344ca49 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts] //// + //// [arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts] // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols index a0d52b278b655..a0c409aaf92b4 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts] //// + +=== arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts === // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types index 25c42c8a33c9d..d91d4103c8192 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts] //// + +=== arithmeticOperatorWithUndefinedValueAndInvalidOperands.ts === // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt index fb0647b177fa9..53924924d504e 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.errors.txt @@ -1,86 +1,86 @@ -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(17,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(18,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(19,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(20,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(23,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(24,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(25,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(26,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(27,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(28,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(29,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(30,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(33,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(34,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(35,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(36,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(37,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(38,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(39,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(40,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(43,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(44,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(45,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(46,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(47,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(48,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(49,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(50,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(53,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(54,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(55,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(56,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(57,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(58,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(59,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(60,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(63,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(64,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(65,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(66,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(67,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(68,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(69,16): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(70,18): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(73,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(74,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(75,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(76,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(77,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(78,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(79,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(80,19): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(83,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(84,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(85,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(86,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(87,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(88,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(89,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(90,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(93,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(94,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(95,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(96,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(97,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(98,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(99,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(100,17): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(103,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(104,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(105,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(106,11): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(107,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(108,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(109,15): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts(110,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(13,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(14,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(15,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(16,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(17,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(18,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(19,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(20,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(23,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(24,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(25,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(26,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(27,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(28,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(29,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(30,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(33,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(34,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(35,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(36,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(37,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(38,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(39,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(40,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(43,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(44,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(45,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(46,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(47,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(48,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(49,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(50,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(53,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(54,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(55,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(56,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(57,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(58,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(59,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(60,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(63,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(64,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(65,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(66,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(67,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(68,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(69,16): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(70,18): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(73,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(74,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(75,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(76,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(77,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(78,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(79,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(80,19): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(83,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(84,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(85,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(86,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(87,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(88,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(89,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(90,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(93,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(94,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(95,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(96,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(97,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(98,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(99,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(100,17): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(103,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(104,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(105,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(106,11): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(107,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(108,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(109,15): error TS18050: The value 'undefined' cannot be used here. +arithmeticOperatorWithUndefinedValueAndValidOperands.ts(110,17): error TS18050: The value 'undefined' cannot be used here. -==== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts (80 errors) ==== +==== arithmeticOperatorWithUndefinedValueAndValidOperands.ts (80 errors) ==== // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js index 60ea9af32c2b5..fdb16d22f3009 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts] //// + //// [arithmeticOperatorWithUndefinedValueAndValidOperands.ts] // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols index 5ba1d7f972881..6219bebd69096 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts] //// + +=== arithmeticOperatorWithUndefinedValueAndValidOperands.ts === // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types index 2a714a35210b4..2d26e95398bf7 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndValidOperands.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts === +//// [tests/cases/conformance/expressions/binaryOperators/arithmeticOperator/arithmeticOperatorWithUndefinedValueAndValidOperands.ts] //// + +=== arithmeticOperatorWithUndefinedValueAndValidOperands.ts === // If one operand is the undefined or undefined value, it is treated as having the type of the // other operand. diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt index 1ce65087aec9d..b4e4cdbcf67a4 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt +++ b/tests/baselines/reference/arityAndOrderCompatibility01.errors.txt @@ -1,35 +1,35 @@ -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(15,12): error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(17,5): error TS2461: Type '{ 0: string; 1: number; length: 2; }' is not an array type. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(18,5): error TS2322: Type '[string, number]' is not assignable to type '[number, number, number]'. +arityAndOrderCompatibility01.ts(15,12): error TS2493: Tuple type '[string, number]' of length '2' has no element at index '2'. +arityAndOrderCompatibility01.ts(17,5): error TS2461: Type '{ 0: string; 1: number; length: 2; }' is not an array type. +arityAndOrderCompatibility01.ts(18,5): error TS2322: Type '[string, number]' is not assignable to type '[number, number, number]'. Source has 2 element(s) but target requires 3. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(19,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[number, number, number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(20,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, number, number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(21,5): error TS2322: Type '[string, number]' is not assignable to type '[string, number, number]'. +arityAndOrderCompatibility01.ts(19,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[number, number, number]'. +arityAndOrderCompatibility01.ts(20,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, number, number]'. +arityAndOrderCompatibility01.ts(21,5): error TS2322: Type '[string, number]' is not assignable to type '[string, number, number]'. Source has 2 element(s) but target requires 3. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(22,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[string, number, number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(23,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string, number, number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(24,5): error TS2322: Type '[string, number]' is not assignable to type '[number]'. +arityAndOrderCompatibility01.ts(22,5): error TS2741: Property '2' is missing in type 'StrNum' but required in type '[string, number, number]'. +arityAndOrderCompatibility01.ts(23,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string, number, number]'. +arityAndOrderCompatibility01.ts(24,5): error TS2322: Type '[string, number]' is not assignable to type '[number]'. Source has 2 element(s) but target allows only 1. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(25,5): error TS2322: Type 'StrNum' is not assignable to type '[number]'. +arityAndOrderCompatibility01.ts(25,5): error TS2322: Type 'StrNum' is not assignable to type '[number]'. Types of property '0' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(26,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'. +arityAndOrderCompatibility01.ts(26,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'. +arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'. Source has 2 element(s) but target allows only 1. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(28,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'. +arityAndOrderCompatibility01.ts(28,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'. Types of property 'length' are incompatible. Type '2' is not assignable to type '1'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(29,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(30,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. +arityAndOrderCompatibility01.ts(29,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'. +arityAndOrderCompatibility01.ts(30,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'. Type at position 0 in source is not compatible with type at position 0 in target. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(31,5): error TS2322: Type 'StrNum' is not assignable to type '[number, string]'. +arityAndOrderCompatibility01.ts(31,5): error TS2322: Type 'StrNum' is not assignable to type '[number, string]'. Types of property '0' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, string]'. +arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, string]'. -==== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts (17 errors) ==== +==== arityAndOrderCompatibility01.ts (17 errors) ==== interface StrNum extends Array { 0: string; 1: number; diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.js b/tests/baselines/reference/arityAndOrderCompatibility01.js index bf7736a80c997..81f2df8dd8165 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.js +++ b/tests/baselines/reference/arityAndOrderCompatibility01.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts] //// + //// [arityAndOrderCompatibility01.ts] interface StrNum extends Array { 0: string; diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.symbols b/tests/baselines/reference/arityAndOrderCompatibility01.symbols index 13bab3cc679b1..c711fa4a471af 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.symbols +++ b/tests/baselines/reference/arityAndOrderCompatibility01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts === +//// [tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts] //// + +=== arityAndOrderCompatibility01.ts === interface StrNum extends Array { >StrNum : Symbol(StrNum, Decl(arityAndOrderCompatibility01.ts, 0, 0)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arityAndOrderCompatibility01.types b/tests/baselines/reference/arityAndOrderCompatibility01.types index aa658ba762934..52ed403344001 100644 --- a/tests/baselines/reference/arityAndOrderCompatibility01.types +++ b/tests/baselines/reference/arityAndOrderCompatibility01.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts === +//// [tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts] //// + +=== arityAndOrderCompatibility01.ts === interface StrNum extends Array { 0: string; >0 : string diff --git a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.errors.txt b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.errors.txt index 788ff30c58f83..008c8d2e399c8 100644 --- a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.errors.txt +++ b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts(5,1): error TS2554: Expected 3 arguments, but got 2. -tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts(7,1): error TS2554: Expected 3 arguments, but got 2. +arityErrorRelatedSpanBindingPattern.ts(5,1): error TS2554: Expected 3 arguments, but got 2. +arityErrorRelatedSpanBindingPattern.ts(7,1): error TS2554: Expected 3 arguments, but got 2. -==== tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts (2 errors) ==== +==== arityErrorRelatedSpanBindingPattern.ts (2 errors) ==== function foo(a, b, {c}): void {} function bar(a, b, [c]): void {} @@ -10,10 +10,10 @@ tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts(7,1): error TS2554: foo("", 0); ~~~~~~~~~~ !!! error TS2554: Expected 3 arguments, but got 2. -!!! related TS6211 tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts:1:20: An argument matching this binding pattern was not provided. +!!! related TS6211 arityErrorRelatedSpanBindingPattern.ts:1:20: An argument matching this binding pattern was not provided. bar("", 0); ~~~~~~~~~~ !!! error TS2554: Expected 3 arguments, but got 2. -!!! related TS6211 tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts:3:20: An argument matching this binding pattern was not provided. +!!! related TS6211 arityErrorRelatedSpanBindingPattern.ts:3:20: An argument matching this binding pattern was not provided. \ No newline at end of file diff --git a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js index 66f9316457d12..6d4adebd8469f 100644 --- a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js +++ b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts] //// + //// [arityErrorRelatedSpanBindingPattern.ts] function foo(a, b, {c}): void {} diff --git a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.symbols b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.symbols index f58194abaac00..1b646138d0592 100644 --- a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.symbols +++ b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts === +//// [tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts] //// + +=== arityErrorRelatedSpanBindingPattern.ts === function foo(a, b, {c}): void {} >foo : Symbol(foo, Decl(arityErrorRelatedSpanBindingPattern.ts, 0, 0)) >a : Symbol(a, Decl(arityErrorRelatedSpanBindingPattern.ts, 0, 13)) diff --git a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.types b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.types index 954cb537665bc..a405434b06c50 100644 --- a/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.types +++ b/tests/baselines/reference/arityErrorRelatedSpanBindingPattern.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts === +//// [tests/cases/compiler/arityErrorRelatedSpanBindingPattern.ts] //// + +=== arityErrorRelatedSpanBindingPattern.ts === function foo(a, b, {c}): void {} >foo : (a: any, b: any, { c }: { c: any; }) => void >a : any diff --git a/tests/baselines/reference/arrayAssignmentPatternWithAny.js b/tests/baselines/reference/arrayAssignmentPatternWithAny.js index c81b5f1f38d8b..5160c81de9b09 100644 --- a/tests/baselines/reference/arrayAssignmentPatternWithAny.js +++ b/tests/baselines/reference/arrayAssignmentPatternWithAny.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/destructuring/arrayAssignmentPatternWithAny.ts] //// + //// [arrayAssignmentPatternWithAny.ts] var a: any; var x: string; diff --git a/tests/baselines/reference/arrayAssignmentPatternWithAny.symbols b/tests/baselines/reference/arrayAssignmentPatternWithAny.symbols index a55febc142289..44be199cf2413 100644 --- a/tests/baselines/reference/arrayAssignmentPatternWithAny.symbols +++ b/tests/baselines/reference/arrayAssignmentPatternWithAny.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/destructuring/arrayAssignmentPatternWithAny.ts === +//// [tests/cases/conformance/es6/destructuring/arrayAssignmentPatternWithAny.ts] //// + +=== arrayAssignmentPatternWithAny.ts === var a: any; >a : Symbol(a, Decl(arrayAssignmentPatternWithAny.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayAssignmentPatternWithAny.types b/tests/baselines/reference/arrayAssignmentPatternWithAny.types index 452fc0737a1ec..a108a0fa458d3 100644 --- a/tests/baselines/reference/arrayAssignmentPatternWithAny.types +++ b/tests/baselines/reference/arrayAssignmentPatternWithAny.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/destructuring/arrayAssignmentPatternWithAny.ts === +//// [tests/cases/conformance/es6/destructuring/arrayAssignmentPatternWithAny.ts] //// + +=== arrayAssignmentPatternWithAny.ts === var a: any; >a : any diff --git a/tests/baselines/reference/arrayAssignmentTest1.errors.txt b/tests/baselines/reference/arrayAssignmentTest1.errors.txt index 2ff2066dac365..c22688b1bdb46 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -1,34 +1,34 @@ -tests/cases/compiler/arrayAssignmentTest1.ts(46,5): error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'. -tests/cases/compiler/arrayAssignmentTest1.ts(47,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 -tests/cases/compiler/arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 -tests/cases/compiler/arrayAssignmentTest1.ts(49,5): error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'. +arrayAssignmentTest1.ts(46,5): error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'. +arrayAssignmentTest1.ts(47,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 +arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 +arrayAssignmentTest1.ts(49,5): error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. +arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'. Property 'IM1' is missing in type 'C3' but required in type 'I1'. -tests/cases/compiler/arrayAssignmentTest1.ts(64,1): error TS2322: Type 'I1[]' is not assignable to type 'C1[]'. +arrayAssignmentTest1.ts(64,1): error TS2322: Type 'I1[]' is not assignable to type 'C1[]'. Property 'C1M1' is missing in type 'I1' but required in type 'C1'. -tests/cases/compiler/arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to type 'C1[]'. +arrayAssignmentTest1.ts(65,1): error TS2322: Type 'C3[]' is not assignable to type 'C1[]'. Type 'C3' is missing the following properties from type 'C1': IM1, C1M1 -tests/cases/compiler/arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'. +arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'. Property 'C2M1' is missing in type 'C1' but required in type 'C2'. -tests/cases/compiler/arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. +arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1 -tests/cases/compiler/arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. +arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1 -tests/cases/compiler/arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. +arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. +arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. Property 'CM3M1' is missing in type 'C1' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. +arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. -tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest1.ts(83,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest1.ts(84,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. +arrayAssignmentTest1.ts(80,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest1.ts(82,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest1.ts(83,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest1.ts(84,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -==== tests/cases/compiler/arrayAssignmentTest1.ts (19 errors) ==== +==== arrayAssignmentTest1.ts (19 errors) ==== interface I1 { IM1():void[]; } @@ -77,7 +77,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m var i1_error: I1 = []; // should be an error - is ~~~~~~~~ !!! error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:2:2: 'IM1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:2:2: 'IM1' is declared here. var c1_error: C1 = []; // should be an error - is ~~~~~~~~ !!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 @@ -87,7 +87,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m var c3_error: C3 = []; // should be an error - is ~~~~~~~~ !!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. arr_any = arr_i1; // should be ok - is @@ -102,7 +102,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m ~~~~~~ !!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]'. !!! error TS2322: Property 'IM1' is missing in type 'C3' but required in type 'I1'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:2:2: 'IM1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:2:2: 'IM1' is declared here. arr_c1 = arr_c1; // should be ok - subtype relationship - is arr_c1 = arr_c2; // should be ok - subtype relationship - is @@ -110,7 +110,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m ~~~~~~ !!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]'. !!! error TS2322: Property 'C1M1' is missing in type 'I1' but required in type 'C1'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:7:2: 'C1M1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:7:2: 'C1M1' is declared here. arr_c1 = arr_c3; // should be an error - is ~~~~~~ !!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]'. @@ -121,7 +121,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m ~~~~~~ !!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]'. !!! error TS2322: Property 'C2M1' is missing in type 'C1' but required in type 'C2'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:10:5: 'C2M1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:10:5: 'C2M1' is declared here. arr_c2 = arr_i1; // should be an error - subtype relationship - is ~~~~~~ !!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. @@ -138,17 +138,17 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is m ~~~~~~ !!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. !!! error TS2322: Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ !!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. !!! error TS2322: Property 'CM3M1' is missing in type 'C1' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ !!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. !!! error TS2322: Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest1.ts:14:5: 'CM3M1' is declared here. arr_any = f1; // should be an error - is ~~~~~~~ diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 5ceebf7c0a187..0d2051b310bef 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAssignmentTest1.ts] //// + //// [arrayAssignmentTest1.ts] interface I1 { IM1():void[]; diff --git a/tests/baselines/reference/arrayAssignmentTest1.symbols b/tests/baselines/reference/arrayAssignmentTest1.symbols index 8f9445fd56ce0..e2aeab997ce78 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.symbols +++ b/tests/baselines/reference/arrayAssignmentTest1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest1.ts === +//// [tests/cases/compiler/arrayAssignmentTest1.ts] //// + +=== arrayAssignmentTest1.ts === interface I1 { >I1 : Symbol(I1, Decl(arrayAssignmentTest1.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayAssignmentTest1.types b/tests/baselines/reference/arrayAssignmentTest1.types index 2c858cdc89da0..6e8b4651e15a4 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.types +++ b/tests/baselines/reference/arrayAssignmentTest1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest1.ts === +//// [tests/cases/compiler/arrayAssignmentTest1.ts] //// + +=== arrayAssignmentTest1.ts === interface I1 { IM1():void[]; >IM1 : () => void[] diff --git a/tests/baselines/reference/arrayAssignmentTest2.errors.txt b/tests/baselines/reference/arrayAssignmentTest2.errors.txt index f79695c546ce1..939b931970d08 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest2.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/arrayAssignmentTest2.ts(47,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. +arrayAssignmentTest2.ts(47,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest2.ts(48,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. +arrayAssignmentTest2.ts(48,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. Property 'CM3M1' is missing in type 'C1' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. +arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. -tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. -tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'. -tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest2.ts(56,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest2.ts(57,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. +arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'. +arrayAssignmentTest2.ts(53,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest2.ts(55,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest2.ts(56,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest2.ts(57,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -==== tests/cases/compiler/arrayAssignmentTest2.ts (10 errors) ==== +==== arrayAssignmentTest2.ts (10 errors) ==== interface I1 { IM1():void[]; } @@ -64,17 +64,17 @@ tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is m ~~~~~~ !!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. !!! error TS2322: Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ !!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. !!! error TS2322: Property 'CM3M1' is missing in type 'C1' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ !!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. !!! error TS2322: Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. +!!! related TS2728 arrayAssignmentTest2.ts:14:2: 'CM3M1' is declared here. arr_any = f1; // should be an error - is ~~~~~~~ diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 536a61692ec96..caeeb10d16c23 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAssignmentTest2.ts] //// + //// [arrayAssignmentTest2.ts] interface I1 { IM1():void[]; diff --git a/tests/baselines/reference/arrayAssignmentTest2.symbols b/tests/baselines/reference/arrayAssignmentTest2.symbols index e96f15fb5b197..3e67f18bc78e6 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.symbols +++ b/tests/baselines/reference/arrayAssignmentTest2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest2.ts === +//// [tests/cases/compiler/arrayAssignmentTest2.ts] //// + +=== arrayAssignmentTest2.ts === interface I1 { >I1 : Symbol(I1, Decl(arrayAssignmentTest2.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayAssignmentTest2.types b/tests/baselines/reference/arrayAssignmentTest2.types index ec52fac522494..7ac482429aed6 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.types +++ b/tests/baselines/reference/arrayAssignmentTest2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest2.ts === +//// [tests/cases/compiler/arrayAssignmentTest2.ts] //// + +=== arrayAssignmentTest2.ts === interface I1 { IM1():void[]; >IM1 : () => void[] diff --git a/tests/baselines/reference/arrayAssignmentTest3.errors.txt b/tests/baselines/reference/arrayAssignmentTest3.errors.txt index 04b49ff6dafc0..be2cf62d245ee 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/arrayAssignmentTest3.ts(12,25): error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. +arrayAssignmentTest3.ts(12,25): error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more. -==== tests/cases/compiler/arrayAssignmentTest3.ts (1 errors) ==== +==== arrayAssignmentTest3.ts (1 errors) ==== // The following gives no error // Michal saw no error if he used number instead of B, // but I do... diff --git a/tests/baselines/reference/arrayAssignmentTest3.js b/tests/baselines/reference/arrayAssignmentTest3.js index 965da445a2ba8..1db156b9707dc 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.js +++ b/tests/baselines/reference/arrayAssignmentTest3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAssignmentTest3.ts] //// + //// [arrayAssignmentTest3.ts] // The following gives no error // Michal saw no error if he used number instead of B, diff --git a/tests/baselines/reference/arrayAssignmentTest3.symbols b/tests/baselines/reference/arrayAssignmentTest3.symbols index 7b0907f94eb5c..8ef9da4e79ccf 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.symbols +++ b/tests/baselines/reference/arrayAssignmentTest3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest3.ts === +//// [tests/cases/compiler/arrayAssignmentTest3.ts] //// + +=== arrayAssignmentTest3.ts === // The following gives no error // Michal saw no error if he used number instead of B, // but I do... diff --git a/tests/baselines/reference/arrayAssignmentTest3.types b/tests/baselines/reference/arrayAssignmentTest3.types index 3a40825c4ab4c..615085ffc1446 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.types +++ b/tests/baselines/reference/arrayAssignmentTest3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest3.ts === +//// [tests/cases/compiler/arrayAssignmentTest3.ts] //// + +=== arrayAssignmentTest3.ts === // The following gives no error // Michal saw no error if he used number instead of B, // but I do... diff --git a/tests/baselines/reference/arrayAssignmentTest4.errors.txt b/tests/baselines/reference/arrayAssignmentTest4.errors.txt index c2103507d902a..1006fdfe5675f 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/arrayAssignmentTest4.ts(22,1): error TS2322: Type '() => any' is not assignable to type 'any[]'. -tests/cases/compiler/arrayAssignmentTest4.ts(23,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. +arrayAssignmentTest4.ts(22,1): error TS2322: Type '() => any' is not assignable to type 'any[]'. +arrayAssignmentTest4.ts(23,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. -==== tests/cases/compiler/arrayAssignmentTest4.ts (2 errors) ==== +==== arrayAssignmentTest4.ts (2 errors) ==== class C3 { CM3M1() { return 3;} } diff --git a/tests/baselines/reference/arrayAssignmentTest4.js b/tests/baselines/reference/arrayAssignmentTest4.js index da900089c9d1a..1a568ee4fef60 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.js +++ b/tests/baselines/reference/arrayAssignmentTest4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAssignmentTest4.ts] //// + //// [arrayAssignmentTest4.ts] class C3 { CM3M1() { return 3;} diff --git a/tests/baselines/reference/arrayAssignmentTest4.symbols b/tests/baselines/reference/arrayAssignmentTest4.symbols index f8928f4ae9c88..775e8ce8cca52 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.symbols +++ b/tests/baselines/reference/arrayAssignmentTest4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest4.ts === +//// [tests/cases/compiler/arrayAssignmentTest4.ts] //// + +=== arrayAssignmentTest4.ts === class C3 { >C3 : Symbol(C3, Decl(arrayAssignmentTest4.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayAssignmentTest4.types b/tests/baselines/reference/arrayAssignmentTest4.types index 390dea76b2b6d..3ef44f8763ccb 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.types +++ b/tests/baselines/reference/arrayAssignmentTest4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest4.ts === +//// [tests/cases/compiler/arrayAssignmentTest4.ts] //// + +=== arrayAssignmentTest4.ts === class C3 { >C3 : C3 diff --git a/tests/baselines/reference/arrayAssignmentTest5.errors.txt b/tests/baselines/reference/arrayAssignmentTest5.errors.txt index 1a5c1ce41806c..a8263630deaa9 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]'. +arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]'. Property 'state' is missing in type 'IToken' but required in type 'IStateToken'. -==== tests/cases/compiler/arrayAssignmentTest5.ts (1 errors) ==== +==== arrayAssignmentTest5.ts (1 errors) ==== module Test { interface IState { } @@ -29,7 +29,7 @@ tests/cases/compiler/arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[ ~~~~~~ !!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]'. !!! error TS2322: Property 'state' is missing in type 'IToken' but required in type 'IStateToken'. -!!! related TS2728 tests/cases/compiler/arrayAssignmentTest5.ts:8:9: 'state' is declared here. +!!! related TS2728 arrayAssignmentTest5.ts:8:9: 'state' is declared here. if (tokens.length === 0) { return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset) } diff --git a/tests/baselines/reference/arrayAssignmentTest5.js b/tests/baselines/reference/arrayAssignmentTest5.js index 71c84f374ee6c..124a5be14b29c 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.js +++ b/tests/baselines/reference/arrayAssignmentTest5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAssignmentTest5.ts] //// + //// [arrayAssignmentTest5.ts] module Test { interface IState { diff --git a/tests/baselines/reference/arrayAssignmentTest5.symbols b/tests/baselines/reference/arrayAssignmentTest5.symbols index 03b2bb97115b0..6ec2d24f201ac 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.symbols +++ b/tests/baselines/reference/arrayAssignmentTest5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest5.ts === +//// [tests/cases/compiler/arrayAssignmentTest5.ts] //// + +=== arrayAssignmentTest5.ts === module Test { >Test : Symbol(Test, Decl(arrayAssignmentTest5.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayAssignmentTest5.types b/tests/baselines/reference/arrayAssignmentTest5.types index 3d81d27cc4612..877f42a8bf58b 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.types +++ b/tests/baselines/reference/arrayAssignmentTest5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest5.ts === +//// [tests/cases/compiler/arrayAssignmentTest5.ts] //// + +=== arrayAssignmentTest5.ts === module Test { >Test : typeof Test diff --git a/tests/baselines/reference/arrayAssignmentTest6.js b/tests/baselines/reference/arrayAssignmentTest6.js index 8ed75d26b1988..6e8c2ab306b73 100644 --- a/tests/baselines/reference/arrayAssignmentTest6.js +++ b/tests/baselines/reference/arrayAssignmentTest6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAssignmentTest6.ts] //// + //// [arrayAssignmentTest6.ts] module Test { interface IState { diff --git a/tests/baselines/reference/arrayAssignmentTest6.symbols b/tests/baselines/reference/arrayAssignmentTest6.symbols index a224f26062534..d41afbb82d57e 100644 --- a/tests/baselines/reference/arrayAssignmentTest6.symbols +++ b/tests/baselines/reference/arrayAssignmentTest6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest6.ts === +//// [tests/cases/compiler/arrayAssignmentTest6.ts] //// + +=== arrayAssignmentTest6.ts === module Test { >Test : Symbol(Test, Decl(arrayAssignmentTest6.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayAssignmentTest6.types b/tests/baselines/reference/arrayAssignmentTest6.types index d28d4e139076e..e829e25389d69 100644 --- a/tests/baselines/reference/arrayAssignmentTest6.types +++ b/tests/baselines/reference/arrayAssignmentTest6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAssignmentTest6.ts === +//// [tests/cases/compiler/arrayAssignmentTest6.ts] //// + +=== arrayAssignmentTest6.ts === module Test { >Test : typeof Test diff --git a/tests/baselines/reference/arrayAugment.js b/tests/baselines/reference/arrayAugment.js index 20cf510712a92..887b7eb854d53 100644 --- a/tests/baselines/reference/arrayAugment.js +++ b/tests/baselines/reference/arrayAugment.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayAugment.ts] //// + //// [arrayAugment.ts] interface Array { split: (parts: number) => T[][]; diff --git a/tests/baselines/reference/arrayAugment.symbols b/tests/baselines/reference/arrayAugment.symbols index 75479c1fd739b..50a47c97cc428 100644 --- a/tests/baselines/reference/arrayAugment.symbols +++ b/tests/baselines/reference/arrayAugment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAugment.ts === +//// [tests/cases/compiler/arrayAugment.ts] //// + +=== arrayAugment.ts === interface Array { >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 0)) >T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) diff --git a/tests/baselines/reference/arrayAugment.types b/tests/baselines/reference/arrayAugment.types index 224c762c40c35..3f3f63e13fa89 100644 --- a/tests/baselines/reference/arrayAugment.types +++ b/tests/baselines/reference/arrayAugment.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayAugment.ts === +//// [tests/cases/compiler/arrayAugment.ts] //// + +=== arrayAugment.ts === interface Array { split: (parts: number) => T[][]; >split : (parts: number) => T[][] diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index 7acf6feb591e4..530ae4fcbbfcb 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayBestCommonTypes.ts] //// + //// [arrayBestCommonTypes.ts] module EmptyTypes { interface iface { } diff --git a/tests/baselines/reference/arrayBestCommonTypes.symbols b/tests/baselines/reference/arrayBestCommonTypes.symbols index fc7d10261e8a3..2e4d5fbdb3f42 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.symbols +++ b/tests/baselines/reference/arrayBestCommonTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayBestCommonTypes.ts === +//// [tests/cases/compiler/arrayBestCommonTypes.ts] //// + +=== arrayBestCommonTypes.ts === module EmptyTypes { >EmptyTypes : Symbol(EmptyTypes, Decl(arrayBestCommonTypes.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayBestCommonTypes.types b/tests/baselines/reference/arrayBestCommonTypes.types index cd9dd16ec99ca..29bc6d40a04ef 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.types +++ b/tests/baselines/reference/arrayBestCommonTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayBestCommonTypes.ts === +//// [tests/cases/compiler/arrayBestCommonTypes.ts] //// + +=== arrayBestCommonTypes.ts === module EmptyTypes { >EmptyTypes : typeof EmptyTypes diff --git a/tests/baselines/reference/arrayBindingPatternOmittedExpressions.js b/tests/baselines/reference/arrayBindingPatternOmittedExpressions.js index 916eee6218392..4a6426b99ac29 100644 --- a/tests/baselines/reference/arrayBindingPatternOmittedExpressions.js +++ b/tests/baselines/reference/arrayBindingPatternOmittedExpressions.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts] //// + //// [arrayBindingPatternOmittedExpressions.ts] var results: string[]; diff --git a/tests/baselines/reference/arrayBindingPatternOmittedExpressions.symbols b/tests/baselines/reference/arrayBindingPatternOmittedExpressions.symbols index 82421e2ef30b3..0aaed1a35264e 100644 --- a/tests/baselines/reference/arrayBindingPatternOmittedExpressions.symbols +++ b/tests/baselines/reference/arrayBindingPatternOmittedExpressions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts === +//// [tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts] //// + +=== arrayBindingPatternOmittedExpressions.ts === var results: string[]; >results : Symbol(results, Decl(arrayBindingPatternOmittedExpressions.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayBindingPatternOmittedExpressions.types b/tests/baselines/reference/arrayBindingPatternOmittedExpressions.types index 83cde401c229b..d3dcf1be43fe9 100644 --- a/tests/baselines/reference/arrayBindingPatternOmittedExpressions.types +++ b/tests/baselines/reference/arrayBindingPatternOmittedExpressions.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts === +//// [tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts] //// + +=== arrayBindingPatternOmittedExpressions.ts === var results: string[]; >results : string[] diff --git a/tests/baselines/reference/arrayBufferIsViewNarrowsType.js b/tests/baselines/reference/arrayBufferIsViewNarrowsType.js index fcda4d5976bd3..eb162a6133ba0 100644 --- a/tests/baselines/reference/arrayBufferIsViewNarrowsType.js +++ b/tests/baselines/reference/arrayBufferIsViewNarrowsType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayBufferIsViewNarrowsType.ts] //// + //// [arrayBufferIsViewNarrowsType.ts] var obj: Object; if (ArrayBuffer.isView(obj)) { diff --git a/tests/baselines/reference/arrayBufferIsViewNarrowsType.symbols b/tests/baselines/reference/arrayBufferIsViewNarrowsType.symbols index 362fcfb5eb8f5..132dbc95810a5 100644 --- a/tests/baselines/reference/arrayBufferIsViewNarrowsType.symbols +++ b/tests/baselines/reference/arrayBufferIsViewNarrowsType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayBufferIsViewNarrowsType.ts === +//// [tests/cases/compiler/arrayBufferIsViewNarrowsType.ts] //// + +=== arrayBufferIsViewNarrowsType.ts === var obj: Object; >obj : Symbol(obj, Decl(arrayBufferIsViewNarrowsType.ts, 0, 3)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arrayBufferIsViewNarrowsType.types b/tests/baselines/reference/arrayBufferIsViewNarrowsType.types index 6745afb85c134..1e1db7def5eb7 100644 --- a/tests/baselines/reference/arrayBufferIsViewNarrowsType.types +++ b/tests/baselines/reference/arrayBufferIsViewNarrowsType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayBufferIsViewNarrowsType.ts === +//// [tests/cases/compiler/arrayBufferIsViewNarrowsType.ts] //// + +=== arrayBufferIsViewNarrowsType.ts === var obj: Object; >obj : Object diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index 746f027c8a703..e45e3c8daabf3 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/arrayCast.ts(3,23): error TS2352: Conversion of type '{ foo: string; }[]' to type '{ id: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +arrayCast.ts(3,23): error TS2352: Conversion of type '{ foo: string; }[]' to type '{ id: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type '{ foo: string; }' is not comparable to type '{ id: number; }'. Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'. -==== tests/cases/compiler/arrayCast.ts (1 errors) ==== +==== arrayCast.ts (1 errors) ==== // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; diff --git a/tests/baselines/reference/arrayCast.js b/tests/baselines/reference/arrayCast.js index 214bf642250b9..5454be517af0f 100644 --- a/tests/baselines/reference/arrayCast.js +++ b/tests/baselines/reference/arrayCast.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayCast.ts] //// + //// [arrayCast.ts] // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. diff --git a/tests/baselines/reference/arrayCast.symbols b/tests/baselines/reference/arrayCast.symbols index 668ca3a79d5e3..f933ecf1e36bd 100644 --- a/tests/baselines/reference/arrayCast.symbols +++ b/tests/baselines/reference/arrayCast.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayCast.ts === +//// [tests/cases/compiler/arrayCast.ts] //// + +=== arrayCast.ts === // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; diff --git a/tests/baselines/reference/arrayCast.types b/tests/baselines/reference/arrayCast.types index ed536d0a60ae8..753ea9d093cd0 100644 --- a/tests/baselines/reference/arrayCast.types +++ b/tests/baselines/reference/arrayCast.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayCast.ts === +//// [tests/cases/compiler/arrayCast.ts] //// + +=== arrayCast.ts === // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; diff --git a/tests/baselines/reference/arrayConcat2.js b/tests/baselines/reference/arrayConcat2.js index 8db2d62e1d357..a684c2b5ebb7e 100644 --- a/tests/baselines/reference/arrayConcat2.js +++ b/tests/baselines/reference/arrayConcat2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayConcat2.ts] //// + //// [arrayConcat2.ts] var a: string[] = []; a.concat("hello", 'world'); diff --git a/tests/baselines/reference/arrayConcat2.symbols b/tests/baselines/reference/arrayConcat2.symbols index 7da42f6dfcb5e..63ef6236f3b92 100644 --- a/tests/baselines/reference/arrayConcat2.symbols +++ b/tests/baselines/reference/arrayConcat2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConcat2.ts === +//// [tests/cases/compiler/arrayConcat2.ts] //// + +=== arrayConcat2.ts === var a: string[] = []; >a : Symbol(a, Decl(arrayConcat2.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayConcat2.types b/tests/baselines/reference/arrayConcat2.types index f1ca2a5f10977..5d96966f9bedb 100644 --- a/tests/baselines/reference/arrayConcat2.types +++ b/tests/baselines/reference/arrayConcat2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConcat2.ts === +//// [tests/cases/compiler/arrayConcat2.ts] //// + +=== arrayConcat2.ts === var a: string[] = []; >a : string[] >[] : undefined[] diff --git a/tests/baselines/reference/arrayConcat3.js b/tests/baselines/reference/arrayConcat3.js index 90226797706e2..1e6487ce7fe28 100644 --- a/tests/baselines/reference/arrayConcat3.js +++ b/tests/baselines/reference/arrayConcat3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayConcat3.ts] //// + //// [arrayConcat3.ts] // TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed type Fn = (subj: U) => U diff --git a/tests/baselines/reference/arrayConcat3.symbols b/tests/baselines/reference/arrayConcat3.symbols index 309fddf179475..2b1043fb4a595 100644 --- a/tests/baselines/reference/arrayConcat3.symbols +++ b/tests/baselines/reference/arrayConcat3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConcat3.ts === +//// [tests/cases/compiler/arrayConcat3.ts] //// + +=== arrayConcat3.ts === // TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed type Fn = (subj: U) => U >Fn : Symbol(Fn, Decl(arrayConcat3.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayConcat3.types b/tests/baselines/reference/arrayConcat3.types index 287ee432e705a..c78e701c5f660 100644 --- a/tests/baselines/reference/arrayConcat3.types +++ b/tests/baselines/reference/arrayConcat3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConcat3.ts === +//// [tests/cases/compiler/arrayConcat3.ts] //// + +=== arrayConcat3.ts === // TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed type Fn = (subj: U) => U >Fn : Fn diff --git a/tests/baselines/reference/arrayConcatMap.js b/tests/baselines/reference/arrayConcatMap.js index 715ca158a43ff..7b4f312d07c39 100644 --- a/tests/baselines/reference/arrayConcatMap.js +++ b/tests/baselines/reference/arrayConcatMap.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayConcatMap.ts] //// + //// [arrayConcatMap.ts] var x = [].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a); diff --git a/tests/baselines/reference/arrayConcatMap.symbols b/tests/baselines/reference/arrayConcatMap.symbols index a01d0f078bfee..42cf6445c74b6 100644 --- a/tests/baselines/reference/arrayConcatMap.symbols +++ b/tests/baselines/reference/arrayConcatMap.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConcatMap.ts === +//// [tests/cases/compiler/arrayConcatMap.ts] //// + +=== arrayConcatMap.ts === var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : Symbol(x, Decl(arrayConcatMap.ts, 0, 3)) >[].concat([{ a: 1 }], [{ a: 2 }]) .map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arrayConcatMap.types b/tests/baselines/reference/arrayConcatMap.types index ffc49e548a350..5ee4edbea8981 100644 --- a/tests/baselines/reference/arrayConcatMap.types +++ b/tests/baselines/reference/arrayConcatMap.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConcatMap.ts === +//// [tests/cases/compiler/arrayConcatMap.ts] //// + +=== arrayConcatMap.ts === var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : any[] >[].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a) : any[] diff --git a/tests/baselines/reference/arrayConstructors1.js b/tests/baselines/reference/arrayConstructors1.js index 488cf49a3160b..792b0a23780aa 100644 --- a/tests/baselines/reference/arrayConstructors1.js +++ b/tests/baselines/reference/arrayConstructors1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayConstructors1.ts] //// + //// [arrayConstructors1.ts] var x: string[]; x = new Array(1); diff --git a/tests/baselines/reference/arrayConstructors1.symbols b/tests/baselines/reference/arrayConstructors1.symbols index 921d4e321816d..446c852ee37d2 100644 --- a/tests/baselines/reference/arrayConstructors1.symbols +++ b/tests/baselines/reference/arrayConstructors1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConstructors1.ts === +//// [tests/cases/compiler/arrayConstructors1.ts] //// + +=== arrayConstructors1.ts === var x: string[]; >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayConstructors1.types b/tests/baselines/reference/arrayConstructors1.types index c5a49e56f90a9..c7557ff6dcaea 100644 --- a/tests/baselines/reference/arrayConstructors1.types +++ b/tests/baselines/reference/arrayConstructors1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayConstructors1.ts === +//// [tests/cases/compiler/arrayConstructors1.ts] //// + +=== arrayConstructors1.ts === var x: string[]; >x : string[] diff --git a/tests/baselines/reference/arrayDestructuringInSwitch1.js b/tests/baselines/reference/arrayDestructuringInSwitch1.js index 64782df1a6fe9..90959d9a8152c 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch1.js +++ b/tests/baselines/reference/arrayDestructuringInSwitch1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayDestructuringInSwitch1.ts] //// + //// [arrayDestructuringInSwitch1.ts] export type Expression = BooleanLogicExpression | 'true' | 'false'; export type BooleanLogicExpression = ['and', ...Expression[]] | ['not', Expression]; diff --git a/tests/baselines/reference/arrayDestructuringInSwitch1.symbols b/tests/baselines/reference/arrayDestructuringInSwitch1.symbols index f1a9bea3fa35f..1218fb03d02f2 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch1.symbols +++ b/tests/baselines/reference/arrayDestructuringInSwitch1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayDestructuringInSwitch1.ts === +//// [tests/cases/compiler/arrayDestructuringInSwitch1.ts] //// + +=== arrayDestructuringInSwitch1.ts === export type Expression = BooleanLogicExpression | 'true' | 'false'; >Expression : Symbol(Expression, Decl(arrayDestructuringInSwitch1.ts, 0, 0)) >BooleanLogicExpression : Symbol(BooleanLogicExpression, Decl(arrayDestructuringInSwitch1.ts, 0, 67)) diff --git a/tests/baselines/reference/arrayDestructuringInSwitch1.types b/tests/baselines/reference/arrayDestructuringInSwitch1.types index 56d48f6a30075..aea2febcc6afa 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch1.types +++ b/tests/baselines/reference/arrayDestructuringInSwitch1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayDestructuringInSwitch1.ts === +//// [tests/cases/compiler/arrayDestructuringInSwitch1.ts] //// + +=== arrayDestructuringInSwitch1.ts === export type Expression = BooleanLogicExpression | 'true' | 'false'; >Expression : BooleanLogicExpression | "true" | "false" diff --git a/tests/baselines/reference/arrayDestructuringInSwitch2.errors.txt b/tests/baselines/reference/arrayDestructuringInSwitch2.errors.txt index 48fb17f0c6edc..354d01791657e 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch2.errors.txt +++ b/tests/baselines/reference/arrayDestructuringInSwitch2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrayDestructuringInSwitch2.ts(11,13): error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator. +arrayDestructuringInSwitch2.ts(11,13): error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator. -==== tests/cases/compiler/arrayDestructuringInSwitch2.ts (1 errors) ==== +==== arrayDestructuringInSwitch2.ts (1 errors) ==== type X = { kind: "a", a: [1] } | { kind: "b", a: [] } function foo(x: X): 1 { diff --git a/tests/baselines/reference/arrayDestructuringInSwitch2.js b/tests/baselines/reference/arrayDestructuringInSwitch2.js index be6f00c08416a..4da13269936fa 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch2.js +++ b/tests/baselines/reference/arrayDestructuringInSwitch2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayDestructuringInSwitch2.ts] //// + //// [arrayDestructuringInSwitch2.ts] type X = { kind: "a", a: [1] } | { kind: "b", a: [] } diff --git a/tests/baselines/reference/arrayDestructuringInSwitch2.symbols b/tests/baselines/reference/arrayDestructuringInSwitch2.symbols index 7d64ebdb8a432..ea34443a7cc1f 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch2.symbols +++ b/tests/baselines/reference/arrayDestructuringInSwitch2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayDestructuringInSwitch2.ts === +//// [tests/cases/compiler/arrayDestructuringInSwitch2.ts] //// + +=== arrayDestructuringInSwitch2.ts === type X = { kind: "a", a: [1] } | { kind: "b", a: [] } >X : Symbol(X, Decl(arrayDestructuringInSwitch2.ts, 0, 0)) >kind : Symbol(kind, Decl(arrayDestructuringInSwitch2.ts, 0, 10)) diff --git a/tests/baselines/reference/arrayDestructuringInSwitch2.types b/tests/baselines/reference/arrayDestructuringInSwitch2.types index 62b0999fcbd6b..759e2f1b664d8 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch2.types +++ b/tests/baselines/reference/arrayDestructuringInSwitch2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayDestructuringInSwitch2.ts === +//// [tests/cases/compiler/arrayDestructuringInSwitch2.ts] //// + +=== arrayDestructuringInSwitch2.ts === type X = { kind: "a", a: [1] } | { kind: "b", a: [] } >X : { kind: "a"; a: [1]; } | { kind: "b"; a: []; } >kind : "a" diff --git a/tests/baselines/reference/arrayEvery.js b/tests/baselines/reference/arrayEvery.js index 35aa5aa5b409b..04eece1b8d175 100644 --- a/tests/baselines/reference/arrayEvery.js +++ b/tests/baselines/reference/arrayEvery.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayEvery.ts] //// + //// [arrayEvery.ts] const foo: (number | string)[] = ['aaa']; diff --git a/tests/baselines/reference/arrayEvery.symbols b/tests/baselines/reference/arrayEvery.symbols index dce3dc609285a..2bbc51dc80941 100644 --- a/tests/baselines/reference/arrayEvery.symbols +++ b/tests/baselines/reference/arrayEvery.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayEvery.ts === +//// [tests/cases/compiler/arrayEvery.ts] //// + +=== arrayEvery.ts === const foo: (number | string)[] = ['aaa']; >foo : Symbol(foo, Decl(arrayEvery.ts, 0, 5)) diff --git a/tests/baselines/reference/arrayEvery.types b/tests/baselines/reference/arrayEvery.types index 1e7c6655a5e1e..5bd0f2f679dc5 100644 --- a/tests/baselines/reference/arrayEvery.types +++ b/tests/baselines/reference/arrayEvery.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayEvery.ts === +//// [tests/cases/compiler/arrayEvery.ts] //// + +=== arrayEvery.ts === const foo: (number | string)[] = ['aaa']; >foo : (string | number)[] >['aaa'] : string[] diff --git a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.errors.txt b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.errors.txt index dace371323368..2108e03d4a196 100644 --- a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.errors.txt +++ b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. +arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary. -==== tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== +==== arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== type BadFlatArray = {obj: { "done": Arr, "recur": Arr extends ReadonlyArray diff --git a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.js b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.js index 3879383270a28..b743d30cd5d36 100644 --- a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.js +++ b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + //// [arrayFakeFlatNoCrashInferenceDeclarations.ts] type BadFlatArray = {obj: { "done": Arr, diff --git a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.symbols b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.symbols index 560838c935003..7983447a751a8 100644 --- a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.symbols +++ b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts === +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + +=== arrayFakeFlatNoCrashInferenceDeclarations.ts === type BadFlatArray = {obj: { >BadFlatArray : Symbol(BadFlatArray, Decl(arrayFakeFlatNoCrashInferenceDeclarations.ts, 0, 0)) >Arr : Symbol(Arr, Decl(arrayFakeFlatNoCrashInferenceDeclarations.ts, 0, 18)) diff --git a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.types b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.types index 692e007dd92ba..1a3b4eef0bda6 100644 --- a/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.types +++ b/tests/baselines/reference/arrayFakeFlatNoCrashInferenceDeclarations.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts === +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + +=== arrayFakeFlatNoCrashInferenceDeclarations.ts === type BadFlatArray = {obj: { >BadFlatArray : { done: Arr; recur: Arr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? any[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth] extends -1 ? "done" : "recur"] : Arr; }[Depth extends -1 ? "done" : "recur"] >obj : { done: Arr; recur: Arr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? { done: InnerArr; recur: InnerArr extends readonly (infer InnerArr)[] ? any[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]] extends -1 ? "done" : "recur"] : InnerArr; }[[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth] extends -1 ? "done" : "recur"] : Arr; }[Depth extends -1 ? "done" : "recur"] diff --git a/tests/baselines/reference/arrayFilter.js b/tests/baselines/reference/arrayFilter.js index dd3b321b19ced..c53f2e82e1bb0 100644 --- a/tests/baselines/reference/arrayFilter.js +++ b/tests/baselines/reference/arrayFilter.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFilter.ts] //// + //// [arrayFilter.ts] var foo = [ { name: 'bar' }, diff --git a/tests/baselines/reference/arrayFilter.symbols b/tests/baselines/reference/arrayFilter.symbols index b416fa90baadb..448246fd2b8bf 100644 --- a/tests/baselines/reference/arrayFilter.symbols +++ b/tests/baselines/reference/arrayFilter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFilter.ts === +//// [tests/cases/compiler/arrayFilter.ts] //// + +=== arrayFilter.ts === var foo = [ >foo : Symbol(foo, Decl(arrayFilter.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayFilter.types b/tests/baselines/reference/arrayFilter.types index ddafd413db60c..fd0cc58780ae0 100644 --- a/tests/baselines/reference/arrayFilter.types +++ b/tests/baselines/reference/arrayFilter.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFilter.ts === +//// [tests/cases/compiler/arrayFilter.ts] //// + +=== arrayFilter.ts === var foo = [ >foo : { name: string; }[] >[ { name: 'bar' }, { name: null }, { name: 'baz' }] : { name: string; }[] diff --git a/tests/baselines/reference/arrayFind.js b/tests/baselines/reference/arrayFind.js index 1926c3a8dcc15..8d460074302b5 100644 --- a/tests/baselines/reference/arrayFind.js +++ b/tests/baselines/reference/arrayFind.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFind.ts] //// + //// [arrayFind.ts] // test fix for #18112, type guard predicates should narrow returned element function isNumber(x: any): x is number { diff --git a/tests/baselines/reference/arrayFind.symbols b/tests/baselines/reference/arrayFind.symbols index 8a97654c6df0f..ff5a6a3e7c040 100644 --- a/tests/baselines/reference/arrayFind.symbols +++ b/tests/baselines/reference/arrayFind.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFind.ts === +//// [tests/cases/compiler/arrayFind.ts] //// + +=== arrayFind.ts === // test fix for #18112, type guard predicates should narrow returned element function isNumber(x: any): x is number { >isNumber : Symbol(isNumber, Decl(arrayFind.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayFind.types b/tests/baselines/reference/arrayFind.types index 9ba393d76212c..3d47107be8b02 100644 --- a/tests/baselines/reference/arrayFind.types +++ b/tests/baselines/reference/arrayFind.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFind.ts === +//// [tests/cases/compiler/arrayFind.ts] //// + +=== arrayFind.ts === // test fix for #18112, type guard predicates should narrow returned element function isNumber(x: any): x is number { >isNumber : (x: any) => x is number diff --git a/tests/baselines/reference/arrayFlatMap.js b/tests/baselines/reference/arrayFlatMap.js index 3c35cedc1f3be..cf0bcd800034f 100644 --- a/tests/baselines/reference/arrayFlatMap.js +++ b/tests/baselines/reference/arrayFlatMap.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFlatMap.ts] //// + //// [arrayFlatMap.ts] const array: number[] = []; const readonlyArray: ReadonlyArray = []; diff --git a/tests/baselines/reference/arrayFlatMap.symbols b/tests/baselines/reference/arrayFlatMap.symbols index 963c2609b94de..32c28ccf33d16 100644 --- a/tests/baselines/reference/arrayFlatMap.symbols +++ b/tests/baselines/reference/arrayFlatMap.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFlatMap.ts === +//// [tests/cases/compiler/arrayFlatMap.ts] //// + +=== arrayFlatMap.ts === const array: number[] = []; >array : Symbol(array, Decl(arrayFlatMap.ts, 0, 5)) diff --git a/tests/baselines/reference/arrayFlatMap.types b/tests/baselines/reference/arrayFlatMap.types index 0e36141f64b64..50dbc37220d3b 100644 --- a/tests/baselines/reference/arrayFlatMap.types +++ b/tests/baselines/reference/arrayFlatMap.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFlatMap.ts === +//// [tests/cases/compiler/arrayFlatMap.ts] //// + +=== arrayFlatMap.ts === const array: number[] = []; >array : number[] >[] : undefined[] diff --git a/tests/baselines/reference/arrayFlatNoCrashInference.js b/tests/baselines/reference/arrayFlatNoCrashInference.js index e84d67800f750..2836b5b6c8d0f 100644 --- a/tests/baselines/reference/arrayFlatNoCrashInference.js +++ b/tests/baselines/reference/arrayFlatNoCrashInference.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFlatNoCrashInference.ts] //// + //// [arrayFlatNoCrashInference.ts] function foo(arr: T[], depth: number) { return arr.flat(depth); diff --git a/tests/baselines/reference/arrayFlatNoCrashInference.symbols b/tests/baselines/reference/arrayFlatNoCrashInference.symbols index c6001acbcf305..88989c6e569cc 100644 --- a/tests/baselines/reference/arrayFlatNoCrashInference.symbols +++ b/tests/baselines/reference/arrayFlatNoCrashInference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFlatNoCrashInference.ts === +//// [tests/cases/compiler/arrayFlatNoCrashInference.ts] //// + +=== arrayFlatNoCrashInference.ts === function foo(arr: T[], depth: number) { >foo : Symbol(foo, Decl(arrayFlatNoCrashInference.ts, 0, 0)) >T : Symbol(T, Decl(arrayFlatNoCrashInference.ts, 0, 13)) diff --git a/tests/baselines/reference/arrayFlatNoCrashInference.types b/tests/baselines/reference/arrayFlatNoCrashInference.types index 63cd3e8dddaa3..b03f66c9d53ca 100644 --- a/tests/baselines/reference/arrayFlatNoCrashInference.types +++ b/tests/baselines/reference/arrayFlatNoCrashInference.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFlatNoCrashInference.ts === +//// [tests/cases/compiler/arrayFlatNoCrashInference.ts] //// + +=== arrayFlatNoCrashInference.ts === function foo(arr: T[], depth: number) { >foo : (arr: T[], depth: number) => FlatArray[] >arr : T[] diff --git a/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.js b/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.js index a1fe98292bfac..1ff74edb7d62d 100644 --- a/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.js +++ b/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFlatNoCrashInferenceDeclarations.ts] //// + //// [arrayFlatNoCrashInferenceDeclarations.ts] function foo(arr: T[], depth: number) { return arr.flat(depth); diff --git a/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.symbols b/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.symbols index 039da99ccd371..200a39dae7688 100644 --- a/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.symbols +++ b/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFlatNoCrashInferenceDeclarations.ts === +//// [tests/cases/compiler/arrayFlatNoCrashInferenceDeclarations.ts] //// + +=== arrayFlatNoCrashInferenceDeclarations.ts === function foo(arr: T[], depth: number) { >foo : Symbol(foo, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 0)) >T : Symbol(T, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 13)) diff --git a/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.types b/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.types index 013e32a0f0032..826b4de083d77 100644 --- a/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.types +++ b/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFlatNoCrashInferenceDeclarations.ts === +//// [tests/cases/compiler/arrayFlatNoCrashInferenceDeclarations.ts] //// + +=== arrayFlatNoCrashInferenceDeclarations.ts === function foo(arr: T[], depth: number) { >foo : (arr: T[], depth: number) => FlatArray[] >arr : T[] diff --git a/tests/baselines/reference/arrayFrom.errors.txt b/tests/baselines/reference/arrayFrom.errors.txt index 615bd1bf76955..62f3045196e00 100644 --- a/tests/baselines/reference/arrayFrom.errors.txt +++ b/tests/baselines/reference/arrayFrom.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/arrayFrom.ts(20,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'. +arrayFrom.ts(20,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'. Property 'b' is missing in type 'A' but required in type 'B'. -tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'. +arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assignable to type 'B[]'. -==== tests/cases/compiler/arrayFrom.ts (2 errors) ==== +==== arrayFrom.ts (2 errors) ==== // Tests fix for #20432, ensures Array.from accepts all valid inputs // Also tests for #19682 @@ -27,7 +27,7 @@ tests/cases/compiler/arrayFrom.ts(23,7): error TS2322: Type 'A[]' is not assigna ~~~~~~~ !!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. !!! error TS2322: Property 'b' is missing in type 'A' but required in type 'B'. -!!! related TS2728 tests/cases/compiler/arrayFrom.ts:9:3: 'b' is declared here. +!!! related TS2728 arrayFrom.ts:9:3: 'b' is declared here. const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); const result5: A[] = Array.from(inputALike); const result6: B[] = Array.from(inputALike); // expect error diff --git a/tests/baselines/reference/arrayFrom.js b/tests/baselines/reference/arrayFrom.js index ea6fcf8fcf03f..13609e4b1692a 100644 --- a/tests/baselines/reference/arrayFrom.js +++ b/tests/baselines/reference/arrayFrom.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayFrom.ts] //// + //// [arrayFrom.ts] // Tests fix for #20432, ensures Array.from accepts all valid inputs // Also tests for #19682 diff --git a/tests/baselines/reference/arrayFrom.symbols b/tests/baselines/reference/arrayFrom.symbols index 29ccb93a2e6bf..37042ae3ed536 100644 --- a/tests/baselines/reference/arrayFrom.symbols +++ b/tests/baselines/reference/arrayFrom.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFrom.ts === +//// [tests/cases/compiler/arrayFrom.ts] //// + +=== arrayFrom.ts === // Tests fix for #20432, ensures Array.from accepts all valid inputs // Also tests for #19682 diff --git a/tests/baselines/reference/arrayFrom.types b/tests/baselines/reference/arrayFrom.types index 8c755a6366f8a..34f57a85dbf16 100644 --- a/tests/baselines/reference/arrayFrom.types +++ b/tests/baselines/reference/arrayFrom.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayFrom.ts === +//// [tests/cases/compiler/arrayFrom.ts] //// + +=== arrayFrom.ts === // Tests fix for #20432, ensures Array.from accepts all valid inputs // Also tests for #19682 diff --git a/tests/baselines/reference/arrayIndexWithArrayFails.errors.txt b/tests/baselines/reference/arrayIndexWithArrayFails.errors.txt index bfe75e6d79c8c..cca4341933cdf 100644 --- a/tests/baselines/reference/arrayIndexWithArrayFails.errors.txt +++ b/tests/baselines/reference/arrayIndexWithArrayFails.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrayIndexWithArrayFails.ts(3,16): error TS2538: Type 'string[]' cannot be used as an index type. +arrayIndexWithArrayFails.ts(3,16): error TS2538: Type 'string[]' cannot be used as an index type. -==== tests/cases/compiler/arrayIndexWithArrayFails.ts (1 errors) ==== +==== arrayIndexWithArrayFails.ts (1 errors) ==== declare const arr1: (string | string[])[]; declare const arr2: number[]; const j = arr2[arr1[0]]; // should error diff --git a/tests/baselines/reference/arrayIndexWithArrayFails.js b/tests/baselines/reference/arrayIndexWithArrayFails.js index e5541a50704ea..312b1b790c588 100644 --- a/tests/baselines/reference/arrayIndexWithArrayFails.js +++ b/tests/baselines/reference/arrayIndexWithArrayFails.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayIndexWithArrayFails.ts] //// + //// [arrayIndexWithArrayFails.ts] declare const arr1: (string | string[])[]; declare const arr2: number[]; diff --git a/tests/baselines/reference/arrayIndexWithArrayFails.symbols b/tests/baselines/reference/arrayIndexWithArrayFails.symbols index e389f29fbef6f..3aff6227731a9 100644 --- a/tests/baselines/reference/arrayIndexWithArrayFails.symbols +++ b/tests/baselines/reference/arrayIndexWithArrayFails.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayIndexWithArrayFails.ts === +//// [tests/cases/compiler/arrayIndexWithArrayFails.ts] //// + +=== arrayIndexWithArrayFails.ts === declare const arr1: (string | string[])[]; >arr1 : Symbol(arr1, Decl(arrayIndexWithArrayFails.ts, 0, 13)) diff --git a/tests/baselines/reference/arrayIndexWithArrayFails.types b/tests/baselines/reference/arrayIndexWithArrayFails.types index 7e9b28f733c6e..ea457f9d1b0d0 100644 --- a/tests/baselines/reference/arrayIndexWithArrayFails.types +++ b/tests/baselines/reference/arrayIndexWithArrayFails.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayIndexWithArrayFails.ts === +//// [tests/cases/compiler/arrayIndexWithArrayFails.ts] //// + +=== arrayIndexWithArrayFails.ts === declare const arr1: (string | string[])[]; >arr1 : (string | string[])[] diff --git a/tests/baselines/reference/arrayLiteral.js b/tests/baselines/reference/arrayLiteral.js index ae210aabd42c2..08ec40049ea81 100644 --- a/tests/baselines/reference/arrayLiteral.js +++ b/tests/baselines/reference/arrayLiteral.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayLiteral.ts] //// + //// [arrayLiteral.ts] // valid uses of array literals diff --git a/tests/baselines/reference/arrayLiteral.symbols b/tests/baselines/reference/arrayLiteral.symbols index 269bb7cbe1a10..f6adc7f8ff5ec 100644 --- a/tests/baselines/reference/arrayLiteral.symbols +++ b/tests/baselines/reference/arrayLiteral.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayLiteral.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayLiteral.ts] //// + +=== arrayLiteral.ts === // valid uses of array literals var x = []; diff --git a/tests/baselines/reference/arrayLiteral.types b/tests/baselines/reference/arrayLiteral.types index c36cc93c68e38..114282f213b22 100644 --- a/tests/baselines/reference/arrayLiteral.types +++ b/tests/baselines/reference/arrayLiteral.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayLiteral.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayLiteral.ts] //// + +=== arrayLiteral.ts === // valid uses of array literals var x = []; diff --git a/tests/baselines/reference/arrayLiteral1.js b/tests/baselines/reference/arrayLiteral1.js index b84e7414f2448..1ba12d5456b40 100644 --- a/tests/baselines/reference/arrayLiteral1.js +++ b/tests/baselines/reference/arrayLiteral1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteral1.ts] //// + //// [arrayLiteral1.ts] var v30 = [1, 2]; diff --git a/tests/baselines/reference/arrayLiteral1.symbols b/tests/baselines/reference/arrayLiteral1.symbols index 9f2e04138b72c..7146f27f9d5dd 100644 --- a/tests/baselines/reference/arrayLiteral1.symbols +++ b/tests/baselines/reference/arrayLiteral1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteral1.ts === +//// [tests/cases/compiler/arrayLiteral1.ts] //// + +=== arrayLiteral1.ts === var v30 = [1, 2]; >v30 : Symbol(v30, Decl(arrayLiteral1.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayLiteral1.types b/tests/baselines/reference/arrayLiteral1.types index e0ee33c1ef427..0265e3f1247c2 100644 --- a/tests/baselines/reference/arrayLiteral1.types +++ b/tests/baselines/reference/arrayLiteral1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteral1.ts === +//// [tests/cases/compiler/arrayLiteral1.ts] //// + +=== arrayLiteral1.ts === var v30 = [1, 2]; >v30 : number[] >[1, 2] : number[] diff --git a/tests/baselines/reference/arrayLiteral2.js b/tests/baselines/reference/arrayLiteral2.js index fb1b805930510..f2362adb1439e 100644 --- a/tests/baselines/reference/arrayLiteral2.js +++ b/tests/baselines/reference/arrayLiteral2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteral2.ts] //// + //// [arrayLiteral2.ts] var v30 = [1, 2], v31; diff --git a/tests/baselines/reference/arrayLiteral2.symbols b/tests/baselines/reference/arrayLiteral2.symbols index e06077736e572..f077b77b2b1a5 100644 --- a/tests/baselines/reference/arrayLiteral2.symbols +++ b/tests/baselines/reference/arrayLiteral2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteral2.ts === +//// [tests/cases/compiler/arrayLiteral2.ts] //// + +=== arrayLiteral2.ts === var v30 = [1, 2], v31; >v30 : Symbol(v30, Decl(arrayLiteral2.ts, 0, 3)) >v31 : Symbol(v31, Decl(arrayLiteral2.ts, 0, 17)) diff --git a/tests/baselines/reference/arrayLiteral2.types b/tests/baselines/reference/arrayLiteral2.types index 5bbc2f4fce829..a71887693130f 100644 --- a/tests/baselines/reference/arrayLiteral2.types +++ b/tests/baselines/reference/arrayLiteral2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteral2.ts === +//// [tests/cases/compiler/arrayLiteral2.ts] //// + +=== arrayLiteral2.ts === var v30 = [1, 2], v31; >v30 : number[] >[1, 2] : number[] diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt index 75a69c09df808..61c9f33cada3f 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts(3,14): error TS2314: Generic type 'Array' requires 1 type argument(s). +arrayLiteralAndArrayConstructorEquivalence1.ts(3,14): error TS2314: Generic type 'Array' requires 1 type argument(s). -==== tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts (1 errors) ==== +==== arrayLiteralAndArrayConstructorEquivalence1.ts (1 errors) ==== var myCars=new Array(); var myCars3 = new Array({}); var myCars4: Array; // error diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js index 0b9f543e38242..3876a90b17c2c 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts] //// + //// [arrayLiteralAndArrayConstructorEquivalence1.ts] var myCars=new Array(); var myCars3 = new Array({}); diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols index 727fc13074170..fa64395cad3e3 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts === +//// [tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts] //// + +=== arrayLiteralAndArrayConstructorEquivalence1.ts === var myCars=new Array(); >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types index 8a6d1648302d5..4550086a08680 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts === +//// [tests/cases/compiler/arrayLiteralAndArrayConstructorEquivalence1.ts] //// + +=== arrayLiteralAndArrayConstructorEquivalence1.ts === var myCars=new Array(); >myCars : any[] >new Array() : any[] diff --git a/tests/baselines/reference/arrayLiteralComments.js b/tests/baselines/reference/arrayLiteralComments.js index 4f13df1c8281b..4d2d03e07f18f 100644 --- a/tests/baselines/reference/arrayLiteralComments.js +++ b/tests/baselines/reference/arrayLiteralComments.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteralComments.ts] //// + //// [arrayLiteralComments.ts] var testArrayWithFunc = [ // Function comment diff --git a/tests/baselines/reference/arrayLiteralComments.symbols b/tests/baselines/reference/arrayLiteralComments.symbols index c1c173d741fe1..7f1588ec1a415 100644 --- a/tests/baselines/reference/arrayLiteralComments.symbols +++ b/tests/baselines/reference/arrayLiteralComments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralComments.ts === +//// [tests/cases/compiler/arrayLiteralComments.ts] //// + +=== arrayLiteralComments.ts === var testArrayWithFunc = [ >testArrayWithFunc : Symbol(testArrayWithFunc, Decl(arrayLiteralComments.ts, 0, 3)) diff --git a/tests/baselines/reference/arrayLiteralComments.types b/tests/baselines/reference/arrayLiteralComments.types index 80199c0f808e1..3afbe38157fee 100644 --- a/tests/baselines/reference/arrayLiteralComments.types +++ b/tests/baselines/reference/arrayLiteralComments.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralComments.ts === +//// [tests/cases/compiler/arrayLiteralComments.ts] //// + +=== arrayLiteralComments.ts === var testArrayWithFunc = [ >testArrayWithFunc : (string | number | (() => void) | number[] | { a: number; })[] >[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | (() => void) | number[] | { a: number; })[] diff --git a/tests/baselines/reference/arrayLiteralContextualType.js b/tests/baselines/reference/arrayLiteralContextualType.js index 2d48085c80ff3..63c236537589e 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.js +++ b/tests/baselines/reference/arrayLiteralContextualType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteralContextualType.ts] //// + //// [arrayLiteralContextualType.ts] interface IAnimal { name: string; diff --git a/tests/baselines/reference/arrayLiteralContextualType.symbols b/tests/baselines/reference/arrayLiteralContextualType.symbols index 2049ec342ec60..b97e150c6627f 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.symbols +++ b/tests/baselines/reference/arrayLiteralContextualType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralContextualType.ts === +//// [tests/cases/compiler/arrayLiteralContextualType.ts] //// + +=== arrayLiteralContextualType.ts === interface IAnimal { >IAnimal : Symbol(IAnimal, Decl(arrayLiteralContextualType.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayLiteralContextualType.types b/tests/baselines/reference/arrayLiteralContextualType.types index 7aac86e75d0a4..5af5173d6112b 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.types +++ b/tests/baselines/reference/arrayLiteralContextualType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralContextualType.ts === +//// [tests/cases/compiler/arrayLiteralContextualType.ts] //// + +=== arrayLiteralContextualType.ts === interface IAnimal { name: string; >name : string diff --git a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt index b472e2297a6b1..4fe70d48c4631 100644 --- a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt +++ b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(6,5): error TS2322: Type '[number, number, number, number]' is not assignable to type '[number, number, number]'. +arrayLiteralExpressionContextualTyping.ts(6,5): error TS2322: Type '[number, number, number, number]' is not assignable to type '[number, number, number]'. Source has 4 element(s) but target allows only 3. -tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(7,5): error TS2322: Type '[number, number, number, string]' is not assignable to type '[string | number, string | number, string | number]'. +arrayLiteralExpressionContextualTyping.ts(7,5): error TS2322: Type '[number, number, number, string]' is not assignable to type '[string | number, string | number, string | number]'. Source has 4 element(s) but target allows only 3. -tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(8,5): error TS2322: Type '[number, number, number, string]' is not assignable to type '[number, number, number]'. +arrayLiteralExpressionContextualTyping.ts(8,5): error TS2322: Type '[number, number, number, string]' is not assignable to type '[number, number, number]'. Source has 4 element(s) but target allows only 3. -tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts(14,5): error TS2322: Type '[number, number, number, number, number, number]' is not assignable to type '[number, number, number]'. +arrayLiteralExpressionContextualTyping.ts(14,5): error TS2322: Type '[number, number, number, number, number, number]' is not assignable to type '[number, number, number]'. Source has 6 element(s) but target allows only 3. -==== tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts (4 errors) ==== +==== arrayLiteralExpressionContextualTyping.ts (4 errors) ==== // In a contextually typed array literal expression containing no spread elements, an element expression at index N is contextually typed by // the type of the property with the numeric name N in the contextual type, if any, or otherwise // the numeric index type of the contextual type, if any. diff --git a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.js b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.js index a6f5a5d44eb4a..acba52443a9b4 100644 --- a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.js +++ b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts] //// + //// [arrayLiteralExpressionContextualTyping.ts] // In a contextually typed array literal expression containing no spread elements, an element expression at index N is contextually typed by // the type of the property with the numeric name N in the contextual type, if any, or otherwise diff --git a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.symbols b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.symbols index 23458bf363661..c219b9aafc2d2 100644 --- a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.symbols +++ b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts === +//// [tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts] //// + +=== arrayLiteralExpressionContextualTyping.ts === // In a contextually typed array literal expression containing no spread elements, an element expression at index N is contextually typed by // the type of the property with the numeric name N in the contextual type, if any, or otherwise // the numeric index type of the contextual type, if any. diff --git a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types index dc942ebb9d5e8..ab14de6f0fc69 100644 --- a/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types +++ b/tests/baselines/reference/arrayLiteralExpressionContextualTyping.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts === +//// [tests/cases/conformance/expressions/contextualTyping/arrayLiteralExpressionContextualTyping.ts] //// + +=== arrayLiteralExpressionContextualTyping.ts === // In a contextually typed array literal expression containing no spread elements, an element expression at index N is contextually typed by // the type of the property with the numeric name N in the contextual type, if any, or otherwise // the numeric index type of the contextual type, if any. diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js index 57cba07d6bf16..83321fddac144 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts] //// + //// [arrayLiteralInNonVarArgParameter.ts] function panic(val: string[], ...opt: string[]) { } diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.symbols b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.symbols index 9ce5cebf0c20d..a0b2fb5a7bfa3 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.symbols +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts === +//// [tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts] //// + +=== arrayLiteralInNonVarArgParameter.ts === function panic(val: string[], ...opt: string[]) { } >panic : Symbol(panic, Decl(arrayLiteralInNonVarArgParameter.ts, 0, 0)) >val : Symbol(val, Decl(arrayLiteralInNonVarArgParameter.ts, 0, 15)) diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types index 4b46e0bf29f00..7ae934b4bb318 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts === +//// [tests/cases/compiler/arrayLiteralInNonVarArgParameter.ts] //// + +=== arrayLiteralInNonVarArgParameter.ts === function panic(val: string[], ...opt: string[]) { } >panic : (val: string[], ...opt: string[]) => void >val : string[] diff --git a/tests/baselines/reference/arrayLiteralInference.js b/tests/baselines/reference/arrayLiteralInference.js index 6b98b22394ac2..f3be1c5f37bde 100644 --- a/tests/baselines/reference/arrayLiteralInference.js +++ b/tests/baselines/reference/arrayLiteralInference.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts] //// + //// [arrayLiteralInference.ts] // Repro from #31204 diff --git a/tests/baselines/reference/arrayLiteralInference.symbols b/tests/baselines/reference/arrayLiteralInference.symbols index cdb89eb206101..4ac04224105aa 100644 --- a/tests/baselines/reference/arrayLiteralInference.symbols +++ b/tests/baselines/reference/arrayLiteralInference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts] //// + +=== arrayLiteralInference.ts === // Repro from #31204 export enum AppType { diff --git a/tests/baselines/reference/arrayLiteralInference.types b/tests/baselines/reference/arrayLiteralInference.types index fc7bdc8c03271..95bd379456337 100644 --- a/tests/baselines/reference/arrayLiteralInference.types +++ b/tests/baselines/reference/arrayLiteralInference.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiteralInference.ts] //// + +=== arrayLiteralInference.ts === // Repro from #31204 export enum AppType { diff --git a/tests/baselines/reference/arrayLiteralSpread.js b/tests/baselines/reference/arrayLiteralSpread.js index a6093100e417e..a0ea9ce127f74 100644 --- a/tests/baselines/reference/arrayLiteralSpread.js +++ b/tests/baselines/reference/arrayLiteralSpread.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/spread/arrayLiteralSpread.ts] //// + //// [arrayLiteralSpread.ts] function f0() { var a = [1, 2, 3]; diff --git a/tests/baselines/reference/arrayLiteralSpread.symbols b/tests/baselines/reference/arrayLiteralSpread.symbols index d7bcee44fef6e..0606b2fa8c987 100644 --- a/tests/baselines/reference/arrayLiteralSpread.symbols +++ b/tests/baselines/reference/arrayLiteralSpread.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/spread/arrayLiteralSpread.ts === +//// [tests/cases/conformance/es6/spread/arrayLiteralSpread.ts] //// + +=== arrayLiteralSpread.ts === function f0() { >f0 : Symbol(f0, Decl(arrayLiteralSpread.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayLiteralSpread.types b/tests/baselines/reference/arrayLiteralSpread.types index fd6ae24326504..fbcff7ce956af 100644 --- a/tests/baselines/reference/arrayLiteralSpread.types +++ b/tests/baselines/reference/arrayLiteralSpread.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/spread/arrayLiteralSpread.ts === +//// [tests/cases/conformance/es6/spread/arrayLiteralSpread.ts] //// + +=== arrayLiteralSpread.ts === function f0() { >f0 : () => void diff --git a/tests/baselines/reference/arrayLiteralSpreadES5iterable.js b/tests/baselines/reference/arrayLiteralSpreadES5iterable.js index 2e828e602df4b..3f16bdfbeebe4 100644 --- a/tests/baselines/reference/arrayLiteralSpreadES5iterable.js +++ b/tests/baselines/reference/arrayLiteralSpreadES5iterable.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/spread/arrayLiteralSpreadES5iterable.ts] //// + //// [arrayLiteralSpreadES5iterable.ts] function f0() { var a = [1, 2, 3]; diff --git a/tests/baselines/reference/arrayLiteralSpreadES5iterable.symbols b/tests/baselines/reference/arrayLiteralSpreadES5iterable.symbols index e31cc74e013f4..949b2e07217b2 100644 --- a/tests/baselines/reference/arrayLiteralSpreadES5iterable.symbols +++ b/tests/baselines/reference/arrayLiteralSpreadES5iterable.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/spread/arrayLiteralSpreadES5iterable.ts === +//// [tests/cases/conformance/es6/spread/arrayLiteralSpreadES5iterable.ts] //// + +=== arrayLiteralSpreadES5iterable.ts === function f0() { >f0 : Symbol(f0, Decl(arrayLiteralSpreadES5iterable.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayLiteralSpreadES5iterable.types b/tests/baselines/reference/arrayLiteralSpreadES5iterable.types index 21c41bb6dcef9..4967fa77ea931 100644 --- a/tests/baselines/reference/arrayLiteralSpreadES5iterable.types +++ b/tests/baselines/reference/arrayLiteralSpreadES5iterable.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/spread/arrayLiteralSpreadES5iterable.ts === +//// [tests/cases/conformance/es6/spread/arrayLiteralSpreadES5iterable.ts] //// + +=== arrayLiteralSpreadES5iterable.ts === function f0() { >f0 : () => void diff --git a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt index be5013ff7174f..b93d7243fe4fe 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt +++ b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/arrayLiteralTypeInference.ts(14,14): error TS2322: Type '{ id: number; trueness: false; }' is not assignable to type 'Action'. +arrayLiteralTypeInference.ts(14,14): error TS2322: Type '{ id: number; trueness: false; }' is not assignable to type 'Action'. Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'. -tests/cases/compiler/arrayLiteralTypeInference.ts(15,14): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'Action'. +arrayLiteralTypeInference.ts(15,14): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'Action'. Object literal may only specify known properties, and 'name' does not exist in type 'Action'. -tests/cases/compiler/arrayLiteralTypeInference.ts(31,18): error TS2322: Type '{ id: number; trueness: false; }' is not assignable to type '{ id: number; }'. +arrayLiteralTypeInference.ts(31,18): error TS2322: Type '{ id: number; trueness: false; }' is not assignable to type '{ id: number; }'. Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'. -tests/cases/compiler/arrayLiteralTypeInference.ts(32,18): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. +arrayLiteralTypeInference.ts(32,18): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. -==== tests/cases/compiler/arrayLiteralTypeInference.ts (4 errors) ==== +==== arrayLiteralTypeInference.ts (4 errors) ==== class Action { id: number; } diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 54b98a664ada1..9d27f4c561fa3 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayLiteralTypeInference.ts] //// + //// [arrayLiteralTypeInference.ts] class Action { id: number; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.symbols b/tests/baselines/reference/arrayLiteralTypeInference.symbols index 9f95dec0aaa8e..0e2437b76ad19 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.symbols +++ b/tests/baselines/reference/arrayLiteralTypeInference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralTypeInference.ts === +//// [tests/cases/compiler/arrayLiteralTypeInference.ts] //// + +=== arrayLiteralTypeInference.ts === class Action { >Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayLiteralTypeInference.types b/tests/baselines/reference/arrayLiteralTypeInference.types index 609d057e1205c..bc2286280816c 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.types +++ b/tests/baselines/reference/arrayLiteralTypeInference.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayLiteralTypeInference.ts === +//// [tests/cases/compiler/arrayLiteralTypeInference.ts] //// + +=== arrayLiteralTypeInference.ts === class Action { >Action : Action diff --git a/tests/baselines/reference/arrayLiteralWidened.js b/tests/baselines/reference/arrayLiteralWidened.js index 5b7346b87381b..39ee52e48df39 100644 --- a/tests/baselines/reference/arrayLiteralWidened.js +++ b/tests/baselines/reference/arrayLiteralWidened.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/widenedTypes/arrayLiteralWidened.ts] //// + //// [arrayLiteralWidened.ts] // array literals are widened upon assignment according to their element type diff --git a/tests/baselines/reference/arrayLiteralWidened.symbols b/tests/baselines/reference/arrayLiteralWidened.symbols index 48137812a5dfc..65f2c075275f2 100644 --- a/tests/baselines/reference/arrayLiteralWidened.symbols +++ b/tests/baselines/reference/arrayLiteralWidened.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/widenedTypes/arrayLiteralWidened.ts === +//// [tests/cases/conformance/types/typeRelationships/widenedTypes/arrayLiteralWidened.ts] //// + +=== arrayLiteralWidened.ts === // array literals are widened upon assignment according to their element type var a = []; // any[] diff --git a/tests/baselines/reference/arrayLiteralWidened.types b/tests/baselines/reference/arrayLiteralWidened.types index 1313118f333e0..6b7f80fdac41a 100644 --- a/tests/baselines/reference/arrayLiteralWidened.types +++ b/tests/baselines/reference/arrayLiteralWidened.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/widenedTypes/arrayLiteralWidened.ts === +//// [tests/cases/conformance/types/typeRelationships/widenedTypes/arrayLiteralWidened.ts] //// + +=== arrayLiteralWidened.ts === // array literals are widened upon assignment according to their element type var a = []; // any[] diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js index b4f869d499eae..a1ff23200df6c 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/arrayLiteralWithMultipleBestCommonTypes.ts] //// + //// [arrayLiteralWithMultipleBestCommonTypes.ts] // when multiple best common types exist we will choose the first candidate diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols index 81209306f3330..0aa25268dc750 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/arrayLiteralWithMultipleBestCommonTypes.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/arrayLiteralWithMultipleBestCommonTypes.ts] //// + +=== arrayLiteralWithMultipleBestCommonTypes.ts === // when multiple best common types exist we will choose the first candidate var a: { x: number; y?: number }; diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types index a7553fd5cd5f0..032764689df88 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/arrayLiteralWithMultipleBestCommonTypes.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/arrayLiteralWithMultipleBestCommonTypes.ts] //// + +=== arrayLiteralWithMultipleBestCommonTypes.ts === // when multiple best common types exist we will choose the first candidate var a: { x: number; y?: number }; diff --git a/tests/baselines/reference/arrayLiterals.errors.txt b/tests/baselines/reference/arrayLiterals.errors.txt index d877277b803f8..a4e089933e072 100644 --- a/tests/baselines/reference/arrayLiterals.errors.txt +++ b/tests/baselines/reference/arrayLiterals.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,77): error TS2322: Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. +arrayLiterals.ts(24,77): error TS2322: Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,101): error TS2322: Type '{ a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. +arrayLiterals.ts(24,101): error TS2322: Type '{ a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. -==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts (2 errors) ==== +==== arrayLiterals.ts (2 errors) ==== // Empty array literal with no contextual type has type Undefined[] var arr1= [[], [1], ['']]; @@ -32,11 +32,11 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,101): erro ~ !!! error TS2322: Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. -!!! related TS6501 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:17: The expected type comes from this index signature. +!!! related TS6501 arrayLiterals.ts:24:17: The expected type comes from this index signature. ~ !!! error TS2322: Type '{ a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. -!!! related TS6501 tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts:24:17: The expected type comes from this index signature. +!!! related TS6501 arrayLiterals.ts:24:17: The expected type comes from this index signature. var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; // Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 3dd1cae6fb93c..0f2dc1f7e2ebf 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts] //// + //// [arrayLiterals.ts] // Empty array literal with no contextual type has type Undefined[] diff --git a/tests/baselines/reference/arrayLiterals.symbols b/tests/baselines/reference/arrayLiterals.symbols index 707641173d39f..840abbdb53233 100644 --- a/tests/baselines/reference/arrayLiterals.symbols +++ b/tests/baselines/reference/arrayLiterals.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts] //// + +=== arrayLiterals.ts === // Empty array literal with no contextual type has type Undefined[] var arr1= [[], [1], ['']]; diff --git a/tests/baselines/reference/arrayLiterals.types b/tests/baselines/reference/arrayLiterals.types index e20aa6d957805..4b170779b6cc0 100644 --- a/tests/baselines/reference/arrayLiterals.types +++ b/tests/baselines/reference/arrayLiterals.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts] //// + +=== arrayLiterals.ts === // Empty array literal with no contextual type has type Undefined[] var arr1= [[], [1], ['']]; diff --git a/tests/baselines/reference/arrayLiterals2ES5.js b/tests/baselines/reference/arrayLiterals2ES5.js index af76232a07dc8..23b9662bb0506 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.js +++ b/tests/baselines/reference/arrayLiterals2ES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts] //// + //// [arrayLiterals2ES5.ts] // ElementList: ( Modified ) // Elisionopt AssignmentExpression diff --git a/tests/baselines/reference/arrayLiterals2ES5.symbols b/tests/baselines/reference/arrayLiterals2ES5.symbols index 43e67d5664afc..236cc654c3099 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.symbols +++ b/tests/baselines/reference/arrayLiterals2ES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts] //// + +=== arrayLiterals2ES5.ts === // ElementList: ( Modified ) // Elisionopt AssignmentExpression // Elisionopt SpreadElement diff --git a/tests/baselines/reference/arrayLiterals2ES5.types b/tests/baselines/reference/arrayLiterals2ES5.types index 282086d5395d7..128dc1d66460b 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.types +++ b/tests/baselines/reference/arrayLiterals2ES5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts] //// + +=== arrayLiterals2ES5.ts === // ElementList: ( Modified ) // Elisionopt AssignmentExpression // Elisionopt SpreadElement diff --git a/tests/baselines/reference/arrayLiterals2ES6.js b/tests/baselines/reference/arrayLiterals2ES6.js index cb6bf2684e858..1a80dcbec0e98 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.js +++ b/tests/baselines/reference/arrayLiterals2ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES6.ts] //// + //// [arrayLiterals2ES6.ts] // ElementList: ( Modified ) // Elisionopt AssignmentExpression diff --git a/tests/baselines/reference/arrayLiterals2ES6.symbols b/tests/baselines/reference/arrayLiterals2ES6.symbols index 5186ea2b0f3a3..46084570c17f5 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.symbols +++ b/tests/baselines/reference/arrayLiterals2ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES6.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES6.ts] //// + +=== arrayLiterals2ES6.ts === // ElementList: ( Modified ) // Elisionopt AssignmentExpression // Elisionopt SpreadElement diff --git a/tests/baselines/reference/arrayLiterals2ES6.types b/tests/baselines/reference/arrayLiterals2ES6.types index 61944e57fd03d..ff0bb113c5aad 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.types +++ b/tests/baselines/reference/arrayLiterals2ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES6.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES6.ts] //// + +=== arrayLiterals2ES6.ts === // ElementList: ( Modified ) // Elisionopt AssignmentExpression // Elisionopt SpreadElement diff --git a/tests/baselines/reference/arrayLiterals3.errors.txt b/tests/baselines/reference/arrayLiterals3.errors.txt index 3b2d25d17f4ec..1c96065df876e 100644 --- a/tests/baselines/reference/arrayLiterals3.errors.txt +++ b/tests/baselines/reference/arrayLiterals3.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(10,5): error TS2322: Type '[]' is not assignable to type '[any, any, any]'. +arrayLiterals3.ts(10,5): error TS2322: Type '[]' is not assignable to type '[any, any, any]'. Source has 0 element(s) but target requires 3. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(11,38): error TS2322: Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(11,48): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(11,51): error TS2322: Type 'boolean' is not assignable to type 'number'. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(17,5): error TS2322: Type '[number, number, string, boolean]' is not assignable to type '[number, number]'. +arrayLiterals3.ts(11,38): error TS2322: Type 'string' is not assignable to type 'boolean'. +arrayLiterals3.ts(11,48): error TS2322: Type 'number' is not assignable to type 'string'. +arrayLiterals3.ts(11,51): error TS2322: Type 'boolean' is not assignable to type 'number'. +arrayLiterals3.ts(17,5): error TS2322: Type '[number, number, string, boolean]' is not assignable to type '[number, number]'. Source has 4 element(s) but target allows only 2. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(33,5): error TS2322: Type 'number[]' is not assignable to type '[number, number, number]'. +arrayLiterals3.ts(33,5): error TS2322: Type 'number[]' is not assignable to type '[number, number, number]'. Target requires 3 element(s) but source may have fewer. -tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error TS2322: Type '(string | number)[]' is not assignable to type 'myArray'. +arrayLiterals3.ts(34,5): error TS2322: Type '(string | number)[]' is not assignable to type 'myArray'. Type 'string | number' is not assignable to type 'Number'. Type 'string' is not assignable to type 'Number'. -==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts (7 errors) ==== +==== arrayLiterals3.ts (7 errors) ==== // Each element expression in a non-empty array literal is processed as follows: // - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19) // by a type T and T has a property with the numeric name N, where N is the index of the element expression in the array literal, diff --git a/tests/baselines/reference/arrayLiterals3.js b/tests/baselines/reference/arrayLiterals3.js index e838b51abfb45..15601e737ad96 100644 --- a/tests/baselines/reference/arrayLiterals3.js +++ b/tests/baselines/reference/arrayLiterals3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts] //// + //// [arrayLiterals3.ts] // Each element expression in a non-empty array literal is processed as follows: // - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19) diff --git a/tests/baselines/reference/arrayLiterals3.symbols b/tests/baselines/reference/arrayLiterals3.symbols index b776ef43e883d..015ed97cd3b13 100644 --- a/tests/baselines/reference/arrayLiterals3.symbols +++ b/tests/baselines/reference/arrayLiterals3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts] //// + +=== arrayLiterals3.ts === // Each element expression in a non-empty array literal is processed as follows: // - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19) // by a type T and T has a property with the numeric name N, where N is the index of the element expression in the array literal, diff --git a/tests/baselines/reference/arrayLiterals3.types b/tests/baselines/reference/arrayLiterals3.types index ec2aab18322c8..757094c4641e6 100644 --- a/tests/baselines/reference/arrayLiterals3.types +++ b/tests/baselines/reference/arrayLiterals3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts === +//// [tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts] //// + +=== arrayLiterals3.ts === // Each element expression in a non-empty array literal is processed as follows: // - If the array literal contains no spread elements, and if the array literal is contextually typed (section 4.19) // by a type T and T has a property with the numeric name N, where N is the index of the element expression in the array literal, diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index eababb4f69b72..b048aded77a6d 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts] //// + //// [arrayLiteralsWithRecursiveGenerics.ts] class List { data: T; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.symbols b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.symbols index 0b3630cac2876..ad1519b562356 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.symbols +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts === +//// [tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts] //// + +=== arrayLiteralsWithRecursiveGenerics.ts === class List { >List : Symbol(List, Decl(arrayLiteralsWithRecursiveGenerics.ts, 0, 0)) >T : Symbol(T, Decl(arrayLiteralsWithRecursiveGenerics.ts, 0, 11)) diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.types b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.types index 1337b4dc68d4b..22f82c1c2bdcd 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.types +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts === +//// [tests/cases/conformance/types/typeRelationships/recursiveTypes/arrayLiteralsWithRecursiveGenerics.ts] //// + +=== arrayLiteralsWithRecursiveGenerics.ts === class List { >List : List diff --git a/tests/baselines/reference/arrayOfExportedClass.symbols b/tests/baselines/reference/arrayOfExportedClass.symbols index acdcbfa398b94..fdbd8e4f2928e 100644 --- a/tests/baselines/reference/arrayOfExportedClass.symbols +++ b/tests/baselines/reference/arrayOfExportedClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayOfExportedClass_1.ts === +//// [tests/cases/compiler/arrayOfExportedClass.ts] //// + +=== arrayOfExportedClass_1.ts === /// import Car = require('./arrayOfExportedClass_0'); >Car : Symbol(Car, Decl(arrayOfExportedClass_1.ts, 0, 0)) @@ -26,7 +28,7 @@ class Road { export = Road; >Road : Symbol(Road, Decl(arrayOfExportedClass_1.ts, 1, 49)) -=== tests/cases/compiler/arrayOfExportedClass_0.ts === +=== arrayOfExportedClass_0.ts === class Car { >Car : Symbol(Car, Decl(arrayOfExportedClass_0.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayOfExportedClass.types b/tests/baselines/reference/arrayOfExportedClass.types index 74676750a9add..ea2f30c016cca 100644 --- a/tests/baselines/reference/arrayOfExportedClass.types +++ b/tests/baselines/reference/arrayOfExportedClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayOfExportedClass_1.ts === +//// [tests/cases/compiler/arrayOfExportedClass.ts] //// + +=== arrayOfExportedClass_1.ts === /// import Car = require('./arrayOfExportedClass_0'); >Car : typeof Car @@ -25,7 +27,7 @@ class Road { export = Road; >Road : Road -=== tests/cases/compiler/arrayOfExportedClass_0.ts === +=== arrayOfExportedClass_0.ts === class Car { >Car : Car diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.js b/tests/baselines/reference/arrayOfFunctionTypes3.js index 758e11f6f1fc5..d56193714c2e2 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.js +++ b/tests/baselines/reference/arrayOfFunctionTypes3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts] //// + //// [arrayOfFunctionTypes3.ts] // valid uses of arrays of function types diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.symbols b/tests/baselines/reference/arrayOfFunctionTypes3.symbols index 9ff5a252d34e4..cb94a26440ef8 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.symbols +++ b/tests/baselines/reference/arrayOfFunctionTypes3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts] //// + +=== arrayOfFunctionTypes3.ts === // valid uses of arrays of function types var x = [() => 1, () => { }]; diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.types b/tests/baselines/reference/arrayOfFunctionTypes3.types index 4dd258645a6f2..b8cbf2a9f1b95 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.types +++ b/tests/baselines/reference/arrayOfFunctionTypes3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayOfFunctionTypes3.ts] //// + +=== arrayOfFunctionTypes3.ts === // valid uses of arrays of function types var x = [() => 1, () => { }]; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt index 66b3c2c869106..1b2f7b62be09f 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(13,1): error TS2322: Type 'A[]' is not assignable to type 'readonly B[]'. +arrayOfSubtypeIsAssignableToReadonlyArray.ts(13,1): error TS2322: Type 'A[]' is not assignable to type 'readonly B[]'. Property 'b' is missing in type 'A' but required in type 'B'. -tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error TS2322: Type 'C' is not assignable to type 'readonly B[]'. +arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error TS2322: Type 'C' is not assignable to type 'readonly B[]'. The types returned by 'concat(...)' are incompatible between these types. Type 'A[]' is not assignable to type 'B[]'. Type 'A' is not assignable to type 'B'. -==== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts (2 errors) ==== +==== arrayOfSubtypeIsAssignableToReadonlyArray.ts (2 errors) ==== class A { a } class B extends A { b } class C extends Array { c } @@ -23,7 +23,7 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T ~~~ !!! error TS2322: Type 'A[]' is not assignable to type 'readonly B[]'. !!! error TS2322: Property 'b' is missing in type 'A' but required in type 'B'. -!!! related TS2728 tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:21: 'b' is declared here. +!!! related TS2728 arrayOfSubtypeIsAssignableToReadonlyArray.ts:2:21: 'b' is declared here. rra = cra; rra = crb; // OK, C is assignable to ReadonlyArray diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 6659f2820396d..4f326443f931c 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts] //// + //// [arrayOfSubtypeIsAssignableToReadonlyArray.ts] class A { a } class B extends A { b } diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.symbols b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.symbols index cd1be6c6aa6b9..6b0df4f746ea7 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.symbols +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts === +//// [tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts] //// + +=== arrayOfSubtypeIsAssignableToReadonlyArray.ts === class A { a } >A : Symbol(A, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 0, 0)) >a : Symbol(A.a, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 0, 9)) diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.types b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.types index f5b639f486701..6154e1a72c812 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.types +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts === +//// [tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts] //// + +=== arrayOfSubtypeIsAssignableToReadonlyArray.ts === class A { a } >A : A >a : any diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt index f662bf20af3e3..7114eb4548fb9 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts(2,17): error TS2314: Generic type 'Array' requires 1 type argument(s). +arrayReferenceWithoutTypeArgs.ts(2,17): error TS2314: Generic type 'Array' requires 1 type argument(s). -==== tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts (1 errors) ==== +==== arrayReferenceWithoutTypeArgs.ts (1 errors) ==== class X { public f(a: Array) { } ~~~~~ diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js index 867395c44cf1b..7bb632a55f625 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts] //// + //// [arrayReferenceWithoutTypeArgs.ts] class X { public f(a: Array) { } diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.symbols b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.symbols index 58854242d1114..e56f623c7cbf1 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.symbols +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts === +//// [tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts] //// + +=== arrayReferenceWithoutTypeArgs.ts === class X { >X : Symbol(X, Decl(arrayReferenceWithoutTypeArgs.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.types b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.types index 0fd47267ffea0..614cb4d8f3306 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.types +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts === +//// [tests/cases/compiler/arrayReferenceWithoutTypeArgs.ts] //// + +=== arrayReferenceWithoutTypeArgs.ts === class X { >X : X diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index 9d7ef5ef0634a..e1b1746de5889 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/arraySigChecking.ts(11,17): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -tests/cases/compiler/arraySigChecking.ts(18,27): error TS2322: Type 'void' is not assignable to type 'string'. -tests/cases/compiler/arraySigChecking.ts(22,13): error TS2322: Type 'number' is not assignable to type 'number[]'. -tests/cases/compiler/arraySigChecking.ts(22,16): error TS2322: Type 'number' is not assignable to type 'number[]'. +arraySigChecking.ts(11,17): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +arraySigChecking.ts(18,27): error TS2322: Type 'void' is not assignable to type 'string'. +arraySigChecking.ts(22,13): error TS2322: Type 'number' is not assignable to type 'number[]'. +arraySigChecking.ts(22,16): error TS2322: Type 'number' is not assignable to type 'number[]'. -==== tests/cases/compiler/arraySigChecking.ts (4 errors) ==== +==== arraySigChecking.ts (4 errors) ==== declare module M { interface iBar { t: any; } interface iFoo extends iBar { diff --git a/tests/baselines/reference/arraySigChecking.js b/tests/baselines/reference/arraySigChecking.js index 16189305eaddb..f83b5bb3b75fe 100644 --- a/tests/baselines/reference/arraySigChecking.js +++ b/tests/baselines/reference/arraySigChecking.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arraySigChecking.ts] //// + //// [arraySigChecking.ts] declare module M { interface iBar { t: any; } diff --git a/tests/baselines/reference/arraySigChecking.symbols b/tests/baselines/reference/arraySigChecking.symbols index 709cf7c365221..10c48f6e6b216 100644 --- a/tests/baselines/reference/arraySigChecking.symbols +++ b/tests/baselines/reference/arraySigChecking.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arraySigChecking.ts === +//// [tests/cases/compiler/arraySigChecking.ts] //// + +=== arraySigChecking.ts === declare module M { >M : Symbol(M, Decl(arraySigChecking.ts, 0, 0)) diff --git a/tests/baselines/reference/arraySigChecking.types b/tests/baselines/reference/arraySigChecking.types index bbde4920731a6..161463fd6e35d 100644 --- a/tests/baselines/reference/arraySigChecking.types +++ b/tests/baselines/reference/arraySigChecking.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arraySigChecking.ts === +//// [tests/cases/compiler/arraySigChecking.ts] //// + +=== arraySigChecking.ts === declare module M { >M : typeof M diff --git a/tests/baselines/reference/arraySlice.js b/tests/baselines/reference/arraySlice.js index a5e4ba1546e2a..c496aa4ed2dd9 100644 --- a/tests/baselines/reference/arraySlice.js +++ b/tests/baselines/reference/arraySlice.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arraySlice.ts] //// + //// [arraySlice.ts] var arr: string[] | number[]; arr.splice(1, 1); diff --git a/tests/baselines/reference/arraySlice.symbols b/tests/baselines/reference/arraySlice.symbols index 2ba96cbb582a9..0d96026a75ad0 100644 --- a/tests/baselines/reference/arraySlice.symbols +++ b/tests/baselines/reference/arraySlice.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arraySlice.ts === +//// [tests/cases/compiler/arraySlice.ts] //// + +=== arraySlice.ts === var arr: string[] | number[]; >arr : Symbol(arr, Decl(arraySlice.ts, 0, 3)) diff --git a/tests/baselines/reference/arraySlice.types b/tests/baselines/reference/arraySlice.types index d1ee482ccaac4..c66e2d7da37d9 100644 --- a/tests/baselines/reference/arraySlice.types +++ b/tests/baselines/reference/arraySlice.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arraySlice.ts === +//// [tests/cases/compiler/arraySlice.ts] //// + +=== arraySlice.ts === var arr: string[] | number[]; >arr : string[] | number[] diff --git a/tests/baselines/reference/arraySpreadImportHelpers.errors.txt b/tests/baselines/reference/arraySpreadImportHelpers.errors.txt index 7871905df87fa..98b0b1cae757f 100644 --- a/tests/baselines/reference/arraySpreadImportHelpers.errors.txt +++ b/tests/baselines/reference/arraySpreadImportHelpers.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/es6/spread/main.ts(3,15): error TS2807: This syntax requires an imported helper named '__spreadArray' with 3 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'. +main.ts(3,15): error TS2807: This syntax requires an imported helper named '__spreadArray' with 3 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'. -==== tests/cases/conformance/es6/spread/main.ts (1 errors) ==== +==== main.ts (1 errors) ==== export {}; const k = [1, , 2]; const o = [3, ...k, 4]; ~~~~ !!! error TS2807: This syntax requires an imported helper named '__spreadArray' with 3 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'. -==== tests/cases/conformance/es6/spread/tslib.d.ts (0 errors) ==== +==== tslib.d.ts (0 errors) ==== // this is a pre-TS4.4 versions of emit helper, which always forced array packing declare module "tslib" { function __spreadArray(to: any[], from: any[]): any[]; diff --git a/tests/baselines/reference/arraySpreadInCall.errors.txt b/tests/baselines/reference/arraySpreadInCall.errors.txt index a28479767edd6..147c3676659ae 100644 --- a/tests/baselines/reference/arraySpreadInCall.errors.txt +++ b/tests/baselines/reference/arraySpreadInCall.errors.txt @@ -1,21 +1,32 @@ -tests/cases/conformance/es6/spread/arraySpreadInCall.ts(21,12): error TS2554: Expected 0-1 arguments, but got 2. +arraySpreadInCall.ts(32,12): error TS2554: Expected 0-1 arguments, but got 2. -==== tests/cases/conformance/es6/spread/arraySpreadInCall.ts (1 errors) ==== +==== arraySpreadInCall.ts (1 errors) ==== declare function f1(a: number, b: number, c: number, d: number, e: number, f: number): void; f1(1, 2, 3, 4, ...[5, 6]); f1(...[1], 2, 3, 4, 5, 6); f1(1, 2, ...[3, 4], 5, 6); f1(1, 2, ...[3], 4, ...[5, 6]); f1(...[1, 2], ...[3, 4], ...[5, 6]); + f1(...(([1, 2])), ...(((([3, 4])))), ...([5, 6])); declare function f2(...args: T): T; const x21 = f2(...[1, 'foo']) const x22 = f2(true, ...[1, 'foo']) + const x23 = f2(...([1, 'foo'])) + const x24 = f2(true, ...([1, 'foo'])) declare function f3(...args: T): T; const x31 = f3(...[1, 'foo']) const x32 = f3(true, ...[1, 'foo']) + const x33 = f3(...([1, 'foo'])) + const x34 = f3(true, ...([1, 'foo'])) + + declare function f4(...args: T): T; + const x41 = f4(...[1, 'foo']) + const x42 = f4(true, ...[1, 'foo']) + const x43 = f4(...([1, 'foo'])) + const x44 = f4(true, ...([1, 'foo'])) // dicovered in #52845#issuecomment-1459132562 interface IAction { diff --git a/tests/baselines/reference/arraySpreadInCall.symbols b/tests/baselines/reference/arraySpreadInCall.symbols index 359c6d52d123b..96b009ba0c918 100644 --- a/tests/baselines/reference/arraySpreadInCall.symbols +++ b/tests/baselines/reference/arraySpreadInCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/spread/arraySpreadInCall.ts === +//// [tests/cases/conformance/es6/spread/arraySpreadInCall.ts] //// + +=== arraySpreadInCall.ts === declare function f1(a: number, b: number, c: number, d: number, e: number, f: number): void; >f1 : Symbol(f1, Decl(arraySpreadInCall.ts, 0, 0)) >a : Symbol(a, Decl(arraySpreadInCall.ts, 0, 20)) @@ -23,51 +25,93 @@ f1(1, 2, ...[3], 4, ...[5, 6]); f1(...[1, 2], ...[3, 4], ...[5, 6]); >f1 : Symbol(f1, Decl(arraySpreadInCall.ts, 0, 0)) +f1(...(([1, 2])), ...(((([3, 4])))), ...([5, 6])); +>f1 : Symbol(f1, Decl(arraySpreadInCall.ts, 0, 0)) + declare function f2(...args: T): T; ->f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 5, 36)) ->T : Symbol(T, Decl(arraySpreadInCall.ts, 7, 20)) ->args : Symbol(args, Decl(arraySpreadInCall.ts, 7, 41)) ->T : Symbol(T, Decl(arraySpreadInCall.ts, 7, 20)) ->T : Symbol(T, Decl(arraySpreadInCall.ts, 7, 20)) +>f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 6, 50)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 8, 20)) +>args : Symbol(args, Decl(arraySpreadInCall.ts, 8, 41)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 8, 20)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 8, 20)) const x21 = f2(...[1, 'foo']) ->x21 : Symbol(x21, Decl(arraySpreadInCall.ts, 8, 5)) ->f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 5, 36)) +>x21 : Symbol(x21, Decl(arraySpreadInCall.ts, 9, 5)) +>f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 6, 50)) const x22 = f2(true, ...[1, 'foo']) ->x22 : Symbol(x22, Decl(arraySpreadInCall.ts, 9, 5)) ->f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 5, 36)) +>x22 : Symbol(x22, Decl(arraySpreadInCall.ts, 10, 5)) +>f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 6, 50)) + +const x23 = f2(...([1, 'foo'])) +>x23 : Symbol(x23, Decl(arraySpreadInCall.ts, 11, 5)) +>f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 6, 50)) + +const x24 = f2(true, ...([1, 'foo'])) +>x24 : Symbol(x24, Decl(arraySpreadInCall.ts, 12, 5)) +>f2 : Symbol(f2, Decl(arraySpreadInCall.ts, 6, 50)) declare function f3(...args: T): T; ->f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 9, 35)) ->T : Symbol(T, Decl(arraySpreadInCall.ts, 11, 20)) ->args : Symbol(args, Decl(arraySpreadInCall.ts, 11, 50)) ->T : Symbol(T, Decl(arraySpreadInCall.ts, 11, 20)) ->T : Symbol(T, Decl(arraySpreadInCall.ts, 11, 20)) +>f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 12, 37)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 14, 20)) +>args : Symbol(args, Decl(arraySpreadInCall.ts, 14, 50)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 14, 20)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 14, 20)) const x31 = f3(...[1, 'foo']) ->x31 : Symbol(x31, Decl(arraySpreadInCall.ts, 12, 5)) ->f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 9, 35)) +>x31 : Symbol(x31, Decl(arraySpreadInCall.ts, 15, 5)) +>f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 12, 37)) const x32 = f3(true, ...[1, 'foo']) ->x32 : Symbol(x32, Decl(arraySpreadInCall.ts, 13, 5)) ->f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 9, 35)) +>x32 : Symbol(x32, Decl(arraySpreadInCall.ts, 16, 5)) +>f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 12, 37)) + +const x33 = f3(...([1, 'foo'])) +>x33 : Symbol(x33, Decl(arraySpreadInCall.ts, 17, 5)) +>f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 12, 37)) + +const x34 = f3(true, ...([1, 'foo'])) +>x34 : Symbol(x34, Decl(arraySpreadInCall.ts, 18, 5)) +>f3 : Symbol(f3, Decl(arraySpreadInCall.ts, 12, 37)) + +declare function f4(...args: T): T; +>f4 : Symbol(f4, Decl(arraySpreadInCall.ts, 18, 37)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 20, 20)) +>args : Symbol(args, Decl(arraySpreadInCall.ts, 20, 56)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 20, 20)) +>T : Symbol(T, Decl(arraySpreadInCall.ts, 20, 20)) + +const x41 = f4(...[1, 'foo']) +>x41 : Symbol(x41, Decl(arraySpreadInCall.ts, 21, 5)) +>f4 : Symbol(f4, Decl(arraySpreadInCall.ts, 18, 37)) + +const x42 = f4(true, ...[1, 'foo']) +>x42 : Symbol(x42, Decl(arraySpreadInCall.ts, 22, 5)) +>f4 : Symbol(f4, Decl(arraySpreadInCall.ts, 18, 37)) + +const x43 = f4(...([1, 'foo'])) +>x43 : Symbol(x43, Decl(arraySpreadInCall.ts, 23, 5)) +>f4 : Symbol(f4, Decl(arraySpreadInCall.ts, 18, 37)) + +const x44 = f4(true, ...([1, 'foo'])) +>x44 : Symbol(x44, Decl(arraySpreadInCall.ts, 24, 5)) +>f4 : Symbol(f4, Decl(arraySpreadInCall.ts, 18, 37)) // dicovered in #52845#issuecomment-1459132562 interface IAction { ->IAction : Symbol(IAction, Decl(arraySpreadInCall.ts, 13, 35)) +>IAction : Symbol(IAction, Decl(arraySpreadInCall.ts, 24, 37)) run(event?: unknown): unknown; ->run : Symbol(IAction.run, Decl(arraySpreadInCall.ts, 16, 19)) ->event : Symbol(event, Decl(arraySpreadInCall.ts, 17, 8)) +>run : Symbol(IAction.run, Decl(arraySpreadInCall.ts, 27, 19)) +>event : Symbol(event, Decl(arraySpreadInCall.ts, 28, 8)) } declare const action: IAction ->action : Symbol(action, Decl(arraySpreadInCall.ts, 19, 13)) ->IAction : Symbol(IAction, Decl(arraySpreadInCall.ts, 13, 35)) +>action : Symbol(action, Decl(arraySpreadInCall.ts, 30, 13)) +>IAction : Symbol(IAction, Decl(arraySpreadInCall.ts, 24, 37)) action.run(...[100, 'foo']) // error ->action.run : Symbol(IAction.run, Decl(arraySpreadInCall.ts, 16, 19)) ->action : Symbol(action, Decl(arraySpreadInCall.ts, 19, 13)) ->run : Symbol(IAction.run, Decl(arraySpreadInCall.ts, 16, 19)) +>action.run : Symbol(IAction.run, Decl(arraySpreadInCall.ts, 27, 19)) +>action : Symbol(action, Decl(arraySpreadInCall.ts, 30, 13)) +>run : Symbol(IAction.run, Decl(arraySpreadInCall.ts, 27, 19)) diff --git a/tests/baselines/reference/arraySpreadInCall.types b/tests/baselines/reference/arraySpreadInCall.types index 7f06c4be8f14c..acab4f6d2bd25 100644 --- a/tests/baselines/reference/arraySpreadInCall.types +++ b/tests/baselines/reference/arraySpreadInCall.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/spread/arraySpreadInCall.ts === +//// [tests/cases/conformance/es6/spread/arraySpreadInCall.ts] //// + +=== arraySpreadInCall.ts === declare function f1(a: number, b: number, c: number, d: number, e: number, f: number): void; >f1 : (a: number, b: number, c: number, d: number, e: number, f: number) => void >a : number @@ -16,7 +18,7 @@ f1(1, 2, 3, 4, ...[5, 6]); >3 : 3 >4 : 4 >...[5, 6] : number ->[5, 6] : readonly [number, number] +>[5, 6] : [number, number] >5 : 5 >6 : 6 @@ -24,7 +26,7 @@ f1(...[1], 2, 3, 4, 5, 6); >f1(...[1], 2, 3, 4, 5, 6) : void >f1 : (a: number, b: number, c: number, d: number, e: number, f: number) => void >...[1] : number ->[1] : readonly [number] +>[1] : [number] >1 : 1 >2 : 2 >3 : 3 @@ -38,7 +40,7 @@ f1(1, 2, ...[3, 4], 5, 6); >1 : 1 >2 : 2 >...[3, 4] : number ->[3, 4] : readonly [number, number] +>[3, 4] : [number, number] >3 : 3 >4 : 4 >5 : 5 @@ -50,11 +52,11 @@ f1(1, 2, ...[3], 4, ...[5, 6]); >1 : 1 >2 : 2 >...[3] : number ->[3] : readonly [number] +>[3] : [number] >3 : 3 >4 : 4 >...[5, 6] : number ->[5, 6] : readonly [number, number] +>[5, 6] : [number, number] >5 : 5 >6 : 6 @@ -62,15 +64,38 @@ f1(...[1, 2], ...[3, 4], ...[5, 6]); >f1(...[1, 2], ...[3, 4], ...[5, 6]) : void >f1 : (a: number, b: number, c: number, d: number, e: number, f: number) => void >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 >...[3, 4] : number ->[3, 4] : readonly [number, number] +>[3, 4] : [number, number] >3 : 3 >4 : 4 >...[5, 6] : number ->[5, 6] : readonly [number, number] +>[5, 6] : [number, number] +>5 : 5 +>6 : 6 + +f1(...(([1, 2])), ...(((([3, 4])))), ...([5, 6])); +>f1(...(([1, 2])), ...(((([3, 4])))), ...([5, 6])) : void +>f1 : (a: number, b: number, c: number, d: number, e: number, f: number) => void +>...(([1, 2])) : number +>(([1, 2])) : [number, number] +>([1, 2]) : [number, number] +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 +>...(((([3, 4])))) : number +>(((([3, 4])))) : [number, number] +>((([3, 4]))) : [number, number] +>(([3, 4])) : [number, number] +>([3, 4]) : [number, number] +>[3, 4] : [number, number] +>3 : 3 +>4 : 4 +>...([5, 6]) : number +>([5, 6]) : [number, number] +>[5, 6] : [number, number] >5 : 5 >6 : 6 @@ -83,7 +108,7 @@ const x21 = f2(...[1, 'foo']) >f2(...[1, 'foo']) : [number, string] >f2 : (...args: T) => T >...[1, 'foo'] : string | number ->[1, 'foo'] : readonly [number, string] +>[1, 'foo'] : [number, string] >1 : 1 >'foo' : "foo" @@ -93,7 +118,28 @@ const x22 = f2(true, ...[1, 'foo']) >f2 : (...args: T) => T >true : true >...[1, 'foo'] : string | number ->[1, 'foo'] : readonly [number, string] +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x23 = f2(...([1, 'foo'])) +>x23 : [number, string] +>f2(...([1, 'foo'])) : [number, string] +>f2 : (...args: T) => T +>...([1, 'foo']) : string | number +>([1, 'foo']) : [number, string] +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x24 = f2(true, ...([1, 'foo'])) +>x24 : [boolean, number, string] +>f2(true, ...([1, 'foo'])) : [boolean, number, string] +>f2 : (...args: T) => T +>true : true +>...([1, 'foo']) : string | number +>([1, 'foo']) : [number, string] +>[1, 'foo'] : [number, string] >1 : 1 >'foo' : "foo" @@ -106,7 +152,7 @@ const x31 = f3(...[1, 'foo']) >f3(...[1, 'foo']) : [number, string] >f3 : (...args: T) => T >...[1, 'foo'] : string | number ->[1, 'foo'] : readonly [number, string] +>[1, 'foo'] : [number, string] >1 : 1 >'foo' : "foo" @@ -116,7 +162,72 @@ const x32 = f3(true, ...[1, 'foo']) >f3 : (...args: T) => T >true : true >...[1, 'foo'] : string | number ->[1, 'foo'] : readonly [number, string] +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x33 = f3(...([1, 'foo'])) +>x33 : [number, string] +>f3(...([1, 'foo'])) : [number, string] +>f3 : (...args: T) => T +>...([1, 'foo']) : string | number +>([1, 'foo']) : [number, string] +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x34 = f3(true, ...([1, 'foo'])) +>x34 : [boolean, number, string] +>f3(true, ...([1, 'foo'])) : [boolean, number, string] +>f3 : (...args: T) => T +>true : true +>...([1, 'foo']) : string | number +>([1, 'foo']) : [number, string] +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +declare function f4(...args: T): T; +>f4 : (...args: T) => T +>args : T + +const x41 = f4(...[1, 'foo']) +>x41 : readonly [number, string] +>f4(...[1, 'foo']) : readonly [number, string] +>f4 : (...args: T) => T +>...[1, 'foo'] : string | number +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x42 = f4(true, ...[1, 'foo']) +>x42 : readonly [true, number, string] +>f4(true, ...[1, 'foo']) : readonly [true, number, string] +>f4 : (...args: T) => T +>true : true +>...[1, 'foo'] : string | number +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x43 = f4(...([1, 'foo'])) +>x43 : readonly [number, string] +>f4(...([1, 'foo'])) : readonly [number, string] +>f4 : (...args: T) => T +>...([1, 'foo']) : string | number +>([1, 'foo']) : [number, string] +>[1, 'foo'] : [number, string] +>1 : 1 +>'foo' : "foo" + +const x44 = f4(true, ...([1, 'foo'])) +>x44 : readonly [true, number, string] +>f4(true, ...([1, 'foo'])) : readonly [true, number, string] +>f4 : (...args: T) => T +>true : true +>...([1, 'foo']) : string | number +>([1, 'foo']) : [number, string] +>[1, 'foo'] : [number, string] >1 : 1 >'foo' : "foo" @@ -135,7 +246,7 @@ action.run(...[100, 'foo']) // error >action : IAction >run : (event?: unknown) => unknown >...[100, 'foo'] : string | number ->[100, 'foo'] : readonly [number, string] +>[100, 'foo'] : [number, string] >100 : 100 >'foo' : "foo" diff --git a/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.js b/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.js index 2082c2c8574e8..cffc71656bdb0 100644 --- a/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.js +++ b/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// + //// [arrayTypeInSignatureOfInterfaceAndClass.ts] declare module WinJS { class Promise { diff --git a/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.symbols b/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.symbols index 018f9ce35c99d..263bb0d26b886 100644 --- a/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.symbols +++ b/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts === +//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// + +=== arrayTypeInSignatureOfInterfaceAndClass.ts === declare module WinJS { >WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.types b/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.types index 702dcefe44eca..eabcdbce05be8 100644 --- a/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.types +++ b/tests/baselines/reference/arrayTypeInSignatureOfInterfaceAndClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts === +//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// + +=== arrayTypeInSignatureOfInterfaceAndClass.ts === declare module WinJS { >WinJS : typeof WinJS diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt b/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt index b040c9eb1c966..6e0c0c9c56bfb 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts(11,11): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts(16,11): error TS2350: Only a void function can be called with the 'new' keyword. +arrayTypeOfFunctionTypes.ts(11,11): error TS2350: Only a void function can be called with the 'new' keyword. +arrayTypeOfFunctionTypes.ts(16,11): error TS2350: Only a void function can be called with the 'new' keyword. -==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts (2 errors) ==== +==== arrayTypeOfFunctionTypes.ts (2 errors) ==== // valid uses of arrays of function types var x: () => string[]; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.js b/tests/baselines/reference/arrayTypeOfFunctionTypes.js index 9a7a4516cb585..840ea1ad405dc 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.js +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts] //// + //// [arrayTypeOfFunctionTypes.ts] // valid uses of arrays of function types diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.symbols b/tests/baselines/reference/arrayTypeOfFunctionTypes.symbols index 74497ceceefd5..eca41ef4c1196 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.symbols +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts] //// + +=== arrayTypeOfFunctionTypes.ts === // valid uses of arrays of function types var x: () => string[]; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.types b/tests/baselines/reference/arrayTypeOfFunctionTypes.types index b9c4d01198a2b..665545a909cf1 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.types +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes.ts] //// + +=== arrayTypeOfFunctionTypes.ts === // valid uses of arrays of function types var x: () => string[]; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt b/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt index 7be76cb9c1bb9..d7212ff5047e7 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts(16,11): error TS2348: Value of type 'new () => string' is not callable. Did you mean to include 'new'? +arrayTypeOfFunctionTypes2.ts(16,11): error TS2348: Value of type 'new () => string' is not callable. Did you mean to include 'new'? -==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts (1 errors) ==== +==== arrayTypeOfFunctionTypes2.ts (1 errors) ==== // valid uses of arrays of function types var x: new () => string[]; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.js b/tests/baselines/reference/arrayTypeOfFunctionTypes2.js index f9baa9871e183..77e60bb8c08cf 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.js +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts] //// + //// [arrayTypeOfFunctionTypes2.ts] // valid uses of arrays of function types diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.symbols b/tests/baselines/reference/arrayTypeOfFunctionTypes2.symbols index ddf37ac26d30b..cdf05d68cc2f0 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.symbols +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts] //// + +=== arrayTypeOfFunctionTypes2.ts === // valid uses of arrays of function types var x: new () => string[]; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.types b/tests/baselines/reference/arrayTypeOfFunctionTypes2.types index f19a63211a152..bae6ce5fe896b 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.types +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfFunctionTypes2.ts] //// + +=== arrayTypeOfFunctionTypes2.ts === // valid uses of arrays of function types var x: new () => string[]; diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.js b/tests/baselines/reference/arrayTypeOfTypeOf.js index 74a50b9cc1fc9..b6827bd2a9999 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.js +++ b/tests/baselines/reference/arrayTypeOfTypeOf.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts] //// + //// [arrayTypeOfTypeOf.ts] // array type cannot use typeof. diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.symbols b/tests/baselines/reference/arrayTypeOfTypeOf.symbols index 81c99307f1a2b..a714acc9dfb8e 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.symbols +++ b/tests/baselines/reference/arrayTypeOfTypeOf.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts] //// + +=== arrayTypeOfTypeOf.ts === // array type cannot use typeof. var x = 1; diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.types b/tests/baselines/reference/arrayTypeOfTypeOf.types index e937c6746a160..b2dd94fad1d1c 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.types +++ b/tests/baselines/reference/arrayTypeOfTypeOf.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts === +//// [tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts] //// + +=== arrayTypeOfTypeOf.ts === // array type cannot use typeof. var x = 1; diff --git a/tests/baselines/reference/arrayconcat.js b/tests/baselines/reference/arrayconcat.js index 8730fff8c41ee..b42610336bb66 100644 --- a/tests/baselines/reference/arrayconcat.js +++ b/tests/baselines/reference/arrayconcat.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrayconcat.ts] //// + //// [arrayconcat.ts] interface IOptions { name?: string; diff --git a/tests/baselines/reference/arrayconcat.symbols b/tests/baselines/reference/arrayconcat.symbols index c3aa108041d32..17132e20a3cb3 100644 --- a/tests/baselines/reference/arrayconcat.symbols +++ b/tests/baselines/reference/arrayconcat.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayconcat.ts === +//// [tests/cases/compiler/arrayconcat.ts] //// + +=== arrayconcat.ts === interface IOptions { >IOptions : Symbol(IOptions, Decl(arrayconcat.ts, 0, 0)) diff --git a/tests/baselines/reference/arrayconcat.types b/tests/baselines/reference/arrayconcat.types index 9a221314aa044..48349f3151bc3 100644 --- a/tests/baselines/reference/arrayconcat.types +++ b/tests/baselines/reference/arrayconcat.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrayconcat.ts === +//// [tests/cases/compiler/arrayconcat.ts] //// + +=== arrayconcat.ts === interface IOptions { name?: string; >name : string diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index 7dbc788bde113..1e27fe363487b 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. +arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. +arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. -==== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts (6 errors) ==== +==== arrowFunctionContexts.ts (6 errors) ==== // Arrow function used in with statement with (window) { ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index c5dc6e4053672..7a80cd10d9c18 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + //// [arrowFunctionContexts.ts] // Arrow function used in with statement with (window) { diff --git a/tests/baselines/reference/arrowFunctionContexts.symbols b/tests/baselines/reference/arrowFunctionContexts.symbols index ec0f3b6d30e89..f940f2d3af5f8 100644 --- a/tests/baselines/reference/arrowFunctionContexts.symbols +++ b/tests/baselines/reference/arrowFunctionContexts.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts === +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=== arrowFunctionContexts.ts === // Arrow function used in with statement with (window) { >window : Symbol(window, Decl(lib.dom.d.ts, --, --)) diff --git a/tests/baselines/reference/arrowFunctionContexts.types b/tests/baselines/reference/arrowFunctionContexts.types index fc8d49c5d4d64..d45a2c06bbc9f 100644 --- a/tests/baselines/reference/arrowFunctionContexts.types +++ b/tests/baselines/reference/arrowFunctionContexts.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts === +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=== arrowFunctionContexts.ts === // Arrow function used in with statement with (window) { >window : Window & typeof globalThis diff --git a/tests/baselines/reference/arrowFunctionErrorSpan.errors.txt b/tests/baselines/reference/arrowFunctionErrorSpan.errors.txt index 07e49c757b623..0cc9ee2b6a98f 100644 --- a/tests/baselines/reference/arrowFunctionErrorSpan.errors.txt +++ b/tests/baselines/reference/arrowFunctionErrorSpan.errors.txt @@ -1,27 +1,27 @@ -tests/cases/compiler/arrowFunctionErrorSpan.ts(4,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(4,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(7,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(7,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(12,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(12,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(17,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(17,3): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(18,5): error TS1200: Line terminator not permitted before arrow. -tests/cases/compiler/arrowFunctionErrorSpan.ts(21,3): error TS2345: Argument of type '(a: any, b: any, c: any, d: any) => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(18,5): error TS1200: Line terminator not permitted before arrow. +arrowFunctionErrorSpan.ts(21,3): error TS2345: Argument of type '(a: any, b: any, c: any, d: any) => void' is not assignable to parameter of type '() => number'. Target signature provides too few arguments. Expected 4 or more, but got 0. -tests/cases/compiler/arrowFunctionErrorSpan.ts(28,7): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(28,7): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(32,7): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(32,7): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(36,7): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(36,7): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(43,5): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(43,5): error TS2345: Argument of type '() => void' is not assignable to parameter of type '() => number'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/arrowFunctionErrorSpan.ts(52,3): error TS2345: Argument of type '(_: any) => number' is not assignable to parameter of type '() => number'. +arrowFunctionErrorSpan.ts(52,3): error TS2345: Argument of type '(_: any) => number' is not assignable to parameter of type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. -==== tests/cases/compiler/arrowFunctionErrorSpan.ts (11 errors) ==== +==== arrowFunctionErrorSpan.ts (11 errors) ==== function f(a: () => number) { } // oneliner diff --git a/tests/baselines/reference/arrowFunctionErrorSpan.js b/tests/baselines/reference/arrowFunctionErrorSpan.js index ca1f966f5178b..b9dd81a62ea09 100644 --- a/tests/baselines/reference/arrowFunctionErrorSpan.js +++ b/tests/baselines/reference/arrowFunctionErrorSpan.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionErrorSpan.ts] //// + //// [arrowFunctionErrorSpan.ts] function f(a: () => number) { } diff --git a/tests/baselines/reference/arrowFunctionErrorSpan.symbols b/tests/baselines/reference/arrowFunctionErrorSpan.symbols index c5adb1da8f888..d1c0ff14d50b5 100644 --- a/tests/baselines/reference/arrowFunctionErrorSpan.symbols +++ b/tests/baselines/reference/arrowFunctionErrorSpan.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionErrorSpan.ts === +//// [tests/cases/compiler/arrowFunctionErrorSpan.ts] //// + +=== arrowFunctionErrorSpan.ts === function f(a: () => number) { } >f : Symbol(f, Decl(arrowFunctionErrorSpan.ts, 0, 0)) >a : Symbol(a, Decl(arrowFunctionErrorSpan.ts, 0, 11)) diff --git a/tests/baselines/reference/arrowFunctionErrorSpan.types b/tests/baselines/reference/arrowFunctionErrorSpan.types index 1d5bde951cd13..2365b6ded59a4 100644 --- a/tests/baselines/reference/arrowFunctionErrorSpan.types +++ b/tests/baselines/reference/arrowFunctionErrorSpan.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionErrorSpan.ts === +//// [tests/cases/compiler/arrowFunctionErrorSpan.ts] //// + +=== arrowFunctionErrorSpan.ts === function f(a: () => number) { } >f : (a: () => number) => void >a : () => number diff --git a/tests/baselines/reference/arrowFunctionExpressions.js b/tests/baselines/reference/arrowFunctionExpressions.js index 4872c904f01d4..f4be03dd189a6 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.js +++ b/tests/baselines/reference/arrowFunctionExpressions.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts] //// + //// [arrowFunctionExpressions.ts] // ArrowFormalParameters => AssignmentExpression is equivalent to ArrowFormalParameters => { return AssignmentExpression; } var a = (p: string) => p.length; diff --git a/tests/baselines/reference/arrowFunctionExpressions.symbols b/tests/baselines/reference/arrowFunctionExpressions.symbols index 7680553edb246..33ea3515f192c 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.symbols +++ b/tests/baselines/reference/arrowFunctionExpressions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts === +//// [tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts] //// + +=== arrowFunctionExpressions.ts === // ArrowFormalParameters => AssignmentExpression is equivalent to ArrowFormalParameters => { return AssignmentExpression; } var a = (p: string) => p.length; >a : Symbol(a, Decl(arrowFunctionExpressions.ts, 1, 3), Decl(arrowFunctionExpressions.ts, 2, 3)) diff --git a/tests/baselines/reference/arrowFunctionExpressions.types b/tests/baselines/reference/arrowFunctionExpressions.types index 9eb9b09181369..627f69346fc9e 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.types +++ b/tests/baselines/reference/arrowFunctionExpressions.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts === +//// [tests/cases/conformance/expressions/functions/arrowFunctionExpressions.ts] //// + +=== arrowFunctionExpressions.ts === // ArrowFormalParameters => AssignmentExpression is equivalent to ArrowFormalParameters => { return AssignmentExpression; } var a = (p: string) => p.length; >a : (p: string) => number diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt b/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt index 0fc1315078e49..47345ab4ee818 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrowFunctionInConstructorArgument1.ts(4,30): error TS2304: Cannot find name 'asdf'. +arrowFunctionInConstructorArgument1.ts(4,30): error TS2304: Cannot find name 'asdf'. -==== tests/cases/compiler/arrowFunctionInConstructorArgument1.ts (1 errors) ==== +==== arrowFunctionInConstructorArgument1.ts (1 errors) ==== class C { constructor(x: () => void) { } } diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js index f80b870692958..d7762cad8adba 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionInConstructorArgument1.ts] //// + //// [arrowFunctionInConstructorArgument1.ts] class C { constructor(x: () => void) { } diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.symbols b/tests/baselines/reference/arrowFunctionInConstructorArgument1.symbols index 2991e8ace2724..e59377b3a779b 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.symbols +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionInConstructorArgument1.ts === +//// [tests/cases/compiler/arrowFunctionInConstructorArgument1.ts] //// + +=== arrowFunctionInConstructorArgument1.ts === class C { >C : Symbol(C, Decl(arrowFunctionInConstructorArgument1.ts, 0, 0)) diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.types b/tests/baselines/reference/arrowFunctionInConstructorArgument1.types index bea39c33b1041..9b52f8d48e1b5 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.types +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionInConstructorArgument1.ts === +//// [tests/cases/compiler/arrowFunctionInConstructorArgument1.ts] //// + +=== arrowFunctionInConstructorArgument1.ts === class C { >C : C diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement1.js b/tests/baselines/reference/arrowFunctionInExpressionStatement1.js index 9969a28b6cec2..8edeb9c0a3460 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement1.js +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionInExpressionStatement1.ts] //// + //// [arrowFunctionInExpressionStatement1.ts] () => 0; diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement1.symbols b/tests/baselines/reference/arrowFunctionInExpressionStatement1.symbols index 25113f14b7cf5..64b36bb3cc9cd 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement1.symbols +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement1.symbols @@ -1,3 +1,5 @@ -=== tests/cases/compiler/arrowFunctionInExpressionStatement1.ts === +//// [tests/cases/compiler/arrowFunctionInExpressionStatement1.ts] //// + +=== arrowFunctionInExpressionStatement1.ts === () => 0; diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement1.types b/tests/baselines/reference/arrowFunctionInExpressionStatement1.types index c2954cd7bec78..e803000f7e306 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement1.types +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionInExpressionStatement1.ts === +//// [tests/cases/compiler/arrowFunctionInExpressionStatement1.ts] //// + +=== arrowFunctionInExpressionStatement1.ts === () => 0; >() => 0 : () => number >0 : 0 diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement2.js b/tests/baselines/reference/arrowFunctionInExpressionStatement2.js index 2cc6aca998ea5..188c0e00289fc 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement2.js +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] //// + //// [arrowFunctionInExpressionStatement2.ts] module M { () => 0; diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement2.symbols b/tests/baselines/reference/arrowFunctionInExpressionStatement2.symbols index c9bbfde997418..eeb19bb75981b 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement2.symbols +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionInExpressionStatement2.ts === +//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] //// + +=== arrowFunctionInExpressionStatement2.ts === module M { >M : Symbol(M, Decl(arrowFunctionInExpressionStatement2.ts, 0, 0)) diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement2.types b/tests/baselines/reference/arrowFunctionInExpressionStatement2.types index 04db38ac58135..af05180173e1d 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement2.types +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionInExpressionStatement2.ts === +//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] //// + +=== arrowFunctionInExpressionStatement2.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt index cdc67fc09af72..0e16fb1f4656d 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts(2,15): error TS1109: Expression expected. +arrowFunctionMissingCurlyWithSemicolon.ts(2,15): error TS1109: Expression expected. -==== tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts (1 errors) ==== +==== arrowFunctionMissingCurlyWithSemicolon.ts (1 errors) ==== // Should error at semicolon. var f = () => ; ~ diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js index a828e1248c5f8..ea026b5bb5bc7 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts] //// + //// [arrowFunctionMissingCurlyWithSemicolon.ts] // Should error at semicolon. var f = () => ; diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.symbols b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.symbols index af4ae1b59767f..4b2b855a7f446 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.symbols +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts === +//// [tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts] //// + +=== arrowFunctionMissingCurlyWithSemicolon.ts === // Should error at semicolon. var f = () => ; >f : Symbol(f, Decl(arrowFunctionMissingCurlyWithSemicolon.ts, 1, 3)) diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.types b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.types index 90dc0011b79c1..bf30d2d0715e0 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.types +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts === +//// [tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts] //// + +=== arrowFunctionMissingCurlyWithSemicolon.ts === // Should error at semicolon. var f = () => ; >f : () => any diff --git a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js index fbd013629a6ac..abf6e9e184d24 100644 --- a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js +++ b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts] //// + //// [arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts] // regression test for https://github.com/microsoft/TypeScript/issues/32914 declare var value: boolean; diff --git a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.symbols b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.symbols index bd50c7118ae1a..69770b7310084 100644 --- a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.symbols +++ b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts === +//// [tests/cases/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts] //// + +=== arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts === // regression test for https://github.com/microsoft/TypeScript/issues/32914 declare var value: boolean; >value : Symbol(value, Decl(arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts, 1, 11)) diff --git a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types index 22f3dea71faa8..d7d903caab7f6 100644 --- a/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types +++ b/tests/baselines/reference/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts === +//// [tests/cases/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts] //// + +=== arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.ts === // regression test for https://github.com/microsoft/TypeScript/issues/32914 declare var value: boolean; >value : boolean diff --git a/tests/baselines/reference/arrowFunctionParsingGenericInObject.js b/tests/baselines/reference/arrowFunctionParsingGenericInObject.js index 9c8d515d860a4..eb8a95546feec 100644 --- a/tests/baselines/reference/arrowFunctionParsingGenericInObject.js +++ b/tests/baselines/reference/arrowFunctionParsingGenericInObject.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionParsingGenericInObject.ts] //// + //// [arrowFunctionParsingGenericInObject.ts] const fn1 = () => ({ test: (value: T): T => value, diff --git a/tests/baselines/reference/arrowFunctionParsingGenericInObject.symbols b/tests/baselines/reference/arrowFunctionParsingGenericInObject.symbols index 38df0d50b2893..b84d4e3522b56 100644 --- a/tests/baselines/reference/arrowFunctionParsingGenericInObject.symbols +++ b/tests/baselines/reference/arrowFunctionParsingGenericInObject.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionParsingGenericInObject.ts === +//// [tests/cases/compiler/arrowFunctionParsingGenericInObject.ts] //// + +=== arrowFunctionParsingGenericInObject.ts === const fn1 = () => ({ >fn1 : Symbol(fn1, Decl(arrowFunctionParsingGenericInObject.ts, 0, 5)) diff --git a/tests/baselines/reference/arrowFunctionParsingGenericInObject.types b/tests/baselines/reference/arrowFunctionParsingGenericInObject.types index e8017bbf69e1f..e9f538ba626af 100644 --- a/tests/baselines/reference/arrowFunctionParsingGenericInObject.types +++ b/tests/baselines/reference/arrowFunctionParsingGenericInObject.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionParsingGenericInObject.ts === +//// [tests/cases/compiler/arrowFunctionParsingGenericInObject.ts] //// + +=== arrowFunctionParsingGenericInObject.ts === const fn1 = () => ({ >fn1 : () => { test: (value: T) => T; extraValue: () => void; } >() => ({ test: (value: T): T => value, extraValue: () => {},}) : () => { test: (value: T) => T; extraValue: () => void; } diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js index 85c0b85daeab1..07163e950d79d 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts] //// + //// [arrowFunctionWithObjectLiteralBody1.ts] var v = a => {} diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.symbols index b4f68e045fe54..555232503329b 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts] //// + +=== arrowFunctionWithObjectLiteralBody1.ts === var v = a => {} >v : Symbol(v, Decl(arrowFunctionWithObjectLiteralBody1.ts, 0, 3)) >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody1.ts, 0, 7)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types index 2446c97d4ceaf..2e1ae30954a6b 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts] //// + +=== arrowFunctionWithObjectLiteralBody1.ts === var v = a => {} >v : (a: any) => any >a => {} : (a: any) => any diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js index 5164a98331c1b..a7a6cae46a019 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts] //// + //// [arrowFunctionWithObjectLiteralBody2.ts] var v = a => {} diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.symbols index 1f8b83a23f158..8cc8603ee697b 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts] //// + +=== arrowFunctionWithObjectLiteralBody2.ts === var v = a => {} >v : Symbol(v, Decl(arrowFunctionWithObjectLiteralBody2.ts, 0, 3)) >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody2.ts, 0, 7)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types index df8e87e82ea0a..265bcfc4886c3 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts] //// + +=== arrowFunctionWithObjectLiteralBody2.ts === var v = a => {} >v : (a: any) => any >a => {} : (a: any) => any diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js index 91a699dfc4bc0..77cbeeb1584bc 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts] //// + //// [arrowFunctionWithObjectLiteralBody3.ts] var v = a => {} diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.symbols index 92122d16fc993..8f5a21e908fe0 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts] //// + +=== arrowFunctionWithObjectLiteralBody3.ts === var v = a => {} >v : Symbol(v, Decl(arrowFunctionWithObjectLiteralBody3.ts, 0, 3)) >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody3.ts, 0, 7)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types index 91e11ab910414..ce1fe778bd37a 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts] //// + +=== arrowFunctionWithObjectLiteralBody3.ts === var v = a => {} >v : (a: any) => any >a => {} : (a: any) => any diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js index 83bc0c878ca96..40b2842f3c438 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts] //// + //// [arrowFunctionWithObjectLiteralBody4.ts] var v = a => {} diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.symbols index 74a6b6a2b9d0e..47915dfa96bd6 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts] //// + +=== arrowFunctionWithObjectLiteralBody4.ts === var v = a => {} >v : Symbol(v, Decl(arrowFunctionWithObjectLiteralBody4.ts, 0, 3)) >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody4.ts, 0, 7)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types index 400a91b459d36..692a50a68f0eb 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts] //// + +=== arrowFunctionWithObjectLiteralBody4.ts === var v = a => {} >v : (a: any) => any >a => {} : (a: any) => any diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js index c097ccf0d50e7..4e83d53574428 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts] //// + //// [arrowFunctionWithObjectLiteralBody5.ts] var a = () => { name: "foo", message: "bar" }; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols index 763c04dcbd58a..2749fdd94b0e0 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts] //// + +=== arrowFunctionWithObjectLiteralBody5.ts === var a = () => { name: "foo", message: "bar" }; >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody5.ts, 0, 3)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types index dccfe1724cc4a..225ea096007f7 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts] //// + +=== arrowFunctionWithObjectLiteralBody5.ts === var a = () => { name: "foo", message: "bar" }; >a : () => Error >() => { name: "foo", message: "bar" } : () => Error diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js index 270a9927835a9..8602d38b4645a 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts] //// + //// [arrowFunctionWithObjectLiteralBody6.ts] var a = () => { name: "foo", message: "bar" }; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols index 534f9cc1ea0ff..677fdb66c34b8 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts] //// + +=== arrowFunctionWithObjectLiteralBody6.ts === var a = () => { name: "foo", message: "bar" }; >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 3)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types index fea7c40d2b0a0..327e1820f8be0 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts === +//// [tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts] //// + +=== arrowFunctionWithObjectLiteralBody6.ts === var a = () => { name: "foo", message: "bar" }; >a : () => Error >() => { name: "foo", message: "bar" } : () => Error diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.js index 6e38ade31413a..e767e6f6f169d 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es2017.ts] //// + //// [arrowFunctionWithParameterNameAsync_es2017.ts] const x = async => async; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.symbols b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.symbols index 2a4b1a95b58c3..97a12e1650dc4 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.symbols +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es2017.ts] //// + +=== arrowFunctionWithParameterNameAsync_es2017.ts === const x = async => async; >x : Symbol(x, Decl(arrowFunctionWithParameterNameAsync_es2017.ts, 0, 5)) >async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync_es2017.ts, 0, 9)) diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.types b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.types index 5e9d0d089f242..fa17af26a685f 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.types +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es2017.ts] //// + +=== arrowFunctionWithParameterNameAsync_es2017.ts === const x = async => async; >x : (async: any) => any >async => async : (async: any) => any diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.js index 324121a1efb42..ceccea14ba50a 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es5.ts] //// + //// [arrowFunctionWithParameterNameAsync_es5.ts] const x = async => async; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.symbols b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.symbols index 47a150ca02d42..db4e2f9be973e 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.symbols +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es5.ts] //// + +=== arrowFunctionWithParameterNameAsync_es5.ts === const x = async => async; >x : Symbol(x, Decl(arrowFunctionWithParameterNameAsync_es5.ts, 0, 5)) >async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync_es5.ts, 0, 9)) diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.types b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.types index af963d2be0497..77eab0ab2fb36 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.types +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es5.ts] //// + +=== arrowFunctionWithParameterNameAsync_es5.ts === const x = async => async; >x : (async: any) => any >async => async : (async: any) => any diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.js b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.js index a3b69bcab67cf..8a19c99f8be03 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.js +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts] //// + //// [arrowFunctionWithParameterNameAsync_es6.ts] const x = async => async; diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.symbols b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.symbols index 102ea23fc39a1..aff006029f768 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.symbols +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts] //// + +=== arrowFunctionWithParameterNameAsync_es6.ts === const x = async => async; >x : Symbol(x, Decl(arrowFunctionWithParameterNameAsync_es6.ts, 0, 5)) >async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.types b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.types index 8502a206f4ae9..95131ec227448 100644 --- a/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.types +++ b/tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts] //// + +=== arrowFunctionWithParameterNameAsync_es6.ts === const x = async => async; >x : (async: any) => any >async => async : (async: any) => any diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt b/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt index 988a98c32809c..925b762414f79 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt @@ -1,30 +1,30 @@ -tests/cases/compiler/arrowFunctionsMissingTokens.ts(2,16): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(4,22): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(6,17): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(8,36): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(10,42): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(15,23): error TS1005: '{' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(17,29): error TS1005: '{' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(19,24): error TS1005: '{' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(21,43): error TS1005: '{' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(23,49): error TS1005: '{' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(25,23): error TS1005: '{' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(29,23): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(31,29): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(33,24): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(35,43): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(37,49): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(39,23): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(40,5): error TS1128: Declaration or statement expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(41,1): error TS1128: Declaration or statement expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(44,14): error TS1109: Expression expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(46,21): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(48,14): error TS2304: Cannot find name 'x'. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(50,35): error TS1005: '=>' expected. -tests/cases/compiler/arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(2,16): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(4,22): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(6,17): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(8,36): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(10,42): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(15,23): error TS1005: '{' expected. +arrowFunctionsMissingTokens.ts(17,29): error TS1005: '{' expected. +arrowFunctionsMissingTokens.ts(19,24): error TS1005: '{' expected. +arrowFunctionsMissingTokens.ts(21,43): error TS1005: '{' expected. +arrowFunctionsMissingTokens.ts(23,49): error TS1005: '{' expected. +arrowFunctionsMissingTokens.ts(25,23): error TS1005: '{' expected. +arrowFunctionsMissingTokens.ts(29,23): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(31,29): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(33,24): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(35,43): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(37,49): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(39,23): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(40,5): error TS1128: Declaration or statement expected. +arrowFunctionsMissingTokens.ts(41,1): error TS1128: Declaration or statement expected. +arrowFunctionsMissingTokens.ts(44,14): error TS1109: Expression expected. +arrowFunctionsMissingTokens.ts(46,21): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(48,14): error TS2304: Cannot find name 'x'. +arrowFunctionsMissingTokens.ts(50,35): error TS1005: '=>' expected. +arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. -==== tests/cases/compiler/arrowFunctionsMissingTokens.ts (24 errors) ==== +==== arrowFunctionsMissingTokens.ts (24 errors) ==== module missingArrowsWithCurly { var a = () { }; ~ diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.js b/tests/baselines/reference/arrowFunctionsMissingTokens.js index d0a8bde2a5365..e423794058bca 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.js +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] //// + //// [arrowFunctionsMissingTokens.ts] module missingArrowsWithCurly { var a = () { }; diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.symbols b/tests/baselines/reference/arrowFunctionsMissingTokens.symbols index 31d91f71960e0..fb67a28d3594a 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.symbols +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionsMissingTokens.ts === +//// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] //// + +=== arrowFunctionsMissingTokens.ts === module missingArrowsWithCurly { >missingArrowsWithCurly : Symbol(missingArrowsWithCurly, Decl(arrowFunctionsMissingTokens.ts, 0, 0)) diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.types b/tests/baselines/reference/arrowFunctionsMissingTokens.types index ab067bb1415ab..a36e955340c92 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.types +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/arrowFunctionsMissingTokens.ts === +//// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] //// + +=== arrowFunctionsMissingTokens.ts === module missingArrowsWithCurly { >missingArrowsWithCurly : typeof missingArrowsWithCurly diff --git a/tests/baselines/reference/asOpEmitParens.js b/tests/baselines/reference/asOpEmitParens.js index dee8d263eaef2..1096a2a24762d 100644 --- a/tests/baselines/reference/asOpEmitParens.js +++ b/tests/baselines/reference/asOpEmitParens.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts] //// + //// [asOpEmitParens.ts] declare var x; // Must emit as (x + 1) * 3 diff --git a/tests/baselines/reference/asOpEmitParens.symbols b/tests/baselines/reference/asOpEmitParens.symbols index 210d9f3ea0dc2..b5ba68220b778 100644 --- a/tests/baselines/reference/asOpEmitParens.symbols +++ b/tests/baselines/reference/asOpEmitParens.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts === +//// [tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts] //// + +=== asOpEmitParens.ts === declare var x; >x : Symbol(x, Decl(asOpEmitParens.ts, 0, 11)) diff --git a/tests/baselines/reference/asOpEmitParens.types b/tests/baselines/reference/asOpEmitParens.types index 3204a6e5cac5b..2d13e3cab2fe7 100644 --- a/tests/baselines/reference/asOpEmitParens.types +++ b/tests/baselines/reference/asOpEmitParens.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts === +//// [tests/cases/conformance/expressions/asOperator/asOpEmitParens.ts] //// + +=== asOpEmitParens.ts === declare var x; >x : any diff --git a/tests/baselines/reference/asOperator1.js b/tests/baselines/reference/asOperator1.js index 1b23d0a86f7c9..a90f36fcd9fd9 100644 --- a/tests/baselines/reference/asOperator1.js +++ b/tests/baselines/reference/asOperator1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// + //// [asOperator1.ts] var as = 43; var x = undefined as number; diff --git a/tests/baselines/reference/asOperator1.symbols b/tests/baselines/reference/asOperator1.symbols index 395dfba5fc4e6..6323cdefdef0a 100644 --- a/tests/baselines/reference/asOperator1.symbols +++ b/tests/baselines/reference/asOperator1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperator1.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// + +=== asOperator1.ts === var as = 43; >as : Symbol(as, Decl(asOperator1.ts, 0, 3)) diff --git a/tests/baselines/reference/asOperator1.types b/tests/baselines/reference/asOperator1.types index 625229beb10ab..b77a8dfbb6112 100644 --- a/tests/baselines/reference/asOperator1.types +++ b/tests/baselines/reference/asOperator1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperator1.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// + +=== asOperator1.ts === var as = 43; >as : number >43 : 43 diff --git a/tests/baselines/reference/asOperator2.errors.txt b/tests/baselines/reference/asOperator2.errors.txt index 711c320ff7a1b..7bb4d3226514a 100644 --- a/tests/baselines/reference/asOperator2.errors.txt +++ b/tests/baselines/reference/asOperator2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/expressions/asOperator/asOperator2.ts(1,9): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +asOperator2.ts(1,9): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -==== tests/cases/conformance/expressions/asOperator/asOperator2.ts (1 errors) ==== +==== asOperator2.ts (1 errors) ==== var x = 23 as string; ~~~~~~~~~~~~ !!! error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. diff --git a/tests/baselines/reference/asOperator2.js b/tests/baselines/reference/asOperator2.js index 32962555d5107..cbb984e148613 100644 --- a/tests/baselines/reference/asOperator2.js +++ b/tests/baselines/reference/asOperator2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperator2.ts] //// + //// [asOperator2.ts] var x = 23 as string; diff --git a/tests/baselines/reference/asOperator2.symbols b/tests/baselines/reference/asOperator2.symbols index 52ddf48e2e7a4..1c2cf931f8278 100644 --- a/tests/baselines/reference/asOperator2.symbols +++ b/tests/baselines/reference/asOperator2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperator2.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator2.ts] //// + +=== asOperator2.ts === var x = 23 as string; >x : Symbol(x, Decl(asOperator2.ts, 0, 3)) diff --git a/tests/baselines/reference/asOperator2.types b/tests/baselines/reference/asOperator2.types index 108b97a1d85f4..571771a42cf03 100644 --- a/tests/baselines/reference/asOperator2.types +++ b/tests/baselines/reference/asOperator2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperator2.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator2.ts] //// + +=== asOperator2.ts === var x = 23 as string; >x : string >23 as string : string diff --git a/tests/baselines/reference/asOperator3.js b/tests/baselines/reference/asOperator3.js index 9027237af1db2..9eac43c07e479 100644 --- a/tests/baselines/reference/asOperator3.js +++ b/tests/baselines/reference/asOperator3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperator3.ts] //// + //// [asOperator3.ts] declare function tag(...x: any[]): any; diff --git a/tests/baselines/reference/asOperator3.symbols b/tests/baselines/reference/asOperator3.symbols index d29a64d3c3a51..5b93af6b7eebe 100644 --- a/tests/baselines/reference/asOperator3.symbols +++ b/tests/baselines/reference/asOperator3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperator3.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator3.ts] //// + +=== asOperator3.ts === declare function tag(...x: any[]): any; >tag : Symbol(tag, Decl(asOperator3.ts, 0, 0)) >x : Symbol(x, Decl(asOperator3.ts, 0, 21)) diff --git a/tests/baselines/reference/asOperator3.types b/tests/baselines/reference/asOperator3.types index e5e319d3caf3a..6be6833c3ec82 100644 --- a/tests/baselines/reference/asOperator3.types +++ b/tests/baselines/reference/asOperator3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperator3.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator3.ts] //// + +=== asOperator3.ts === declare function tag(...x: any[]): any; >tag : (...x: any[]) => any >x : any[] @@ -30,7 +32,7 @@ var c = `${123 + 456 as number} trailing`; var d = `Hello ${123} World` as string; >d : string >`Hello ${123} World` as string : string ->`Hello ${123} World` : string +>`Hello ${123} World` : "Hello 123 World" >123 : 123 var e = `Hello` as string; @@ -43,7 +45,7 @@ var f = 1 + `${1} end of string` as string; >1 + `${1} end of string` as string : string >1 + `${1} end of string` : string >1 : 1 ->`${1} end of string` : string +>`${1} end of string` : "1 end of string" >1 : 1 var g = tag `Hello ${123} World` as string; diff --git a/tests/baselines/reference/asOperator4.symbols b/tests/baselines/reference/asOperator4.symbols index 276c0706069cd..5e0bb000f4bba 100644 --- a/tests/baselines/reference/asOperator4.symbols +++ b/tests/baselines/reference/asOperator4.symbols @@ -1,8 +1,10 @@ -=== tests/cases/conformance/expressions/asOperator/foo.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator4.ts] //// + +=== foo.ts === export function foo() { } >foo : Symbol(foo, Decl(foo.ts, 0, 0)) -=== tests/cases/conformance/expressions/asOperator/bar.ts === +=== bar.ts === import { foo } from './foo'; >foo : Symbol(foo, Decl(bar.ts, 0, 8)) diff --git a/tests/baselines/reference/asOperator4.types b/tests/baselines/reference/asOperator4.types index c60cfc19e3299..f5df546b15f0b 100644 --- a/tests/baselines/reference/asOperator4.types +++ b/tests/baselines/reference/asOperator4.types @@ -1,8 +1,10 @@ -=== tests/cases/conformance/expressions/asOperator/foo.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperator4.ts] //// + +=== foo.ts === export function foo() { } >foo : () => void -=== tests/cases/conformance/expressions/asOperator/bar.ts === +=== bar.ts === import { foo } from './foo'; >foo : () => void diff --git a/tests/baselines/reference/asOperatorASI.js b/tests/baselines/reference/asOperatorASI.js index 4a78b022c4fe7..1de18b75954e1 100644 --- a/tests/baselines/reference/asOperatorASI.js +++ b/tests/baselines/reference/asOperatorASI.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperatorASI.ts] //// + //// [asOperatorASI.ts] class Foo { } declare function as(...args: any[]); diff --git a/tests/baselines/reference/asOperatorASI.symbols b/tests/baselines/reference/asOperatorASI.symbols index 7def6d460c15c..7b3ddde2d077b 100644 --- a/tests/baselines/reference/asOperatorASI.symbols +++ b/tests/baselines/reference/asOperatorASI.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorASI.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorASI.ts] //// + +=== asOperatorASI.ts === class Foo { } >Foo : Symbol(Foo, Decl(asOperatorASI.ts, 0, 0)) diff --git a/tests/baselines/reference/asOperatorASI.types b/tests/baselines/reference/asOperatorASI.types index 985806bf040e2..b4f7c01d8d096 100644 --- a/tests/baselines/reference/asOperatorASI.types +++ b/tests/baselines/reference/asOperatorASI.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorASI.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorASI.ts] //// + +=== asOperatorASI.ts === class Foo { } >Foo : Foo diff --git a/tests/baselines/reference/asOperatorAmbiguity.errors.txt b/tests/baselines/reference/asOperatorAmbiguity.errors.txt index cb7c6d4132c18..72d616f8e6ead 100644 --- a/tests/baselines/reference/asOperatorAmbiguity.errors.txt +++ b/tests/baselines/reference/asOperatorAmbiguity.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts(7,14): error TS2339: Property 'm' does not exist on type 'A'. +asOperatorAmbiguity.ts(7,14): error TS2339: Property 'm' does not exist on type 'A'. -==== tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts (1 errors) ==== +==== asOperatorAmbiguity.ts (1 errors) ==== interface A { x: T; } interface B { m: string; } diff --git a/tests/baselines/reference/asOperatorAmbiguity.js b/tests/baselines/reference/asOperatorAmbiguity.js index 6c336970b65fe..e10fb695a5b9e 100644 --- a/tests/baselines/reference/asOperatorAmbiguity.js +++ b/tests/baselines/reference/asOperatorAmbiguity.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts] //// + //// [asOperatorAmbiguity.ts] interface A { x: T; } interface B { m: string; } diff --git a/tests/baselines/reference/asOperatorAmbiguity.symbols b/tests/baselines/reference/asOperatorAmbiguity.symbols index d191f110b3b5b..895ad9d6b86c7 100644 --- a/tests/baselines/reference/asOperatorAmbiguity.symbols +++ b/tests/baselines/reference/asOperatorAmbiguity.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts] //// + +=== asOperatorAmbiguity.ts === interface A { x: T; } >A : Symbol(A, Decl(asOperatorAmbiguity.ts, 0, 0)) >T : Symbol(T, Decl(asOperatorAmbiguity.ts, 0, 12)) diff --git a/tests/baselines/reference/asOperatorAmbiguity.types b/tests/baselines/reference/asOperatorAmbiguity.types index 09677db7d015d..e33c1e43a8f38 100644 --- a/tests/baselines/reference/asOperatorAmbiguity.types +++ b/tests/baselines/reference/asOperatorAmbiguity.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorAmbiguity.ts] //// + +=== asOperatorAmbiguity.ts === interface A { x: T; } >x : T diff --git a/tests/baselines/reference/asOperatorContextualType.errors.txt b/tests/baselines/reference/asOperatorContextualType.errors.txt index 77ebe06fbf921..31b7b8304d46c 100644 --- a/tests/baselines/reference/asOperatorContextualType.errors.txt +++ b/tests/baselines/reference/asOperatorContextualType.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts(2,9): error TS2352: Conversion of type '(v: number) => number' to type '(x: number) => string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +asOperatorContextualType.ts(2,9): error TS2352: Conversion of type '(v: number) => number' to type '(x: number) => string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type 'number' is not comparable to type 'string'. -==== tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts (1 errors) ==== +==== asOperatorContextualType.ts (1 errors) ==== // should error var x = (v => v) as (x: number) => string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/asOperatorContextualType.js b/tests/baselines/reference/asOperatorContextualType.js index 7b495ada8f403..0d55b4dbd3fb6 100644 --- a/tests/baselines/reference/asOperatorContextualType.js +++ b/tests/baselines/reference/asOperatorContextualType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts] //// + //// [asOperatorContextualType.ts] // should error var x = (v => v) as (x: number) => string; diff --git a/tests/baselines/reference/asOperatorContextualType.symbols b/tests/baselines/reference/asOperatorContextualType.symbols index b32284b53931a..076203d44179b 100644 --- a/tests/baselines/reference/asOperatorContextualType.symbols +++ b/tests/baselines/reference/asOperatorContextualType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts] //// + +=== asOperatorContextualType.ts === // should error var x = (v => v) as (x: number) => string; >x : Symbol(x, Decl(asOperatorContextualType.ts, 1, 3)) diff --git a/tests/baselines/reference/asOperatorContextualType.types b/tests/baselines/reference/asOperatorContextualType.types index b318dd4878b6d..1d47ba4dad0d0 100644 --- a/tests/baselines/reference/asOperatorContextualType.types +++ b/tests/baselines/reference/asOperatorContextualType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorContextualType.ts] //// + +=== asOperatorContextualType.ts === // should error var x = (v => v) as (x: number) => string; >x : (x: number) => string diff --git a/tests/baselines/reference/asOperatorNames.errors.txt b/tests/baselines/reference/asOperatorNames.errors.txt index c634a4a78873f..12469811e7f9b 100644 --- a/tests/baselines/reference/asOperatorNames.errors.txt +++ b/tests/baselines/reference/asOperatorNames.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/expressions/asOperator/asOperatorNames.ts(2,9): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +asOperatorNames.ts(2,9): error TS2352: Conversion of type 'number' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -==== tests/cases/conformance/expressions/asOperator/asOperatorNames.ts (1 errors) ==== +==== asOperatorNames.ts (1 errors) ==== var a = 20; var b = a as string; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/asOperatorNames.js b/tests/baselines/reference/asOperatorNames.js index 35e80d080e334..bf1d0f3c72653 100644 --- a/tests/baselines/reference/asOperatorNames.js +++ b/tests/baselines/reference/asOperatorNames.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperatorNames.ts] //// + //// [asOperatorNames.ts] var a = 20; var b = a as string; diff --git a/tests/baselines/reference/asOperatorNames.symbols b/tests/baselines/reference/asOperatorNames.symbols index eda84b98c24a8..393c8e49ccb9e 100644 --- a/tests/baselines/reference/asOperatorNames.symbols +++ b/tests/baselines/reference/asOperatorNames.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorNames.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorNames.ts] //// + +=== asOperatorNames.ts === var a = 20; >a : Symbol(a, Decl(asOperatorNames.ts, 0, 3)) diff --git a/tests/baselines/reference/asOperatorNames.types b/tests/baselines/reference/asOperatorNames.types index 0caa81d1f8dac..6517b9f46beb5 100644 --- a/tests/baselines/reference/asOperatorNames.types +++ b/tests/baselines/reference/asOperatorNames.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/asOperator/asOperatorNames.ts === +//// [tests/cases/conformance/expressions/asOperator/asOperatorNames.ts] //// + +=== asOperatorNames.ts === var a = 20; >a : number >20 : 20 diff --git a/tests/baselines/reference/asiAbstract.errors.txt b/tests/baselines/reference/asiAbstract.errors.txt index 3cc8999a2f205..c3e6dbb1ef7c2 100644 --- a/tests/baselines/reference/asiAbstract.errors.txt +++ b/tests/baselines/reference/asiAbstract.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/asiAbstract.ts(1,1): error TS2304: Cannot find name 'abstract'. -tests/cases/compiler/asiAbstract.ts(3,3): error TS1244: Abstract methods can only appear within an abstract class. +asiAbstract.ts(1,1): error TS2304: Cannot find name 'abstract'. +asiAbstract.ts(3,3): error TS1244: Abstract methods can only appear within an abstract class. -==== tests/cases/compiler/asiAbstract.ts (2 errors) ==== +==== asiAbstract.ts (2 errors) ==== abstract ~~~~~~~~ !!! error TS2304: Cannot find name 'abstract'. diff --git a/tests/baselines/reference/asiAbstract.js b/tests/baselines/reference/asiAbstract.js index 27ae841ac4294..55a6f8b175b44 100644 --- a/tests/baselines/reference/asiAbstract.js +++ b/tests/baselines/reference/asiAbstract.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiAbstract.ts] //// + //// [asiAbstract.ts] abstract class NonAbstractClass { diff --git a/tests/baselines/reference/asiAbstract.symbols b/tests/baselines/reference/asiAbstract.symbols index d7781af6495c7..6c681aca53b09 100644 --- a/tests/baselines/reference/asiAbstract.symbols +++ b/tests/baselines/reference/asiAbstract.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiAbstract.ts === +//// [tests/cases/compiler/asiAbstract.ts] //// + +=== asiAbstract.ts === abstract class NonAbstractClass { >NonAbstractClass : Symbol(NonAbstractClass, Decl(asiAbstract.ts, 0, 8)) diff --git a/tests/baselines/reference/asiAbstract.types b/tests/baselines/reference/asiAbstract.types index d1ac88d5373bc..a2160ec1fc428 100644 --- a/tests/baselines/reference/asiAbstract.types +++ b/tests/baselines/reference/asiAbstract.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiAbstract.ts === +//// [tests/cases/compiler/asiAbstract.ts] //// + +=== asiAbstract.ts === abstract >abstract : any diff --git a/tests/baselines/reference/asiAmbientFunctionDeclaration.js b/tests/baselines/reference/asiAmbientFunctionDeclaration.js index 30b7e76056a78..fd36df59caa97 100644 --- a/tests/baselines/reference/asiAmbientFunctionDeclaration.js +++ b/tests/baselines/reference/asiAmbientFunctionDeclaration.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiAmbientFunctionDeclaration.ts] //// + //// [asiAmbientFunctionDeclaration.ts] declare function foo() diff --git a/tests/baselines/reference/asiAmbientFunctionDeclaration.symbols b/tests/baselines/reference/asiAmbientFunctionDeclaration.symbols index d32b9a6761949..fc8b8eda85e7a 100644 --- a/tests/baselines/reference/asiAmbientFunctionDeclaration.symbols +++ b/tests/baselines/reference/asiAmbientFunctionDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiAmbientFunctionDeclaration.ts === +//// [tests/cases/compiler/asiAmbientFunctionDeclaration.ts] //// + +=== asiAmbientFunctionDeclaration.ts === declare function foo() >foo : Symbol(foo, Decl(asiAmbientFunctionDeclaration.ts, 0, 0)) diff --git a/tests/baselines/reference/asiAmbientFunctionDeclaration.types b/tests/baselines/reference/asiAmbientFunctionDeclaration.types index 40ad7f2ba94eb..08acb434eb049 100644 --- a/tests/baselines/reference/asiAmbientFunctionDeclaration.types +++ b/tests/baselines/reference/asiAmbientFunctionDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiAmbientFunctionDeclaration.ts === +//// [tests/cases/compiler/asiAmbientFunctionDeclaration.ts] //// + +=== asiAmbientFunctionDeclaration.ts === declare function foo() >foo : () => any diff --git a/tests/baselines/reference/asiArith.js b/tests/baselines/reference/asiArith.js index d552fd5ee77c4..441f09c9f62b7 100644 --- a/tests/baselines/reference/asiArith.js +++ b/tests/baselines/reference/asiArith.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiArith.ts] //// + //// [asiArith.ts] var x = 1; diff --git a/tests/baselines/reference/asiArith.symbols b/tests/baselines/reference/asiArith.symbols index 40b15d0723e2d..a4fcdb6d88c9d 100644 --- a/tests/baselines/reference/asiArith.symbols +++ b/tests/baselines/reference/asiArith.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiArith.ts === +//// [tests/cases/compiler/asiArith.ts] //// + +=== asiArith.ts === var x = 1; >x : Symbol(x, Decl(asiArith.ts, 0, 3)) diff --git a/tests/baselines/reference/asiArith.types b/tests/baselines/reference/asiArith.types index b2c7410a403d9..b508d237120ab 100644 --- a/tests/baselines/reference/asiArith.types +++ b/tests/baselines/reference/asiArith.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiArith.ts === +//// [tests/cases/compiler/asiArith.ts] //// + +=== asiArith.ts === var x = 1; >x : number >1 : 1 diff --git a/tests/baselines/reference/asiBreak.js b/tests/baselines/reference/asiBreak.js index cd890f74de779..ff6296f0b78c9 100644 --- a/tests/baselines/reference/asiBreak.js +++ b/tests/baselines/reference/asiBreak.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiBreak.ts] //// + //// [asiBreak.ts] while (true) break diff --git a/tests/baselines/reference/asiBreak.symbols b/tests/baselines/reference/asiBreak.symbols index bad37b8f92c11..ca04f878fd0d5 100644 --- a/tests/baselines/reference/asiBreak.symbols +++ b/tests/baselines/reference/asiBreak.symbols @@ -1,3 +1,5 @@ -=== tests/cases/compiler/asiBreak.ts === +//// [tests/cases/compiler/asiBreak.ts] //// + +=== asiBreak.ts === while (true) break diff --git a/tests/baselines/reference/asiBreak.types b/tests/baselines/reference/asiBreak.types index 7e7a8efb71f1d..6d90df2bc6529 100644 --- a/tests/baselines/reference/asiBreak.types +++ b/tests/baselines/reference/asiBreak.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiBreak.ts === +//// [tests/cases/compiler/asiBreak.ts] //// + +=== asiBreak.ts === while (true) break >true : true diff --git a/tests/baselines/reference/asiContinue.js b/tests/baselines/reference/asiContinue.js index b2b9bc751cca1..2937e6819b29b 100644 --- a/tests/baselines/reference/asiContinue.js +++ b/tests/baselines/reference/asiContinue.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiContinue.ts] //// + //// [asiContinue.ts] while (true) continue diff --git a/tests/baselines/reference/asiContinue.symbols b/tests/baselines/reference/asiContinue.symbols index 421e593f00e18..86b872ca6fddf 100644 --- a/tests/baselines/reference/asiContinue.symbols +++ b/tests/baselines/reference/asiContinue.symbols @@ -1,3 +1,5 @@ -=== tests/cases/compiler/asiContinue.ts === +//// [tests/cases/compiler/asiContinue.ts] //// + +=== asiContinue.ts === while (true) continue diff --git a/tests/baselines/reference/asiContinue.types b/tests/baselines/reference/asiContinue.types index 0de6786fee13d..9a8739b00c643 100644 --- a/tests/baselines/reference/asiContinue.types +++ b/tests/baselines/reference/asiContinue.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiContinue.ts === +//// [tests/cases/compiler/asiContinue.ts] //// + +=== asiContinue.ts === while (true) continue >true : true diff --git a/tests/baselines/reference/asiInES6Classes.js b/tests/baselines/reference/asiInES6Classes.js index 375f0e4bc65da..c0a9938449112 100644 --- a/tests/baselines/reference/asiInES6Classes.js +++ b/tests/baselines/reference/asiInES6Classes.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiInES6Classes.ts] //// + //// [asiInES6Classes.ts] class Foo { diff --git a/tests/baselines/reference/asiInES6Classes.symbols b/tests/baselines/reference/asiInES6Classes.symbols index e4b89c19bf0cd..7a06176173c82 100644 --- a/tests/baselines/reference/asiInES6Classes.symbols +++ b/tests/baselines/reference/asiInES6Classes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiInES6Classes.ts === +//// [tests/cases/compiler/asiInES6Classes.ts] //// + +=== asiInES6Classes.ts === class Foo { >Foo : Symbol(Foo, Decl(asiInES6Classes.ts, 0, 0)) diff --git a/tests/baselines/reference/asiInES6Classes.types b/tests/baselines/reference/asiInES6Classes.types index 6a93269497c55..8e59dbe14012c 100644 --- a/tests/baselines/reference/asiInES6Classes.types +++ b/tests/baselines/reference/asiInES6Classes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiInES6Classes.ts === +//// [tests/cases/compiler/asiInES6Classes.ts] //// + +=== asiInES6Classes.ts === class Foo { >Foo : Foo diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js index 40ec54d0ac51c..b78dfc31eebc5 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts] //// + //// [asiPreventsParsingAsAmbientExternalModule01.ts] var declare: number; var module: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols index 87e75ef0d0010..7e5c9b6883842 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts === +//// [tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts] //// + +=== asiPreventsParsingAsAmbientExternalModule01.ts === var declare: number; >declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types index 1b690aee048f7..75e39c89e96b1 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts === +//// [tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts] //// + +=== asiPreventsParsingAsAmbientExternalModule01.ts === var declare: number; >declare : number diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js index 74cd41de62237..c42db2164fb43 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts] //// + //// [asiPreventsParsingAsAmbientExternalModule02.ts] var declare: number; var module: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols index ecc5728b32f8c..2c27bd59b915b 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts === +//// [tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts] //// + +=== asiPreventsParsingAsAmbientExternalModule02.ts === var declare: number; >declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types index d4c769fa50a7d..87031fcf18e6a 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts === +//// [tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts] //// + +=== asiPreventsParsingAsAmbientExternalModule02.ts === var declare: number; >declare : number diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface01.js b/tests/baselines/reference/asiPreventsParsingAsInterface01.js index 4d0215454b6c4..49e75fd95b106 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface01.js +++ b/tests/baselines/reference/asiPreventsParsingAsInterface01.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts] //// + //// [asiPreventsParsingAsInterface01.ts] var interface: number, I: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface01.symbols b/tests/baselines/reference/asiPreventsParsingAsInterface01.symbols index b353c406cc6b6..a9f06151b2205 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsInterface01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts] //// + +=== asiPreventsParsingAsInterface01.ts === var interface: number, I: string; >interface : Symbol(interface, Decl(asiPreventsParsingAsInterface01.ts, 0, 3)) >I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 0, 22)) diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface01.types b/tests/baselines/reference/asiPreventsParsingAsInterface01.types index 101b2c8f96b50..d9559eb24c3f6 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface01.types +++ b/tests/baselines/reference/asiPreventsParsingAsInterface01.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts] //// + +=== asiPreventsParsingAsInterface01.ts === var interface: number, I: string; >interface : number >I : string diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface02.js b/tests/baselines/reference/asiPreventsParsingAsInterface02.js index d38cc228d2e57..f2e14e01c0f7d 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface02.js +++ b/tests/baselines/reference/asiPreventsParsingAsInterface02.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts] //// + //// [asiPreventsParsingAsInterface02.ts] function f(interface: number, I: string) { interface // This should be the identifier 'interface' diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface02.symbols b/tests/baselines/reference/asiPreventsParsingAsInterface02.symbols index ea22e5f24b3ef..d0b0ff35ec4c7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface02.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsInterface02.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts] //// + +=== asiPreventsParsingAsInterface02.ts === function f(interface: number, I: string) { >f : Symbol(f, Decl(asiPreventsParsingAsInterface02.ts, 0, 0)) >interface : Symbol(interface, Decl(asiPreventsParsingAsInterface02.ts, 0, 11)) diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface02.types b/tests/baselines/reference/asiPreventsParsingAsInterface02.types index 5477fd1c0719f..6b8fad14ed165 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface02.types +++ b/tests/baselines/reference/asiPreventsParsingAsInterface02.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts] //// + +=== asiPreventsParsingAsInterface02.ts === function f(interface: number, I: string) { >f : (interface: number, I: string) => void >interface : number diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface03.js b/tests/baselines/reference/asiPreventsParsingAsInterface03.js index b35c94de5b2e9..62650298ac91d 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface03.js +++ b/tests/baselines/reference/asiPreventsParsingAsInterface03.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts] //// + //// [asiPreventsParsingAsInterface03.ts] var interface: number, I: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface03.symbols b/tests/baselines/reference/asiPreventsParsingAsInterface03.symbols index 25d220dec6a7c..b899cb6861be5 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface03.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsInterface03.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts] //// + +=== asiPreventsParsingAsInterface03.ts === var interface: number, I: string; >interface : Symbol(interface, Decl(asiPreventsParsingAsInterface03.ts, 0, 3)) >I : Symbol(I, Decl(asiPreventsParsingAsInterface03.ts, 0, 22)) diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface03.types b/tests/baselines/reference/asiPreventsParsingAsInterface03.types index 23c90ad8cce22..215c2d61028d5 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface03.types +++ b/tests/baselines/reference/asiPreventsParsingAsInterface03.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts] //// + +=== asiPreventsParsingAsInterface03.ts === var interface: number, I: string; >interface : number >I : string diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface04.js b/tests/baselines/reference/asiPreventsParsingAsInterface04.js index 1c39f09d59694..248e9f0196769 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface04.js +++ b/tests/baselines/reference/asiPreventsParsingAsInterface04.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts] //// + //// [asiPreventsParsingAsInterface04.ts] var declare: boolean, interface: number, I: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface04.symbols b/tests/baselines/reference/asiPreventsParsingAsInterface04.symbols index e7e91ffd3c534..597761e3295d6 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface04.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsInterface04.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts] //// + +=== asiPreventsParsingAsInterface04.ts === var declare: boolean, interface: number, I: string; >declare : Symbol(declare, Decl(asiPreventsParsingAsInterface04.ts, 0, 3)) >interface : Symbol(interface, Decl(asiPreventsParsingAsInterface04.ts, 0, 21)) diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface04.types b/tests/baselines/reference/asiPreventsParsingAsInterface04.types index d616eccf6e01d..e79e21a1f7fcb 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface04.types +++ b/tests/baselines/reference/asiPreventsParsingAsInterface04.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts] //// + +=== asiPreventsParsingAsInterface04.ts === var declare: boolean, interface: number, I: string; >declare : boolean >interface : number diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt b/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt index 71f272b4268a7..61d669aec1ff6 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. -tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. -tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'. +asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. +asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. +asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'. -==== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts (3 errors) ==== +==== asiPreventsParsingAsInterface05.ts (3 errors) ==== "use strict" var interface: number; diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.js b/tests/baselines/reference/asiPreventsParsingAsInterface05.js index 85c19be4473f6..82aea79bba0b6 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.js +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts] //// + //// [asiPreventsParsingAsInterface05.ts] "use strict" diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols b/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols index 08eddcb1d78db..e3730eef1fae9 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts] //// + +=== asiPreventsParsingAsInterface05.ts === "use strict" var interface: number; diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.types b/tests/baselines/reference/asiPreventsParsingAsInterface05.types index 3cd12ce04b367..5129fd50fb902 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.types +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts === +//// [tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts] //// + +=== asiPreventsParsingAsInterface05.ts === "use strict" >"use strict" : "use strict" diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace01.js b/tests/baselines/reference/asiPreventsParsingAsNamespace01.js index f471b93e3c9a8..d2a31b6db7357 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace01.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace01.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts] //// + //// [asiPreventsParsingAsNamespace01.ts] var namespace: number; var n: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols index 70c53a50611ea..b28a997cff9cd 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts] //// + +=== asiPreventsParsingAsNamespace01.ts === var namespace: number; >namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace01.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace01.types b/tests/baselines/reference/asiPreventsParsingAsNamespace01.types index 5fbee41f3f281..3b1c64c329e0a 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace01.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace01.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts] //// + +=== asiPreventsParsingAsNamespace01.ts === var namespace: number; >namespace : number diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace02.js b/tests/baselines/reference/asiPreventsParsingAsNamespace02.js index c3a09147a9b56..968b0c1834857 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace02.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace02.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts] //// + //// [asiPreventsParsingAsNamespace02.ts] var module: number; var m: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols index 019e54bc41598..273aaf0da27e8 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts] //// + +=== asiPreventsParsingAsNamespace02.ts === var module: number; >module : Symbol(module, Decl(asiPreventsParsingAsNamespace02.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace02.types b/tests/baselines/reference/asiPreventsParsingAsNamespace02.types index efc95969ecc7b..5258ecd6f171a 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace02.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace02.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts] //// + +=== asiPreventsParsingAsNamespace02.ts === var module: number; >module : number diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace03.js b/tests/baselines/reference/asiPreventsParsingAsNamespace03.js index 306ad1baf494d..3c4ad1422266a 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace03.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace03.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts] //// + //// [asiPreventsParsingAsNamespace03.ts] var namespace: number; var n: string; diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols index 8cd929e1986d0..53c20e12ba875 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts] //// + +=== asiPreventsParsingAsNamespace03.ts === var namespace: number; >namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace03.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace03.types b/tests/baselines/reference/asiPreventsParsingAsNamespace03.types index 918383e4cb1c0..7acebd406b749 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace03.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace03.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts] //// + +=== asiPreventsParsingAsNamespace03.ts === var namespace: number; >namespace : number diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.js b/tests/baselines/reference/asiPreventsParsingAsNamespace04.js index b8de05cf86053..027b839404df2 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace04.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace04.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts] //// + //// [asiPreventsParsingAsNamespace04.ts] let module = 10; module in {} diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols index fcacb36dba149..64818185e42f0 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts] //// + +=== asiPreventsParsingAsNamespace04.ts === let module = 10; >module : Symbol(module, Decl(asiPreventsParsingAsNamespace04.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.types b/tests/baselines/reference/asiPreventsParsingAsNamespace04.types index 0492d79e9a58f..b94a986fecc2f 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace04.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace04.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts] //// + +=== asiPreventsParsingAsNamespace04.ts === let module = 10; >module : number >10 : 10 diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace05.js b/tests/baselines/reference/asiPreventsParsingAsNamespace05.js index d7cab5ae28336..0abf89d14d1c7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace05.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace05.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts] //// + //// [asiPreventsParsingAsNamespace05.ts] let namespace = 10; namespace a.b { diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols index 35e69ef56f8fe..adfc0b7816e6f 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts] //// + +=== asiPreventsParsingAsNamespace05.ts === let namespace = 10; >namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace05.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace05.types b/tests/baselines/reference/asiPreventsParsingAsNamespace05.types index 98e94c9dc2794..40a1c2a9af8c8 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace05.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace05.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts === +//// [tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace05.ts] //// + +=== asiPreventsParsingAsNamespace05.ts === let namespace = 10; >namespace : number >10 : 10 diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js index 7a7ec322eead8..555ee106f7093 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts] //// + //// [asiPreventsParsingAsTypeAlias01.ts] var type; var string; diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols index eaf10d109d328..6ecbf7a63e3be 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts === +//// [tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts] //// + +=== asiPreventsParsingAsTypeAlias01.ts === var type; >type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias01.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types index 2c3d1f8091226..c3a2bb6839c87 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts === +//// [tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts] //// + +=== asiPreventsParsingAsTypeAlias01.ts === var type; >type : any diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js index db6215388ffa7..6b86e53716a5d 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts] //// + //// [asiPreventsParsingAsTypeAlias02.ts] var type; var string; diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols index 23761438119d8..005b6bc5f4d05 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts === +//// [tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts] //// + +=== asiPreventsParsingAsTypeAlias02.ts === var type; >type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias02.ts, 0, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types index 62e71637127f4..0101965a586ae 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts === +//// [tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts] //// + +=== asiPreventsParsingAsTypeAlias02.ts === var type; >type : any diff --git a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt index 96d243536fb33..c3653603ddc74 100644 --- a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt +++ b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. -tests/cases/compiler/asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. -tests/cases/compiler/asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. +asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. +asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. +asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. -==== tests/cases/compiler/asiPublicPrivateProtected.ts (3 errors) ==== +==== asiPublicPrivateProtected.ts (3 errors) ==== public ~~~~~~ !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/asiPublicPrivateProtected.js b/tests/baselines/reference/asiPublicPrivateProtected.js index 7c9b9d7eb72e1..4f9ba76fc8e67 100644 --- a/tests/baselines/reference/asiPublicPrivateProtected.js +++ b/tests/baselines/reference/asiPublicPrivateProtected.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + //// [asiPublicPrivateProtected.ts] public class NonPublicClass { diff --git a/tests/baselines/reference/asiPublicPrivateProtected.symbols b/tests/baselines/reference/asiPublicPrivateProtected.symbols index 987849a329a87..546fbb632777f 100644 --- a/tests/baselines/reference/asiPublicPrivateProtected.symbols +++ b/tests/baselines/reference/asiPublicPrivateProtected.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiPublicPrivateProtected.ts === +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +=== asiPublicPrivateProtected.ts === public class NonPublicClass { >NonPublicClass : Symbol(NonPublicClass, Decl(asiPublicPrivateProtected.ts, 0, 6)) diff --git a/tests/baselines/reference/asiPublicPrivateProtected.types b/tests/baselines/reference/asiPublicPrivateProtected.types index c1734d8488d08..98bbc633fcce1 100644 --- a/tests/baselines/reference/asiPublicPrivateProtected.types +++ b/tests/baselines/reference/asiPublicPrivateProtected.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiPublicPrivateProtected.ts === +//// [tests/cases/compiler/asiPublicPrivateProtected.ts] //// + +=== asiPublicPrivateProtected.ts === public >public : any diff --git a/tests/baselines/reference/asiReturn.errors.txt b/tests/baselines/reference/asiReturn.errors.txt index 1cc3ec8a3c1ac..5da07636f95d3 100644 --- a/tests/baselines/reference/asiReturn.errors.txt +++ b/tests/baselines/reference/asiReturn.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/asiReturn.ts(2,1): error TS1108: A 'return' statement can only be used within a function body. +asiReturn.ts(2,1): error TS1108: A 'return' statement can only be used within a function body. -==== tests/cases/compiler/asiReturn.ts (1 errors) ==== +==== asiReturn.ts (1 errors) ==== // This should be an error for using a return outside a function, but ASI should work properly return ~~~~~~ diff --git a/tests/baselines/reference/asiReturn.js b/tests/baselines/reference/asiReturn.js index ef2aada682c7d..0e416cf5544c2 100644 --- a/tests/baselines/reference/asiReturn.js +++ b/tests/baselines/reference/asiReturn.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asiReturn.ts] //// + //// [asiReturn.ts] // This should be an error for using a return outside a function, but ASI should work properly return diff --git a/tests/baselines/reference/asiReturn.symbols b/tests/baselines/reference/asiReturn.symbols index 0e4edaa631c45..378182e99bfc8 100644 --- a/tests/baselines/reference/asiReturn.symbols +++ b/tests/baselines/reference/asiReturn.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiReturn.ts === +//// [tests/cases/compiler/asiReturn.ts] //// + +=== asiReturn.ts === // This should be an error for using a return outside a function, but ASI should work properly return diff --git a/tests/baselines/reference/asiReturn.types b/tests/baselines/reference/asiReturn.types index 0e4edaa631c45..378182e99bfc8 100644 --- a/tests/baselines/reference/asiReturn.types +++ b/tests/baselines/reference/asiReturn.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asiReturn.ts === +//// [tests/cases/compiler/asiReturn.ts] //// + +=== asiReturn.ts === // This should be an error for using a return outside a function, but ASI should work properly return diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt b/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt index a7d1630c50e6d..1f4f5858f5920 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/assertInWrapSomeTypeParameter.ts(2,26): error TS1005: '>' expected. +assertInWrapSomeTypeParameter.ts(2,26): error TS1005: '>' expected. -==== tests/cases/compiler/assertInWrapSomeTypeParameter.ts (1 errors) ==== +==== assertInWrapSomeTypeParameter.ts (1 errors) ==== class C> { foo>(x: U) { ~ diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.js b/tests/baselines/reference/assertInWrapSomeTypeParameter.js index da31d1910727f..e2428d6a5bbe6 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.js +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assertInWrapSomeTypeParameter.ts] //// + //// [assertInWrapSomeTypeParameter.ts] class C> { foo>(x: U) { diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.symbols b/tests/baselines/reference/assertInWrapSomeTypeParameter.symbols index c207950893008..261818a2b5af0 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.symbols +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assertInWrapSomeTypeParameter.ts === +//// [tests/cases/compiler/assertInWrapSomeTypeParameter.ts] //// + +=== assertInWrapSomeTypeParameter.ts === class C> { >C : Symbol(C, Decl(assertInWrapSomeTypeParameter.ts, 0, 0)) >T : Symbol(T, Decl(assertInWrapSomeTypeParameter.ts, 0, 8)) diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.types b/tests/baselines/reference/assertInWrapSomeTypeParameter.types index 348422e5efe20..6c8b21355f6e9 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.types +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assertInWrapSomeTypeParameter.ts === +//// [tests/cases/compiler/assertInWrapSomeTypeParameter.ts] //// + +=== assertInWrapSomeTypeParameter.ts === class C> { >C : C diff --git a/tests/baselines/reference/assertionFunctionWildcardImport1.symbols b/tests/baselines/reference/assertionFunctionWildcardImport1.symbols index ea4fa4af61712..90c775b7a7f29 100644 --- a/tests/baselines/reference/assertionFunctionWildcardImport1.symbols +++ b/tests/baselines/reference/assertionFunctionWildcardImport1.symbols @@ -1,18 +1,20 @@ -=== tests/cases/compiler/src/core/_namespaces/ts.ts === +//// [tests/cases/compiler/assertionFunctionWildcardImport1.ts] //// + +=== src/core/_namespaces/ts.ts === import * as Debug from "../debug"; >Debug : Symbol(Debug, Decl(ts.ts, 0, 6)) export { Debug }; >Debug : Symbol(Debug, Decl(ts.ts, 1, 8)) -=== tests/cases/compiler/src/core/debug.ts === +=== src/core/debug.ts === export declare function assert(expression: unknown): asserts expression; >assert : Symbol(assert, Decl(debug.ts, 0, 0)) >expression : Symbol(expression, Decl(debug.ts, 0, 31)) >expression : Symbol(expression, Decl(debug.ts, 0, 31)) -=== tests/cases/compiler/src/core/foo.ts === +=== src/core/foo.ts === import * as ts from "./_namespaces/ts"; >ts : Symbol(ts, Decl(foo.ts, 0, 6)) @@ -32,12 +34,12 @@ Debug.assert(true); >assert : Symbol(ts.Debug.assert, Decl(debug.ts, 0, 0)) -=== tests/cases/compiler/src/other/_namespaces/ts.ts === +=== src/other/_namespaces/ts.ts === export * from "../../core/_namespaces/ts" -=== tests/cases/compiler/src/other/bar.ts === +=== src/other/bar.ts === import * as ts from "./_namespaces/ts"; >ts : Symbol(ts, Decl(bar.ts, 0, 6)) diff --git a/tests/baselines/reference/assertionFunctionWildcardImport1.types b/tests/baselines/reference/assertionFunctionWildcardImport1.types index 82610d9ca68e8..fa9315db67c2f 100644 --- a/tests/baselines/reference/assertionFunctionWildcardImport1.types +++ b/tests/baselines/reference/assertionFunctionWildcardImport1.types @@ -1,17 +1,19 @@ -=== tests/cases/compiler/src/core/_namespaces/ts.ts === +//// [tests/cases/compiler/assertionFunctionWildcardImport1.ts] //// + +=== src/core/_namespaces/ts.ts === import * as Debug from "../debug"; >Debug : typeof Debug export { Debug }; >Debug : typeof Debug -=== tests/cases/compiler/src/core/debug.ts === +=== src/core/debug.ts === export declare function assert(expression: unknown): asserts expression; >assert : (expression: unknown) => asserts expression >expression : unknown -=== tests/cases/compiler/src/core/foo.ts === +=== src/core/foo.ts === import * as ts from "./_namespaces/ts"; >ts : typeof ts @@ -35,12 +37,12 @@ Debug.assert(true); >true : true -=== tests/cases/compiler/src/other/_namespaces/ts.ts === +=== src/other/_namespaces/ts.ts === export * from "../../core/_namespaces/ts" -=== tests/cases/compiler/src/other/bar.ts === +=== src/other/bar.ts === import * as ts from "./_namespaces/ts"; >ts : typeof ts diff --git a/tests/baselines/reference/assertionFunctionWildcardImport2.symbols b/tests/baselines/reference/assertionFunctionWildcardImport2.symbols index ca06e3db686d9..6cf75b017564a 100644 --- a/tests/baselines/reference/assertionFunctionWildcardImport2.symbols +++ b/tests/baselines/reference/assertionFunctionWildcardImport2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asserts.ts === +//// [tests/cases/compiler/assertionFunctionWildcardImport2.ts] //// + +=== asserts.ts === function isNonNullable(obj: T): asserts obj is NonNullable { >isNonNullable : Symbol(isNonNullable, Decl(asserts.ts, 0, 0)) >T : Symbol(T, Decl(asserts.ts, 0, 23)) @@ -24,7 +26,7 @@ export { }; -=== tests/cases/compiler/test.ts === +=== test.ts === import * as asserts from "./asserts"; >asserts : Symbol(asserts, Decl(test.ts, 0, 6)) diff --git a/tests/baselines/reference/assertionFunctionWildcardImport2.types b/tests/baselines/reference/assertionFunctionWildcardImport2.types index 6c1ca25477ff0..8fbabb6097ea3 100644 --- a/tests/baselines/reference/assertionFunctionWildcardImport2.types +++ b/tests/baselines/reference/assertionFunctionWildcardImport2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asserts.ts === +//// [tests/cases/compiler/assertionFunctionWildcardImport2.ts] //// + +=== asserts.ts === function isNonNullable(obj: T): asserts obj is NonNullable { >isNonNullable : (obj: T) => asserts obj is NonNullable >obj : T @@ -24,7 +26,7 @@ export { }; -=== tests/cases/compiler/test.ts === +=== test.ts === import * as asserts from "./asserts"; >asserts : typeof asserts diff --git a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.js b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.js index 8857b7dd16013..2cacd1f1534de 100644 --- a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.js +++ b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assertionFunctionsCanNarrowByDiscriminant.ts] //// + //// [assertionFunctionsCanNarrowByDiscriminant.ts] interface Cat { type: 'cat'; diff --git a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.symbols b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.symbols index a7cb944dc4938..4324aea42ee1a 100644 --- a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.symbols +++ b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assertionFunctionsCanNarrowByDiscriminant.ts === +//// [tests/cases/compiler/assertionFunctionsCanNarrowByDiscriminant.ts] //// + +=== assertionFunctionsCanNarrowByDiscriminant.ts === interface Cat { >Cat : Symbol(Cat, Decl(assertionFunctionsCanNarrowByDiscriminant.ts, 0, 0)) diff --git a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types index 9384922fa7a29..d9f4d3c3df4a0 100644 --- a/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types +++ b/tests/baselines/reference/assertionFunctionsCanNarrowByDiscriminant.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assertionFunctionsCanNarrowByDiscriminant.ts === +//// [tests/cases/compiler/assertionFunctionsCanNarrowByDiscriminant.ts] //// + +=== assertionFunctionsCanNarrowByDiscriminant.ts === interface Cat { type: 'cat'; >type : "cat" diff --git a/tests/baselines/reference/assertionTypePredicates1.errors.txt b/tests/baselines/reference/assertionTypePredicates1.errors.txt index 11b1217ec76fc..660ce1f8a255b 100644 --- a/tests/baselines/reference/assertionTypePredicates1.errors.txt +++ b/tests/baselines/reference/assertionTypePredicates1.errors.txt @@ -1,21 +1,21 @@ -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(43,9): error TS7027: Unreachable code detected. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(47,9): error TS7027: Unreachable code detected. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(91,9): error TS7027: Unreachable code detected. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(126,9): error TS7027: Unreachable code detected. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(141,9): error TS7027: Unreachable code detected. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(157,37): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(158,37): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(159,37): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(162,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(163,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(164,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(165,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(170,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(172,5): error TS2776: Assertions require the call target to be an identifier or qualified name. -tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(174,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. +assertionTypePredicates1.ts(43,9): error TS7027: Unreachable code detected. +assertionTypePredicates1.ts(47,9): error TS7027: Unreachable code detected. +assertionTypePredicates1.ts(91,9): error TS7027: Unreachable code detected. +assertionTypePredicates1.ts(126,9): error TS7027: Unreachable code detected. +assertionTypePredicates1.ts(141,9): error TS7027: Unreachable code detected. +assertionTypePredicates1.ts(157,37): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(158,37): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(159,37): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(162,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(163,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(164,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(165,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. +assertionTypePredicates1.ts(170,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. +assertionTypePredicates1.ts(172,5): error TS2776: Assertions require the call target to be an identifier or qualified name. +assertionTypePredicates1.ts(174,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. -==== tests/cases/conformance/controlFlow/assertionTypePredicates1.ts (15 errors) ==== +==== assertionTypePredicates1.ts (15 errors) ==== declare function isString(value: unknown): value is string; declare function isArrayOfStrings(value: unknown): value is string[]; @@ -212,7 +212,7 @@ tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(174,5): error TS assert(typeof x === "string"); // Error ~~~~~~ !!! error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. -!!! related TS2782 tests/cases/conformance/controlFlow/assertionTypePredicates1.ts:169:11: 'assert' needs an explicit type annotation. +!!! related TS2782 assertionTypePredicates1.ts:169:11: 'assert' needs an explicit type annotation. const a = [assert]; a[0](typeof x === "string"); // Error ~~~~ @@ -221,7 +221,7 @@ tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(174,5): error TS t1.assert(typeof x === "string"); // Error ~~~~~~~~~ !!! error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. -!!! related TS2782 tests/cases/conformance/controlFlow/assertionTypePredicates1.ts:173:11: 't1' needs an explicit type annotation. +!!! related TS2782 assertionTypePredicates1.ts:173:11: 't1' needs an explicit type annotation. const t2: Test = new Test(); t2.assert(typeof x === "string"); } diff --git a/tests/baselines/reference/assertionTypePredicates1.js b/tests/baselines/reference/assertionTypePredicates1.js index 94342d03fa00a..4f1b02f42677a 100644 --- a/tests/baselines/reference/assertionTypePredicates1.js +++ b/tests/baselines/reference/assertionTypePredicates1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/controlFlow/assertionTypePredicates1.ts] //// + //// [assertionTypePredicates1.ts] declare function isString(value: unknown): value is string; declare function isArrayOfStrings(value: unknown): value is string[]; diff --git a/tests/baselines/reference/assertionTypePredicates1.symbols b/tests/baselines/reference/assertionTypePredicates1.symbols index d8dea6959ba33..33031eead7221 100644 --- a/tests/baselines/reference/assertionTypePredicates1.symbols +++ b/tests/baselines/reference/assertionTypePredicates1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/controlFlow/assertionTypePredicates1.ts === +//// [tests/cases/conformance/controlFlow/assertionTypePredicates1.ts] //// + +=== assertionTypePredicates1.ts === declare function isString(value: unknown): value is string; >isString : Symbol(isString, Decl(assertionTypePredicates1.ts, 0, 0)) >value : Symbol(value, Decl(assertionTypePredicates1.ts, 0, 26)) diff --git a/tests/baselines/reference/assertionTypePredicates1.types b/tests/baselines/reference/assertionTypePredicates1.types index c8f4c2e063ae4..ea3c0e541a90b 100644 --- a/tests/baselines/reference/assertionTypePredicates1.types +++ b/tests/baselines/reference/assertionTypePredicates1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/controlFlow/assertionTypePredicates1.ts === +//// [tests/cases/conformance/controlFlow/assertionTypePredicates1.ts] //// + +=== assertionTypePredicates1.ts === declare function isString(value: unknown): value is string; >isString : (value: unknown) => value is string >value : unknown diff --git a/tests/baselines/reference/assertionTypePredicates2.js b/tests/baselines/reference/assertionTypePredicates2.js index a6ec601b96e96..ada62f93812d4 100644 --- a/tests/baselines/reference/assertionTypePredicates2.js +++ b/tests/baselines/reference/assertionTypePredicates2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/controlFlow/assertionTypePredicates2.ts] //// + //// [assertionTypePredicates2.js] /** * @typedef {{ x: number }} A diff --git a/tests/baselines/reference/assertionTypePredicates2.symbols b/tests/baselines/reference/assertionTypePredicates2.symbols index 24086f27a213b..2bb05c557428c 100644 --- a/tests/baselines/reference/assertionTypePredicates2.symbols +++ b/tests/baselines/reference/assertionTypePredicates2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/controlFlow/assertionTypePredicates2.js === +//// [tests/cases/conformance/controlFlow/assertionTypePredicates2.ts] //// + +=== assertionTypePredicates2.js === /** * @typedef {{ x: number }} A */ diff --git a/tests/baselines/reference/assertionTypePredicates2.types b/tests/baselines/reference/assertionTypePredicates2.types index 6b0b1fc396175..4defda8da847f 100644 --- a/tests/baselines/reference/assertionTypePredicates2.types +++ b/tests/baselines/reference/assertionTypePredicates2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/controlFlow/assertionTypePredicates2.js === +//// [tests/cases/conformance/controlFlow/assertionTypePredicates2.ts] //// + +=== assertionTypePredicates2.js === /** * @typedef {{ x: number }} A */ diff --git a/tests/baselines/reference/assertionsAndNonReturningFunctions.errors.txt b/tests/baselines/reference/assertionsAndNonReturningFunctions.errors.txt index e1648d7643dee..7925bfb827219 100644 --- a/tests/baselines/reference/assertionsAndNonReturningFunctions.errors.txt +++ b/tests/baselines/reference/assertionsAndNonReturningFunctions.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.js(46,9): error TS7027: Unreachable code detected. -tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.js(58,5): error TS7027: Unreachable code detected. +assertionsAndNonReturningFunctions.js(46,9): error TS7027: Unreachable code detected. +assertionsAndNonReturningFunctions.js(58,5): error TS7027: Unreachable code detected. -==== tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.js (2 errors) ==== +==== assertionsAndNonReturningFunctions.js (2 errors) ==== /** @typedef {(check: boolean) => asserts check} AssertFunc */ /** @type {AssertFunc} */ diff --git a/tests/baselines/reference/assertionsAndNonReturningFunctions.symbols b/tests/baselines/reference/assertionsAndNonReturningFunctions.symbols index 88931cffbd87c..a3142da90cc93 100644 --- a/tests/baselines/reference/assertionsAndNonReturningFunctions.symbols +++ b/tests/baselines/reference/assertionsAndNonReturningFunctions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.js === +//// [tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.ts] //// + +=== assertionsAndNonReturningFunctions.js === /** @typedef {(check: boolean) => asserts check} AssertFunc */ /** @type {AssertFunc} */ diff --git a/tests/baselines/reference/assertionsAndNonReturningFunctions.types b/tests/baselines/reference/assertionsAndNonReturningFunctions.types index 2f947691d5423..352a369660d90 100644 --- a/tests/baselines/reference/assertionsAndNonReturningFunctions.types +++ b/tests/baselines/reference/assertionsAndNonReturningFunctions.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.js === +//// [tests/cases/conformance/jsdoc/assertionsAndNonReturningFunctions.ts] //// + +=== assertionsAndNonReturningFunctions.js === /** @typedef {(check: boolean) => asserts check} AssertFunc */ /** @type {AssertFunc} */ diff --git a/tests/baselines/reference/assign1.js b/tests/baselines/reference/assign1.js index fa18c8f287bb7..af4babfa4a2e3 100644 --- a/tests/baselines/reference/assign1.js +++ b/tests/baselines/reference/assign1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assign1.ts] //// + //// [assign1.ts] module M { interface I { diff --git a/tests/baselines/reference/assign1.symbols b/tests/baselines/reference/assign1.symbols index a8ab57146af6d..e620d27a420ef 100644 --- a/tests/baselines/reference/assign1.symbols +++ b/tests/baselines/reference/assign1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assign1.ts === +//// [tests/cases/compiler/assign1.ts] //// + +=== assign1.ts === module M { >M : Symbol(M, Decl(assign1.ts, 0, 0)) diff --git a/tests/baselines/reference/assign1.types b/tests/baselines/reference/assign1.types index db8b9f05ebefd..8fe84ed77e7dd 100644 --- a/tests/baselines/reference/assign1.types +++ b/tests/baselines/reference/assign1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assign1.ts === +//// [tests/cases/compiler/assign1.ts] //// + +=== assign1.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/assignAnyToEveryType.errors.txt b/tests/baselines/reference/assignAnyToEveryType.errors.txt index a1ff42218e370..d0704bab7a465 100644 --- a/tests/baselines/reference/assignAnyToEveryType.errors.txt +++ b/tests/baselines/reference/assignAnyToEveryType.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/any/assignAnyToEveryType.ts(41,1): error TS2631: Cannot assign to 'M' because it is a namespace. +assignAnyToEveryType.ts(41,1): error TS2631: Cannot assign to 'M' because it is a namespace. -==== tests/cases/conformance/types/any/assignAnyToEveryType.ts (1 errors) ==== +==== assignAnyToEveryType.ts (1 errors) ==== // all of these are valid var x: any; diff --git a/tests/baselines/reference/assignAnyToEveryType.js b/tests/baselines/reference/assignAnyToEveryType.js index 351c041523fc9..c8514736c09e3 100644 --- a/tests/baselines/reference/assignAnyToEveryType.js +++ b/tests/baselines/reference/assignAnyToEveryType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/any/assignAnyToEveryType.ts] //// + //// [assignAnyToEveryType.ts] // all of these are valid diff --git a/tests/baselines/reference/assignAnyToEveryType.symbols b/tests/baselines/reference/assignAnyToEveryType.symbols index c5f6addb2fa3b..c40ae5c4d1102 100644 --- a/tests/baselines/reference/assignAnyToEveryType.symbols +++ b/tests/baselines/reference/assignAnyToEveryType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/assignAnyToEveryType.ts === +//// [tests/cases/conformance/types/any/assignAnyToEveryType.ts] //// + +=== assignAnyToEveryType.ts === // all of these are valid var x: any; diff --git a/tests/baselines/reference/assignAnyToEveryType.types b/tests/baselines/reference/assignAnyToEveryType.types index 3e8bf265eacd3..34db2473b9acc 100644 --- a/tests/baselines/reference/assignAnyToEveryType.types +++ b/tests/baselines/reference/assignAnyToEveryType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/assignAnyToEveryType.ts === +//// [tests/cases/conformance/types/any/assignAnyToEveryType.ts] //// + +=== assignAnyToEveryType.ts === // all of these are valid var x: any; diff --git a/tests/baselines/reference/assignEveryTypeToAny.js b/tests/baselines/reference/assignEveryTypeToAny.js index 07bfbaddebc11..0c7e4b20f59d4 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.js +++ b/tests/baselines/reference/assignEveryTypeToAny.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/any/assignEveryTypeToAny.ts] //// + //// [assignEveryTypeToAny.ts] // all of these are valid diff --git a/tests/baselines/reference/assignEveryTypeToAny.symbols b/tests/baselines/reference/assignEveryTypeToAny.symbols index e94413d4a3b71..4d852f791233a 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.symbols +++ b/tests/baselines/reference/assignEveryTypeToAny.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/assignEveryTypeToAny.ts === +//// [tests/cases/conformance/types/any/assignEveryTypeToAny.ts] //// + +=== assignEveryTypeToAny.ts === // all of these are valid var x: any; diff --git a/tests/baselines/reference/assignEveryTypeToAny.types b/tests/baselines/reference/assignEveryTypeToAny.types index 8cec100b8be5d..cbeb59812dc33 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.types +++ b/tests/baselines/reference/assignEveryTypeToAny.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/any/assignEveryTypeToAny.ts === +//// [tests/cases/conformance/types/any/assignEveryTypeToAny.ts] //// + +=== assignEveryTypeToAny.ts === // all of these are valid var x: any; diff --git a/tests/baselines/reference/assignFromBooleanInterface.errors.txt b/tests/baselines/reference/assignFromBooleanInterface.errors.txt index 555b645cd7dc1..6671373734381 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts(3,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'. +assignFromBooleanInterface.ts(3,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'. 'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible. -==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts (1 errors) ==== +==== assignFromBooleanInterface.ts (1 errors) ==== var x = true; var a: Boolean; x = a; diff --git a/tests/baselines/reference/assignFromBooleanInterface.js b/tests/baselines/reference/assignFromBooleanInterface.js index 82b4413f585fe..f539081384d0e 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.js +++ b/tests/baselines/reference/assignFromBooleanInterface.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts] //// + //// [assignFromBooleanInterface.ts] var x = true; var a: Boolean; diff --git a/tests/baselines/reference/assignFromBooleanInterface.symbols b/tests/baselines/reference/assignFromBooleanInterface.symbols index c0f790bb92fe8..4177c7169e5b0 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.symbols +++ b/tests/baselines/reference/assignFromBooleanInterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts === +//// [tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts] //// + +=== assignFromBooleanInterface.ts === var x = true; >x : Symbol(x, Decl(assignFromBooleanInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromBooleanInterface.types b/tests/baselines/reference/assignFromBooleanInterface.types index 93c798eb99389..9a9cca232e7be 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.types +++ b/tests/baselines/reference/assignFromBooleanInterface.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts === +//// [tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface.ts] //// + +=== assignFromBooleanInterface.ts === var x = true; >x : boolean >true : true diff --git a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt index ba8b2f5a9c903..ebd3e9a5477b9 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(14,1): error TS2322: Type 'NotBoolean' is not assignable to type 'Boolean'. +assignFromBooleanInterface2.ts(14,1): error TS2322: Type 'NotBoolean' is not assignable to type 'Boolean'. The types returned by 'valueOf()' are incompatible between these types. Type 'Object' is not assignable to type 'boolean'. -tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(19,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'. +assignFromBooleanInterface2.ts(19,1): error TS2322: Type 'Boolean' is not assignable to type 'boolean'. 'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible. -tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts(20,1): error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'. +assignFromBooleanInterface2.ts(20,1): error TS2322: Type 'NotBoolean' is not assignable to type 'boolean'. -==== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts (3 errors) ==== +==== assignFromBooleanInterface2.ts (3 errors) ==== interface Boolean { doStuff(): string; } diff --git a/tests/baselines/reference/assignFromBooleanInterface2.js b/tests/baselines/reference/assignFromBooleanInterface2.js index be376b293c0f5..5a903182bb980 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.js +++ b/tests/baselines/reference/assignFromBooleanInterface2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts] //// + //// [assignFromBooleanInterface2.ts] interface Boolean { doStuff(): string; diff --git a/tests/baselines/reference/assignFromBooleanInterface2.symbols b/tests/baselines/reference/assignFromBooleanInterface2.symbols index 47f527681d894..1d3dc6b474e0c 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.symbols +++ b/tests/baselines/reference/assignFromBooleanInterface2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts === +//// [tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts] //// + +=== assignFromBooleanInterface2.ts === interface Boolean { >Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromBooleanInterface2.ts, 0, 0)) diff --git a/tests/baselines/reference/assignFromBooleanInterface2.types b/tests/baselines/reference/assignFromBooleanInterface2.types index 758b160f6e385..b4de3cd1adc75 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.types +++ b/tests/baselines/reference/assignFromBooleanInterface2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts === +//// [tests/cases/conformance/types/primitives/boolean/assignFromBooleanInterface2.ts] //// + +=== assignFromBooleanInterface2.ts === interface Boolean { doStuff(): string; >doStuff : () => string diff --git a/tests/baselines/reference/assignFromNumberInterface.errors.txt b/tests/baselines/reference/assignFromNumberInterface.errors.txt index 1a70ef342d2b8..421e4d34e5c2e 100644 --- a/tests/baselines/reference/assignFromNumberInterface.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts(3,1): error TS2322: Type 'Number' is not assignable to type 'number'. +assignFromNumberInterface.ts(3,1): error TS2322: Type 'Number' is not assignable to type 'number'. 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts (1 errors) ==== +==== assignFromNumberInterface.ts (1 errors) ==== var x = 1; var a: Number; x = a; diff --git a/tests/baselines/reference/assignFromNumberInterface.js b/tests/baselines/reference/assignFromNumberInterface.js index aeebc9928f71a..ea4cd1b8b6814 100644 --- a/tests/baselines/reference/assignFromNumberInterface.js +++ b/tests/baselines/reference/assignFromNumberInterface.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts] //// + //// [assignFromNumberInterface.ts] var x = 1; var a: Number; diff --git a/tests/baselines/reference/assignFromNumberInterface.symbols b/tests/baselines/reference/assignFromNumberInterface.symbols index 41893f7c1e43d..f0f7c8443d81c 100644 --- a/tests/baselines/reference/assignFromNumberInterface.symbols +++ b/tests/baselines/reference/assignFromNumberInterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts === +//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts] //// + +=== assignFromNumberInterface.ts === var x = 1; >x : Symbol(x, Decl(assignFromNumberInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromNumberInterface.types b/tests/baselines/reference/assignFromNumberInterface.types index 98d5b78edabd0..bc46467b960c3 100644 --- a/tests/baselines/reference/assignFromNumberInterface.types +++ b/tests/baselines/reference/assignFromNumberInterface.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts === +//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface.ts] //// + +=== assignFromNumberInterface.ts === var x = 1; >x : number >1 : 1 diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index 3297501d61208..eae1519fd6d6d 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(24,1): error TS2322: Type 'Number' is not assignable to type 'number'. +assignFromNumberInterface2.ts(24,1): error TS2322: Type 'Number' is not assignable to type 'number'. 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts(25,1): error TS2322: Type 'NotNumber' is not assignable to type 'number'. +assignFromNumberInterface2.ts(25,1): error TS2322: Type 'NotNumber' is not assignable to type 'number'. -==== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts (2 errors) ==== +==== assignFromNumberInterface2.ts (2 errors) ==== interface Number { doStuff(): string; } diff --git a/tests/baselines/reference/assignFromNumberInterface2.js b/tests/baselines/reference/assignFromNumberInterface2.js index 25262bf27f074..fac0aba9ff5e9 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.js +++ b/tests/baselines/reference/assignFromNumberInterface2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts] //// + //// [assignFromNumberInterface2.ts] interface Number { doStuff(): string; diff --git a/tests/baselines/reference/assignFromNumberInterface2.symbols b/tests/baselines/reference/assignFromNumberInterface2.symbols index adaea640b3189..2a1f46e208195 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.symbols +++ b/tests/baselines/reference/assignFromNumberInterface2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts === +//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts] //// + +=== assignFromNumberInterface2.ts === interface Number { >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromNumberInterface2.ts, 0, 0)) diff --git a/tests/baselines/reference/assignFromNumberInterface2.types b/tests/baselines/reference/assignFromNumberInterface2.types index 01a293f3a76e8..06da8e6b27c0e 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.types +++ b/tests/baselines/reference/assignFromNumberInterface2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts === +//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts] //// + +=== assignFromNumberInterface2.ts === interface Number { doStuff(): string; >doStuff : () => string diff --git a/tests/baselines/reference/assignFromStringInterface.errors.txt b/tests/baselines/reference/assignFromStringInterface.errors.txt index 7e7af4d1b9daf..d01a2c1e33524 100644 --- a/tests/baselines/reference/assignFromStringInterface.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts(3,1): error TS2322: Type 'String' is not assignable to type 'string'. +assignFromStringInterface.ts(3,1): error TS2322: Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. -==== tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts (1 errors) ==== +==== assignFromStringInterface.ts (1 errors) ==== var x = ''; var a: String; x = a; diff --git a/tests/baselines/reference/assignFromStringInterface.js b/tests/baselines/reference/assignFromStringInterface.js index 82de11dfcc7fd..c458439013a2f 100644 --- a/tests/baselines/reference/assignFromStringInterface.js +++ b/tests/baselines/reference/assignFromStringInterface.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts] //// + //// [assignFromStringInterface.ts] var x = ''; var a: String; diff --git a/tests/baselines/reference/assignFromStringInterface.symbols b/tests/baselines/reference/assignFromStringInterface.symbols index 1bf0e9e5f5320..eea3e81e87905 100644 --- a/tests/baselines/reference/assignFromStringInterface.symbols +++ b/tests/baselines/reference/assignFromStringInterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts === +//// [tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts] //// + +=== assignFromStringInterface.ts === var x = ''; >x : Symbol(x, Decl(assignFromStringInterface.ts, 0, 3)) diff --git a/tests/baselines/reference/assignFromStringInterface.types b/tests/baselines/reference/assignFromStringInterface.types index 5c5c2f319b695..cad0952d6a0f4 100644 --- a/tests/baselines/reference/assignFromStringInterface.types +++ b/tests/baselines/reference/assignFromStringInterface.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts === +//// [tests/cases/conformance/types/primitives/string/assignFromStringInterface.ts] //// + +=== assignFromStringInterface.ts === var x = ''; >x : string >'' : "" diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 9364465567900..8c2cd74aa7df2 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(47,1): error TS2322: Type 'String' is not assignable to type 'string'. +assignFromStringInterface2.ts(47,1): error TS2322: Type 'String' is not assignable to type 'string'. 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible. -tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assignable to type 'string'. +assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assignable to type 'string'. -==== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts (2 errors) ==== +==== assignFromStringInterface2.ts (2 errors) ==== interface String { doStuff(): string; } diff --git a/tests/baselines/reference/assignFromStringInterface2.js b/tests/baselines/reference/assignFromStringInterface2.js index ac8a3af66d5ee..308491f89cee8 100644 --- a/tests/baselines/reference/assignFromStringInterface2.js +++ b/tests/baselines/reference/assignFromStringInterface2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts] //// + //// [assignFromStringInterface2.ts] interface String { doStuff(): string; diff --git a/tests/baselines/reference/assignFromStringInterface2.symbols b/tests/baselines/reference/assignFromStringInterface2.symbols index 6b49a36c5db9d..40846e9388e8f 100644 --- a/tests/baselines/reference/assignFromStringInterface2.symbols +++ b/tests/baselines/reference/assignFromStringInterface2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts === +//// [tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts] //// + +=== assignFromStringInterface2.ts === interface String { >String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0)) diff --git a/tests/baselines/reference/assignFromStringInterface2.types b/tests/baselines/reference/assignFromStringInterface2.types index 800269ffca323..8ee6aed62e644 100644 --- a/tests/baselines/reference/assignFromStringInterface2.types +++ b/tests/baselines/reference/assignFromStringInterface2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts === +//// [tests/cases/conformance/types/primitives/string/assignFromStringInterface2.ts] //// + +=== assignFromStringInterface2.ts === interface String { doStuff(): string; >doStuff : () => string diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt index 4f0e5d0d7be41..00ee1d5f8e021 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts(7,4): error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts(8,4): error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. +assignLambdaToNominalSubtypeOfFunction.ts(7,4): error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. +assignLambdaToNominalSubtypeOfFunction.ts(8,4): error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -==== tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts (2 errors) ==== +==== assignLambdaToNominalSubtypeOfFunction.ts (2 errors) ==== interface IResultCallback extends Function { x: number; } diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js index fe6142cafe088..9671f8d71852b 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts] //// + //// [assignLambdaToNominalSubtypeOfFunction.ts] interface IResultCallback extends Function { x: number; diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.symbols b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.symbols index 780995f62ec0e..d6a61b29bce47 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.symbols +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts === +//// [tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts] //// + +=== assignLambdaToNominalSubtypeOfFunction.ts === interface IResultCallback extends Function { >IResultCallback : Symbol(IResultCallback, Decl(assignLambdaToNominalSubtypeOfFunction.ts, 0, 0)) >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.types b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.types index 9011a09836323..2f98e4eee6f9d 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.types +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts === +//// [tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts] //// + +=== assignLambdaToNominalSubtypeOfFunction.ts === interface IResultCallback extends Function { x: number; >x : number diff --git a/tests/baselines/reference/assignObjectToNonPrimitive.js b/tests/baselines/reference/assignObjectToNonPrimitive.js index ec0015fba8ad3..40eb2db3e1fa8 100644 --- a/tests/baselines/reference/assignObjectToNonPrimitive.js +++ b/tests/baselines/reference/assignObjectToNonPrimitive.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts] //// + //// [assignObjectToNonPrimitive.ts] var x = {}; var y = {foo: "bar"}; diff --git a/tests/baselines/reference/assignObjectToNonPrimitive.symbols b/tests/baselines/reference/assignObjectToNonPrimitive.symbols index 5c806e09b9419..25e7d764013a2 100644 --- a/tests/baselines/reference/assignObjectToNonPrimitive.symbols +++ b/tests/baselines/reference/assignObjectToNonPrimitive.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts === +//// [tests/cases/conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts] //// + +=== assignObjectToNonPrimitive.ts === var x = {}; >x : Symbol(x, Decl(assignObjectToNonPrimitive.ts, 0, 3)) diff --git a/tests/baselines/reference/assignObjectToNonPrimitive.types b/tests/baselines/reference/assignObjectToNonPrimitive.types index f16c22871550b..45848e33f89bb 100644 --- a/tests/baselines/reference/assignObjectToNonPrimitive.types +++ b/tests/baselines/reference/assignObjectToNonPrimitive.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts === +//// [tests/cases/conformance/types/nonPrimitive/assignObjectToNonPrimitive.ts] //// + +=== assignObjectToNonPrimitive.ts === var x = {}; >x : {} >{} : {} diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.errors.txt b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.errors.txt index 1fb4bd61473ab..59ee9f7409d20 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.errors.txt +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.errors.txt @@ -1,25 +1,25 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts(2,16): error TS2729: Property 'bar' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts(3,16): error TS2729: Property 'foo' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts(6,19): error TS2729: Property 'm3' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts(12,17): error TS2729: Property 'baz' is used before its initialization. +assignParameterPropertyToPropertyDeclarationES2022.ts(2,16): error TS2729: Property 'bar' is used before its initialization. +assignParameterPropertyToPropertyDeclarationES2022.ts(3,16): error TS2729: Property 'foo' is used before its initialization. +assignParameterPropertyToPropertyDeclarationES2022.ts(6,19): error TS2729: Property 'm3' is used before its initialization. +assignParameterPropertyToPropertyDeclarationES2022.ts(12,17): error TS2729: Property 'baz' is used before its initialization. -==== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts (4 errors) ==== +==== assignParameterPropertyToPropertyDeclarationES2022.ts (4 errors) ==== class C { qux = this.bar // should error ~~~ !!! error TS2729: Property 'bar' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts:3:5: 'bar' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationES2022.ts:3:5: 'bar' is declared here. bar = this.foo // should error ~~~ !!! error TS2729: Property 'foo' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts:11:17: 'foo' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationES2022.ts:11:17: 'foo' is declared here. quiz = this.bar // ok quench = this.m1() // ok quanch = this.m3() // should error ~~ !!! error TS2729: Property 'm3' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts:10:5: 'm3' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationES2022.ts:10:5: 'm3' is declared here. m1() { this.foo // ok } @@ -28,7 +28,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterProper quim = this.baz // should error ~~~ !!! error TS2729: Property 'baz' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts:13:5: 'baz' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationES2022.ts:13:5: 'baz' is declared here. baz = this.foo; // should error quid = this.baz // ok m2() { diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.js b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.js index af8f469a3915b..ebff1d836dd23 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.js +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts] //// + //// [assignParameterPropertyToPropertyDeclarationES2022.ts] class C { qux = this.bar // should error diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.symbols b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.symbols index a1e97476b8b02..fbb17c8f7a512 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.symbols +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts] //// + +=== assignParameterPropertyToPropertyDeclarationES2022.ts === class C { >C : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationES2022.ts, 0, 0)) diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.types b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.types index a2616449713d1..c26ab010e9ca1 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.types +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationES2022.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationES2022.ts] //// + +=== assignParameterPropertyToPropertyDeclarationES2022.ts === class C { >C : C diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.errors.txt b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.errors.txt index 91310fd3814d6..29f147f0555b0 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.errors.txt +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(2,16): error TS2729: Property 'bar' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(3,16): error TS2729: Property 'foo' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(6,19): error TS2729: Property 'm3' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(12,17): error TS2729: Property 'baz' is used before its initialization. -tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts(13,16): error TS2729: Property 'foo' is used before its initialization. +assignParameterPropertyToPropertyDeclarationESNext.ts(2,16): error TS2729: Property 'bar' is used before its initialization. +assignParameterPropertyToPropertyDeclarationESNext.ts(3,16): error TS2729: Property 'foo' is used before its initialization. +assignParameterPropertyToPropertyDeclarationESNext.ts(6,19): error TS2729: Property 'm3' is used before its initialization. +assignParameterPropertyToPropertyDeclarationESNext.ts(12,17): error TS2729: Property 'baz' is used before its initialization. +assignParameterPropertyToPropertyDeclarationESNext.ts(13,16): error TS2729: Property 'foo' is used before its initialization. -==== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts (5 errors) ==== +==== assignParameterPropertyToPropertyDeclarationESNext.ts (5 errors) ==== class C { qux = this.bar // should error ~~~ !!! error TS2729: Property 'bar' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:3:5: 'bar' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationESNext.ts:3:5: 'bar' is declared here. bar = this.foo // should error ~~~ !!! error TS2729: Property 'foo' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:11:17: 'foo' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationESNext.ts:11:17: 'foo' is declared here. quiz = this.bar // ok quench = this.m1() // ok quanch = this.m3() // should error ~~ !!! error TS2729: Property 'm3' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:10:5: 'm3' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationESNext.ts:10:5: 'm3' is declared here. m1() { this.foo // ok } @@ -29,11 +29,11 @@ tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterProper quim = this.baz // should error ~~~ !!! error TS2729: Property 'baz' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:13:5: 'baz' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationESNext.ts:13:5: 'baz' is declared here. baz = this.foo; // should error ~~~ !!! error TS2729: Property 'foo' is used before its initialization. -!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts:11:17: 'foo' is declared here. +!!! related TS2728 assignParameterPropertyToPropertyDeclarationESNext.ts:11:17: 'foo' is declared here. quid = this.baz // ok m2() { this.foo // ok diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.js b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.js index 20afc664a4e8e..834dd77490ebc 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.js +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts] //// + //// [assignParameterPropertyToPropertyDeclarationESNext.ts] class C { qux = this.bar // should error diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.symbols b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.symbols index b94171e52b662..52efa659caf7b 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.symbols +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts] //// + +=== assignParameterPropertyToPropertyDeclarationESNext.ts === class C { >C : Symbol(C, Decl(assignParameterPropertyToPropertyDeclarationESNext.ts, 0, 0)) diff --git a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types index a041399c6bee9..3e0079eb5f473 100644 --- a/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types +++ b/tests/baselines/reference/assignParameterPropertyToPropertyDeclarationESNext.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/assignParameterPropertyToPropertyDeclarationESNext.ts] //// + +=== assignParameterPropertyToPropertyDeclarationESNext.ts === class C { >C : C diff --git a/tests/baselines/reference/assignToEnum.errors.txt b/tests/baselines/reference/assignToEnum.errors.txt index 182cc8a5b72fd..1b080695531df 100644 --- a/tests/baselines/reference/assignToEnum.errors.txt +++ b/tests/baselines/reference/assignToEnum.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/assignToEnum.ts(2,1): error TS2628: Cannot assign to 'A' because it is an enum. -tests/cases/compiler/assignToEnum.ts(3,1): error TS2628: Cannot assign to 'A' because it is an enum. -tests/cases/compiler/assignToEnum.ts(4,3): error TS2540: Cannot assign to 'foo' because it is a read-only property. -tests/cases/compiler/assignToEnum.ts(5,3): error TS2540: Cannot assign to 'foo' because it is a read-only property. +assignToEnum.ts(2,1): error TS2628: Cannot assign to 'A' because it is an enum. +assignToEnum.ts(3,1): error TS2628: Cannot assign to 'A' because it is an enum. +assignToEnum.ts(4,3): error TS2540: Cannot assign to 'foo' because it is a read-only property. +assignToEnum.ts(5,3): error TS2540: Cannot assign to 'foo' because it is a read-only property. -==== tests/cases/compiler/assignToEnum.ts (4 errors) ==== +==== assignToEnum.ts (4 errors) ==== enum A { foo, bar } A = undefined; // invalid LHS ~ diff --git a/tests/baselines/reference/assignToEnum.js b/tests/baselines/reference/assignToEnum.js index 5f7048894fa32..c0fee8f2fae3d 100644 --- a/tests/baselines/reference/assignToEnum.js +++ b/tests/baselines/reference/assignToEnum.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToEnum.ts] //// + //// [assignToEnum.ts] enum A { foo, bar } A = undefined; // invalid LHS diff --git a/tests/baselines/reference/assignToEnum.symbols b/tests/baselines/reference/assignToEnum.symbols index 8abccb32ce45f..824ed671b8b0a 100644 --- a/tests/baselines/reference/assignToEnum.symbols +++ b/tests/baselines/reference/assignToEnum.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToEnum.ts === +//// [tests/cases/compiler/assignToEnum.ts] //// + +=== assignToEnum.ts === enum A { foo, bar } >A : Symbol(A, Decl(assignToEnum.ts, 0, 0)) >foo : Symbol(A.foo, Decl(assignToEnum.ts, 0, 8)) diff --git a/tests/baselines/reference/assignToEnum.types b/tests/baselines/reference/assignToEnum.types index a4301d113abc8..69e0851d79d35 100644 --- a/tests/baselines/reference/assignToEnum.types +++ b/tests/baselines/reference/assignToEnum.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToEnum.ts === +//// [tests/cases/compiler/assignToEnum.ts] //// + +=== assignToEnum.ts === enum A { foo, bar } >A : A >foo : A.foo diff --git a/tests/baselines/reference/assignToExistingClass.errors.txt b/tests/baselines/reference/assignToExistingClass.errors.txt index 20f6cd8823da0..aa2cfd5c1e952 100644 --- a/tests/baselines/reference/assignToExistingClass.errors.txt +++ b/tests/baselines/reference/assignToExistingClass.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/assignToExistingClass.ts(8,13): error TS2629: Cannot assign to 'Mocked' because it is a class. +assignToExistingClass.ts(8,13): error TS2629: Cannot assign to 'Mocked' because it is a class. -==== tests/cases/compiler/assignToExistingClass.ts (1 errors) ==== +==== assignToExistingClass.ts (1 errors) ==== module Test { class Mocked { myProp: string; diff --git a/tests/baselines/reference/assignToExistingClass.js b/tests/baselines/reference/assignToExistingClass.js index baa7dc3cc7329..09e82d20b2a92 100644 --- a/tests/baselines/reference/assignToExistingClass.js +++ b/tests/baselines/reference/assignToExistingClass.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToExistingClass.ts] //// + //// [assignToExistingClass.ts] module Test { class Mocked { diff --git a/tests/baselines/reference/assignToExistingClass.symbols b/tests/baselines/reference/assignToExistingClass.symbols index 9d170e9e30c36..e089cd5c430dd 100644 --- a/tests/baselines/reference/assignToExistingClass.symbols +++ b/tests/baselines/reference/assignToExistingClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToExistingClass.ts === +//// [tests/cases/compiler/assignToExistingClass.ts] //// + +=== assignToExistingClass.ts === module Test { >Test : Symbol(Test, Decl(assignToExistingClass.ts, 0, 0)) diff --git a/tests/baselines/reference/assignToExistingClass.types b/tests/baselines/reference/assignToExistingClass.types index 9894347c20f41..d49869e1f6262 100644 --- a/tests/baselines/reference/assignToExistingClass.types +++ b/tests/baselines/reference/assignToExistingClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToExistingClass.ts === +//// [tests/cases/compiler/assignToExistingClass.ts] //// + +=== assignToExistingClass.ts === module Test { >Test : typeof Test diff --git a/tests/baselines/reference/assignToFn.errors.txt b/tests/baselines/reference/assignToFn.errors.txt index 7f2c7855a359d..cc1b83bf65913 100644 --- a/tests/baselines/reference/assignToFn.errors.txt +++ b/tests/baselines/reference/assignToFn.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'. +assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'. -==== tests/cases/compiler/assignToFn.ts (1 errors) ==== +==== assignToFn.ts (1 errors) ==== module M { interface I { f(n:number):boolean; diff --git a/tests/baselines/reference/assignToFn.js b/tests/baselines/reference/assignToFn.js index 2ff8ceedfa67c..13becfdcfef92 100644 --- a/tests/baselines/reference/assignToFn.js +++ b/tests/baselines/reference/assignToFn.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToFn.ts] //// + //// [assignToFn.ts] module M { interface I { diff --git a/tests/baselines/reference/assignToFn.symbols b/tests/baselines/reference/assignToFn.symbols index 497515eec9968..cc7cbce689f20 100644 --- a/tests/baselines/reference/assignToFn.symbols +++ b/tests/baselines/reference/assignToFn.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToFn.ts === +//// [tests/cases/compiler/assignToFn.ts] //// + +=== assignToFn.ts === module M { >M : Symbol(M, Decl(assignToFn.ts, 0, 0)) diff --git a/tests/baselines/reference/assignToFn.types b/tests/baselines/reference/assignToFn.types index 954eaa8b23d5d..70709a60ceb78 100644 --- a/tests/baselines/reference/assignToFn.types +++ b/tests/baselines/reference/assignToFn.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToFn.ts === +//// [tests/cases/compiler/assignToFn.ts] //// + +=== assignToFn.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/assignToInvalidLHS.errors.txt b/tests/baselines/reference/assignToInvalidLHS.errors.txt index b338871606b4f..568f775edfae4 100644 --- a/tests/baselines/reference/assignToInvalidLHS.errors.txt +++ b/tests/baselines/reference/assignToInvalidLHS.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/assignToInvalidLHS.ts(4,9): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignToInvalidLHS.ts(4,9): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -==== tests/cases/compiler/assignToInvalidLHS.ts (1 errors) ==== +==== assignToInvalidLHS.ts (1 errors) ==== declare var y:any; // Below is actually valid JavaScript (see http://es5.github.com/#x8.7 ), even though will always fail at runtime with 'invalid left-hand side' diff --git a/tests/baselines/reference/assignToInvalidLHS.js b/tests/baselines/reference/assignToInvalidLHS.js index 13906d28fdf26..e3a6f1ea11448 100644 --- a/tests/baselines/reference/assignToInvalidLHS.js +++ b/tests/baselines/reference/assignToInvalidLHS.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToInvalidLHS.ts] //// + //// [assignToInvalidLHS.ts] declare var y:any; diff --git a/tests/baselines/reference/assignToInvalidLHS.symbols b/tests/baselines/reference/assignToInvalidLHS.symbols index 3a1cd4974b0ce..1bd0744388c6e 100644 --- a/tests/baselines/reference/assignToInvalidLHS.symbols +++ b/tests/baselines/reference/assignToInvalidLHS.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToInvalidLHS.ts === +//// [tests/cases/compiler/assignToInvalidLHS.ts] //// + +=== assignToInvalidLHS.ts === declare var y:any; >y : Symbol(y, Decl(assignToInvalidLHS.ts, 0, 11)) diff --git a/tests/baselines/reference/assignToInvalidLHS.types b/tests/baselines/reference/assignToInvalidLHS.types index 7a24245010ce2..16ac535ecea00 100644 --- a/tests/baselines/reference/assignToInvalidLHS.types +++ b/tests/baselines/reference/assignToInvalidLHS.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToInvalidLHS.ts === +//// [tests/cases/compiler/assignToInvalidLHS.ts] //// + +=== assignToInvalidLHS.ts === declare var y:any; >y : any diff --git a/tests/baselines/reference/assignToModule.errors.txt b/tests/baselines/reference/assignToModule.errors.txt index 0b8b6f27deb47..3b0a5bb65aa36 100644 --- a/tests/baselines/reference/assignToModule.errors.txt +++ b/tests/baselines/reference/assignToModule.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/assignToModule.ts(2,1): error TS2708: Cannot use namespace 'A' as a value. +assignToModule.ts(2,1): error TS2708: Cannot use namespace 'A' as a value. -==== tests/cases/compiler/assignToModule.ts (1 errors) ==== +==== assignToModule.ts (1 errors) ==== module A {} A = undefined; // invalid LHS ~ diff --git a/tests/baselines/reference/assignToModule.js b/tests/baselines/reference/assignToModule.js index ae81518bee28b..086dc5c44f67e 100644 --- a/tests/baselines/reference/assignToModule.js +++ b/tests/baselines/reference/assignToModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToModule.ts] //// + //// [assignToModule.ts] module A {} A = undefined; // invalid LHS diff --git a/tests/baselines/reference/assignToModule.symbols b/tests/baselines/reference/assignToModule.symbols index 9461056de11b8..60b02202d4a78 100644 --- a/tests/baselines/reference/assignToModule.symbols +++ b/tests/baselines/reference/assignToModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToModule.ts === +//// [tests/cases/compiler/assignToModule.ts] //// + +=== assignToModule.ts === module A {} >A : Symbol(A, Decl(assignToModule.ts, 0, 0)) diff --git a/tests/baselines/reference/assignToModule.types b/tests/baselines/reference/assignToModule.types index afbb933e9d1f5..911c2820d141e 100644 --- a/tests/baselines/reference/assignToModule.types +++ b/tests/baselines/reference/assignToModule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToModule.ts === +//// [tests/cases/compiler/assignToModule.ts] //// + +=== assignToModule.ts === module A {} A = undefined; // invalid LHS >A = undefined : undefined diff --git a/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.js b/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.js index ac2b7368361f8..a43fc66615cfc 100644 --- a/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.js +++ b/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToObjectTypeWithPrototypeProperty.ts] //// + //// [assignToObjectTypeWithPrototypeProperty.ts] class XEvent {} var p: XEvent = XEvent.prototype; diff --git a/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.symbols b/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.symbols index 730560d0d81be..ac3e944676bec 100644 --- a/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.symbols +++ b/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToObjectTypeWithPrototypeProperty.ts === +//// [tests/cases/compiler/assignToObjectTypeWithPrototypeProperty.ts] //// + +=== assignToObjectTypeWithPrototypeProperty.ts === class XEvent {} >XEvent : Symbol(XEvent, Decl(assignToObjectTypeWithPrototypeProperty.ts, 0, 0)) diff --git a/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.types b/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.types index a71c447b5c6ca..f423141dd9195 100644 --- a/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.types +++ b/tests/baselines/reference/assignToObjectTypeWithPrototypeProperty.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToObjectTypeWithPrototypeProperty.ts === +//// [tests/cases/compiler/assignToObjectTypeWithPrototypeProperty.ts] //// + +=== assignToObjectTypeWithPrototypeProperty.ts === class XEvent {} >XEvent : XEvent diff --git a/tests/baselines/reference/assignToPrototype1.js b/tests/baselines/reference/assignToPrototype1.js index b2d2af37e5296..c3006b1d89d78 100644 --- a/tests/baselines/reference/assignToPrototype1.js +++ b/tests/baselines/reference/assignToPrototype1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignToPrototype1.ts] //// + //// [assignToPrototype1.ts] declare class Point { add(dx: number, dy: number): void; diff --git a/tests/baselines/reference/assignToPrototype1.symbols b/tests/baselines/reference/assignToPrototype1.symbols index 7e58c92fdcbc6..d0b1ed9cbb209 100644 --- a/tests/baselines/reference/assignToPrototype1.symbols +++ b/tests/baselines/reference/assignToPrototype1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToPrototype1.ts === +//// [tests/cases/compiler/assignToPrototype1.ts] //// + +=== assignToPrototype1.ts === declare class Point { >Point : Symbol(Point, Decl(assignToPrototype1.ts, 0, 0)) diff --git a/tests/baselines/reference/assignToPrototype1.types b/tests/baselines/reference/assignToPrototype1.types index f4631c89e0b3b..1292caa91d95d 100644 --- a/tests/baselines/reference/assignToPrototype1.types +++ b/tests/baselines/reference/assignToPrototype1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignToPrototype1.ts === +//// [tests/cases/compiler/assignToPrototype1.ts] //// + +=== assignToPrototype1.ts === declare class Point { >Point : Point diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt b/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt index 0a7a3a2db5c4e..a0210cdf806d0 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/assigningFromObjectToAnythingElse.ts(3,1): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +assigningFromObjectToAnythingElse.ts(3,1): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more. -tests/cases/compiler/assigningFromObjectToAnythingElse.ts(5,31): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/compiler/assigningFromObjectToAnythingElse.ts(6,31): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/compiler/assigningFromObjectToAnythingElse.ts(8,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +assigningFromObjectToAnythingElse.ts(5,31): error TS2558: Expected 0 type arguments, but got 1. +assigningFromObjectToAnythingElse.ts(6,31): error TS2558: Expected 0 type arguments, but got 1. +assigningFromObjectToAnythingElse.ts(8,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Type 'Object' is missing the following properties from type 'Error': name, message -==== tests/cases/compiler/assigningFromObjectToAnythingElse.ts (4 errors) ==== +==== assigningFromObjectToAnythingElse.ts (4 errors) ==== var x: Object; var y: RegExp; y = x; diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.js b/tests/baselines/reference/assigningFromObjectToAnythingElse.js index 61c4a6ede22f8..39cddae6eee45 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.js +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assigningFromObjectToAnythingElse.ts] //// + //// [assigningFromObjectToAnythingElse.ts] var x: Object; var y: RegExp; diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols b/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols index 057e193fe8156..b66e34ceb34d5 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assigningFromObjectToAnythingElse.ts === +//// [tests/cases/compiler/assigningFromObjectToAnythingElse.ts] //// + +=== assigningFromObjectToAnythingElse.ts === var x: Object; >x : Symbol(x, Decl(assigningFromObjectToAnythingElse.ts, 0, 3)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/assigningFromObjectToAnythingElse.types b/tests/baselines/reference/assigningFromObjectToAnythingElse.types index 65e7012ffc34e..b1cf18b4c8a21 100644 --- a/tests/baselines/reference/assigningFromObjectToAnythingElse.types +++ b/tests/baselines/reference/assigningFromObjectToAnythingElse.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assigningFromObjectToAnythingElse.ts === +//// [tests/cases/compiler/assigningFromObjectToAnythingElse.ts] //// + +=== assigningFromObjectToAnythingElse.ts === var x: Object; >x : Object diff --git a/tests/baselines/reference/assigningFunctionToTupleIssuesError.errors.txt b/tests/baselines/reference/assigningFunctionToTupleIssuesError.errors.txt index ca1af66c0873c..bf6d4bb644b08 100644 --- a/tests/baselines/reference/assigningFunctionToTupleIssuesError.errors.txt +++ b/tests/baselines/reference/assigningFunctionToTupleIssuesError.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/assigningFunctionToTupleIssuesError.ts(2,5): error TS2322: Type '() => void' is not assignable to type '[string]'. +assigningFunctionToTupleIssuesError.ts(2,5): error TS2322: Type '() => void' is not assignable to type '[string]'. -==== tests/cases/compiler/assigningFunctionToTupleIssuesError.ts (1 errors) ==== +==== assigningFunctionToTupleIssuesError.ts (1 errors) ==== declare let a: () => void; let b: [string] = a; ~ diff --git a/tests/baselines/reference/assigningFunctionToTupleIssuesError.js b/tests/baselines/reference/assigningFunctionToTupleIssuesError.js index 3de3da7b3cc41..f5502a8feaad0 100644 --- a/tests/baselines/reference/assigningFunctionToTupleIssuesError.js +++ b/tests/baselines/reference/assigningFunctionToTupleIssuesError.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assigningFunctionToTupleIssuesError.ts] //// + //// [assigningFunctionToTupleIssuesError.ts] declare let a: () => void; let b: [string] = a; diff --git a/tests/baselines/reference/assigningFunctionToTupleIssuesError.symbols b/tests/baselines/reference/assigningFunctionToTupleIssuesError.symbols index 7a499662aeffb..6a1d97ba1e5f6 100644 --- a/tests/baselines/reference/assigningFunctionToTupleIssuesError.symbols +++ b/tests/baselines/reference/assigningFunctionToTupleIssuesError.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assigningFunctionToTupleIssuesError.ts === +//// [tests/cases/compiler/assigningFunctionToTupleIssuesError.ts] //// + +=== assigningFunctionToTupleIssuesError.ts === declare let a: () => void; >a : Symbol(a, Decl(assigningFunctionToTupleIssuesError.ts, 0, 11)) diff --git a/tests/baselines/reference/assigningFunctionToTupleIssuesError.types b/tests/baselines/reference/assigningFunctionToTupleIssuesError.types index 6c7d57f8483f2..380e012fa0136 100644 --- a/tests/baselines/reference/assigningFunctionToTupleIssuesError.types +++ b/tests/baselines/reference/assigningFunctionToTupleIssuesError.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assigningFunctionToTupleIssuesError.ts === +//// [tests/cases/compiler/assigningFunctionToTupleIssuesError.ts] //// + +=== assigningFunctionToTupleIssuesError.ts === declare let a: () => void; >a : () => void diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 38bc0af3dc85b..21f47f1464878 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -1,22 +1,22 @@ -tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2741: Property 'one' is missing in type '{ [index: string]: any; }' but required in type '{ one: number; }'. -tests/cases/compiler/assignmentCompat1.ts(6,1): error TS2741: Property 'one' is missing in type '{ [index: number]: any; }' but required in type '{ one: number; }'. -tests/cases/compiler/assignmentCompat1.ts(8,1): error TS2322: Type 'string' is not assignable to type '{ [index: string]: any; }'. -tests/cases/compiler/assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is not assignable to type '{ [index: number]: any; }'. +assignmentCompat1.ts(4,1): error TS2741: Property 'one' is missing in type '{ [index: string]: any; }' but required in type '{ one: number; }'. +assignmentCompat1.ts(6,1): error TS2741: Property 'one' is missing in type '{ [index: number]: any; }' but required in type '{ one: number; }'. +assignmentCompat1.ts(8,1): error TS2322: Type 'string' is not assignable to type '{ [index: string]: any; }'. +assignmentCompat1.ts(10,1): error TS2322: Type 'boolean' is not assignable to type '{ [index: number]: any; }'. -==== tests/cases/compiler/assignmentCompat1.ts (4 errors) ==== +==== assignmentCompat1.ts (4 errors) ==== var x = { one: 1 }; var y: { [index: string]: any }; var z: { [index: number]: any }; x = y; // Error ~ !!! error TS2741: Property 'one' is missing in type '{ [index: string]: any; }' but required in type '{ one: number; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompat1.ts:1:11: 'one' is declared here. +!!! related TS2728 assignmentCompat1.ts:1:11: 'one' is declared here. y = x; // Ok because index signature type is any x = z; // Error ~ !!! error TS2741: Property 'one' is missing in type '{ [index: number]: any; }' but required in type '{ one: number; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompat1.ts:1:11: 'one' is declared here. +!!! related TS2728 assignmentCompat1.ts:1:11: 'one' is declared here. z = x; // Ok because index signature type is any y = "foo"; // Error ~ diff --git a/tests/baselines/reference/assignmentCompat1.js b/tests/baselines/reference/assignmentCompat1.js index 7451d342fa14b..7aa4680ff2a04 100644 --- a/tests/baselines/reference/assignmentCompat1.js +++ b/tests/baselines/reference/assignmentCompat1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompat1.ts] //// + //// [assignmentCompat1.ts] var x = { one: 1 }; var y: { [index: string]: any }; diff --git a/tests/baselines/reference/assignmentCompat1.symbols b/tests/baselines/reference/assignmentCompat1.symbols index 43d4525e498c5..8603aabcaea2e 100644 --- a/tests/baselines/reference/assignmentCompat1.symbols +++ b/tests/baselines/reference/assignmentCompat1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompat1.ts === +//// [tests/cases/compiler/assignmentCompat1.ts] //// + +=== assignmentCompat1.ts === var x = { one: 1 }; >x : Symbol(x, Decl(assignmentCompat1.ts, 0, 3)) >one : Symbol(one, Decl(assignmentCompat1.ts, 0, 9)) diff --git a/tests/baselines/reference/assignmentCompat1.types b/tests/baselines/reference/assignmentCompat1.types index 7036cca17251d..586b91e8620e2 100644 --- a/tests/baselines/reference/assignmentCompat1.types +++ b/tests/baselines/reference/assignmentCompat1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompat1.ts === +//// [tests/cases/compiler/assignmentCompat1.ts] //// + +=== assignmentCompat1.ts === var x = { one: 1 }; >x : { one: number; } >{ one: 1 } : { one: number; } diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt index 3fc5d847becc8..861f1ca4a05a1 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'. +assignmentCompatBetweenTupleAndArray.ts(17,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]'. +assignmentCompatBetweenTupleAndArray.ts(18,1): error TS2322: Type '{}[]' is not assignable to type '[{}]'. Target requires 1 element(s) but source may have fewer. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts (2 errors) ==== +==== assignmentCompatBetweenTupleAndArray.ts (2 errors) ==== var numStrTuple: [number, string]; var numNumTuple: [number, number]; var numEmptyObjTuple: [number, {}]; diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js index fd3ac1d46f144..eab8267b89688 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts] //// + //// [assignmentCompatBetweenTupleAndArray.ts] var numStrTuple: [number, string]; var numNumTuple: [number, number]; diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols index 0558393c631db..ebc52c1ccc15e 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts] //// + +=== assignmentCompatBetweenTupleAndArray.ts === var numStrTuple: [number, string]; >numStrTuple : Symbol(numStrTuple, Decl(assignmentCompatBetweenTupleAndArray.ts, 0, 3)) diff --git a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types index 7d4750d02fa56..22d45129056f1 100644 --- a/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types +++ b/tests/baselines/reference/assignmentCompatBetweenTupleAndArray.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatBetweenTupleAndArray.ts] //// + +=== assignmentCompatBetweenTupleAndArray.ts === var numStrTuple: [number, string]; >numStrTuple : [number, string] diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index 624db1b93e6ce..6d1e0ffd492d5 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/assignmentCompatBug2.ts(1,27): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. +assignmentCompatBug2.ts(1,27): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. -tests/cases/compiler/assignmentCompatBug2.ts(3,8): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. +assignmentCompatBug2.ts(3,8): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. -tests/cases/compiler/assignmentCompatBug2.ts(5,13): error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. +assignmentCompatBug2.ts(5,13): error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. -tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. -tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2741: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. -tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. +assignmentCompatBug2.ts(15,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. +assignmentCompatBug2.ts(20,1): error TS2741: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. +assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. -==== tests/cases/compiler/assignmentCompatBug2.ts (6 errors) ==== +==== assignmentCompatBug2.ts (6 errors) ==== var b2: { b: number;} = { a: 0 }; // error ~ !!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. @@ -36,7 +36,7 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i b3 = { ~~ !!! error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:55: 'm' is declared here. +!!! related TS2728 assignmentCompatBug2.ts:7:55: 'm' is declared here. f: (n) => { return 0; }, g: (s) => { return 0; }, }; // error @@ -44,7 +44,7 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i b3 = { ~~ !!! error TS2741: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:33: 'g' is declared here. +!!! related TS2728 assignmentCompatBug2.ts:7:33: 'g' is declared here. f: (n) => { return 0; }, m: 0, }; // error @@ -60,7 +60,7 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i b3 = { ~~ !!! error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:55: 'm' is declared here. +!!! related TS2728 assignmentCompatBug2.ts:7:55: 'm' is declared here. f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, diff --git a/tests/baselines/reference/assignmentCompatBug2.js b/tests/baselines/reference/assignmentCompatBug2.js index e569691aed380..8eafbe2b11059 100644 --- a/tests/baselines/reference/assignmentCompatBug2.js +++ b/tests/baselines/reference/assignmentCompatBug2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatBug2.ts] //// + //// [assignmentCompatBug2.ts] var b2: { b: number;} = { a: 0 }; // error diff --git a/tests/baselines/reference/assignmentCompatBug2.symbols b/tests/baselines/reference/assignmentCompatBug2.symbols index d34000b6fa7ae..0ecf88a6cdbee 100644 --- a/tests/baselines/reference/assignmentCompatBug2.symbols +++ b/tests/baselines/reference/assignmentCompatBug2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatBug2.ts === +//// [tests/cases/compiler/assignmentCompatBug2.ts] //// + +=== assignmentCompatBug2.ts === var b2: { b: number;} = { a: 0 }; // error >b2 : Symbol(b2, Decl(assignmentCompatBug2.ts, 0, 3)) >b : Symbol(b, Decl(assignmentCompatBug2.ts, 0, 9)) diff --git a/tests/baselines/reference/assignmentCompatBug2.types b/tests/baselines/reference/assignmentCompatBug2.types index ffb33244862ff..e32071d0cf715 100644 --- a/tests/baselines/reference/assignmentCompatBug2.types +++ b/tests/baselines/reference/assignmentCompatBug2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatBug2.ts === +//// [tests/cases/compiler/assignmentCompatBug2.ts] //// + +=== assignmentCompatBug2.ts === var b2: { b: number;} = { a: 0 }; // error >b2 : { b: number; } >b : number diff --git a/tests/baselines/reference/assignmentCompatBug3.js b/tests/baselines/reference/assignmentCompatBug3.js index ac79938f9364a..f56bd9b492e29 100644 --- a/tests/baselines/reference/assignmentCompatBug3.js +++ b/tests/baselines/reference/assignmentCompatBug3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatBug3.ts] //// + //// [assignmentCompatBug3.ts] function makePoint(x: number, y: number) { return { diff --git a/tests/baselines/reference/assignmentCompatBug3.symbols b/tests/baselines/reference/assignmentCompatBug3.symbols index fee72b360dfac..d534534bda074 100644 --- a/tests/baselines/reference/assignmentCompatBug3.symbols +++ b/tests/baselines/reference/assignmentCompatBug3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatBug3.ts === +//// [tests/cases/compiler/assignmentCompatBug3.ts] //// + +=== assignmentCompatBug3.ts === function makePoint(x: number, y: number) { >makePoint : Symbol(makePoint, Decl(assignmentCompatBug3.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) diff --git a/tests/baselines/reference/assignmentCompatBug3.types b/tests/baselines/reference/assignmentCompatBug3.types index 1c4581e2f196f..be97271188405 100644 --- a/tests/baselines/reference/assignmentCompatBug3.types +++ b/tests/baselines/reference/assignmentCompatBug3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatBug3.ts === +//// [tests/cases/compiler/assignmentCompatBug3.ts] //// + +=== assignmentCompatBug3.ts === function makePoint(x: number, y: number) { >makePoint : (x: number, y: number) => { readonly x: number; readonly y: number; dist: () => number; } >x : number diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index cbdfa1214b280..49f5755490708 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/assignmentCompatBug5.ts(2,8): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. +assignmentCompatBug5.ts(2,8): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. -tests/cases/compiler/assignmentCompatBug5.ts(5,7): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/assignmentCompatBug5.ts(5,12): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/assignmentCompatBug5.ts(8,6): error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. +assignmentCompatBug5.ts(5,7): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentCompatBug5.ts(5,12): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentCompatBug5.ts(8,6): error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. Types of parameters 's' and 'n' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. +assignmentCompatBug5.ts(9,6): error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. Type 'void' is not assignable to type 'number'. -==== tests/cases/compiler/assignmentCompatBug5.ts (5 errors) ==== +==== assignmentCompatBug5.ts (5 errors) ==== function foo1(x: { a: number; }) { } foo1({ b: 5 }); ~ diff --git a/tests/baselines/reference/assignmentCompatBug5.js b/tests/baselines/reference/assignmentCompatBug5.js index ae444c3dad6eb..3206dcdc9da5b 100644 --- a/tests/baselines/reference/assignmentCompatBug5.js +++ b/tests/baselines/reference/assignmentCompatBug5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatBug5.ts] //// + //// [assignmentCompatBug5.ts] function foo1(x: { a: number; }) { } foo1({ b: 5 }); diff --git a/tests/baselines/reference/assignmentCompatBug5.symbols b/tests/baselines/reference/assignmentCompatBug5.symbols index 63d4af123b44c..d1f42c80ff18a 100644 --- a/tests/baselines/reference/assignmentCompatBug5.symbols +++ b/tests/baselines/reference/assignmentCompatBug5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatBug5.ts === +//// [tests/cases/compiler/assignmentCompatBug5.ts] //// + +=== assignmentCompatBug5.ts === function foo1(x: { a: number; }) { } >foo1 : Symbol(foo1, Decl(assignmentCompatBug5.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatBug5.ts, 0, 14)) diff --git a/tests/baselines/reference/assignmentCompatBug5.types b/tests/baselines/reference/assignmentCompatBug5.types index 8aadcc369d830..e2703de4e59d6 100644 --- a/tests/baselines/reference/assignmentCompatBug5.types +++ b/tests/baselines/reference/assignmentCompatBug5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatBug5.ts === +//// [tests/cases/compiler/assignmentCompatBug5.ts] //// + +=== assignmentCompatBug5.ts === function foo1(x: { a: number; }) { } >foo1 : (x: { a: number;}) => void >x : { a: number; } diff --git a/tests/baselines/reference/assignmentCompatForEnums.js b/tests/baselines/reference/assignmentCompatForEnums.js index 8db85399fa830..81fca0dde353a 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.js +++ b/tests/baselines/reference/assignmentCompatForEnums.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatForEnums.ts] //// + //// [assignmentCompatForEnums.ts] enum TokenType { One, Two }; diff --git a/tests/baselines/reference/assignmentCompatForEnums.symbols b/tests/baselines/reference/assignmentCompatForEnums.symbols index 510c08e61f692..7e9c42008a24f 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.symbols +++ b/tests/baselines/reference/assignmentCompatForEnums.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatForEnums.ts === +//// [tests/cases/compiler/assignmentCompatForEnums.ts] //// + +=== assignmentCompatForEnums.ts === enum TokenType { One, Two }; >TokenType : Symbol(TokenType, Decl(assignmentCompatForEnums.ts, 0, 0)) >One : Symbol(TokenType.One, Decl(assignmentCompatForEnums.ts, 0, 16)) diff --git a/tests/baselines/reference/assignmentCompatForEnums.types b/tests/baselines/reference/assignmentCompatForEnums.types index 8194a407249fe..162d8c02db7b6 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.types +++ b/tests/baselines/reference/assignmentCompatForEnums.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatForEnums.ts === +//// [tests/cases/compiler/assignmentCompatForEnums.ts] //// + +=== assignmentCompatForEnums.ts === enum TokenType { One, Two }; >TokenType : TokenType >One : TokenType.One diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt index 292852bf99217..ed95de201c349 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(4,17): error TS2322: Type 'boolean' is not assignable to type 'string'. -tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. +assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +assignmentCompatFunctionsWithOptionalArgs.ts(4,17): error TS2322: Type 'boolean' is not assignable to type 'string'. +assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string; }'. -==== tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts (3 errors) ==== +==== assignmentCompatFunctionsWithOptionalArgs.ts (3 errors) ==== function foo(x: { id: number; name?: string; }): void; ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. @@ -13,9 +13,9 @@ tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS foo({ id: 1234, name: false }); // Error, name of wrong type ~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'string'. -!!! related TS6500 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:31: The expected type comes from property 'name' which is declared here on type '{ id: number; name?: string; }' +!!! related TS6500 assignmentCompatFunctionsWithOptionalArgs.ts:1:31: The expected type comes from property 'name' which is declared here on type '{ id: number; name?: string; }' foo({ name: "hello" }); // Error, id required but missing ~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. !!! error TS2345: Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string; }'. -!!! related TS2728 tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts:1:19: 'id' is declared here. \ No newline at end of file +!!! related TS2728 assignmentCompatFunctionsWithOptionalArgs.ts:1:19: 'id' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js index c96c739bf3cb3..57acf2f70ace6 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts] //// + //// [assignmentCompatFunctionsWithOptionalArgs.ts] function foo(x: { id: number; name?: string; }): void; foo({ id: 1234 }); // Ok diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.symbols b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.symbols index e0a2d00ac3421..fda51b9b08881 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.symbols +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts === +//// [tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts] //// + +=== assignmentCompatFunctionsWithOptionalArgs.ts === function foo(x: { id: number; name?: string; }): void; >foo : Symbol(foo, Decl(assignmentCompatFunctionsWithOptionalArgs.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatFunctionsWithOptionalArgs.ts, 0, 13)) diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types index 8cb4327d16b39..a86aed10bb821 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts === +//// [tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts] //// + +=== assignmentCompatFunctionsWithOptionalArgs.ts === function foo(x: { id: number; name?: string; }): void; >foo : (x: { id: number; name?: string;}) => void >x : { id: number; name?: string; } diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt index 4c25dc87decab..774e7d402e5e8 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts(15,5): error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. +assignmentCompatInterfaceWithStringIndexSignature.ts(15,5): error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. Index signature for type 'string' is missing in type 'Foo'. -==== tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts (1 errors) ==== +==== assignmentCompatInterfaceWithStringIndexSignature.ts (1 errors) ==== interface IHandler { (e): boolean; } diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js index 13448bc57a460..a03a4d0efb07c 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts] //// + //// [assignmentCompatInterfaceWithStringIndexSignature.ts] interface IHandler { (e): boolean; diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.symbols b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.symbols index 2fa181500ae62..38f3b50eb194b 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.symbols +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts === +//// [tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts] //// + +=== assignmentCompatInterfaceWithStringIndexSignature.ts === interface IHandler { >IHandler : Symbol(IHandler, Decl(assignmentCompatInterfaceWithStringIndexSignature.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.types b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.types index 40ea57b597a47..3bd108b4d7d12 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.types +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts === +//// [tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts] //// + +=== assignmentCompatInterfaceWithStringIndexSignature.ts === interface IHandler { (e): boolean; >e : any diff --git a/tests/baselines/reference/assignmentCompatOnNew.js b/tests/baselines/reference/assignmentCompatOnNew.js index 14d9fb5071ee2..f5607ae2eea0d 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.js +++ b/tests/baselines/reference/assignmentCompatOnNew.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatOnNew.ts] //// + //// [assignmentCompatOnNew.ts] class Foo{}; diff --git a/tests/baselines/reference/assignmentCompatOnNew.symbols b/tests/baselines/reference/assignmentCompatOnNew.symbols index 524a22d2421f7..7f6cd1b831292 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.symbols +++ b/tests/baselines/reference/assignmentCompatOnNew.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatOnNew.ts === +//// [tests/cases/compiler/assignmentCompatOnNew.ts] //// + +=== assignmentCompatOnNew.ts === class Foo{}; >Foo : Symbol(Foo, Decl(assignmentCompatOnNew.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatOnNew.types b/tests/baselines/reference/assignmentCompatOnNew.types index 1c443eb8d0d4d..2982bd7e03286 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.types +++ b/tests/baselines/reference/assignmentCompatOnNew.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatOnNew.ts === +//// [tests/cases/compiler/assignmentCompatOnNew.ts] //// + +=== assignmentCompatOnNew.ts === class Foo{}; >Foo : Foo diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index c5914e593864f..905c8e33ce6ff 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -1,30 +1,30 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T'. +assignmentCompatWithCallSignatures.ts(35,1): error TS2322: Type 'S2' is not assignable to type 'T'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'. +assignmentCompatWithCallSignatures.ts(36,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. +assignmentCompatWithCallSignatures.ts(37,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. +assignmentCompatWithCallSignatures.ts(38,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void'. +assignmentCompatWithCallSignatures.ts(39,1): error TS2322: Type 'S2' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. +assignmentCompatWithCallSignatures.ts(40,1): error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void'. +assignmentCompatWithCallSignatures.ts(41,1): error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void'. +assignmentCompatWithCallSignatures.ts(42,1): error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts (8 errors) ==== +==== assignmentCompatWithCallSignatures.ts (8 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.js b/tests/baselines/reference/assignmentCompatWithCallSignatures.js index 12fc6159fac13..b590146a43b3a 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts] //// + //// [assignmentCompatWithCallSignatures.ts] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols index 26e3701c0e31e..aeaaa7a460154 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts] //// + +=== assignmentCompatWithCallSignatures.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.types b/tests/baselines/reference/assignmentCompatWithCallSignatures.types index 3d11a665035ad..7dd4861124743 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures.ts] //// + +=== assignmentCompatWithCallSignatures.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index 12cd30864464f..3cefc45caab17 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt @@ -1,34 +1,34 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: Type '() => number' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(34,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T'. +assignmentCompatWithCallSignatures2.ts(31,1): error TS2322: Type '() => number' is not assignable to type 'T'. +assignmentCompatWithCallSignatures2.ts(32,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T'. +assignmentCompatWithCallSignatures2.ts(33,1): error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }'. +assignmentCompatWithCallSignatures2.ts(34,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }'. +assignmentCompatWithCallSignatures2.ts(42,1): error TS2322: Type 'S2' is not assignable to type 'T'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. +assignmentCompatWithCallSignatures2.ts(43,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'. +assignmentCompatWithCallSignatures2.ts(44,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. +assignmentCompatWithCallSignatures2.ts(45,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. +assignmentCompatWithCallSignatures2.ts(46,1): error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'. +assignmentCompatWithCallSignatures2.ts(47,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type '(x: number) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'. +assignmentCompatWithCallSignatures2.ts(48,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }'. +assignmentCompatWithCallSignatures2.ts(49,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts (12 errors) ==== +==== assignmentCompatWithCallSignatures2.ts (12 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js index 6bfc1b6c0d64d..c7bf9a81f5a58 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts] //// + //// [assignmentCompatWithCallSignatures2.ts] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols index 267aea9fa5fd3..b861c36caeeb8 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts] //// + +=== assignmentCompatWithCallSignatures2.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.types b/tests/baselines/reference/assignmentCompatWithCallSignatures2.types index e828d9170d649..345e81daaa362 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures2.ts] //// + +=== assignmentCompatWithCallSignatures2.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt index 4b707a808b38c..def250f002fe2 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.errors.txt @@ -1,68 +1,68 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(47,1): error TS2322: Type '(x: number) => number[]' is not assignable to type '(x: T) => T[]'. +assignmentCompatWithCallSignatures3.ts(47,1): error TS2322: Type '(x: number) => number[]' is not assignable to type '(x: T) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(50,1): error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => string[]'. +assignmentCompatWithCallSignatures3.ts(50,1): error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => string[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(53,1): error TS2322: Type '(x: number) => void' is not assignable to type '(x: T) => T'. +assignmentCompatWithCallSignatures3.ts(53,1): error TS2322: Type '(x: number) => void' is not assignable to type '(x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(56,1): error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(x: T, y: U) => T'. +assignmentCompatWithCallSignatures3.ts(56,1): error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(x: T, y: U) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(59,1): error TS2322: Type '(x: (arg: string) => number) => string' is not assignable to type '(x: (arg: T) => U) => T'. +assignmentCompatWithCallSignatures3.ts(59,1): error TS2322: Type '(x: (arg: string) => number) => string' is not assignable to type '(x: (arg: T) => U) => T'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(62,1): error TS2322: Type '(x: (arg: Base) => Derived) => Base' is not assignable to type '(x: (arg: T) => U) => T'. +assignmentCompatWithCallSignatures3.ts(62,1): error TS2322: Type '(x: (arg: Base) => Derived) => Base' is not assignable to type '(x: (arg: T) => U) => T'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(65,1): error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U) => (r: T) => U'. +assignmentCompatWithCallSignatures3.ts(65,1): error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(68,1): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U'. +assignmentCompatWithCallSignatures3.ts(68,1): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(71,1): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U'. +assignmentCompatWithCallSignatures3.ts(71,1): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(74,1): error TS2322: Type '(...x: Derived[]) => Derived' is not assignable to type '(...x: T[]) => T'. +assignmentCompatWithCallSignatures3.ts(74,1): error TS2322: Type '(...x: Derived[]) => Derived' is not assignable to type '(...x: T[]) => T'. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(77,1): error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '(x: T, y: T) => T'. +assignmentCompatWithCallSignatures3.ts(77,1): error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '(x: T, y: T) => T'. Types of parameters 'y' and 'y' are incompatible. Type 'T' is not assignable to type '{ foo: string; bar: string; }'. Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(80,1): error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => Derived[]'. +assignmentCompatWithCallSignatures3.ts(80,1): error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => Derived[]'. Types of parameters 'y' and 'y' are incompatible. Type 'T' is not assignable to type 'Derived2[]'. Type 'Base[]' is not assignable to type 'Derived2[]'. Type 'Base' is missing the following properties from type 'Derived2': baz, bar -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(83,1): error TS2322: Type '(x: Base[], y: Derived[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => T'. +assignmentCompatWithCallSignatures3.ts(83,1): error TS2322: Type '(x: Base[], y: Derived[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => T'. Type 'Derived[]' is not assignable to type 'T'. 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(85,1): error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => Object'. +assignmentCompatWithCallSignatures3.ts(85,1): error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => Object'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. Types of property 'b' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: string; b: number; }) => Object' is not assignable to type '(x: { a: T; b: T; }) => T'. +assignmentCompatWithCallSignatures3.ts(86,1): error TS2322: Type '(x: { a: string; b: number; }) => Object' is not assignable to type '(x: { a: T; b: T; }) => T'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts (15 errors) ==== +==== assignmentCompatWithCallSignatures3.ts (15 errors) ==== // these are all permitted with the current rules, since we do not do contextual signature instantiation class Base { foo: string; } @@ -114,7 +114,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: number) => number[]' is not assignable to type '(x: T) => T[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:45:9: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:45:9: This type parameter might need an `extends number` constraint. var b2: (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok @@ -122,7 +122,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => string[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:48:10: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:48:10: This type parameter might need an `extends number` constraint. var b3: (x: T) => T; a3 = b3; // ok b3 = a3; // ok @@ -130,7 +130,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: number) => void' is not assignable to type '(x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:51:10: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:51:10: This type parameter might need an `extends number` constraint. var b4: (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok @@ -138,7 +138,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(x: T, y: U) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:54:10: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:54:10: This type parameter might need an `extends string` constraint. var b5: (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok @@ -199,7 +199,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'T' is not assignable to type '{ foo: string; bar: string; }'. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:18:49: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithCallSignatures3.ts:18:49: 'bar' is declared here. var b12: >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok @@ -231,7 +231,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts:84:11: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures3.ts:84:11: This type parameter might need an `extends string` constraint. var b15: (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index 0d6d31486414f..7c3cfb81b994f 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts] //// + //// [assignmentCompatWithCallSignatures3.ts] // these are all permitted with the current rules, since we do not do contextual signature instantiation diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols index ddd44e97d90b5..a404ae143ce9a 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts] //// + +=== assignmentCompatWithCallSignatures3.ts === // these are all permitted with the current rules, since we do not do contextual signature instantiation class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types index e904fd3141249..4c11234186aff 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts] //// + +=== assignmentCompatWithCallSignatures3.ts === // these are all permitted with the current rules, since we do not do contextual signature instantiation class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index c410160366a8d..9a807ded124eb 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -1,69 +1,69 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(45,9): error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => U[]'. +assignmentCompatWithCallSignatures4.ts(45,9): error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => U[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(49,9): error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type '(x: (arg: T) => U) => (r: T) => V'. +assignmentCompatWithCallSignatures4.ts(49,9): error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type '(x: (arg: T) => U) => (r: T) => V'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. +assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. Types of parameters 'y' and 'y' are incompatible. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. Types of property 'foo' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. +assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(58,9): error TS2322: Type '(...x: Base[]) => Base' is not assignable to type '(...x: T[]) => T'. +assignmentCompatWithCallSignatures4.ts(58,9): error TS2322: Type '(...x: Base[]) => Base' is not assignable to type '(...x: T[]) => T'. Type 'Base' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(62,9): error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '(x: T, y: T) => T'. +assignmentCompatWithCallSignatures4.ts(62,9): error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '(x: T, y: T) => T'. Type 'Base' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(66,9): error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '(x: Base[], y: Base[]) => T'. +assignmentCompatWithCallSignatures4.ts(66,9): error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '(x: Base[], y: Base[]) => T'. Type 'Derived[]' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Derived[]'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(69,9): error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'. +assignmentCompatWithCallSignatures4.ts(69,9): error TS2322: Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. Types of property 'b' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(70,9): error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '(x: { a: T; b: T; }) => T'. +assignmentCompatWithCallSignatures4.ts(70,9): error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '(x: { a: T; b: T; }) => T'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(73,9): error TS2322: Type '(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'. +assignmentCompatWithCallSignatures4.ts(73,9): error TS2322: Type '(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'string' is not assignable to type 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(74,9): error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '(x: { a: T; b: T; }) => number'. +assignmentCompatWithCallSignatures4.ts(74,9): error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '(x: { a: T; b: T; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'string'. Type 'Base' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(89,9): error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. +assignmentCompatWithCallSignatures4.ts(89,9): error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. Type 'string[]' is not assignable to type 'T[]'. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(90,9): error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. +assignmentCompatWithCallSignatures4.ts(90,9): error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. Type 'T[]' is not assignable to type 'string[]'. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(95,9): error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. +assignmentCompatWithCallSignatures4.ts(95,9): error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. Type 'T[]' is not assignable to type 'string[]'. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. +assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. Type 'string[]' is not assignable to type 'T[]'. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (15 errors) ==== +==== assignmentCompatWithCallSignatures4.ts (15 errors) ==== // These are mostly permitted with the current loose rules. All ok unless otherwise noted. module Errors { @@ -113,7 +113,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: number) => string[]' is not assignable to type '(x: T) => U[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:43:18: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:43:18: This type parameter might need an `extends number` constraint. var b7: (x: (arg: T) => U) => (r: T) => V; a7 = b7; @@ -182,7 +182,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:68:19: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:68:19: This type parameter might need an `extends string` constraint. var b15a: (x: { a: T; b: T }) => number; a15 = b15a; @@ -225,7 +225,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:88:18: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:88:18: This type parameter might need an `extends string` constraint. // target type has generic call signature var a3: (x: T) => string[]; @@ -235,7 +235,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: T) => T[]' is not assignable to type '(x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts:93:18: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures4.ts:93:18: This type parameter might need an `extends string` constraint. b3 = a3; ~~ !!! error TS2322: Type '(x: T) => string[]' is not assignable to type '(x: T) => T[]'. diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 5b61596e2a577..1782ca7cb0a0e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts] //// + //// [assignmentCompatWithCallSignatures4.ts] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols index 47be56410bd59..54822b60d9e01 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts] //// + +=== assignmentCompatWithCallSignatures4.ts === // These are mostly permitted with the current loose rules. All ok unless otherwise noted. module Errors { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types index ccbcb3ccfd9a3..9bbb6314447dc 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts] //// + +=== assignmentCompatWithCallSignatures4.ts === // These are mostly permitted with the current loose rules. All ok unless otherwise noted. module Errors { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt index 7e156f7a1a2f7..07d3fc5394645 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(40,1): error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. +assignmentCompatWithCallSignatures5.ts(40,1): error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. Type 'void' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(52,1): error TS2322: Type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +assignmentCompatWithCallSignatures5.ts(52,1): error TS2322: Type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. Types of parameters 'y' and 'y' are incompatible. Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(55,1): error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: U; b: V; }) => U[]'. +assignmentCompatWithCallSignatures5.ts(55,1): error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: U; b: V; }) => U[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'. Types of property 'b' are incompatible. Type 'V' is not assignable to type 'U'. 'U' could be instantiated with an arbitrary type which could be unrelated to 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: U; b: V; }) => U[]'. +assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: U; b: V; }) => U[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'U' is not assignable to type 'Base'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts (4 errors) ==== +==== assignmentCompatWithCallSignatures5.ts (4 errors) ==== // checking assignment compat for function types. No errors in this file class Base { foo: string; } @@ -84,7 +84,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'U' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:50:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures5.ts:50:14: This type parameter might need an `extends T` constraint. var b15: (x: { a: U; b: V; }) => U[]; a15 = b15; // ok, T = U, T = V b15 = a15; // ok @@ -95,7 +95,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'V' is not assignable to type 'U'. !!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'V'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:14: This type parameter might need an `extends U` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures5.ts:53:14: This type parameter might need an `extends U` constraint. var b16: (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok @@ -105,7 +105,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'U' is not assignable to type 'Base'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts:53:11: This type parameter might need an `extends Base` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures5.ts:53:11: This type parameter might need an `extends Base` constraint. var b17: (x: (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index abef6b1be0c32..097f6ac2dca22 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts] //// + //// [assignmentCompatWithCallSignatures5.ts] // checking assignment compat for function types. No errors in this file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols index e958922c1dec2..de33824ac824c 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts] //// + +=== assignmentCompatWithCallSignatures5.ts === // checking assignment compat for function types. No errors in this file class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types index 5492c477254d6..f28b235b0f023 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts] //// + +=== assignmentCompatWithCallSignatures5.ts === // checking assignment compat for function types. No errors in this file class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt index 3129b0b230a71..98d798bde9a81 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts(30,1): error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. +assignmentCompatWithCallSignatures6.ts(30,1): error TS2322: Type '(x: T) => void' is not assignable to type '(x: T) => T'. Type 'void' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts(39,1): error TS2322: Type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +assignmentCompatWithCallSignatures6.ts(39,1): error TS2322: Type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. Types of parameters 'y' and 'y' are incompatible. Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts(42,1): error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: T; b: T; }) => T[]'. +assignmentCompatWithCallSignatures6.ts(42,1): error TS2322: Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: T; b: T; }) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'Base'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts (3 errors) ==== +==== assignmentCompatWithCallSignatures6.ts (3 errors) ==== // checking assignment compatibility relations for function types. All valid class Base { foo: string; } @@ -65,7 +65,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'U' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:37:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithCallSignatures6.ts:37:14: This type parameter might need an `extends T` constraint. var b16: (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; @@ -75,4 +75,4 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'Base'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts:40:11: This type parameter might need an `extends Base` constraint. \ No newline at end of file +!!! related TS2208 assignmentCompatWithCallSignatures6.ts:40:11: This type parameter might need an `extends Base` constraint. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 4ba96ed8cbd32..740ed15c17c7d 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts] //// + //// [assignmentCompatWithCallSignatures6.ts] // checking assignment compatibility relations for function types. All valid diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols index 008ea5481a98a..95b783cdecaeb 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts] //// + +=== assignmentCompatWithCallSignatures6.ts === // checking assignment compatibility relations for function types. All valid class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.types b/tests/baselines/reference/assignmentCompatWithCallSignatures6.types index aa7a3839f2a4a..23f7daaf22374 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts] //// + +=== assignmentCompatWithCallSignatures6.ts === // checking assignment compatibility relations for function types. All valid class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt index 7f73c916eb8cc..0563b2842532d 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type '(x: number) => number' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(20,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(22,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 2 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(33,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. Target signature provides too few arguments. Expected 2 or more, but got 1. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(39,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. Target signature provides too few arguments. Expected 2 or more, but got 1. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +assignmentCompatWithCallSignaturesWithOptionalParameters.ts(45,5): error TS2322: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. Target signature provides too few arguments. Expected 2 or more, but got 1. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts (7 errors) ==== +==== assignmentCompatWithCallSignaturesWithOptionalParameters.ts (7 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the base type interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js index e12a741cd0f13..255e10e1ecf13 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts] //// + //// [assignmentCompatWithCallSignaturesWithOptionalParameters.ts] // call signatures in derived types must have the same or fewer optional parameters as the base type diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols index c2a10279efa8a..c0328bd27141a 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts] //// + +=== assignmentCompatWithCallSignaturesWithOptionalParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the base type interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types index 95ca5cb4dc37e..5c97f5ecf0307 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithOptionalParameters.ts] //// + +=== assignmentCompatWithCallSignaturesWithOptionalParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the base type interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt index 6b563ef26312e..ea8eb09c6b2c8 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt @@ -1,33 +1,33 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(13,5): error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number'. Types of parameters 'args' and 'args' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(17,5): error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number'. Types of parameters 'x' and 'args' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(26,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number'. Types of parameters 'args' and 'z' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(35,5): error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. Types of parameters 'y' and 'y' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(36,5): error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. Types of parameters 'z' and 'y' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(37,5): error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(41,5): error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. Types of parameters 'y' and 'y' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(43,5): error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. Types of parameters 'y' and 'y' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. +assignmentCompatWithCallSignaturesWithRestParameters.ts(45,5): error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number'. Types of parameters 'args' and 'z' are incompatible. Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts (9 errors) ==== +==== assignmentCompatWithCallSignaturesWithRestParameters.ts (9 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the target for assignment interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js index ec86f218ac0f9..200540d6373e7 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts] //// + //// [assignmentCompatWithCallSignaturesWithRestParameters.ts] // call signatures in derived types must have the same or fewer optional parameters as the target for assignment diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.symbols b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.symbols index f38ad64d13de6..b33b41a71dac2 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts] //// + +=== assignmentCompatWithCallSignaturesWithRestParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the target for assignment interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.types b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.types index 44719238f82b6..7584cf6e4ec7f 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.types +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignaturesWithRestParameters.ts] //// + +=== assignmentCompatWithCallSignaturesWithRestParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the target for assignment interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index cdf0ee400de41..7ce4e3e9b02c9 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2322: Type 'S2' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures.ts(28,1): error TS2322: Type 'S2' is not assignable to type 'T'. Type 'S2' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures.ts(29,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'. Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures.ts(30,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures.ts(31,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'. +assignmentCompatWithConstructSignatures.ts(32,1): error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'. Type 'S2' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +assignmentCompatWithConstructSignatures.ts(33,1): error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. +assignmentCompatWithConstructSignatures.ts(34,1): error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. +assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts (8 errors) ==== +==== assignmentCompatWithConstructSignatures.ts (8 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js index c00aa121712ef..91f4bad4f16ed 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts] //// + //// [assignmentCompatWithConstructSignatures.ts] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols index 78c153212b8fc..669fbe2e80306 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts] //// + +=== assignmentCompatWithConstructSignatures.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures.types index e331da983afb9..c1906a462992d 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts] //// + +=== assignmentCompatWithConstructSignatures.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index 9491885cc81f5..e9d188fca97ec 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -1,30 +1,30 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: Type '() => number' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(26,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures2.ts(23,1): error TS2322: Type '() => number' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures2.ts(24,1): error TS2322: Type '(x: number) => string' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures2.ts(25,1): error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }'. +assignmentCompatWithConstructSignatures2.ts(26,1): error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }'. +assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'. +assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. +assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'. +assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'. +assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'. +assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts (12 errors) ==== +==== assignmentCompatWithConstructSignatures2.ts (12 errors) ==== // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js index d00762aa1c5b7..68173d62aca87 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts] //// + //// [assignmentCompatWithConstructSignatures2.ts] // void returning call signatures can be assigned a non-void returning call signature that otherwise matches diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols index ed67a37896e5f..5b543a5118a5d 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts] //// + +=== assignmentCompatWithConstructSignatures2.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types index 08b45447a0543..09b20cdd37d22 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts] //// + +=== assignmentCompatWithConstructSignatures2.ts === // void returning call signatures can be assigned a non-void returning call signature that otherwise matches interface T { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt index 288128515006b..fc64e02f7c6a9 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt @@ -1,68 +1,68 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(47,1): error TS2322: Type 'new (x: number) => number[]' is not assignable to type 'new (x: T) => T[]'. +assignmentCompatWithConstructSignatures3.ts(47,1): error TS2322: Type 'new (x: number) => number[]' is not assignable to type 'new (x: T) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(50,1): error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => string[]'. +assignmentCompatWithConstructSignatures3.ts(50,1): error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => string[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(53,1): error TS2322: Type 'new (x: number) => void' is not assignable to type 'new (x: T) => T'. +assignmentCompatWithConstructSignatures3.ts(53,1): error TS2322: Type 'new (x: number) => void' is not assignable to type 'new (x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(56,1): error TS2322: Type 'new (x: string, y: number) => string' is not assignable to type 'new (x: T, y: U) => T'. +assignmentCompatWithConstructSignatures3.ts(56,1): error TS2322: Type 'new (x: string, y: number) => string' is not assignable to type 'new (x: T, y: U) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(59,1): error TS2322: Type 'new (x: (arg: string) => number) => string' is not assignable to type 'new (x: (arg: T) => U) => T'. +assignmentCompatWithConstructSignatures3.ts(59,1): error TS2322: Type 'new (x: (arg: string) => number) => string' is not assignable to type 'new (x: (arg: T) => U) => T'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(62,1): error TS2322: Type 'new (x: (arg: Base) => Derived) => Base' is not assignable to type 'new (x: (arg: T) => U) => T'. +assignmentCompatWithConstructSignatures3.ts(62,1): error TS2322: Type 'new (x: (arg: Base) => Derived) => Base' is not assignable to type 'new (x: (arg: T) => U) => T'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(65,1): error TS2322: Type 'new (x: (arg: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U) => (r: T) => U'. +assignmentCompatWithConstructSignatures3.ts(65,1): error TS2322: Type 'new (x: (arg: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(68,1): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U'. +assignmentCompatWithConstructSignatures3.ts(68,1): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(71,1): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U'. +assignmentCompatWithConstructSignatures3.ts(71,1): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(74,1): error TS2322: Type 'new (...x: Derived[]) => Derived' is not assignable to type 'new (...x: T[]) => T'. +assignmentCompatWithConstructSignatures3.ts(74,1): error TS2322: Type 'new (...x: Derived[]) => Derived' is not assignable to type 'new (...x: T[]) => T'. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(77,1): error TS2322: Type 'new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type 'new (x: T, y: T) => T'. +assignmentCompatWithConstructSignatures3.ts(77,1): error TS2322: Type 'new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type 'new (x: T, y: T) => T'. Types of parameters 'y' and 'y' are incompatible. Type 'T' is not assignable to type '{ foo: string; bar: string; }'. Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(80,1): error TS2322: Type 'new (x: Base[], y: Derived2[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => Derived[]'. +assignmentCompatWithConstructSignatures3.ts(80,1): error TS2322: Type 'new (x: Base[], y: Derived2[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => Derived[]'. Types of parameters 'y' and 'y' are incompatible. Type 'T' is not assignable to type 'Derived2[]'. Type 'Base[]' is not assignable to type 'Derived2[]'. Type 'Base' is missing the following properties from type 'Derived2': baz, bar -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(83,1): error TS2322: Type 'new (x: Base[], y: Derived[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => T'. +assignmentCompatWithConstructSignatures3.ts(83,1): error TS2322: Type 'new (x: Base[], y: Derived[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => T'. Type 'Derived[]' is not assignable to type 'T'. 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(85,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => Object'. +assignmentCompatWithConstructSignatures3.ts(85,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => Object'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. Types of property 'b' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { a: string; b: number; }) => Object' is not assignable to type 'new (x: { a: T; b: T; }) => T'. +assignmentCompatWithConstructSignatures3.ts(86,1): error TS2322: Type 'new (x: { a: string; b: number; }) => Object' is not assignable to type 'new (x: { a: T; b: T; }) => T'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts (15 errors) ==== +==== assignmentCompatWithConstructSignatures3.ts (15 errors) ==== // checking assignment compatibility relations for function types. All of these are valid. class Base { foo: string; } @@ -114,7 +114,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: number) => number[]' is not assignable to type 'new (x: T) => T[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:45:13: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:45:13: This type parameter might need an `extends number` constraint. var b2: new (x: T) => string[]; a2 = b2; // ok b2 = a2; // ok @@ -122,7 +122,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => string[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:48:14: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:48:14: This type parameter might need an `extends number` constraint. var b3: new (x: T) => T; a3 = b3; // ok b3 = a3; // ok @@ -130,7 +130,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: number) => void' is not assignable to type 'new (x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:51:14: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:51:14: This type parameter might need an `extends number` constraint. var b4: new (x: T, y: U) => T; a4 = b4; // ok b4 = a4; // ok @@ -138,7 +138,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: string, y: number) => string' is not assignable to type 'new (x: T, y: U) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:54:14: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:54:14: This type parameter might need an `extends string` constraint. var b5: new (x: (arg: T) => U) => T; a5 = b5; // ok b5 = a5; // ok @@ -199,7 +199,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'T' is not assignable to type '{ foo: string; bar: string; }'. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type '{ foo: string; bar: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:18:53: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithConstructSignatures3.ts:18:53: 'bar' is declared here. var b12: new >(x: Array, y: T) => Array; a12 = b12; // ok b12 = a12; // ok @@ -231,7 +231,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts:84:15: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures3.ts:84:15: This type parameter might need an `extends string` constraint. var b15: new (x: T) => T[]; a15 = b15; // ok b15 = a15; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index 1814f6defc345..c529a6599cd05 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts] //// + //// [assignmentCompatWithConstructSignatures3.ts] // checking assignment compatibility relations for function types. All of these are valid. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols index 7169c546b3ea5..997b1e2e09ae8 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts] //// + +=== assignmentCompatWithConstructSignatures3.ts === // checking assignment compatibility relations for function types. All of these are valid. class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types index 4be1347fca355..beeb022033c73 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts] //// + +=== assignmentCompatWithConstructSignatures3.ts === // checking assignment compatibility relations for function types. All of these are valid. class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index 4589f7f9c3995..6fffdce00b771 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -1,85 +1,85 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(45,9): error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => U[]'. +assignmentCompatWithConstructSignatures4.ts(45,9): error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => U[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(49,9): error TS2322: Type 'new (x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type 'new (x: (arg: T) => U) => (r: T) => V'. +assignmentCompatWithConstructSignatures4.ts(49,9): error TS2322: Type 'new (x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type 'new (x: (arg: T) => U) => (r: T) => V'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. +assignmentCompatWithConstructSignatures4.ts(52,9): error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. Types of parameters 'y' and 'y' are incompatible. Types of parameters 'arg2' and 'arg2' are incompatible. Type '{ foo: number; }' is not assignable to type 'Base'. Types of property 'foo' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. +assignmentCompatWithConstructSignatures4.ts(53,9): error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'Base' is not assignable to type 'T'. 'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(58,9): error TS2322: Type 'new (...x: Base[]) => Base' is not assignable to type 'new (...x: T[]) => T'. +assignmentCompatWithConstructSignatures4.ts(58,9): error TS2322: Type 'new (...x: Base[]) => Base' is not assignable to type 'new (...x: T[]) => T'. Type 'Base' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(62,9): error TS2322: Type 'new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type 'new (x: T, y: T) => T'. +assignmentCompatWithConstructSignatures4.ts(62,9): error TS2322: Type 'new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type 'new (x: T, y: T) => T'. Type 'Base' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(66,9): error TS2322: Type 'new (x: Base[], y: Derived2[]) => Derived[]' is not assignable to type 'new (x: Base[], y: Base[]) => T'. +assignmentCompatWithConstructSignatures4.ts(66,9): error TS2322: Type 'new (x: Base[], y: Derived2[]) => Derived[]' is not assignable to type 'new (x: Base[], y: Base[]) => T'. Type 'Derived[]' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Derived[]'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(69,9): error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => number'. +assignmentCompatWithConstructSignatures4.ts(69,9): error TS2322: Type 'new (x: { a: T; b: T; }) => T' is not assignable to type 'new (x: { a: string; b: number; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. Types of property 'b' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(70,9): error TS2322: Type 'new (x: { a: string; b: number; }) => number' is not assignable to type 'new (x: { a: T; b: T; }) => T'. +assignmentCompatWithConstructSignatures4.ts(70,9): error TS2322: Type 'new (x: { a: string; b: number; }) => number' is not assignable to type 'new (x: { a: T; b: T; }) => T'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(73,9): error TS2322: Type 'new (x: { a: T; b: T; }) => number' is not assignable to type 'new (x: { a: string; b: number; }) => number'. +assignmentCompatWithConstructSignatures4.ts(73,9): error TS2322: Type 'new (x: { a: T; b: T; }) => number' is not assignable to type 'new (x: { a: string; b: number; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'string' is not assignable to type 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(74,9): error TS2322: Type 'new (x: { a: string; b: number; }) => number' is not assignable to type 'new (x: { a: T; b: T; }) => number'. +assignmentCompatWithConstructSignatures4.ts(74,9): error TS2322: Type 'new (x: { a: string; b: number; }) => number' is not assignable to type 'new (x: { a: T; b: T; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'string'. Type 'Base' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. +assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. +assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. Type '(a: any) => any' provides no match for the signature 'new (a: number): number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. +assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. +assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. Type '(a: any) => any' provides no match for the signature 'new (a: T): T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(89,9): error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. +assignmentCompatWithConstructSignatures4.ts(89,9): error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. Type 'string[]' is not assignable to type 'T[]'. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(90,9): error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. +assignmentCompatWithConstructSignatures4.ts(90,9): error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. Type 'T[]' is not assignable to type 'string[]'. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(95,9): error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. +assignmentCompatWithConstructSignatures4.ts(95,9): error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. Type 'T[]' is not assignable to type 'string[]'. Type 'T' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. +assignmentCompatWithConstructSignatures4.ts(96,9): error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. Type 'string[]' is not assignable to type 'T[]'. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (19 errors) ==== +==== assignmentCompatWithConstructSignatures4.ts (19 errors) ==== // checking assignment compatibility relations for function types. module Errors { @@ -129,7 +129,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: number) => string[]' is not assignable to type 'new (x: T) => U[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'number'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:43:22: This type parameter might need an `extends number` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:43:22: This type parameter might need an `extends number` constraint. var b7: new (x: (arg: T) => U) => (r: T) => V; a7 = b7; // ok @@ -198,7 +198,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:68:23: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:68:23: This type parameter might need an `extends string` constraint. var b15a: new (x: { a: T; b: T }) => number; a15 = b15a; // ok @@ -261,7 +261,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:88:22: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:88:22: This type parameter might need an `extends string` constraint. // target type has generic call signature var a3: new (x: T) => string[]; @@ -271,7 +271,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: T) => T[]' is not assignable to type 'new (x: T) => string[]'. !!! error TS2322: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2322: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts:93:22: This type parameter might need an `extends string` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures4.ts:93:22: This type parameter might need an `extends string` constraint. b3 = a3; // ok ~~ !!! error TS2322: Type 'new (x: T) => string[]' is not assignable to type 'new (x: T) => T[]'. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index 82f9ebff3d2fd..8944c699cc898 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts] //// + //// [assignmentCompatWithConstructSignatures4.ts] // checking assignment compatibility relations for function types. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols index 0fbed173429fe..88df86dea784d 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts] //// + +=== assignmentCompatWithConstructSignatures4.ts === // checking assignment compatibility relations for function types. module Errors { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types index a13015a3083e5..5e3a05a1329fe 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts] //// + +=== assignmentCompatWithConstructSignatures4.ts === // checking assignment compatibility relations for function types. module Errors { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt index 65a5fd2e92c0b..adb0972082fdb 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.errors.txt @@ -1,26 +1,26 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts(40,1): error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. +assignmentCompatWithConstructSignatures5.ts(40,1): error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. Type 'void' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts(52,1): error TS2322: Type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +assignmentCompatWithConstructSignatures5.ts(52,1): error TS2322: Type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. Types of parameters 'y' and 'y' are incompatible. Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts(55,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: U; b: V; }) => U[]'. +assignmentCompatWithConstructSignatures5.ts(55,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: U; b: V; }) => U[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'. Types of property 'b' are incompatible. Type 'V' is not assignable to type 'U'. 'U' could be instantiated with an arbitrary type which could be unrelated to 'V'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: U; b: V; }) => U[]'. +assignmentCompatWithConstructSignatures5.ts(58,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: U; b: V; }) => U[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'U' is not assignable to type 'Base'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts (4 errors) ==== +==== assignmentCompatWithConstructSignatures5.ts (4 errors) ==== // checking assignment compat for function types. All valid class Base { foo: string; } @@ -84,7 +84,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'U' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:50:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures5.ts:50:18: This type parameter might need an `extends T` constraint. var b15: new (x: { a: U; b: V; }) => U[]; a15 = b15; // ok b15 = a15; // ok @@ -95,7 +95,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of property 'b' are incompatible. !!! error TS2322: Type 'V' is not assignable to type 'U'. !!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'V'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:18: This type parameter might need an `extends U` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures5.ts:53:18: This type parameter might need an `extends U` constraint. var b16: new (x: { a: T; b: T }) => T[]; a15 = b16; // ok b15 = a16; // ok @@ -105,7 +105,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'U' is not assignable to type 'Base'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts:53:15: This type parameter might need an `extends Base` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures5.ts:53:15: This type parameter might need an `extends Base` constraint. var b17: new (x: new (a: T) => T) => T[]; a17 = b17; // ok b17 = a17; // ok diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index 79cfd8d5ef50a..ccad983de027b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts] //// + //// [assignmentCompatWithConstructSignatures5.ts] // checking assignment compat for function types. All valid diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols index 6fa6cc53bcd12..fd01679e6a986 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts] //// + +=== assignmentCompatWithConstructSignatures5.ts === // checking assignment compat for function types. All valid class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types index 1190d9a75b617..0375aa5e31e92 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures5.ts] //// + +=== assignmentCompatWithConstructSignatures5.ts === // checking assignment compat for function types. All valid class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt index a5289ca36c686..59034ca10b03f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts(30,1): error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. +assignmentCompatWithConstructSignatures6.ts(30,1): error TS2322: Type 'new (x: T) => void' is not assignable to type 'new (x: T) => T'. Type 'void' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts(39,1): error TS2322: Type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. +assignmentCompatWithConstructSignatures6.ts(39,1): error TS2322: Type 'new (x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type 'new (x: { foo: T; }, y: { foo: U; bar: U; }) => Base'. Types of parameters 'y' and 'y' are incompatible. Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'. Types of property 'foo' are incompatible. Type 'U' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts(42,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: T; b: T; }) => T[]'. +assignmentCompatWithConstructSignatures6.ts(42,1): error TS2322: Type 'new (x: { a: T; b: T; }) => T[]' is not assignable to type 'new (x: { a: T; b: T; }) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'T' is not assignable to type 'Base'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts (3 errors) ==== +==== assignmentCompatWithConstructSignatures6.ts (3 errors) ==== // checking assignment compatibility relations for function types. All valid. class Base { foo: string; } @@ -65,7 +65,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'U' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:37:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithConstructSignatures6.ts:37:18: This type parameter might need an `extends T` constraint. var b16: new (x: { a: T; b: T }) => T[]; x.a16 = b16; b16 = x.a16; @@ -75,4 +75,4 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'. !!! error TS2322: Types of property 'a' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'Base'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts:40:15: This type parameter might need an `extends Base` constraint. \ No newline at end of file +!!! related TS2208 assignmentCompatWithConstructSignatures6.ts:40:15: This type parameter might need an `extends Base` constraint. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index dcfb70a5ba52e..5c3f1ab68ebb5 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts] //// + //// [assignmentCompatWithConstructSignatures6.ts] // checking assignment compatibility relations for function types. All valid. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols index 8db5ad09d1d70..eaac9f33e7099 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts] //// + +=== assignmentCompatWithConstructSignatures6.ts === // checking assignment compatibility relations for function types. All valid. class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types index bd4992a599aa3..5c1b806659a56 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures6.ts] //// + +=== assignmentCompatWithConstructSignatures6.ts === // checking assignment compatibility relations for function types. All valid. class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt index 236c5191f8d5c..61495aa38b9f2 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'. +assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(16,5): error TS2322: Type 'new (x: number) => number' is not assignable to type 'new () => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. +assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(17,5): error TS2322: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. +assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(19,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. Target signature provides too few arguments. Expected 2 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. +assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(27,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. Target signature provides too few arguments. Expected 2 or more, but got 1. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. +assignmentCompatWithConstructSignaturesWithOptionalParameters.ts(35,5): error TS2322: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. Target signature provides too few arguments. Expected 2 or more, but got 1. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts (5 errors) ==== +==== assignmentCompatWithConstructSignaturesWithOptionalParameters.ts (5 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the base type interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js index e41011021d216..11b24bc4902be 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts] //// + //// [assignmentCompatWithConstructSignaturesWithOptionalParameters.ts] // call signatures in derived types must have the same or fewer optional parameters as the base type diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols index 5cd4f91642d39..f560ccf052345 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts] //// + +=== assignmentCompatWithConstructSignaturesWithOptionalParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the base type interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types index e304d4a20767e..8752266cee8c1 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignaturesWithOptionalParameters.ts] //// + +=== assignmentCompatWithConstructSignaturesWithOptionalParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the base type interface Base { diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt index 130b836d052a1..e815b2a2ccb24 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts(44,5): error TS2322: Type 'S' is not assignable to type 'T'. +assignmentCompatWithDiscriminatedUnion.ts(44,5): error TS2322: Type 'S' is not assignable to type 'T'. Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 1; b: 2 | 4; }'. Type 'S' is not assignable to type '{ a: 1; b: 2 | 4; }'. Types of property 'a' are incompatible. Type '0 | 2' is not assignable to type '1'. Type '0' is not assignable to type '1'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts(58,5): error TS2322: Type 'S' is not assignable to type 'T'. +assignmentCompatWithDiscriminatedUnion.ts(58,5): error TS2322: Type 'S' is not assignable to type 'T'. Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 2; b: 4 | 3; c: string; }'. Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 4 | 3; c: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not assignable to type 'T'. +assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not assignable to type 'T'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts (3 errors) ==== +==== assignmentCompatWithDiscriminatedUnion.ts (3 errors) ==== // see 'typeRelatedToDiscriminatedType' in checker.ts: // IteratorResult @@ -80,7 +80,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'S' is not assignable to type 'T'. !!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 2; b: 4 | 3; c: string; }'. !!! error TS2322: Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 4 | 3; c: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts:52:36: 'c' is declared here. +!!! related TS2728 assignmentCompatWithDiscriminatedUnion.ts:52:36: 'c' is declared here. } // Maximum discriminant combinations diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js index d05e3036937d7..5a2635075402a 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts] //// + //// [assignmentCompatWithDiscriminatedUnion.ts] // see 'typeRelatedToDiscriminatedType' in checker.ts: diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols index 2e62cc8b7afc7..926f52af3e0d1 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts] //// + +=== assignmentCompatWithDiscriminatedUnion.ts === // see 'typeRelatedToDiscriminatedType' in checker.ts: // IteratorResult diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types index 58784a84667ad..8d4424ad7708b 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts] //// + +=== assignmentCompatWithDiscriminatedUnion.ts === // see 'typeRelatedToDiscriminatedType' in checker.ts: // IteratorResult diff --git a/tests/baselines/reference/assignmentCompatWithEnumIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithEnumIndexer.errors.txt index bf317b7ea7514..ccd8de984384c 100644 --- a/tests/baselines/reference/assignmentCompatWithEnumIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithEnumIndexer.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '[E.A]' is missing in type '{}' but required in type 'Record'. +assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '[E.A]' is missing in type '{}' but required in type 'Record'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts (1 errors) ==== +==== assignmentCompatWithEnumIndexer.ts (1 errors) ==== enum E { A } diff --git a/tests/baselines/reference/assignmentCompatWithEnumIndexer.js b/tests/baselines/reference/assignmentCompatWithEnumIndexer.js index a1281e7243b7f..cdd80c8bcfced 100644 --- a/tests/baselines/reference/assignmentCompatWithEnumIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithEnumIndexer.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts] //// + //// [assignmentCompatWithEnumIndexer.ts] enum E { A diff --git a/tests/baselines/reference/assignmentCompatWithEnumIndexer.symbols b/tests/baselines/reference/assignmentCompatWithEnumIndexer.symbols index 8a6f91a543e61..4324b89f389e3 100644 --- a/tests/baselines/reference/assignmentCompatWithEnumIndexer.symbols +++ b/tests/baselines/reference/assignmentCompatWithEnumIndexer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts] //// + +=== assignmentCompatWithEnumIndexer.ts === enum E { >E : Symbol(E, Decl(assignmentCompatWithEnumIndexer.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatWithEnumIndexer.types b/tests/baselines/reference/assignmentCompatWithEnumIndexer.types index 35d08cfa698e3..e1c046a1d9c75 100644 --- a/tests/baselines/reference/assignmentCompatWithEnumIndexer.types +++ b/tests/baselines/reference/assignmentCompatWithEnumIndexer.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithEnumIndexer.ts] //// + +=== assignmentCompatWithEnumIndexer.ts === enum E { >E : E diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.js index ba4093f523df8..20a588e20ae48 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts] //// + //// [assignmentCompatWithGenericCallSignatures.ts] // some complex cases of assignment compat of generic signatures that stress contextual signature instantiation diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.symbols index 727e7ed911acd..4e46aaa1ee5bd 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts] //// + +=== assignmentCompatWithGenericCallSignatures.ts === // some complex cases of assignment compat of generic signatures that stress contextual signature instantiation var f: (x: S) => void diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.types index c975a7bbd7b90..f32e1c3f560d9 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures.ts] //// + +=== assignmentCompatWithGenericCallSignatures.ts === // some complex cases of assignment compat of generic signatures that stress contextual signature instantiation var f: (x: S) => void diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt index 692fd102e95bb..d58f698ce0cf5 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts(15,1): error TS2322: Type 'B' is not assignable to type 'A'. +assignmentCompatWithGenericCallSignatures2.ts(15,1): error TS2322: Type 'B' is not assignable to type 'A'. Types of parameters 'y' and 'y' are incompatible. Type 'T[]' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T[]'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts(16,1): error TS2322: Type 'A' is not assignable to type 'B'. +assignmentCompatWithGenericCallSignatures2.ts(16,1): error TS2322: Type 'A' is not assignable to type 'B'. Types of parameters 'y' and 'y' are incompatible. Type 'S' is not assignable to type 'S[]'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts (2 errors) ==== +==== assignmentCompatWithGenericCallSignatures2.ts (2 errors) ==== // some complex cases of assignment compat of generic signatures. No contextual signature instantiation interface A { @@ -33,5 +33,5 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'A' is not assignable to type 'B'. !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'S' is not assignable to type 'S[]'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts:8:6: This type parameter might need an `extends S[]` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignatures2.ts:8:6: This type parameter might need an `extends S[]` constraint. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js index 057cbebb3828c..e93ea4401c5e3 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts] //// + //// [assignmentCompatWithGenericCallSignatures2.ts] // some complex cases of assignment compat of generic signatures. No contextual signature instantiation diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols index 9a37bebd6e2ac..16fb5a70238c7 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts] //// + +=== assignmentCompatWithGenericCallSignatures2.ts === // some complex cases of assignment compat of generic signatures. No contextual signature instantiation interface A { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types index ab5bc2d49e8ab..a73f59afa4e37 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts] //// + +=== assignmentCompatWithGenericCallSignatures2.ts === // some complex cases of assignment compat of generic signatures. No contextual signature instantiation interface A { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.js index ae83c39f2a02a..5f396a569edcf 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts] //// + //// [assignmentCompatWithGenericCallSignatures3.ts] // some complex cases of assignment compat of generic signatures that stress contextual signature instantiation diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.symbols index 42a00f83df3ad..28e02d73bec87 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts] //// + +=== assignmentCompatWithGenericCallSignatures3.ts === // some complex cases of assignment compat of generic signatures that stress contextual signature instantiation interface I { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.types index 5130dd25e01d1..7c12a6b244837 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts] //// + +=== assignmentCompatWithGenericCallSignatures3.ts === // some complex cases of assignment compat of generic signatures that stress contextual signature instantiation interface I { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt index b3c8fd3654f43..2e17b5682e4ed 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts(12,1): error TS2322: Type '>(z: T) => void' is not assignable to type '>>(z: T) => void'. +assignmentCompatWithGenericCallSignatures4.ts(12,1): error TS2322: Type '>(z: T) => void' is not assignable to type '>>(z: T) => void'. Types of parameters 'z' and 'z' are incompatible. Type 'T' is not assignable to type 'I2'. Type 'I2>' is not assignable to type 'I2'. @@ -6,7 +6,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme 'T' could be instantiated with an arbitrary type which could be unrelated to 'I2'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts (1 errors) ==== +==== assignmentCompatWithGenericCallSignatures4.ts (1 errors) ==== // some complex cases of assignment compat of generic signatures. interface I2 { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js index 6114e6fdb5419..1e73ebd4aee51 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts] //// + //// [assignmentCompatWithGenericCallSignatures4.ts] // some complex cases of assignment compat of generic signatures. diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols index 86531a9550625..73364359efb0c 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts] //// + +=== assignmentCompatWithGenericCallSignatures4.ts === // some complex cases of assignment compat of generic signatures. interface I2 { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types index 827130aadc9c6..84da2d41918a0 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures4.ts] //// + +=== assignmentCompatWithGenericCallSignatures4.ts === // some complex cases of assignment compat of generic signatures. interface I2 { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt index 51b59d71176f7..d92429833fb5a 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -1,103 +1,103 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(14,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(23,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. Target signature provides too few arguments. Expected 2 or more, but got 1. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(63,9): error TS2322: Type '() => T' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(63,9): error TS2322: Type '() => T' is not assignable to type '() => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(64,9): error TS2322: Type '(x?: T) => T' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(64,9): error TS2322: Type '(x?: T) => T' is not assignable to type '() => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2322: Type '(x: T) => T' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(65,9): error TS2322: Type '(x: T) => T' is not assignable to type '() => T'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(66,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(67,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(67,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '() => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(69,9): error TS2322: Type '() => T' is not assignable to type '(x?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(69,9): error TS2322: Type '() => T' is not assignable to type '(x?: T) => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(70,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(70,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(71,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(71,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(72,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(72,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(73,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(73,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(75,9): error TS2322: Type '() => T' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(75,9): error TS2322: Type '() => T' is not assignable to type '(x: T) => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(76,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(76,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(77,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(77,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(78,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(78,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(79,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(79,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(81,9): error TS2322: Type '() => T' is not assignable to type '(x: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(81,9): error TS2322: Type '() => T' is not assignable to type '(x: T, y?: T) => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(82,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(82,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(83,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(83,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(84,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(84,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(85,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(85,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(87,9): error TS2322: Type '() => T' is not assignable to type '(x?: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(87,9): error TS2322: Type '() => T' is not assignable to type '(x?: T, y?: T) => T'. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(88,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(88,9): error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(89,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(89,9): error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(90,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(90,9): error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(91,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(91,9): error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(107,13): error TS2322: Type '(x: T) => any' is not assignable to type '() => T'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts(116,13): error TS2322: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. Target signature provides too few arguments. Expected 2 or more, but got 1. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts (29 errors) ==== +==== assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts (29 errors) ==== // call signatures in derived types must have the same or fewer optional parameters as the target for assignment module ClassTypeParam { @@ -171,13 +171,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '() => T' is not assignable to type '() => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a = t.a2; ~~~ !!! error TS2322: Type '(x?: T) => T' is not assignable to type '() => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a = t.a3; ~~~ !!! error TS2322: Type '(x: T) => T' is not assignable to type '() => T'. @@ -191,147 +191,147 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '() => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a2 = t.a; ~~~~ !!! error TS2322: Type '() => T' is not assignable to type '(x?: T) => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a2 = t.a2; ~~~~ !!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. b.a2 = t.a3; ~~~~ !!! error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. b.a2 = t.a4; ~~~~ !!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. b.a2 = t.a5; ~~~~ !!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:43:14: This type parameter might need an `extends T` constraint. b.a3 = t.a; ~~~~ !!! error TS2322: Type '() => T' is not assignable to type '(x: T) => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a3 = t.a2; ~~~~ !!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. b.a3 = t.a3; ~~~~ !!! error TS2322: Type '(x: T) => T' is not assignable to type '(x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. b.a3 = t.a4; ~~~~ !!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. b.a3 = t.a5; ~~~~ !!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:44:14: This type parameter might need an `extends T` constraint. b.a4 = t.a; ~~~~ !!! error TS2322: Type '() => T' is not assignable to type '(x: T, y?: T) => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a4 = t.a2; ~~~~ !!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. b.a4 = t.a3; ~~~~ !!! error TS2322: Type '(x: T) => T' is not assignable to type '(x: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. b.a4 = t.a4; ~~~~ !!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. b.a4 = t.a5; ~~~~ !!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:45:14: This type parameter might need an `extends T` constraint. b.a5 = t.a; ~~~~ !!! error TS2322: Type '() => T' is not assignable to type '(x?: T, y?: T) => T'. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:58:18: This type parameter might need an `extends T` constraint. b.a5 = t.a2; ~~~~ !!! error TS2322: Type '(x?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. b.a5 = t.a3; ~~~~ !!! error TS2322: Type '(x: T) => T' is not assignable to type '(x?: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. b.a5 = t.a4; ~~~~ !!! error TS2322: Type '(x: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. b.a5 = t.a5; ~~~~ !!! error TS2322: Type '(x?: T, y?: T) => T' is not assignable to type '(x?: T, y?: T) => T'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts:46:14: This type parameter might need an `extends T` constraint. } } diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js index 78e657f5cb003..4f2180fcb57ed 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts] //// + //// [assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts] // call signatures in derived types must have the same or fewer optional parameters as the target for assignment diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols index e3f1d226283a2..ace08f5ddd6d9 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts] //// + +=== assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the target for assignment module ClassTypeParam { diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types index eb4191813bc4d..fbccd6ce9cd7d 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts] //// + +=== assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts === // call signatures in derived types must have the same or fewer optional parameters as the target for assignment module ClassTypeParam { diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index 2a2a3f3abcef5..60335630beba3 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -1,28 +1,28 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +assignmentCompatWithNumericIndexer.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. 'number' index signatures are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. 'number' index signatures are incompatible. Type 'Base' is missing the following properties from type 'Derived2': baz, bar -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. +assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. 'number' index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +assignmentCompatWithNumericIndexer.ts(33,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. 'number' index signatures are incompatible. Type 'T' is not assignable to type 'Derived'. Type 'Base' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. +assignmentCompatWithNumericIndexer.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. 'number' index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. 'number' index signatures are incompatible. Type 'T' is not assignable to type 'Derived2'. Type 'Base' is not assignable to type 'Derived2'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts (6 errors) ==== +==== assignmentCompatWithNumericIndexer.ts (6 errors) ==== // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } @@ -41,7 +41,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. !!! error TS2322: 'number' index signatures are incompatible. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts:4:34: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithNumericIndexer.ts:4:34: 'bar' is declared here. var b2: { [x: number]: Derived2; } a = b2; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 0cb37a80555de..ff38e3cbd0165 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts] //// + //// [assignmentCompatWithNumericIndexer.ts] // Derived type indexer must be subtype of base type indexer diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols b/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols index 106d8a9351d13..ff5fcf8cb7e60 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts] //// + +=== assignmentCompatWithNumericIndexer.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.types b/tests/baselines/reference/assignmentCompatWithNumericIndexer.types index d4900b9ba21e0..c77be4da9d053 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.types +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts] //// + +=== assignmentCompatWithNumericIndexer.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt index e294347084798..019fcf237bed7 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -1,28 +1,28 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +assignmentCompatWithNumericIndexer2.ts(14,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. 'number' index signatures are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. 'number' index signatures are incompatible. Type 'Base' is missing the following properties from type 'Derived2': baz, bar -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. +assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. 'number' index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. +assignmentCompatWithNumericIndexer2.ts(33,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. 'number' index signatures are incompatible. Type 'T' is not assignable to type 'Derived'. Type 'Base' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. +assignmentCompatWithNumericIndexer2.ts(36,9): error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A'. 'number' index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. 'number' index signatures are incompatible. Type 'T' is not assignable to type 'Derived2'. Type 'Base' is not assignable to type 'Derived2'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts (6 errors) ==== +==== assignmentCompatWithNumericIndexer2.ts (6 errors) ==== // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } @@ -41,7 +41,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }'. !!! error TS2322: 'number' index signatures are incompatible. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts:4:34: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithNumericIndexer2.ts:4:34: 'bar' is declared here. var b2: { [x: number]: Derived2; } a = b2; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js index 8af454eaf8d2e..8de27703d17ee 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts] //// + //// [assignmentCompatWithNumericIndexer2.ts] // Derived type indexer must be subtype of base type indexer diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols index c1b9bd26f9d3e..32ee179f32b21 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts] //// + +=== assignmentCompatWithNumericIndexer2.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types index 75147982b89db..59fdb79962d40 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts] //// + +=== assignmentCompatWithNumericIndexer2.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt index 5b72d9f1ec2de..cc002dbfafb92 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(14,1): error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A'. +assignmentCompatWithNumericIndexer3.ts(14,1): error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A'. 'number' index signatures are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(23,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. +assignmentCompatWithNumericIndexer3.ts(23,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. 'number' index signatures are incompatible. Property 'baz' is missing in type 'Derived' but required in type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. +assignmentCompatWithNumericIndexer3.ts(33,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. 'number' index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts (3 errors) ==== +==== assignmentCompatWithNumericIndexer3.ts (3 errors) ==== // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } @@ -29,7 +29,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A'. !!! error TS2322: 'number' index signatures are incompatible. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:4:34: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithNumericIndexer3.ts:4:34: 'bar' is declared here. b = a; // ok class B2 extends A { @@ -43,7 +43,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. !!! error TS2322: 'number' index signatures are incompatible. !!! error TS2322: Property 'baz' is missing in type 'Derived' but required in type 'Derived2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts:5:38: 'baz' is declared here. +!!! related TS2728 assignmentCompatWithNumericIndexer3.ts:5:38: 'baz' is declared here. module Generics { class A { diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 74f35977d68e6..ff92930c86302 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts] //// + //// [assignmentCompatWithNumericIndexer3.ts] // Derived type indexer must be subtype of base type indexer diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols index 133f0e9ef1294..ef4b3cbaa60af 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts] //// + +=== assignmentCompatWithNumericIndexer3.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types index 7943f95907a8f..93e1f2f5753bb 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts] //// + +=== assignmentCompatWithNumericIndexer3.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.js b/tests/baselines/reference/assignmentCompatWithObjectMembers.js index 2589f464c5315..67556bd0f9869 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts] //// + //// [assignmentCompatWithObjectMembers.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // no errors expected diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers.symbols index 9b84883324df5..957f53002496b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts] //// + +=== assignmentCompatWithObjectMembers.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // no errors expected diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.types b/tests/baselines/reference/assignmentCompatWithObjectMembers.types index 3b69e52fdf911..3710a7b1fb2b2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts] //// + +=== assignmentCompatWithObjectMembers.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // no errors expected diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js index 08452e3d210c9..6bda8ea8ffa18 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts] //// + //// [assignmentCompatWithObjectMembers2.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers2.symbols index e0ac6899eaffe..b95697ce66c41 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts] //// + +=== assignmentCompatWithObjectMembers2.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.types b/tests/baselines/reference/assignmentCompatWithObjectMembers2.types index 204872fca3e1a..a0ef18eb1c6aa 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers2.ts] //// + +=== assignmentCompatWithObjectMembers2.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js index 58c6321faa620..bb71098c20054 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts] //// + //// [assignmentCompatWithObjectMembers3.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers3.symbols index 72151ce604805..e682059cf2d88 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts] //// + +=== assignmentCompatWithObjectMembers3.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.types b/tests/baselines/reference/assignmentCompatWithObjectMembers3.types index d0a87a67535b0..1508f2e9538da 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers3.ts] //// + +=== assignmentCompatWithObjectMembers3.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // additional optional properties do not cause errors diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt index 5f53c581c79aa..861a8174328d5 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -1,57 +1,57 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(24,5): error TS2322: Type 'T' is not assignable to type 'S'. +assignmentCompatWithObjectMembers4.ts(24,5): error TS2322: Type 'T' is not assignable to type 'S'. Types of property 'foo' are incompatible. Property 'bar' is missing in type 'Derived2' but required in type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(25,5): error TS2322: Type 'S' is not assignable to type 'T'. +assignmentCompatWithObjectMembers4.ts(25,5): error TS2322: Type 'S' is not assignable to type 'T'. Types of property 'foo' are incompatible. Property 'baz' is missing in type 'Derived' but required in type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(29,5): error TS2322: Type 'T2' is not assignable to type 'S2'. +assignmentCompatWithObjectMembers4.ts(29,5): error TS2322: Type 'T2' is not assignable to type 'S2'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(30,5): error TS2322: Type 'S2' is not assignable to type 'T2'. +assignmentCompatWithObjectMembers4.ts(30,5): error TS2322: Type 'S2' is not assignable to type 'T2'. Types of property 'foo' are incompatible. Type 'Derived' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(31,5): error TS2322: Type 'T' is not assignable to type 'S2'. +assignmentCompatWithObjectMembers4.ts(31,5): error TS2322: Type 'T' is not assignable to type 'S2'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(32,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2'. +assignmentCompatWithObjectMembers4.ts(32,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(35,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. +assignmentCompatWithObjectMembers4.ts(35,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(36,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. +assignmentCompatWithObjectMembers4.ts(36,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. Types of property 'foo' are incompatible. Type 'Derived' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(41,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. +assignmentCompatWithObjectMembers4.ts(41,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(42,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. +assignmentCompatWithObjectMembers4.ts(42,5): error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }'. Types of property 'foo' are incompatible. Type 'Derived' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(43,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. +assignmentCompatWithObjectMembers4.ts(43,5): error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(44,5): error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }'. +assignmentCompatWithObjectMembers4.ts(44,5): error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(45,5): error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }'. +assignmentCompatWithObjectMembers4.ts(45,5): error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }'. Types of property 'foo' are incompatible. Type 'Derived2' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(70,5): error TS2322: Type 'S' is not assignable to type 'T'. +assignmentCompatWithObjectMembers4.ts(70,5): error TS2322: Type 'S' is not assignable to type 'T'. Types of property 'foo' are incompatible. Property 'baz' is missing in type 'Base' but required in type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(75,5): error TS2322: Type 'S2' is not assignable to type 'T2'. +assignmentCompatWithObjectMembers4.ts(75,5): error TS2322: Type 'S2' is not assignable to type 'T2'. Types of property 'foo' are incompatible. Type 'Base' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(81,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. +assignmentCompatWithObjectMembers4.ts(81,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. Types of property 'foo' are incompatible. Type 'Base' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. +assignmentCompatWithObjectMembers4.ts(87,5): error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }'. Types of property 'foo' are incompatible. Type 'Base' is not assignable to type 'Derived2'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts (17 errors) ==== +==== assignmentCompatWithObjectMembers4.ts (17 errors) ==== // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M module OnlyDerived { @@ -80,13 +80,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'T' is not assignable to type 'S'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Property 'bar' is missing in type 'Derived2' but required in type 'Derived'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:5:34: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembers4.ts:5:34: 'bar' is declared here. t = s; // error ~ !!! error TS2322: Type 'S' is not assignable to type 'T'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Property 'baz' is missing in type 'Derived' but required in type 'Derived2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:6:35: 'baz' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembers4.ts:6:35: 'baz' is declared here. s = s2; // ok s = a2; // ok @@ -180,7 +180,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'S' is not assignable to type 'T'. !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Property 'baz' is missing in type 'Base' but required in type 'Derived2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts:51:35: 'baz' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembers4.ts:51:35: 'baz' is declared here. s = s2; // ok s = a2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 0144f8f75c66d..60412c2abc90f 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts] //// + //// [assignmentCompatWithObjectMembers4.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols index 845747216f812..d31c02b885f5c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts] //// + +=== assignmentCompatWithObjectMembers4.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M module OnlyDerived { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.types b/tests/baselines/reference/assignmentCompatWithObjectMembers4.types index 77bbcee40d3f3..833caf516d738 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts] //// + +=== assignmentCompatWithObjectMembers4.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M module OnlyDerived { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt index ce025fde17982..caf8eb5695bd1 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(13,1): error TS2741: Property 'foo' is missing in type 'I' but required in type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts(14,1): error TS2741: Property 'fooo' is missing in type 'C' but required in type 'I'. +assignmentCompatWithObjectMembers5.ts(13,1): error TS2741: Property 'foo' is missing in type 'I' but required in type 'C'. +assignmentCompatWithObjectMembers5.ts(14,1): error TS2741: Property 'fooo' is missing in type 'C' but required in type 'I'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts (2 errors) ==== +==== assignmentCompatWithObjectMembers5.ts (2 errors) ==== class C { foo: string; } @@ -18,8 +18,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme c = i; // error ~ !!! error TS2741: Property 'foo' is missing in type 'I' but required in type 'C'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:2:5: 'foo' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembers5.ts:2:5: 'foo' is declared here. i = c; // error ~ !!! error TS2741: Property 'fooo' is missing in type 'C' but required in type 'I'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts:8:5: 'fooo' is declared here. \ No newline at end of file +!!! related TS2728 assignmentCompatWithObjectMembers5.ts:8:5: 'fooo' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.js b/tests/baselines/reference/assignmentCompatWithObjectMembers5.js index 86302977ecbab..cb8da85d7e859 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts] //// + //// [assignmentCompatWithObjectMembers5.ts] class C { foo: string; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols index 541f2b72b587b..fdc4e5a828ba6 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts] //// + +=== assignmentCompatWithObjectMembers5.ts === class C { >C : Symbol(C, Decl(assignmentCompatWithObjectMembers5.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.types b/tests/baselines/reference/assignmentCompatWithObjectMembers5.types index bcd092b0ca003..04baeb848fc3d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts] //// + +=== assignmentCompatWithObjectMembers5.ts === class C { >C : C diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index 6ca6b5e21e0ea..654349412ccd0 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt @@ -1,48 +1,48 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +assignmentCompatWithObjectMembersAccessibility.ts(31,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: Type 'E' is not assignable to type 'Base'. +assignmentCompatWithObjectMembersAccessibility.ts(36,5): error TS2322: Type 'E' is not assignable to type 'Base'. Property 'foo' is private in type 'E' but not in type 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: Type 'E' is not assignable to type 'I'. +assignmentCompatWithObjectMembersAccessibility.ts(41,5): error TS2322: Type 'E' is not assignable to type 'I'. Property 'foo' is private in type 'E' but not in type 'I'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: Type 'E' is not assignable to type 'D'. +assignmentCompatWithObjectMembersAccessibility.ts(46,5): error TS2322: Type 'E' is not assignable to type 'D'. Property 'foo' is private in type 'E' but not in type 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(48,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E'. Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: Type 'Base' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(49,5): error TS2322: Type 'Base' is not assignable to type 'E'. Property 'foo' is private in type 'E' but not in type 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: Type 'I' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(50,5): error TS2322: Type 'I' is not assignable to type 'E'. Property 'foo' is private in type 'E' but not in type 'I'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: Type 'D' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(51,5): error TS2322: Type 'D' is not assignable to type 'E'. Property 'foo' is private in type 'E' but not in type 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: Type 'Base' is not assignable to type '{ foo: string; }'. +assignmentCompatWithObjectMembersAccessibility.ts(81,5): error TS2322: Type 'Base' is not assignable to type '{ foo: string; }'. Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: Type 'I' is not assignable to type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +assignmentCompatWithObjectMembersAccessibility.ts(82,5): error TS2322: Type 'I' is not assignable to type '{ foo: string; }'. +assignmentCompatWithObjectMembersAccessibility.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'Base'. +assignmentCompatWithObjectMembersAccessibility.ts(86,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'Base'. Property 'foo' is private in type 'Base' but not in type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: Type 'D' is not assignable to type 'Base'. +assignmentCompatWithObjectMembersAccessibility.ts(88,5): error TS2322: Type 'D' is not assignable to type 'Base'. Property 'foo' is private in type 'Base' but not in type 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: Type 'E' is not assignable to type 'Base'. +assignmentCompatWithObjectMembersAccessibility.ts(89,5): error TS2322: Type 'E' is not assignable to type 'Base'. Types have separate declarations of a private property 'foo'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'I'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: Type 'D' is not assignable to type 'I'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: Type 'E' is not assignable to type 'I'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'D'. +assignmentCompatWithObjectMembersAccessibility.ts(92,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'I'. +assignmentCompatWithObjectMembersAccessibility.ts(94,5): error TS2322: Type 'D' is not assignable to type 'I'. +assignmentCompatWithObjectMembersAccessibility.ts(95,5): error TS2322: Type 'E' is not assignable to type 'I'. +assignmentCompatWithObjectMembersAccessibility.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'D'. Property 'foo' is private in type 'Base' but not in type 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: Type 'I' is not assignable to type 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: Type 'E' is not assignable to type 'D'. +assignmentCompatWithObjectMembersAccessibility.ts(100,5): error TS2322: Type 'I' is not assignable to type 'D'. +assignmentCompatWithObjectMembersAccessibility.ts(101,5): error TS2322: Type 'E' is not assignable to type 'D'. Property 'foo' is private in type 'E' but not in type 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(103,5): error TS2322: Type '{ foo: string; }' is not assignable to type 'E'. Property 'foo' is private in type 'E' but not in type '{ foo: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: Type 'Base' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(104,5): error TS2322: Type 'Base' is not assignable to type 'E'. Types have separate declarations of a private property 'foo'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: Type 'I' is not assignable to type 'E'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(105,5): error TS2322: Type 'I' is not assignable to type 'E'. +assignmentCompatWithObjectMembersAccessibility.ts(106,5): error TS2322: Type 'D' is not assignable to type 'E'. Property 'foo' is private in type 'E' but not in type 'D'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts (24 errors) ==== +==== assignmentCompatWithObjectMembersAccessibility.ts (24 errors) ==== // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M module TargetIsPublic { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js index efe6857f933a7..6b6b4a979ddce 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts] //// + //// [assignmentCompatWithObjectMembersAccessibility.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols index f1ec213331419..72a7dae756991 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts] //// + +=== assignmentCompatWithObjectMembersAccessibility.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M module TargetIsPublic { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types index 0728ec31dd535..4e23072bef028 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts] //// + +=== assignmentCompatWithObjectMembersAccessibility.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M module TargetIsPublic { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js index e021f3e22e62e..836fbe85310de 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts] //// + //// [assignmentCompatWithObjectMembersNumericNames.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // numeric named properties work correctly, no errors expected diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols index 4bd6397936dee..46cba93ae3550 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts] //// + +=== assignmentCompatWithObjectMembersNumericNames.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // numeric named properties work correctly, no errors expected diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types index 1197e489f2891..3f03b1dc5f4fd 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersNumericNames.ts] //// + +=== assignmentCompatWithObjectMembersNumericNames.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // numeric named properties work correctly, no errors expected diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt index b378086ca5e56..6182370720517 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: Type 'D' is not assignable to type 'C'. +assignmentCompatWithObjectMembersOptionality.ts(73,5): error TS2322: Type 'D' is not assignable to type 'C'. Property 'opt' is optional in type 'D' but required in type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: Type 'E' is not assignable to type 'C'. +assignmentCompatWithObjectMembersOptionality.ts(74,5): error TS2322: Type 'E' is not assignable to type 'C'. Property 'opt' is optional in type 'E' but required in type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality.ts(78,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'. Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality.ts(79,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'. Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality.ts(83,5): error TS2322: Type 'D' is not assignable to type '{ opt: Base; }'. Property 'opt' is optional in type 'D' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality.ts(84,5): error TS2322: Type 'E' is not assignable to type '{ opt: Base; }'. Property 'opt' is optional in type 'E' but required in type '{ opt: Base; }'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts (6 errors) ==== +==== assignmentCompatWithObjectMembersOptionality.ts (6 errors) ==== // Derived member is not optional but base member is, should be ok class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 8b7df99a6da06..6eca91bf5c434 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts] //// + //// [assignmentCompatWithObjectMembersOptionality.ts] // Derived member is not optional but base member is, should be ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols index f3271f0e9c315..25eb2c64e5709 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts] //// + +=== assignmentCompatWithObjectMembersOptionality.ts === // Derived member is not optional but base member is, should be ok class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types index 53f56a7d0a7b2..7cb5f561df1d4 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts] //// + +=== assignmentCompatWithObjectMembersOptionality.ts === // Derived member is not optional but base member is, should be ok class Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 4121337fdad53..f1ba1224c455d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -1,24 +1,24 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(33,5): error TS2559: Type 'D' has no properties in common with type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(34,5): error TS2559: Type 'E' has no properties in common with type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(35,5): error TS2559: Type 'F' has no properties in common with type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(36,5): error TS2559: Type 'D' has no properties in common with type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(37,5): error TS2559: Type 'E' has no properties in common with type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(38,5): error TS2559: Type 'F' has no properties in common with type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(39,5): error TS2559: Type 'D' has no properties in common with type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(40,5): error TS2559: Type 'E' has no properties in common with type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(41,5): error TS2559: Type 'F' has no properties in common with type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2741: Property 'opt' is missing in type 'D' but required in type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2741: Property 'opt' is missing in type 'E' but required in type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2741: Property 'opt' is missing in type 'F' but required in type 'C'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(33,5): error TS2559: Type 'D' has no properties in common with type 'C'. +assignmentCompatWithObjectMembersOptionality2.ts(34,5): error TS2559: Type 'E' has no properties in common with type 'C'. +assignmentCompatWithObjectMembersOptionality2.ts(35,5): error TS2559: Type 'F' has no properties in common with type 'C'. +assignmentCompatWithObjectMembersOptionality2.ts(36,5): error TS2559: Type 'D' has no properties in common with type '{ opt?: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(37,5): error TS2559: Type 'E' has no properties in common with type '{ opt?: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(38,5): error TS2559: Type 'F' has no properties in common with type '{ opt?: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(39,5): error TS2559: Type 'D' has no properties in common with type '{ opt?: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(40,5): error TS2559: Type 'E' has no properties in common with type '{ opt?: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(41,5): error TS2559: Type 'F' has no properties in common with type '{ opt?: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2741: Property 'opt' is missing in type 'D' but required in type 'C'. +assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2741: Property 'opt' is missing in type 'E' but required in type 'C'. +assignmentCompatWithObjectMembersOptionality2.ts(76,5): error TS2741: Property 'opt' is missing in type 'F' but required in type 'C'. +assignmentCompatWithObjectMembersOptionality2.ts(79,5): error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(80,5): error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(81,5): error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(84,5): error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(85,5): error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. +assignmentCompatWithObjectMembersOptionality2.ts(86,5): error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts (18 errors) ==== +==== assignmentCompatWithObjectMembersOptionality2.ts (18 errors) ==== // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N @@ -113,43 +113,43 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme c = d; // error ~ !!! error TS2741: Property 'opt' is missing in type 'D' but required in type 'C'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. c = e; // error ~ !!! error TS2741: Property 'opt' is missing in type 'E' but required in type 'C'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. c = f; // error ~ !!! error TS2741: Property 'opt' is missing in type 'F' but required in type 'C'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:53:9: 'opt' is declared here. c = a; // ok a = d; // error ~ !!! error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. a = e; // error ~ !!! error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. a = f; // error ~ !!! error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:57:14: 'opt' is declared here. a = c; // ok b = d; // error ~ !!! error TS2741: Property 'opt' is missing in type 'D' but required in type '{ opt: Base; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. b = e; // error ~ !!! error TS2741: Property 'opt' is missing in type 'E' but required in type '{ opt: Base; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. b = f; // error ~ !!! error TS2741: Property 'opt' is missing in type 'F' but required in type '{ opt: Base; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersOptionality2.ts:58:15: 'opt' is declared here. b = a; // ok b = c; // ok } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 37208dc26cb40..21d93a227794c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts] //// + //// [assignmentCompatWithObjectMembersOptionality2.ts] // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols index b303c168408c4..60543ae0cdf2c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts] //// + +=== assignmentCompatWithObjectMembersOptionality2.ts === // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types index f2caff7f48916..57c52ee7f89c2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts] //// + +=== assignmentCompatWithObjectMembersOptionality2.ts === // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index ef0a9267441da..6c85c052e0336 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -1,35 +1,35 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(24,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(26,5): error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. -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(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'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(75,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(76,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(77,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(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(80,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(81,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(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(84,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(21,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(22,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. +assignmentCompatWithObjectMembersStringNumericNames.ts(24,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(26,5): error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(27,5): error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(28,5): error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(29,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(30,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(32,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(33,5): error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. +assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. +assignmentCompatWithObjectMembersStringNumericNames.ts(73,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(74,5): error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(75,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(76,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(77,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(78,5): error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(80,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(81,5): error TS2741: Property '1.' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(82,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(83,5): error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. +assignmentCompatWithObjectMembersStringNumericNames.ts(84,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 (29 errors) ==== +==== assignmentCompatWithObjectMembersStringNumericNames.ts (29 errors) ==== // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted @@ -53,73 +53,73 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = t; ~ !!! error TS2741: Property ''1'' is missing in type 'T' but required in type 'S'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. t = s; ~ !!! error TS2741: Property ''1.'' is missing in type 'S' but required in type 'T'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:6:15: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:6:15: ''1.'' is declared here. s = s2; // ok s = a2; ~ !!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:5:15: ''1'' is declared here. s2 = t2; ~~ !!! error TS2741: Property ''1'' is missing in type 'T2' but required in type 'S2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. t2 = s2; ~~ !!! error TS2741: Property ''1.0'' is missing in type 'S2' but required in type 'T2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:11:20: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:11:20: ''1.0'' is declared here. s2 = t; ~~ !!! error TS2741: Property ''1'' is missing in type 'T' but required in type 'S2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. s2 = b; ~~ !!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }' but required in type 'S2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. s2 = a2; ~~ !!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:10:20: ''1'' is declared here. a = b; ~ !!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. b = a; ~ !!! error TS2741: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ '1.0': string; baz?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:16:14: ''1.0'' is declared here. a = s; ~ !!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a = s2; ~ !!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a = a2; ~ !!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:15:14: ''1.'' is declared here. a2 = b2; ~~ !!! 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. +!!! related TS2728 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; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ !!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. } module NumbersAndStrings { @@ -145,7 +145,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s = a2; // error ~ !!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:46:15: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:46:15: ''1'' is declared here. s2 = t2; // ok t2 = s2; // ok @@ -154,51 +154,51 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme s2 = a2; // error ~~ !!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:51:20: ''1'' is declared here. a = b; // error ~ !!! error TS2741: Property ''1.'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. b = a; // error ~ !!! error TS2741: Property '1.0' is missing in type '{ '1.': string; bar?: string; }' but required in type '{ 1: string; baz?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:57:14: '1.0' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:57:14: '1.0' is declared here. a = s; // error ~ !!! error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = s2; // error ~ !!! error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = a2; // error ~ !!! error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a = b2; // error ~ !!! error TS2741: Property ''1.'' is missing in type '{ 1: string; }' but required in type '{ '1.': string; bar?: string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:56:14: ''1.'' is declared here. a2 = b2; // error ~~ !!! 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:59:16: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. b2 = a2; // error ~~ !!! 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:60:16: '1.' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:60:16: '1.' is declared here. a2 = b; // error ~~ !!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; baz?: string; }' but required in type '{ '1.0': string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t2; // error ~~ !!! error TS2741: Property ''1.0'' is missing in type 'T2' but required in type '{ '1.0': string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. a2 = t; // error ~~ !!! error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. +!!! related TS2728 assignmentCompatWithObjectMembersStringNumericNames.ts:59:16: ''1.0'' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js index 30e81f3f19f08..76129a50945c5 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts] //// + //// [assignmentCompatWithObjectMembersStringNumericNames.ts] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols index a55c665b085c8..5b82d0fa0af54 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts] //// + +=== assignmentCompatWithObjectMembersStringNumericNames.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types index be89c806241b8..0f5d470a42062 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts] //// + +=== assignmentCompatWithObjectMembersStringNumericNames.ts === // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt index 24f06462b8af4..79462dd40e34e 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'. +assignmentCompatWithOverloads.ts(17,1): error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number'. +assignmentCompatWithOverloads.ts(19,1): error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number'. Types of parameters 'x' and 's1' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'. +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'. +assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'. 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) ==== +==== assignmentCompatWithOverloads.ts (4 errors) ==== function f1(x: string): number { return null; } function f2(x: string): string { return null; } diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.js b/tests/baselines/reference/assignmentCompatWithOverloads.js index 8955dd409755a..7e6d7e0752ab7 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.js +++ b/tests/baselines/reference/assignmentCompatWithOverloads.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatWithOverloads.ts] //// + //// [assignmentCompatWithOverloads.ts] function f1(x: string): number { return null; } diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.symbols b/tests/baselines/reference/assignmentCompatWithOverloads.symbols index 34e108e6647fa..e1c0091ef0706 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.symbols +++ b/tests/baselines/reference/assignmentCompatWithOverloads.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatWithOverloads.ts === +//// [tests/cases/compiler/assignmentCompatWithOverloads.ts] //// + +=== assignmentCompatWithOverloads.ts === function f1(x: string): number { return null; } >f1 : Symbol(f1, Decl(assignmentCompatWithOverloads.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatWithOverloads.ts, 0, 12)) diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.types b/tests/baselines/reference/assignmentCompatWithOverloads.types index 29a8778d008da..e795c4b77da6d 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.types +++ b/tests/baselines/reference/assignmentCompatWithOverloads.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatWithOverloads.ts === +//// [tests/cases/compiler/assignmentCompatWithOverloads.ts] //// + +=== assignmentCompatWithOverloads.ts === function f1(x: string): number { return null; } >f1 : (x: string) => number >x : string diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index 9c5b1e1c11fbc..cb6e1cf7a0184 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -1,34 +1,34 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +assignmentCompatWithStringIndexer.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. 'string' index signatures are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. 'string' index signatures are incompatible. Type 'Base' is missing the following properties from type 'Derived2': baz, bar -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. 'string' index signatures are incompatible. Type 'Base' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. 'string' index signatures are incompatible. Type 'Base' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. +assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. 'string' index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +assignmentCompatWithStringIndexer.ts(47,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. 'string' index signatures are incompatible. Type 'T' is not assignable to type 'Derived'. Type 'Base' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. +assignmentCompatWithStringIndexer.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. 'string' index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. 'string' index signatures are incompatible. Type 'T' is not assignable to type 'Derived2'. Type 'Base' is not assignable to type 'Derived2'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts (8 errors) ==== +==== assignmentCompatWithStringIndexer.ts (8 errors) ==== // index signatures must be compatible in assignments interface Base { foo: string; } @@ -48,7 +48,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. !!! error TS2322: 'string' index signatures are incompatible. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts:4:34: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithStringIndexer.ts:4:34: 'bar' is declared here. var b2: { [x: string]: Derived2; } a = b2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index fbff31831dc20..0a4f06be0ea6a 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts] //// + //// [assignmentCompatWithStringIndexer.ts] // index signatures must be compatible in assignments diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols b/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols index 6649a8bb0d9d4..29ff11c1b5365 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts] //// + +=== assignmentCompatWithStringIndexer.ts === // index signatures must be compatible in assignments interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.types b/tests/baselines/reference/assignmentCompatWithStringIndexer.types index 7b9febebfb461..6181c8fd23605 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.types +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts] //// + +=== assignmentCompatWithStringIndexer.ts === // index signatures must be compatible in assignments interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index 6247b5f1c48bc..5f76ae541c9db 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -1,34 +1,34 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +assignmentCompatWithStringIndexer2.ts(15,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. 'string' index signatures are incompatible. Property 'bar' is missing in type 'Base' but required in type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. 'string' index signatures are incompatible. Type 'Base' is missing the following properties from type 'Derived2': baz, bar -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. 'string' index signatures are incompatible. Type 'Base' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. 'string' index signatures are incompatible. Type 'Base' is not assignable to type 'Derived2'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. +assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. 'string' index signatures are incompatible. Type 'Derived' is not assignable to type 'T'. 'Derived' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. +assignmentCompatWithStringIndexer2.ts(47,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. 'string' index signatures are incompatible. Type 'T' is not assignable to type 'Derived'. Type 'Base' is not assignable to type 'Derived'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. +assignmentCompatWithStringIndexer2.ts(50,9): error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A'. 'string' index signatures are incompatible. Type 'Derived2' is not assignable to type 'T'. 'Derived2' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. +assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. 'string' index signatures are incompatible. Type 'T' is not assignable to type 'Derived2'. Type 'Base' is not assignable to type 'Derived2'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts (8 errors) ==== +==== assignmentCompatWithStringIndexer2.ts (8 errors) ==== // index signatures must be compatible in assignments interface Base { foo: string; } @@ -48,7 +48,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. !!! error TS2322: 'string' index signatures are incompatible. !!! error TS2322: Property 'bar' is missing in type 'Base' but required in type 'Derived'. -!!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts:4:34: 'bar' is declared here. +!!! related TS2728 assignmentCompatWithStringIndexer2.ts:4:34: 'bar' is declared here. var b2: { [x: string]: Derived2; } a = b2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.js b/tests/baselines/reference/assignmentCompatWithStringIndexer2.js index 50fe7b3f8b9be..17b995fa1093a 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts] //// + //// [assignmentCompatWithStringIndexer2.ts] // index signatures must be compatible in assignments diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols b/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols index b1ce13bdbb703..fdca8339e6f85 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts] //// + +=== assignmentCompatWithStringIndexer2.ts === // index signatures must be compatible in assignments interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.types b/tests/baselines/reference/assignmentCompatWithStringIndexer2.types index 0f520bdccb9f0..a3daefbe5c746 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.types +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts] //// + +=== assignmentCompatWithStringIndexer2.ts === // index signatures must be compatible in assignments interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index d3735e6f19901..f7de5656d1044 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A'. +assignmentCompatWithStringIndexer3.ts(7,8): error TS2304: Cannot find name 'A'. +assignmentCompatWithStringIndexer3.ts(20,9): error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A'. 'string' index signatures are incompatible. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }'. +assignmentCompatWithStringIndexer3.ts(21,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }'. 'string' index signatures are incompatible. Type 'T' is not assignable to type 'string'. Type 'Derived' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts (3 errors) ==== +==== assignmentCompatWithStringIndexer3.ts (3 errors) ==== // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.js b/tests/baselines/reference/assignmentCompatWithStringIndexer3.js index d3306949906e2..0c121fc925b02 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts] //// + //// [assignmentCompatWithStringIndexer3.ts] // Derived type indexer must be subtype of base type indexer diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols b/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols index b9c690d55b7e2..a6dec0e485140 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts] //// + +=== assignmentCompatWithStringIndexer3.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.types b/tests/baselines/reference/assignmentCompatWithStringIndexer3.types index af9ecb7675491..9ef5f350d5cbb 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.types +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts] //// + +=== assignmentCompatWithStringIndexer3.ts === // Derived type indexer must be subtype of base type indexer interface Base { foo: string; } diff --git a/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.js b/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.js index c48c9f1c27514..2ebdb77c275ee 100644 --- a/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithWithGenericConstructSignatures.ts] //// + //// [assignmentCompatWithWithGenericConstructSignatures.ts] diff --git a/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.symbols b/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.symbols index dee3f0d792897..151217aa9c788 100644 --- a/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.symbols +++ b/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.symbols @@ -1,2 +1,4 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithWithGenericConstructSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithWithGenericConstructSignatures.ts] //// + +=== assignmentCompatWithWithGenericConstructSignatures.ts === diff --git a/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.types b/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.types index dee3f0d792897..151217aa9c788 100644 --- a/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.types +++ b/tests/baselines/reference/assignmentCompatWithWithGenericConstructSignatures.types @@ -1,2 +1,4 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithWithGenericConstructSignatures.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithWithGenericConstructSignatures.ts] //// + +=== assignmentCompatWithWithGenericConstructSignatures.ts === diff --git a/tests/baselines/reference/assignmentCompatability1.js b/tests/baselines/reference/assignmentCompatability1.js index f629d5eba27e7..ef48a5024215f 100644 --- a/tests/baselines/reference/assignmentCompatability1.js +++ b/tests/baselines/reference/assignmentCompatability1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability1.ts] //// + //// [assignmentCompatability1.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability1.symbols b/tests/baselines/reference/assignmentCompatability1.symbols index 15da482c2034c..105f5f13e52b6 100644 --- a/tests/baselines/reference/assignmentCompatability1.symbols +++ b/tests/baselines/reference/assignmentCompatability1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability1.ts === +//// [tests/cases/compiler/assignmentCompatability1.ts] //// + +=== assignmentCompatability1.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability1.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability1.types b/tests/baselines/reference/assignmentCompatability1.types index 1aa3eac973a99..4a826c5cb3738 100644 --- a/tests/baselines/reference/assignmentCompatability1.types +++ b/tests/baselines/reference/assignmentCompatability1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability1.ts === +//// [tests/cases/compiler/assignmentCompatability1.ts] //// + +=== assignmentCompatability1.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability10.js b/tests/baselines/reference/assignmentCompatability10.js index c21d0d57abdaf..a6164227e32a8 100644 --- a/tests/baselines/reference/assignmentCompatability10.js +++ b/tests/baselines/reference/assignmentCompatability10.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability10.ts] //// + //// [assignmentCompatability10.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability10.symbols b/tests/baselines/reference/assignmentCompatability10.symbols index d4fdcd7324135..92db9a5918094 100644 --- a/tests/baselines/reference/assignmentCompatability10.symbols +++ b/tests/baselines/reference/assignmentCompatability10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability10.ts === +//// [tests/cases/compiler/assignmentCompatability10.ts] //// + +=== assignmentCompatability10.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability10.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability10.types b/tests/baselines/reference/assignmentCompatability10.types index d5d259159403f..1a685c0ec4ca4 100644 --- a/tests/baselines/reference/assignmentCompatability10.types +++ b/tests/baselines/reference/assignmentCompatability10.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability10.ts === +//// [tests/cases/compiler/assignmentCompatability10.ts] //// + +=== assignmentCompatability10.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability11.errors.txt b/tests/baselines/reference/assignmentCompatability11.errors.txt index 21d49c6d3ae3a..73418f7911fac 100644 --- a/tests/baselines/reference/assignmentCompatability11.errors.txt +++ b/tests/baselines/reference/assignmentCompatability11.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. +assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/assignmentCompatability11.ts (1 errors) ==== +==== assignmentCompatability11.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability11.js b/tests/baselines/reference/assignmentCompatability11.js index 992e38f772634..80014b6203437 100644 --- a/tests/baselines/reference/assignmentCompatability11.js +++ b/tests/baselines/reference/assignmentCompatability11.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability11.ts] //// + //// [assignmentCompatability11.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability11.symbols b/tests/baselines/reference/assignmentCompatability11.symbols index f086d046bd0e8..dfb292c4694ed 100644 --- a/tests/baselines/reference/assignmentCompatability11.symbols +++ b/tests/baselines/reference/assignmentCompatability11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability11.ts === +//// [tests/cases/compiler/assignmentCompatability11.ts] //// + +=== assignmentCompatability11.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability11.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability11.types b/tests/baselines/reference/assignmentCompatability11.types index 728aee1517a05..7a91eb1d58c59 100644 --- a/tests/baselines/reference/assignmentCompatability11.types +++ b/tests/baselines/reference/assignmentCompatability11.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability11.ts === +//// [tests/cases/compiler/assignmentCompatability11.ts] //// + +=== assignmentCompatability11.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability12.errors.txt b/tests/baselines/reference/assignmentCompatability12.errors.txt index 07b65bdc463cf..4156d20c5a293 100644 --- a/tests/baselines/reference/assignmentCompatability12.errors.txt +++ b/tests/baselines/reference/assignmentCompatability12.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. +assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/assignmentCompatability12.ts (1 errors) ==== +==== assignmentCompatability12.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability12.js b/tests/baselines/reference/assignmentCompatability12.js index 3c802aab6e3d6..a061c54dd5902 100644 --- a/tests/baselines/reference/assignmentCompatability12.js +++ b/tests/baselines/reference/assignmentCompatability12.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability12.ts] //// + //// [assignmentCompatability12.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability12.symbols b/tests/baselines/reference/assignmentCompatability12.symbols index ed758739991d6..33aefaae8eff0 100644 --- a/tests/baselines/reference/assignmentCompatability12.symbols +++ b/tests/baselines/reference/assignmentCompatability12.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability12.ts === +//// [tests/cases/compiler/assignmentCompatability12.ts] //// + +=== assignmentCompatability12.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability12.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability12.types b/tests/baselines/reference/assignmentCompatability12.types index 0b1eed65e43c5..3992fe00c1049 100644 --- a/tests/baselines/reference/assignmentCompatability12.types +++ b/tests/baselines/reference/assignmentCompatability12.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability12.ts === +//// [tests/cases/compiler/assignmentCompatability12.ts] //// + +=== assignmentCompatability12.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability13.errors.txt b/tests/baselines/reference/assignmentCompatability13.errors.txt index ea7e62c422f41..99b3a3e41f35d 100644 --- a/tests/baselines/reference/assignmentCompatability13.errors.txt +++ b/tests/baselines/reference/assignmentCompatability13.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. +assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. -==== tests/cases/compiler/assignmentCompatability13.ts (1 errors) ==== +==== assignmentCompatability13.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability13.js b/tests/baselines/reference/assignmentCompatability13.js index ef4f24f710029..0c5b80716e519 100644 --- a/tests/baselines/reference/assignmentCompatability13.js +++ b/tests/baselines/reference/assignmentCompatability13.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability13.ts] //// + //// [assignmentCompatability13.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability13.symbols b/tests/baselines/reference/assignmentCompatability13.symbols index fbe3a51d0fdf1..49f0057968a55 100644 --- a/tests/baselines/reference/assignmentCompatability13.symbols +++ b/tests/baselines/reference/assignmentCompatability13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability13.ts === +//// [tests/cases/compiler/assignmentCompatability13.ts] //// + +=== assignmentCompatability13.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability13.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability13.types b/tests/baselines/reference/assignmentCompatability13.types index 62f82be12ac32..1ab649590b93d 100644 --- a/tests/baselines/reference/assignmentCompatability13.types +++ b/tests/baselines/reference/assignmentCompatability13.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability13.ts === +//// [tests/cases/compiler/assignmentCompatability13.ts] //// + +=== assignmentCompatability13.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability14.errors.txt b/tests/baselines/reference/assignmentCompatability14.errors.txt index 2ba77622f3391..f32b599604baa 100644 --- a/tests/baselines/reference/assignmentCompatability14.errors.txt +++ b/tests/baselines/reference/assignmentCompatability14.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. +assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'boolean'. -==== tests/cases/compiler/assignmentCompatability14.ts (1 errors) ==== +==== assignmentCompatability14.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability14.js b/tests/baselines/reference/assignmentCompatability14.js index bd4445cb515b0..2d64de2164088 100644 --- a/tests/baselines/reference/assignmentCompatability14.js +++ b/tests/baselines/reference/assignmentCompatability14.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability14.ts] //// + //// [assignmentCompatability14.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability14.symbols b/tests/baselines/reference/assignmentCompatability14.symbols index 8d777292a28a5..1aa645e13570b 100644 --- a/tests/baselines/reference/assignmentCompatability14.symbols +++ b/tests/baselines/reference/assignmentCompatability14.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability14.ts === +//// [tests/cases/compiler/assignmentCompatability14.ts] //// + +=== assignmentCompatability14.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability14.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability14.types b/tests/baselines/reference/assignmentCompatability14.types index 8321cc0fc614b..bad99cebd1cb8 100644 --- a/tests/baselines/reference/assignmentCompatability14.types +++ b/tests/baselines/reference/assignmentCompatability14.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability14.ts === +//// [tests/cases/compiler/assignmentCompatability14.ts] //// + +=== assignmentCompatability14.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability15.errors.txt b/tests/baselines/reference/assignmentCompatability15.errors.txt index c56719d0895d7..a3726fb2e9fa8 100644 --- a/tests/baselines/reference/assignmentCompatability15.errors.txt +++ b/tests/baselines/reference/assignmentCompatability15.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }'. +assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'boolean'. -==== tests/cases/compiler/assignmentCompatability15.ts (1 errors) ==== +==== assignmentCompatability15.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability15.js b/tests/baselines/reference/assignmentCompatability15.js index 37f1be4bc99d4..7bedfc7465c3d 100644 --- a/tests/baselines/reference/assignmentCompatability15.js +++ b/tests/baselines/reference/assignmentCompatability15.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability15.ts] //// + //// [assignmentCompatability15.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability15.symbols b/tests/baselines/reference/assignmentCompatability15.symbols index 3eb985703c816..f52a3ab57087e 100644 --- a/tests/baselines/reference/assignmentCompatability15.symbols +++ b/tests/baselines/reference/assignmentCompatability15.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability15.ts === +//// [tests/cases/compiler/assignmentCompatability15.ts] //// + +=== assignmentCompatability15.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability15.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability15.types b/tests/baselines/reference/assignmentCompatability15.types index 688e6e4be8446..fc365be3ef16b 100644 --- a/tests/baselines/reference/assignmentCompatability15.types +++ b/tests/baselines/reference/assignmentCompatability15.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability15.ts === +//// [tests/cases/compiler/assignmentCompatability15.ts] //// + +=== assignmentCompatability15.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index 71a93f11b35f3..060dd9436aae3 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. +assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'any[]'. -==== tests/cases/compiler/assignmentCompatability16.ts (1 errors) ==== +==== assignmentCompatability16.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability16.js b/tests/baselines/reference/assignmentCompatability16.js index 43c832016b0e3..26f7d384105ec 100644 --- a/tests/baselines/reference/assignmentCompatability16.js +++ b/tests/baselines/reference/assignmentCompatability16.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability16.ts] //// + //// [assignmentCompatability16.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability16.symbols b/tests/baselines/reference/assignmentCompatability16.symbols index a7beb212c21f1..99ca24c67cd88 100644 --- a/tests/baselines/reference/assignmentCompatability16.symbols +++ b/tests/baselines/reference/assignmentCompatability16.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability16.ts === +//// [tests/cases/compiler/assignmentCompatability16.ts] //// + +=== assignmentCompatability16.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability16.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability16.types b/tests/baselines/reference/assignmentCompatability16.types index 053cbfd26a9af..8161fbab5dbb5 100644 --- a/tests/baselines/reference/assignmentCompatability16.types +++ b/tests/baselines/reference/assignmentCompatability16.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability16.ts === +//// [tests/cases/compiler/assignmentCompatability16.ts] //// + +=== assignmentCompatability16.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index a87bcff2e92ec..5b644b0f0142f 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }'. +assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'any[]'. -==== tests/cases/compiler/assignmentCompatability17.ts (1 errors) ==== +==== assignmentCompatability17.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability17.js b/tests/baselines/reference/assignmentCompatability17.js index 09ce24b8f5da6..3c313cfb85ecb 100644 --- a/tests/baselines/reference/assignmentCompatability17.js +++ b/tests/baselines/reference/assignmentCompatability17.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability17.ts] //// + //// [assignmentCompatability17.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability17.symbols b/tests/baselines/reference/assignmentCompatability17.symbols index 5affec312e5f1..8b7055b7cd831 100644 --- a/tests/baselines/reference/assignmentCompatability17.symbols +++ b/tests/baselines/reference/assignmentCompatability17.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability17.ts === +//// [tests/cases/compiler/assignmentCompatability17.ts] //// + +=== assignmentCompatability17.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability17.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability17.types b/tests/baselines/reference/assignmentCompatability17.types index 5a1c5a0a48ff3..75c7ca24738f2 100644 --- a/tests/baselines/reference/assignmentCompatability17.types +++ b/tests/baselines/reference/assignmentCompatability17.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability17.ts === +//// [tests/cases/compiler/assignmentCompatability17.ts] //// + +=== assignmentCompatability17.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index 8ab5e5dcd07c6..dd7d852885890 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. +assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'number[]'. -==== tests/cases/compiler/assignmentCompatability18.ts (1 errors) ==== +==== assignmentCompatability18.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability18.js b/tests/baselines/reference/assignmentCompatability18.js index ad93e96303ff2..0248777c90bc8 100644 --- a/tests/baselines/reference/assignmentCompatability18.js +++ b/tests/baselines/reference/assignmentCompatability18.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability18.ts] //// + //// [assignmentCompatability18.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability18.symbols b/tests/baselines/reference/assignmentCompatability18.symbols index 4dfdba1387370..03503786f3c92 100644 --- a/tests/baselines/reference/assignmentCompatability18.symbols +++ b/tests/baselines/reference/assignmentCompatability18.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability18.ts === +//// [tests/cases/compiler/assignmentCompatability18.ts] //// + +=== assignmentCompatability18.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability18.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability18.types b/tests/baselines/reference/assignmentCompatability18.types index 936b35a7c9f06..439e5a23cad03 100644 --- a/tests/baselines/reference/assignmentCompatability18.types +++ b/tests/baselines/reference/assignmentCompatability18.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability18.ts === +//// [tests/cases/compiler/assignmentCompatability18.ts] //// + +=== assignmentCompatability18.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index e84e665cefabc..111f623baf545 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }'. +assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'number[]'. -==== tests/cases/compiler/assignmentCompatability19.ts (1 errors) ==== +==== assignmentCompatability19.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability19.js b/tests/baselines/reference/assignmentCompatability19.js index f330f94e81c6b..97f80e669be78 100644 --- a/tests/baselines/reference/assignmentCompatability19.js +++ b/tests/baselines/reference/assignmentCompatability19.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability19.ts] //// + //// [assignmentCompatability19.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability19.symbols b/tests/baselines/reference/assignmentCompatability19.symbols index bb6aa9004410c..cd1b176dc5e04 100644 --- a/tests/baselines/reference/assignmentCompatability19.symbols +++ b/tests/baselines/reference/assignmentCompatability19.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability19.ts === +//// [tests/cases/compiler/assignmentCompatability19.ts] //// + +=== assignmentCompatability19.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability19.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability19.types b/tests/baselines/reference/assignmentCompatability19.types index e822dde289140..d83d43d3bf869 100644 --- a/tests/baselines/reference/assignmentCompatability19.types +++ b/tests/baselines/reference/assignmentCompatability19.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability19.ts === +//// [tests/cases/compiler/assignmentCompatability19.ts] //// + +=== assignmentCompatability19.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability2.js b/tests/baselines/reference/assignmentCompatability2.js index 0c45fa378c619..e3ddf2f1d17d7 100644 --- a/tests/baselines/reference/assignmentCompatability2.js +++ b/tests/baselines/reference/assignmentCompatability2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability2.ts] //// + //// [assignmentCompatability2.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability2.symbols b/tests/baselines/reference/assignmentCompatability2.symbols index 55ed25fb4adc3..fc7cfa6099a2c 100644 --- a/tests/baselines/reference/assignmentCompatability2.symbols +++ b/tests/baselines/reference/assignmentCompatability2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability2.ts === +//// [tests/cases/compiler/assignmentCompatability2.ts] //// + +=== assignmentCompatability2.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability2.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability2.types b/tests/baselines/reference/assignmentCompatability2.types index 33383d1a18530..1c9b7ae60cbd2 100644 --- a/tests/baselines/reference/assignmentCompatability2.types +++ b/tests/baselines/reference/assignmentCompatability2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability2.ts === +//// [tests/cases/compiler/assignmentCompatability2.ts] //// + +=== assignmentCompatability2.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index 2e67a2a20337f..249ded8a2dcc4 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. +assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string[]'. -==== tests/cases/compiler/assignmentCompatability20.ts (1 errors) ==== +==== assignmentCompatability20.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability20.js b/tests/baselines/reference/assignmentCompatability20.js index 321ec78ee17ce..6497767bef47e 100644 --- a/tests/baselines/reference/assignmentCompatability20.js +++ b/tests/baselines/reference/assignmentCompatability20.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability20.ts] //// + //// [assignmentCompatability20.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability20.symbols b/tests/baselines/reference/assignmentCompatability20.symbols index e3572bf81d462..d8b006cd4f5a3 100644 --- a/tests/baselines/reference/assignmentCompatability20.symbols +++ b/tests/baselines/reference/assignmentCompatability20.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability20.ts === +//// [tests/cases/compiler/assignmentCompatability20.ts] //// + +=== assignmentCompatability20.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability20.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability20.types b/tests/baselines/reference/assignmentCompatability20.types index 1e6cf213af3ca..0e00e5d23363e 100644 --- a/tests/baselines/reference/assignmentCompatability20.types +++ b/tests/baselines/reference/assignmentCompatability20.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability20.ts === +//// [tests/cases/compiler/assignmentCompatability20.ts] //// + +=== assignmentCompatability20.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index 44e24e7d0b5cc..cdee4dd3d2e06 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }'. +assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'string[]'. -==== tests/cases/compiler/assignmentCompatability21.ts (1 errors) ==== +==== assignmentCompatability21.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability21.js b/tests/baselines/reference/assignmentCompatability21.js index 215ab5dc3979b..3d588d6e2d071 100644 --- a/tests/baselines/reference/assignmentCompatability21.js +++ b/tests/baselines/reference/assignmentCompatability21.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability21.ts] //// + //// [assignmentCompatability21.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability21.symbols b/tests/baselines/reference/assignmentCompatability21.symbols index 184844b588573..4d5735d9644d9 100644 --- a/tests/baselines/reference/assignmentCompatability21.symbols +++ b/tests/baselines/reference/assignmentCompatability21.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability21.ts === +//// [tests/cases/compiler/assignmentCompatability21.ts] //// + +=== assignmentCompatability21.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability21.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability21.types b/tests/baselines/reference/assignmentCompatability21.types index fdd8eea98d6b8..6c3cc595026e6 100644 --- a/tests/baselines/reference/assignmentCompatability21.types +++ b/tests/baselines/reference/assignmentCompatability21.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability21.ts === +//// [tests/cases/compiler/assignmentCompatability21.ts] //// + +=== assignmentCompatability21.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index cb42a7abaef74..da9cd1e4c5759 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. +assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'boolean[]'. -==== tests/cases/compiler/assignmentCompatability22.ts (1 errors) ==== +==== assignmentCompatability22.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability22.js b/tests/baselines/reference/assignmentCompatability22.js index 04cc2a2d0abcf..7f21694ebbdee 100644 --- a/tests/baselines/reference/assignmentCompatability22.js +++ b/tests/baselines/reference/assignmentCompatability22.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability22.ts] //// + //// [assignmentCompatability22.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability22.symbols b/tests/baselines/reference/assignmentCompatability22.symbols index 457d367ebcaa9..7ca49b21d9242 100644 --- a/tests/baselines/reference/assignmentCompatability22.symbols +++ b/tests/baselines/reference/assignmentCompatability22.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability22.ts === +//// [tests/cases/compiler/assignmentCompatability22.ts] //// + +=== assignmentCompatability22.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability22.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability22.types b/tests/baselines/reference/assignmentCompatability22.types index 70561e334e536..629feacb9ee11 100644 --- a/tests/baselines/reference/assignmentCompatability22.types +++ b/tests/baselines/reference/assignmentCompatability22.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability22.ts === +//// [tests/cases/compiler/assignmentCompatability22.ts] //// + +=== assignmentCompatability22.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index 7b54e8559eb87..0b3b422b60c5d 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }'. +assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'boolean[]'. -==== tests/cases/compiler/assignmentCompatability23.ts (1 errors) ==== +==== assignmentCompatability23.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability23.js b/tests/baselines/reference/assignmentCompatability23.js index 1d03236436059..3fa5f0aaeff18 100644 --- a/tests/baselines/reference/assignmentCompatability23.js +++ b/tests/baselines/reference/assignmentCompatability23.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability23.ts] //// + //// [assignmentCompatability23.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability23.symbols b/tests/baselines/reference/assignmentCompatability23.symbols index 6c42276e49ab7..c44349cfa649a 100644 --- a/tests/baselines/reference/assignmentCompatability23.symbols +++ b/tests/baselines/reference/assignmentCompatability23.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability23.ts === +//// [tests/cases/compiler/assignmentCompatability23.ts] //// + +=== assignmentCompatability23.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability23.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability23.types b/tests/baselines/reference/assignmentCompatability23.types index e8c26edf9ee10..1955258ae1b70 100644 --- a/tests/baselines/reference/assignmentCompatability23.types +++ b/tests/baselines/reference/assignmentCompatability23.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability23.ts === +//// [tests/cases/compiler/assignmentCompatability23.ts] //// + +=== assignmentCompatability23.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability24.errors.txt b/tests/baselines/reference/assignmentCompatability24.errors.txt index 9d200272b31cb..7298208241e28 100644 --- a/tests/baselines/reference/assignmentCompatability24.errors.txt +++ b/tests/baselines/reference/assignmentCompatability24.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. +assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. -==== tests/cases/compiler/assignmentCompatability24.ts (1 errors) ==== +==== assignmentCompatability24.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability24.js b/tests/baselines/reference/assignmentCompatability24.js index e6961264de827..1e2c84b3d44bc 100644 --- a/tests/baselines/reference/assignmentCompatability24.js +++ b/tests/baselines/reference/assignmentCompatability24.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability24.ts] //// + //// [assignmentCompatability24.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability24.symbols b/tests/baselines/reference/assignmentCompatability24.symbols index 43914094463da..714fe18cfb4d4 100644 --- a/tests/baselines/reference/assignmentCompatability24.symbols +++ b/tests/baselines/reference/assignmentCompatability24.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability24.ts === +//// [tests/cases/compiler/assignmentCompatability24.ts] //// + +=== assignmentCompatability24.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability24.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability24.types b/tests/baselines/reference/assignmentCompatability24.types index f997ac68bf1cb..957bbe5acbb8e 100644 --- a/tests/baselines/reference/assignmentCompatability24.types +++ b/tests/baselines/reference/assignmentCompatability24.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability24.ts === +//// [tests/cases/compiler/assignmentCompatability24.ts] //// + +=== assignmentCompatability24.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index 7f7e7f73ee0b0..8c1a2431ba6a3 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. +assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }'. Types of property 'two' are incompatible. Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/assignmentCompatability25.ts (1 errors) ==== +==== assignmentCompatability25.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability25.js b/tests/baselines/reference/assignmentCompatability25.js index 52cc4326eaaa3..9de3bd3f356f9 100644 --- a/tests/baselines/reference/assignmentCompatability25.js +++ b/tests/baselines/reference/assignmentCompatability25.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability25.ts] //// + //// [assignmentCompatability25.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability25.symbols b/tests/baselines/reference/assignmentCompatability25.symbols index c161232a2dd58..80db7327feb92 100644 --- a/tests/baselines/reference/assignmentCompatability25.symbols +++ b/tests/baselines/reference/assignmentCompatability25.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability25.ts === +//// [tests/cases/compiler/assignmentCompatability25.ts] //// + +=== assignmentCompatability25.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability25.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability25.types b/tests/baselines/reference/assignmentCompatability25.types index 776e9992d8954..3ae70bb42d13e 100644 --- a/tests/baselines/reference/assignmentCompatability25.types +++ b/tests/baselines/reference/assignmentCompatability25.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability25.ts === +//// [tests/cases/compiler/assignmentCompatability25.ts] //// + +=== assignmentCompatability25.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index a005850e49c6e..014f618d473d8 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. +assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/assignmentCompatability26.ts (1 errors) ==== +==== assignmentCompatability26.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability26.js b/tests/baselines/reference/assignmentCompatability26.js index 12479b7b8b94d..759f6b5d5d644 100644 --- a/tests/baselines/reference/assignmentCompatability26.js +++ b/tests/baselines/reference/assignmentCompatability26.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability26.ts] //// + //// [assignmentCompatability26.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability26.symbols b/tests/baselines/reference/assignmentCompatability26.symbols index 83286055c81b9..6ae16fc87eb3f 100644 --- a/tests/baselines/reference/assignmentCompatability26.symbols +++ b/tests/baselines/reference/assignmentCompatability26.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability26.ts === +//// [tests/cases/compiler/assignmentCompatability26.ts] //// + +=== assignmentCompatability26.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability26.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability26.types b/tests/baselines/reference/assignmentCompatability26.types index 0350170475a48..98ad790205b9c 100644 --- a/tests/baselines/reference/assignmentCompatability26.types +++ b/tests/baselines/reference/assignmentCompatability26.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability26.ts === +//// [tests/cases/compiler/assignmentCompatability26.ts] //// + +=== assignmentCompatability26.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index 180a51b3cf000..1dae5a7495c23 100644 --- a/tests/baselines/reference/assignmentCompatability27.errors.txt +++ b/tests/baselines/reference/assignmentCompatability27.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. +assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type '{ two: string; }'. -==== tests/cases/compiler/assignmentCompatability27.ts (1 errors) ==== +==== assignmentCompatability27.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability27.js b/tests/baselines/reference/assignmentCompatability27.js index aeac55d9c1703..3254ed0e4383f 100644 --- a/tests/baselines/reference/assignmentCompatability27.js +++ b/tests/baselines/reference/assignmentCompatability27.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability27.ts] //// + //// [assignmentCompatability27.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability27.symbols b/tests/baselines/reference/assignmentCompatability27.symbols index a0d1244651264..bdebf4cbbf2e0 100644 --- a/tests/baselines/reference/assignmentCompatability27.symbols +++ b/tests/baselines/reference/assignmentCompatability27.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability27.ts === +//// [tests/cases/compiler/assignmentCompatability27.ts] //// + +=== assignmentCompatability27.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability27.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability27.types b/tests/baselines/reference/assignmentCompatability27.types index 512e7f09dd26e..032f795d15e3e 100644 --- a/tests/baselines/reference/assignmentCompatability27.types +++ b/tests/baselines/reference/assignmentCompatability27.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability27.ts === +//// [tests/cases/compiler/assignmentCompatability27.ts] //// + +=== assignmentCompatability27.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index 2360d0b1e9d44..fda541dc3f37f 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. +assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'boolean'. -==== tests/cases/compiler/assignmentCompatability28.ts (1 errors) ==== +==== assignmentCompatability28.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability28.js b/tests/baselines/reference/assignmentCompatability28.js index 27d2f7d09d0aa..38eeb3faf58a5 100644 --- a/tests/baselines/reference/assignmentCompatability28.js +++ b/tests/baselines/reference/assignmentCompatability28.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability28.ts] //// + //// [assignmentCompatability28.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability28.symbols b/tests/baselines/reference/assignmentCompatability28.symbols index da7daeb29e19a..fce7e5fe94f42 100644 --- a/tests/baselines/reference/assignmentCompatability28.symbols +++ b/tests/baselines/reference/assignmentCompatability28.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability28.ts === +//// [tests/cases/compiler/assignmentCompatability28.ts] //// + +=== assignmentCompatability28.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability28.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability28.types b/tests/baselines/reference/assignmentCompatability28.types index 5f0a2f41bc518..ac07335042d9d 100644 --- a/tests/baselines/reference/assignmentCompatability28.types +++ b/tests/baselines/reference/assignmentCompatability28.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability28.ts === +//// [tests/cases/compiler/assignmentCompatability28.ts] //// + +=== assignmentCompatability28.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 9ba5c35d52832..3e9056460ad10 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. +assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'any[]'. -==== tests/cases/compiler/assignmentCompatability29.ts (1 errors) ==== +==== assignmentCompatability29.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability29.js b/tests/baselines/reference/assignmentCompatability29.js index 4488c5185309d..01d7f9699e94f 100644 --- a/tests/baselines/reference/assignmentCompatability29.js +++ b/tests/baselines/reference/assignmentCompatability29.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability29.ts] //// + //// [assignmentCompatability29.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability29.symbols b/tests/baselines/reference/assignmentCompatability29.symbols index 0c6aac7168190..71d34eeeb5d77 100644 --- a/tests/baselines/reference/assignmentCompatability29.symbols +++ b/tests/baselines/reference/assignmentCompatability29.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability29.ts === +//// [tests/cases/compiler/assignmentCompatability29.ts] //// + +=== assignmentCompatability29.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability29.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability29.types b/tests/baselines/reference/assignmentCompatability29.types index 6e7393cd504c4..e1ee78d6ad624 100644 --- a/tests/baselines/reference/assignmentCompatability29.types +++ b/tests/baselines/reference/assignmentCompatability29.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability29.ts === +//// [tests/cases/compiler/assignmentCompatability29.ts] //// + +=== assignmentCompatability29.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability3.js b/tests/baselines/reference/assignmentCompatability3.js index 7120e6ce3e24b..b2bccf4bb2301 100644 --- a/tests/baselines/reference/assignmentCompatability3.js +++ b/tests/baselines/reference/assignmentCompatability3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability3.ts] //// + //// [assignmentCompatability3.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability3.symbols b/tests/baselines/reference/assignmentCompatability3.symbols index 49fccff55f0ee..73a62de6a4676 100644 --- a/tests/baselines/reference/assignmentCompatability3.symbols +++ b/tests/baselines/reference/assignmentCompatability3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability3.ts === +//// [tests/cases/compiler/assignmentCompatability3.ts] //// + +=== assignmentCompatability3.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability3.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability3.types b/tests/baselines/reference/assignmentCompatability3.types index 06db684c39e24..58e844d517897 100644 --- a/tests/baselines/reference/assignmentCompatability3.types +++ b/tests/baselines/reference/assignmentCompatability3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability3.ts === +//// [tests/cases/compiler/assignmentCompatability3.ts] //// + +=== assignmentCompatability3.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index 43f7f3f9c0a62..4dfa8802383c3 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. +assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'number[]'. -==== tests/cases/compiler/assignmentCompatability30.ts (1 errors) ==== +==== assignmentCompatability30.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability30.js b/tests/baselines/reference/assignmentCompatability30.js index e6729ad31942b..75184f3eed26b 100644 --- a/tests/baselines/reference/assignmentCompatability30.js +++ b/tests/baselines/reference/assignmentCompatability30.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability30.ts] //// + //// [assignmentCompatability30.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability30.symbols b/tests/baselines/reference/assignmentCompatability30.symbols index b3e8b43d695ab..484dc22fb5302 100644 --- a/tests/baselines/reference/assignmentCompatability30.symbols +++ b/tests/baselines/reference/assignmentCompatability30.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability30.ts === +//// [tests/cases/compiler/assignmentCompatability30.ts] //// + +=== assignmentCompatability30.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability30.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability30.types b/tests/baselines/reference/assignmentCompatability30.types index acde0fb4e7564..10d99884a3983 100644 --- a/tests/baselines/reference/assignmentCompatability30.types +++ b/tests/baselines/reference/assignmentCompatability30.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability30.ts === +//// [tests/cases/compiler/assignmentCompatability30.ts] //// + +=== assignmentCompatability30.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index 8874ebf06a6e4..680c03f7e7d3d 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. +assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'string[]'. -==== tests/cases/compiler/assignmentCompatability31.ts (1 errors) ==== +==== assignmentCompatability31.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability31.js b/tests/baselines/reference/assignmentCompatability31.js index 20aab7d823bf7..072415fdf3211 100644 --- a/tests/baselines/reference/assignmentCompatability31.js +++ b/tests/baselines/reference/assignmentCompatability31.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability31.ts] //// + //// [assignmentCompatability31.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability31.symbols b/tests/baselines/reference/assignmentCompatability31.symbols index e7b453941cc70..751323fcaad90 100644 --- a/tests/baselines/reference/assignmentCompatability31.symbols +++ b/tests/baselines/reference/assignmentCompatability31.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability31.ts === +//// [tests/cases/compiler/assignmentCompatability31.ts] //// + +=== assignmentCompatability31.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability31.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability31.types b/tests/baselines/reference/assignmentCompatability31.types index ab26f09ac3742..cc0670ae20220 100644 --- a/tests/baselines/reference/assignmentCompatability31.types +++ b/tests/baselines/reference/assignmentCompatability31.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability31.ts === +//// [tests/cases/compiler/assignmentCompatability31.ts] //// + +=== assignmentCompatability31.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index 00164a48fd621..dd1d9838a4737 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. +assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }'. Types of property 'one' are incompatible. Type 'number' is not assignable to type 'boolean[]'. -==== tests/cases/compiler/assignmentCompatability32.ts (1 errors) ==== +==== assignmentCompatability32.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability32.js b/tests/baselines/reference/assignmentCompatability32.js index c1656c8b4261a..20d659b1c57f8 100644 --- a/tests/baselines/reference/assignmentCompatability32.js +++ b/tests/baselines/reference/assignmentCompatability32.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability32.ts] //// + //// [assignmentCompatability32.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability32.symbols b/tests/baselines/reference/assignmentCompatability32.symbols index b4d1da0e520e4..f2d625c4ed910 100644 --- a/tests/baselines/reference/assignmentCompatability32.symbols +++ b/tests/baselines/reference/assignmentCompatability32.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability32.ts === +//// [tests/cases/compiler/assignmentCompatability32.ts] //// + +=== assignmentCompatability32.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability32.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability32.types b/tests/baselines/reference/assignmentCompatability32.types index 81cfe862821f8..468d87b5393dc 100644 --- a/tests/baselines/reference/assignmentCompatability32.types +++ b/tests/baselines/reference/assignmentCompatability32.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability32.ts === +//// [tests/cases/compiler/assignmentCompatability32.ts] //// + +=== assignmentCompatability32.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index a67e0c2ae0796..ca248ffd6f4fc 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. +assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. -==== tests/cases/compiler/assignmentCompatability33.ts (1 errors) ==== +==== assignmentCompatability33.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability33.js b/tests/baselines/reference/assignmentCompatability33.js index f078421a65bb9..3861690326f00 100644 --- a/tests/baselines/reference/assignmentCompatability33.js +++ b/tests/baselines/reference/assignmentCompatability33.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability33.ts] //// + //// [assignmentCompatability33.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability33.symbols b/tests/baselines/reference/assignmentCompatability33.symbols index fb6e8d9d5cd5a..16c15c3802be7 100644 --- a/tests/baselines/reference/assignmentCompatability33.symbols +++ b/tests/baselines/reference/assignmentCompatability33.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability33.ts === +//// [tests/cases/compiler/assignmentCompatability33.ts] //// + +=== assignmentCompatability33.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability33.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability33.types b/tests/baselines/reference/assignmentCompatability33.types index 2d0077363bd66..0c7dd4a1999d7 100644 --- a/tests/baselines/reference/assignmentCompatability33.types +++ b/tests/baselines/reference/assignmentCompatability33.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability33.ts === +//// [tests/cases/compiler/assignmentCompatability33.ts] //// + +=== assignmentCompatability33.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index 1dced22968baf..5519c0c36d890 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. +assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber'. -==== tests/cases/compiler/assignmentCompatability34.ts (1 errors) ==== +==== assignmentCompatability34.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability34.js b/tests/baselines/reference/assignmentCompatability34.js index d0e04eddf3f13..9196251778fb7 100644 --- a/tests/baselines/reference/assignmentCompatability34.js +++ b/tests/baselines/reference/assignmentCompatability34.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability34.ts] //// + //// [assignmentCompatability34.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability34.symbols b/tests/baselines/reference/assignmentCompatability34.symbols index b6bca968e335a..9a184ed4b5577 100644 --- a/tests/baselines/reference/assignmentCompatability34.symbols +++ b/tests/baselines/reference/assignmentCompatability34.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability34.ts === +//// [tests/cases/compiler/assignmentCompatability34.ts] //// + +=== assignmentCompatability34.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability34.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability34.types b/tests/baselines/reference/assignmentCompatability34.types index 73a1e988239a7..7146cf17aa39c 100644 --- a/tests/baselines/reference/assignmentCompatability34.types +++ b/tests/baselines/reference/assignmentCompatability34.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability34.ts === +//// [tests/cases/compiler/assignmentCompatability34.ts] //// + +=== assignmentCompatability34.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index bcfc157148fc2..2a1082e2ffa2c 100644 --- a/tests/baselines/reference/assignmentCompatability35.errors.txt +++ b/tests/baselines/reference/assignmentCompatability35.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [index: number]: number; }'. +assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [index: number]: number; }'. Index signature for type 'number' is missing in type 'interfaceWithPublicAndOptional'. -==== tests/cases/compiler/assignmentCompatability35.ts (1 errors) ==== +==== assignmentCompatability35.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability35.js b/tests/baselines/reference/assignmentCompatability35.js index c1a87636e82ef..f85febc9d0e1c 100644 --- a/tests/baselines/reference/assignmentCompatability35.js +++ b/tests/baselines/reference/assignmentCompatability35.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability35.ts] //// + //// [assignmentCompatability35.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability35.symbols b/tests/baselines/reference/assignmentCompatability35.symbols index 04910af5eb6a2..e803f9f470caa 100644 --- a/tests/baselines/reference/assignmentCompatability35.symbols +++ b/tests/baselines/reference/assignmentCompatability35.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability35.ts === +//// [tests/cases/compiler/assignmentCompatability35.ts] //// + +=== assignmentCompatability35.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability35.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability35.types b/tests/baselines/reference/assignmentCompatability35.types index bbef43af9f499..414ccbbc79fa0 100644 --- a/tests/baselines/reference/assignmentCompatability35.types +++ b/tests/baselines/reference/assignmentCompatability35.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability35.ts === +//// [tests/cases/compiler/assignmentCompatability35.ts] //// + +=== assignmentCompatability35.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability36.js b/tests/baselines/reference/assignmentCompatability36.js index c5d274ba0905b..4baf0f6a5f735 100644 --- a/tests/baselines/reference/assignmentCompatability36.js +++ b/tests/baselines/reference/assignmentCompatability36.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability36.ts] //// + //// [assignmentCompatability36.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability36.symbols b/tests/baselines/reference/assignmentCompatability36.symbols index 09ebfb67ed81b..bafaa47fe95c0 100644 --- a/tests/baselines/reference/assignmentCompatability36.symbols +++ b/tests/baselines/reference/assignmentCompatability36.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability36.ts === +//// [tests/cases/compiler/assignmentCompatability36.ts] //// + +=== assignmentCompatability36.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability36.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability36.types b/tests/baselines/reference/assignmentCompatability36.types index 1d93b502cc8e3..80a10a78ad148 100644 --- a/tests/baselines/reference/assignmentCompatability36.types +++ b/tests/baselines/reference/assignmentCompatability36.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability36.ts === +//// [tests/cases/compiler/assignmentCompatability36.ts] //// + +=== assignmentCompatability36.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index b007955968fbd..eeeaf566b53cc 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. +assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any'. -==== tests/cases/compiler/assignmentCompatability37.ts (1 errors) ==== +==== assignmentCompatability37.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability37.js b/tests/baselines/reference/assignmentCompatability37.js index 8f4bf522854c3..f9864f33dad33 100644 --- a/tests/baselines/reference/assignmentCompatability37.js +++ b/tests/baselines/reference/assignmentCompatability37.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability37.ts] //// + //// [assignmentCompatability37.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability37.symbols b/tests/baselines/reference/assignmentCompatability37.symbols index 3be2f9df6d3ae..71297d1b3bc67 100644 --- a/tests/baselines/reference/assignmentCompatability37.symbols +++ b/tests/baselines/reference/assignmentCompatability37.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability37.ts === +//// [tests/cases/compiler/assignmentCompatability37.ts] //// + +=== assignmentCompatability37.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability37.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability37.types b/tests/baselines/reference/assignmentCompatability37.types index 099741162d3a4..6ab0925388cc7 100644 --- a/tests/baselines/reference/assignmentCompatability37.types +++ b/tests/baselines/reference/assignmentCompatability37.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability37.ts === +//// [tests/cases/compiler/assignmentCompatability37.ts] //// + +=== assignmentCompatability37.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index 9b5aebca8e342..d8c6d710d732f 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. +assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any'. -==== tests/cases/compiler/assignmentCompatability38.ts (1 errors) ==== +==== assignmentCompatability38.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability38.js b/tests/baselines/reference/assignmentCompatability38.js index d89f5c735d6ea..6d8b379c81280 100644 --- a/tests/baselines/reference/assignmentCompatability38.js +++ b/tests/baselines/reference/assignmentCompatability38.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability38.ts] //// + //// [assignmentCompatability38.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability38.symbols b/tests/baselines/reference/assignmentCompatability38.symbols index e5575900d994f..cd19f69497073 100644 --- a/tests/baselines/reference/assignmentCompatability38.symbols +++ b/tests/baselines/reference/assignmentCompatability38.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability38.ts === +//// [tests/cases/compiler/assignmentCompatability38.ts] //// + +=== assignmentCompatability38.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability38.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability38.types b/tests/baselines/reference/assignmentCompatability38.types index e6be5038f0ff5..386a93491b283 100644 --- a/tests/baselines/reference/assignmentCompatability38.types +++ b/tests/baselines/reference/assignmentCompatability38.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability38.ts === +//// [tests/cases/compiler/assignmentCompatability38.ts] //// + +=== assignmentCompatability38.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability39.errors.txt b/tests/baselines/reference/assignmentCompatability39.errors.txt index 6389a9ad87f8d..a3dda96f781e1 100644 --- a/tests/baselines/reference/assignmentCompatability39.errors.txt +++ b/tests/baselines/reference/assignmentCompatability39.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic'. +assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'classWithTwoPublic'. -==== tests/cases/compiler/assignmentCompatability39.ts (1 errors) ==== +==== assignmentCompatability39.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability39.js b/tests/baselines/reference/assignmentCompatability39.js index 6a2c4e88e30b8..e1f24aff429d6 100644 --- a/tests/baselines/reference/assignmentCompatability39.js +++ b/tests/baselines/reference/assignmentCompatability39.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability39.ts] //// + //// [assignmentCompatability39.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability39.symbols b/tests/baselines/reference/assignmentCompatability39.symbols index e015316facce9..13af585b6b7a9 100644 --- a/tests/baselines/reference/assignmentCompatability39.symbols +++ b/tests/baselines/reference/assignmentCompatability39.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability39.ts === +//// [tests/cases/compiler/assignmentCompatability39.ts] //// + +=== assignmentCompatability39.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability39.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability39.types b/tests/baselines/reference/assignmentCompatability39.types index b23efbbbcfa5d..d4d3c17315aa6 100644 --- a/tests/baselines/reference/assignmentCompatability39.types +++ b/tests/baselines/reference/assignmentCompatability39.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability39.ts === +//// [tests/cases/compiler/assignmentCompatability39.ts] //// + +=== assignmentCompatability39.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability4.js b/tests/baselines/reference/assignmentCompatability4.js index 7ce0f48bc18cc..6b88073c32c7f 100644 --- a/tests/baselines/reference/assignmentCompatability4.js +++ b/tests/baselines/reference/assignmentCompatability4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability4.ts] //// + //// [assignmentCompatability4.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability4.symbols b/tests/baselines/reference/assignmentCompatability4.symbols index cac51957fc8f6..08e910c370e00 100644 --- a/tests/baselines/reference/assignmentCompatability4.symbols +++ b/tests/baselines/reference/assignmentCompatability4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability4.ts === +//// [tests/cases/compiler/assignmentCompatability4.ts] //// + +=== assignmentCompatability4.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability4.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability4.types b/tests/baselines/reference/assignmentCompatability4.types index 285fe32e0ae2d..8ecd508c6f215 100644 --- a/tests/baselines/reference/assignmentCompatability4.types +++ b/tests/baselines/reference/assignmentCompatability4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability4.ts === +//// [tests/cases/compiler/assignmentCompatability4.ts] //// + +=== assignmentCompatability4.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability40.errors.txt b/tests/baselines/reference/assignmentCompatability40.errors.txt index d60f7dcdeb629..a990107339074 100644 --- a/tests/baselines/reference/assignmentCompatability40.errors.txt +++ b/tests/baselines/reference/assignmentCompatability40.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate'. +assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate'. Property 'one' is private in type 'classWithPrivate' but not in type 'interfaceWithPublicAndOptional'. -==== tests/cases/compiler/assignmentCompatability40.ts (1 errors) ==== +==== assignmentCompatability40.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability40.js b/tests/baselines/reference/assignmentCompatability40.js index ecfd29d6213dc..bb2bcd6cd1959 100644 --- a/tests/baselines/reference/assignmentCompatability40.js +++ b/tests/baselines/reference/assignmentCompatability40.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability40.ts] //// + //// [assignmentCompatability40.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability40.symbols b/tests/baselines/reference/assignmentCompatability40.symbols index 177c83e3d6217..bd437b5684e72 100644 --- a/tests/baselines/reference/assignmentCompatability40.symbols +++ b/tests/baselines/reference/assignmentCompatability40.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability40.ts === +//// [tests/cases/compiler/assignmentCompatability40.ts] //// + +=== assignmentCompatability40.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability40.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability40.types b/tests/baselines/reference/assignmentCompatability40.types index e95d4c6d6850c..a38218659eab5 100644 --- a/tests/baselines/reference/assignmentCompatability40.types +++ b/tests/baselines/reference/assignmentCompatability40.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability40.ts === +//// [tests/cases/compiler/assignmentCompatability40.ts] //// + +=== assignmentCompatability40.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability41.errors.txt b/tests/baselines/reference/assignmentCompatability41.errors.txt index ad0b7b7cfe30d..7f5a1e60cbeff 100644 --- a/tests/baselines/reference/assignmentCompatability41.errors.txt +++ b/tests/baselines/reference/assignmentCompatability41.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate'. +assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate'. Property 'one' is private in type 'classWithTwoPrivate' but not in type 'interfaceWithPublicAndOptional'. -==== tests/cases/compiler/assignmentCompatability41.ts (1 errors) ==== +==== assignmentCompatability41.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability41.js b/tests/baselines/reference/assignmentCompatability41.js index dbba1e012621a..21208bf7e7b70 100644 --- a/tests/baselines/reference/assignmentCompatability41.js +++ b/tests/baselines/reference/assignmentCompatability41.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability41.ts] //// + //// [assignmentCompatability41.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability41.symbols b/tests/baselines/reference/assignmentCompatability41.symbols index 22096f56a7ded..cac6ca2c3c66f 100644 --- a/tests/baselines/reference/assignmentCompatability41.symbols +++ b/tests/baselines/reference/assignmentCompatability41.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability41.ts === +//// [tests/cases/compiler/assignmentCompatability41.ts] //// + +=== assignmentCompatability41.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability41.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability41.types b/tests/baselines/reference/assignmentCompatability41.types index dd52e0b9a0485..233dce3cff417 100644 --- a/tests/baselines/reference/assignmentCompatability41.types +++ b/tests/baselines/reference/assignmentCompatability41.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability41.ts === +//// [tests/cases/compiler/assignmentCompatability41.ts] //// + +=== assignmentCompatability41.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability42.errors.txt b/tests/baselines/reference/assignmentCompatability42.errors.txt index e86b261e68228..7cd727cf1f7e5 100644 --- a/tests/baselines/reference/assignmentCompatability42.errors.txt +++ b/tests/baselines/reference/assignmentCompatability42.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate'. +assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate'. Property 'two' is private in type 'classWithPublicPrivate' but not in type 'interfaceWithPublicAndOptional'. -==== tests/cases/compiler/assignmentCompatability42.ts (1 errors) ==== +==== assignmentCompatability42.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability42.js b/tests/baselines/reference/assignmentCompatability42.js index 98ddf0bd4ec38..d94ebe31d6a63 100644 --- a/tests/baselines/reference/assignmentCompatability42.js +++ b/tests/baselines/reference/assignmentCompatability42.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability42.ts] //// + //// [assignmentCompatability42.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability42.symbols b/tests/baselines/reference/assignmentCompatability42.symbols index 399e6fab57969..97c6341406ebe 100644 --- a/tests/baselines/reference/assignmentCompatability42.symbols +++ b/tests/baselines/reference/assignmentCompatability42.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability42.ts === +//// [tests/cases/compiler/assignmentCompatability42.ts] //// + +=== assignmentCompatability42.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability42.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability42.types b/tests/baselines/reference/assignmentCompatability42.types index 3b4ada6639bc8..2be3f1dbcb3cb 100644 --- a/tests/baselines/reference/assignmentCompatability42.types +++ b/tests/baselines/reference/assignmentCompatability42.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability42.ts === +//// [tests/cases/compiler/assignmentCompatability42.ts] //// + +=== assignmentCompatability42.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability43.errors.txt b/tests/baselines/reference/assignmentCompatability43.errors.txt index a1f596ef7e26f..97874671752be 100644 --- a/tests/baselines/reference/assignmentCompatability43.errors.txt +++ b/tests/baselines/reference/assignmentCompatability43.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo'. +assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo'. Property 'two' is optional in type 'interfaceWithPublicAndOptional' but required in type 'interfaceTwo'. -==== tests/cases/compiler/assignmentCompatability43.ts (1 errors) ==== +==== assignmentCompatability43.ts (1 errors) ==== module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; diff --git a/tests/baselines/reference/assignmentCompatability43.js b/tests/baselines/reference/assignmentCompatability43.js index 0ff9bdb481991..a88f49755e21b 100644 --- a/tests/baselines/reference/assignmentCompatability43.js +++ b/tests/baselines/reference/assignmentCompatability43.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability43.ts] //// + //// [assignmentCompatability43.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability43.symbols b/tests/baselines/reference/assignmentCompatability43.symbols index 0b0f1489f1f12..3c0464f3ecc45 100644 --- a/tests/baselines/reference/assignmentCompatability43.symbols +++ b/tests/baselines/reference/assignmentCompatability43.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability43.ts === +//// [tests/cases/compiler/assignmentCompatability43.ts] //// + +=== assignmentCompatability43.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability43.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability43.types b/tests/baselines/reference/assignmentCompatability43.types index 68af6d8827503..e2ee212256517 100644 --- a/tests/baselines/reference/assignmentCompatability43.types +++ b/tests/baselines/reference/assignmentCompatability43.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability43.ts === +//// [tests/cases/compiler/assignmentCompatability43.ts] //// + +=== assignmentCompatability43.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability44.errors.txt b/tests/baselines/reference/assignmentCompatability44.errors.txt index 030b8c5da1e6d..02dcbf2bdba6d 100644 --- a/tests/baselines/reference/assignmentCompatability44.errors.txt +++ b/tests/baselines/reference/assignmentCompatability44.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/assignmentCompatability44.ts(5,7): error TS2322: Type 'typeof Foo' is not assignable to type 'new () => Foo'. +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'. Target signature provides too few arguments. Expected 1 or more, but got 0. -==== tests/cases/compiler/assignmentCompatability44.ts (1 errors) ==== +==== assignmentCompatability44.ts (1 errors) ==== class Foo { constructor(x: number) {} } diff --git a/tests/baselines/reference/assignmentCompatability44.js b/tests/baselines/reference/assignmentCompatability44.js index ccdbf0827c353..5550c3ca545e4 100644 --- a/tests/baselines/reference/assignmentCompatability44.js +++ b/tests/baselines/reference/assignmentCompatability44.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability44.ts] //// + //// [assignmentCompatability44.ts] class Foo { constructor(x: number) {} diff --git a/tests/baselines/reference/assignmentCompatability44.symbols b/tests/baselines/reference/assignmentCompatability44.symbols index 182bb1b049011..c0defe23425d5 100644 --- a/tests/baselines/reference/assignmentCompatability44.symbols +++ b/tests/baselines/reference/assignmentCompatability44.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability44.ts === +//// [tests/cases/compiler/assignmentCompatability44.ts] //// + +=== assignmentCompatability44.ts === class Foo { >Foo : Symbol(Foo, Decl(assignmentCompatability44.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability44.types b/tests/baselines/reference/assignmentCompatability44.types index a62bf37184b96..5c6d8faea8887 100644 --- a/tests/baselines/reference/assignmentCompatability44.types +++ b/tests/baselines/reference/assignmentCompatability44.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability44.ts === +//// [tests/cases/compiler/assignmentCompatability44.ts] //// + +=== assignmentCompatability44.ts === class Foo { >Foo : Foo diff --git a/tests/baselines/reference/assignmentCompatability45.errors.txt b/tests/baselines/reference/assignmentCompatability45.errors.txt index a21de76d3db13..6cdcfa5f7cb34 100644 --- a/tests/baselines/reference/assignmentCompatability45.errors.txt +++ b/tests/baselines/reference/assignmentCompatability45.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/assignmentCompatability45.ts(7,7): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. +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 'abstract new () => A'. Target signature provides too few arguments. Expected 1 or more, but got 0. -==== tests/cases/compiler/assignmentCompatability45.ts (1 errors) ==== +==== assignmentCompatability45.ts (1 errors) ==== abstract class A {} class B extends A { constructor(x: number) { diff --git a/tests/baselines/reference/assignmentCompatability45.js b/tests/baselines/reference/assignmentCompatability45.js index f5ac5b1f4ce2f..f712233976267 100644 --- a/tests/baselines/reference/assignmentCompatability45.js +++ b/tests/baselines/reference/assignmentCompatability45.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability45.ts] //// + //// [assignmentCompatability45.ts] abstract class A {} class B extends A { diff --git a/tests/baselines/reference/assignmentCompatability45.symbols b/tests/baselines/reference/assignmentCompatability45.symbols index 009e89cd044e2..4d13eb7d7d382 100644 --- a/tests/baselines/reference/assignmentCompatability45.symbols +++ b/tests/baselines/reference/assignmentCompatability45.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability45.ts === +//// [tests/cases/compiler/assignmentCompatability45.ts] //// + +=== assignmentCompatability45.ts === abstract class A {} >A : Symbol(A, Decl(assignmentCompatability45.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability45.types b/tests/baselines/reference/assignmentCompatability45.types index c095da8e8605c..17001027f366d 100644 --- a/tests/baselines/reference/assignmentCompatability45.types +++ b/tests/baselines/reference/assignmentCompatability45.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability45.ts === +//// [tests/cases/compiler/assignmentCompatability45.ts] //// + +=== assignmentCompatability45.ts === abstract class A {} >A : A diff --git a/tests/baselines/reference/assignmentCompatability46.errors.txt b/tests/baselines/reference/assignmentCompatability46.errors.txt index e4e7629c37525..3f20dfc3204ae 100644 --- a/tests/baselines/reference/assignmentCompatability46.errors.txt +++ b/tests/baselines/reference/assignmentCompatability46.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentCompatability46.ts(3,4): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'never'. -tests/cases/compiler/assignmentCompatability46.ts(4,4): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type 'never'. +assignmentCompatability46.ts(3,4): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'never'. +assignmentCompatability46.ts(4,4): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type 'never'. -==== tests/cases/compiler/assignmentCompatability46.ts (2 errors) ==== +==== assignmentCompatability46.ts (2 errors) ==== declare function fn(x: never): void; fn([1, 2, 3]) diff --git a/tests/baselines/reference/assignmentCompatability46.js b/tests/baselines/reference/assignmentCompatability46.js index 6ae198625aff0..fe963750a07e0 100644 --- a/tests/baselines/reference/assignmentCompatability46.js +++ b/tests/baselines/reference/assignmentCompatability46.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability46.ts] //// + //// [assignmentCompatability46.ts] declare function fn(x: never): void; diff --git a/tests/baselines/reference/assignmentCompatability46.symbols b/tests/baselines/reference/assignmentCompatability46.symbols index 0a92711b4e833..24d58fc82fa42 100644 --- a/tests/baselines/reference/assignmentCompatability46.symbols +++ b/tests/baselines/reference/assignmentCompatability46.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability46.ts === +//// [tests/cases/compiler/assignmentCompatability46.ts] //// + +=== assignmentCompatability46.ts === declare function fn(x: never): void; >fn : Symbol(fn, Decl(assignmentCompatability46.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatability46.ts, 0, 20)) diff --git a/tests/baselines/reference/assignmentCompatability46.types b/tests/baselines/reference/assignmentCompatability46.types index 0a43ca90c1d4b..321ad845c06e6 100644 --- a/tests/baselines/reference/assignmentCompatability46.types +++ b/tests/baselines/reference/assignmentCompatability46.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability46.ts === +//// [tests/cases/compiler/assignmentCompatability46.ts] //// + +=== assignmentCompatability46.ts === declare function fn(x: never): void; >fn : (x: never) => void >x : never diff --git a/tests/baselines/reference/assignmentCompatability5.js b/tests/baselines/reference/assignmentCompatability5.js index ef38b738ad304..4794c2dfbcfb7 100644 --- a/tests/baselines/reference/assignmentCompatability5.js +++ b/tests/baselines/reference/assignmentCompatability5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability5.ts] //// + //// [assignmentCompatability5.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability5.symbols b/tests/baselines/reference/assignmentCompatability5.symbols index 9cbfd0dbd8bc5..7bf47721473c6 100644 --- a/tests/baselines/reference/assignmentCompatability5.symbols +++ b/tests/baselines/reference/assignmentCompatability5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability5.ts === +//// [tests/cases/compiler/assignmentCompatability5.ts] //// + +=== assignmentCompatability5.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability5.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability5.types b/tests/baselines/reference/assignmentCompatability5.types index 2273acaabf2fb..cae17330879ab 100644 --- a/tests/baselines/reference/assignmentCompatability5.types +++ b/tests/baselines/reference/assignmentCompatability5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability5.ts === +//// [tests/cases/compiler/assignmentCompatability5.ts] //// + +=== assignmentCompatability5.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability6.js b/tests/baselines/reference/assignmentCompatability6.js index 7b1e2bb65d65f..9689109502b2a 100644 --- a/tests/baselines/reference/assignmentCompatability6.js +++ b/tests/baselines/reference/assignmentCompatability6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability6.ts] //// + //// [assignmentCompatability6.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability6.symbols b/tests/baselines/reference/assignmentCompatability6.symbols index 713ca0926534f..744b547fce15b 100644 --- a/tests/baselines/reference/assignmentCompatability6.symbols +++ b/tests/baselines/reference/assignmentCompatability6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability6.ts === +//// [tests/cases/compiler/assignmentCompatability6.ts] //// + +=== assignmentCompatability6.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability6.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability6.types b/tests/baselines/reference/assignmentCompatability6.types index 334ded9f90ddf..02de561b876a5 100644 --- a/tests/baselines/reference/assignmentCompatability6.types +++ b/tests/baselines/reference/assignmentCompatability6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability6.ts === +//// [tests/cases/compiler/assignmentCompatability6.ts] //// + +=== assignmentCompatability6.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability7.js b/tests/baselines/reference/assignmentCompatability7.js index c6bf8e53bc168..836497d977aa3 100644 --- a/tests/baselines/reference/assignmentCompatability7.js +++ b/tests/baselines/reference/assignmentCompatability7.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability7.ts] //// + //// [assignmentCompatability7.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability7.symbols b/tests/baselines/reference/assignmentCompatability7.symbols index ae66ee045843b..b1b3cd973551f 100644 --- a/tests/baselines/reference/assignmentCompatability7.symbols +++ b/tests/baselines/reference/assignmentCompatability7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability7.ts === +//// [tests/cases/compiler/assignmentCompatability7.ts] //// + +=== assignmentCompatability7.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability7.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability7.types b/tests/baselines/reference/assignmentCompatability7.types index 9f3035a6c0037..baa0898494404 100644 --- a/tests/baselines/reference/assignmentCompatability7.types +++ b/tests/baselines/reference/assignmentCompatability7.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability7.ts === +//// [tests/cases/compiler/assignmentCompatability7.ts] //// + +=== assignmentCompatability7.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability8.js b/tests/baselines/reference/assignmentCompatability8.js index b0aa9b4374f33..235a3f75a92e9 100644 --- a/tests/baselines/reference/assignmentCompatability8.js +++ b/tests/baselines/reference/assignmentCompatability8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability8.ts] //// + //// [assignmentCompatability8.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability8.symbols b/tests/baselines/reference/assignmentCompatability8.symbols index 78b74f4ba62cf..85a4e0824d391 100644 --- a/tests/baselines/reference/assignmentCompatability8.symbols +++ b/tests/baselines/reference/assignmentCompatability8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability8.ts === +//// [tests/cases/compiler/assignmentCompatability8.ts] //// + +=== assignmentCompatability8.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability8.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability8.types b/tests/baselines/reference/assignmentCompatability8.types index 82c78c7a4c1f7..d71102b263a1b 100644 --- a/tests/baselines/reference/assignmentCompatability8.types +++ b/tests/baselines/reference/assignmentCompatability8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability8.ts === +//// [tests/cases/compiler/assignmentCompatability8.ts] //// + +=== assignmentCompatability8.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability9.js b/tests/baselines/reference/assignmentCompatability9.js index 04fcec488b6f6..f2ea8c152e33f 100644 --- a/tests/baselines/reference/assignmentCompatability9.js +++ b/tests/baselines/reference/assignmentCompatability9.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability9.ts] //// + //// [assignmentCompatability9.ts] module __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/tests/baselines/reference/assignmentCompatability9.symbols b/tests/baselines/reference/assignmentCompatability9.symbols index 3799e8beed0f4..3a487aa29ff27 100644 --- a/tests/baselines/reference/assignmentCompatability9.symbols +++ b/tests/baselines/reference/assignmentCompatability9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability9.ts === +//// [tests/cases/compiler/assignmentCompatability9.ts] //// + +=== assignmentCompatability9.ts === module __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability9.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentCompatability9.types b/tests/baselines/reference/assignmentCompatability9.types index c640b9d8cf90c..da5bdf0884721 100644 --- a/tests/baselines/reference/assignmentCompatability9.types +++ b/tests/baselines/reference/assignmentCompatability9.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability9.ts === +//// [tests/cases/compiler/assignmentCompatability9.ts] //// + +=== assignmentCompatability9.ts === module __test1__ { >__test1__ : typeof __test1__ diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index 92ea8a146528d..3816de11cc0cb 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2741: Property 'apply' is missing in type 'string[]' but required in type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2741: Property 'apply' is missing in type '{}' but required in type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(24,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Applicable'. -tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts(25,4): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(11,1): error TS2741: Property 'apply' is missing in type 'string[]' but required in type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(13,1): error TS2741: Property 'apply' is missing in type '{}' but required in type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(24,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Applicable'. +assignmentCompatability_checking-apply-member-off-of-function-interface.ts(25,4): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. Property 'apply' is missing in type '{}' but required in type 'Applicable'. -==== tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts (8 errors) ==== +==== assignmentCompatability_checking-apply-member-off-of-function-interface.ts (8 errors) ==== // 3.8.4 Assignment Compatibility interface Applicable { @@ -25,14 +25,14 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi x = ['']; ~ !!! error TS2741: Property 'apply' is missing in type 'string[]' but required in type 'Applicable'. -!!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. +!!! related TS2728 assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. x = 4; ~ !!! error TS2322: Type 'number' is not assignable to type 'Applicable'. x = {}; ~ !!! error TS2741: Property 'apply' is missing in type '{}' but required in type 'Applicable'. -!!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. +!!! related TS2728 assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. // Should work function f() { }; @@ -54,7 +54,7 @@ tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-functi ~~ !!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. !!! error TS2345: Property 'apply' is missing in type '{}' but required in type 'Applicable'. -!!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. +!!! related TS2728 assignmentCompatability_checking-apply-member-off-of-function-interface.ts:4:5: 'apply' is declared here. // Should work diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js index 760631ffbb5f5..c233e66b00e3c 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts] //// + //// [assignmentCompatability_checking-apply-member-off-of-function-interface.ts] // 3.8.4 Assignment Compatibility diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.symbols b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.symbols index b28f7cd682e37..5ce0cb886e574 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.symbols +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts === +//// [tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts] //// + +=== assignmentCompatability_checking-apply-member-off-of-function-interface.ts === // 3.8.4 Assignment Compatibility interface Applicable { diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.types b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.types index bf093a4b752e3..91fc6fb032c82 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.types +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts === +//// [tests/cases/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.ts] //// + +=== assignmentCompatability_checking-apply-member-off-of-function-interface.ts === // 3.8.4 Assignment Compatibility interface Applicable { diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index b7a51bce4a0d1..5937ea7e1b3f5 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2741: Property 'call' is missing in type 'string[]' but required in type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2741: Property 'call' is missing in type '{}' but required in type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(24,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Callable'. -tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts(25,4): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(10,1): error TS2322: Type 'string' is not assignable to type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(11,1): error TS2741: Property 'call' is missing in type 'string[]' but required in type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(12,1): error TS2322: Type 'number' is not assignable to type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(13,1): error TS2741: Property 'call' is missing in type '{}' but required in type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(22,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(23,4): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(24,4): error TS2345: Argument of type 'number' is not assignable to parameter of type 'Callable'. +assignmentCompatability_checking-call-member-off-of-function-interface.ts(25,4): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. Property 'call' is missing in type '{}' but required in type 'Callable'. -==== tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts (8 errors) ==== +==== assignmentCompatability_checking-call-member-off-of-function-interface.ts (8 errors) ==== // 3.8.4 Assignment Compatibility interface Callable { @@ -25,14 +25,14 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio x = ['']; ~ !!! error TS2741: Property 'call' is missing in type 'string[]' but required in type 'Callable'. -!!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. +!!! related TS2728 assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. x = 4; ~ !!! error TS2322: Type 'number' is not assignable to type 'Callable'. x = {}; ~ !!! error TS2741: Property 'call' is missing in type '{}' but required in type 'Callable'. -!!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. +!!! related TS2728 assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. // Should work function f() { }; @@ -54,7 +54,7 @@ tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-functio ~~ !!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. !!! error TS2345: Property 'call' is missing in type '{}' but required in type 'Callable'. -!!! related TS2728 tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. +!!! related TS2728 assignmentCompatability_checking-call-member-off-of-function-interface.ts:4:5: 'call' is declared here. // Should work diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js index 2e61521eefb84..2b61c2d1984c9 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts] //// + //// [assignmentCompatability_checking-call-member-off-of-function-interface.ts] // 3.8.4 Assignment Compatibility diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.symbols b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.symbols index 7fe01e7bb7640..5d9074797db8f 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.symbols +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts === +//// [tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts] //// + +=== assignmentCompatability_checking-call-member-off-of-function-interface.ts === // 3.8.4 Assignment Compatibility interface Callable { diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.types b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.types index 20420a7ce39b1..fdff277b2efb1 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.types +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts === +//// [tests/cases/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.ts] //// + +=== assignmentCompatability_checking-call-member-off-of-function-interface.ts === // 3.8.4 Assignment Compatibility interface Callable { diff --git a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.js b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.js index 69d2b9c16eef7..f8b059e02d55a 100644 --- a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.js +++ b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts] //// + //// [assignmentCompatibilityForConstrainedTypeParameters.ts] function foo() { function bar() { diff --git a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.symbols b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.symbols index 7ca09f2c77d37..e4eeeda2ba3ec 100644 --- a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.symbols +++ b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts === +//// [tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts] //// + +=== assignmentCompatibilityForConstrainedTypeParameters.ts === function foo() { >foo : Symbol(foo, Decl(assignmentCompatibilityForConstrainedTypeParameters.ts, 0, 0)) >T : Symbol(T, Decl(assignmentCompatibilityForConstrainedTypeParameters.ts, 0, 13)) diff --git a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types index bb224950e8f5b..13d69493244e5 100644 --- a/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types +++ b/tests/baselines/reference/assignmentCompatibilityForConstrainedTypeParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts === +//// [tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts] //// + +=== assignmentCompatibilityForConstrainedTypeParameters.ts === function foo() { >foo : () => void >bar : string diff --git a/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.js b/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.js index 7f757ef24c3c7..52f6be2d86a20 100644 --- a/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.js +++ b/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts] //// + //// [assignmentGenericLookupTypeNarrowing.ts] // Repro from #26130 diff --git a/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.symbols b/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.symbols index f256ef8c1b68f..605aff68ace04 100644 --- a/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.symbols +++ b/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts] //// + +=== assignmentGenericLookupTypeNarrowing.ts === // Repro from #26130 let mappedObject: {[K in "foo"]: null | {x: string}} = {foo: {x: "hello"}}; diff --git a/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.types b/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.types index 414d88afdec17..dfbafa19a233a 100644 --- a/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.types +++ b/tests/baselines/reference/assignmentGenericLookupTypeNarrowing.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts] //// + +=== assignmentGenericLookupTypeNarrowing.ts === // Repro from #26130 let mappedObject: {[K in "foo"]: null | {x: string}} = {foo: {x: "hello"}}; diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt b/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt index 88c822f6dcb60..b1f00aca1dd36 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/assignmentIndexedToPrimitives.ts(1,7): error TS2322: Type 'number[]' is not assignable to type 'number'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(2,7): error TS2322: Type 'string[]' is not assignable to type 'number'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(3,7): error TS2322: Type '(string | number)[]' is not assignable to type 'number'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(4,7): error TS2322: Type 'number[]' is not assignable to type '0'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(6,7): error TS2322: Type 'number[]' is not assignable to type 'string'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(7,7): error TS2322: Type 'string[]' is not assignable to type 'string'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(8,7): error TS2322: Type '(string | number)[]' is not assignable to type 'string'. -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(15,7): error TS2322: Type '{ 0: string; }' is not assignable to type 'string'. +assignmentIndexedToPrimitives.ts(1,7): error TS2322: Type 'number[]' is not assignable to type 'number'. +assignmentIndexedToPrimitives.ts(2,7): error TS2322: Type 'string[]' is not assignable to type 'number'. +assignmentIndexedToPrimitives.ts(3,7): error TS2322: Type '(string | number)[]' is not assignable to type 'number'. +assignmentIndexedToPrimitives.ts(4,7): error TS2322: Type 'number[]' is not assignable to type '0'. +assignmentIndexedToPrimitives.ts(6,7): error TS2322: Type 'number[]' is not assignable to type 'string'. +assignmentIndexedToPrimitives.ts(7,7): error TS2322: Type 'string[]' is not assignable to type 'string'. +assignmentIndexedToPrimitives.ts(8,7): error TS2322: Type '(string | number)[]' is not assignable to type 'string'. +assignmentIndexedToPrimitives.ts(9,7): error TS2322: Type 'string[]' is not assignable to type '"01"'. +assignmentIndexedToPrimitives.ts(11,7): error TS2322: Type '{ 0: number; }' is not assignable to type 'number'. +assignmentIndexedToPrimitives.ts(13,7): error TS2322: Type '{ 0: number; }' is not assignable to type 'string'. +assignmentIndexedToPrimitives.ts(14,7): error TS2322: Type '{ "0": number; }' is not assignable to type 'string'. +assignmentIndexedToPrimitives.ts(15,7): error TS2322: Type '{ 0: string; }' is not assignable to type 'string'. -==== tests/cases/compiler/assignmentIndexedToPrimitives.ts (12 errors) ==== +==== assignmentIndexedToPrimitives.ts (12 errors) ==== const n1: number = [0]; ~~ !!! error TS2322: Type 'number[]' is not assignable to type 'number'. diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.js b/tests/baselines/reference/assignmentIndexedToPrimitives.js index 363d41fc14de9..8fd43de37243c 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.js +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentIndexedToPrimitives.ts] //// + //// [assignmentIndexedToPrimitives.ts] const n1: number = [0]; const n2: number = ["0"]; diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.symbols b/tests/baselines/reference/assignmentIndexedToPrimitives.symbols index 37b41d2f9c9a3..3077fe72c291f 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.symbols +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentIndexedToPrimitives.ts === +//// [tests/cases/compiler/assignmentIndexedToPrimitives.ts] //// + +=== assignmentIndexedToPrimitives.ts === const n1: number = [0]; >n1 : Symbol(n1, Decl(assignmentIndexedToPrimitives.ts, 0, 5)) diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.types b/tests/baselines/reference/assignmentIndexedToPrimitives.types index 7c36c89b1e9fa..e3e4d9babb9af 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.types +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentIndexedToPrimitives.ts === +//// [tests/cases/compiler/assignmentIndexedToPrimitives.ts] //// + +=== assignmentIndexedToPrimitives.ts === const n1: number = [0]; >n1 : number >[0] : number[] diff --git a/tests/baselines/reference/assignmentLHSIsReference.js b/tests/baselines/reference/assignmentLHSIsReference.js index 85d2aab2c46d3..347d4f1c30968 100644 --- a/tests/baselines/reference/assignmentLHSIsReference.js +++ b/tests/baselines/reference/assignmentLHSIsReference.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts] //// + //// [assignmentLHSIsReference.ts] var value: any; diff --git a/tests/baselines/reference/assignmentLHSIsReference.symbols b/tests/baselines/reference/assignmentLHSIsReference.symbols index 417ba3c07ea27..1291f51c4018f 100644 --- a/tests/baselines/reference/assignmentLHSIsReference.symbols +++ b/tests/baselines/reference/assignmentLHSIsReference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts] //// + +=== assignmentLHSIsReference.ts === var value: any; >value : Symbol(value, Decl(assignmentLHSIsReference.ts, 0, 3)) diff --git a/tests/baselines/reference/assignmentLHSIsReference.types b/tests/baselines/reference/assignmentLHSIsReference.types index 2a7fa2982aa87..96a33797f85ee 100644 --- a/tests/baselines/reference/assignmentLHSIsReference.types +++ b/tests/baselines/reference/assignmentLHSIsReference.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsReference.ts] //// + +=== assignmentLHSIsReference.ts === var value: any; >value : any diff --git a/tests/baselines/reference/assignmentLHSIsValue.errors.txt b/tests/baselines/reference/assignmentLHSIsValue.errors.txt index 241cf54a0f6f9..cd5a9761cef79 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/assignmentLHSIsValue.errors.txt @@ -1,45 +1,45 @@ -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7,13): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(8,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(11,18): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(13,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(19,1): error TS2629: Cannot assign to 'C' because it is a class. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(22,1): error TS2628: Cannot assign to 'E' because it is an enum. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(24,1): error TS2630: Cannot assign to 'foo' because it is a function. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(27,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(28,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(29,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(30,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(31,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(32,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,9): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,2): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,6): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,36): error TS1034: 'super' must be followed by an argument list or member access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,19): error TS1034: 'super' must be followed by an argument list or member access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,27): error TS1034: 'super' must be followed by an argument list or member access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(50,20): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,11): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,13): error TS1005: ';' expected. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(54,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(57,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,2): error TS2631: Cannot assign to 'M' because it is a namespace. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(59,2): error TS2629: Cannot assign to 'C' because it is a class. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(60,2): error TS2628: Cannot assign to 'E' because it is an enum. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(61,2): error TS2630: Cannot assign to 'foo' because it is a function. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(62,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(63,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(64,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(65,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(66,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(67,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(68,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(69,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(70,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(6,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(7,13): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(8,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(11,18): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(13,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace. +assignmentLHSIsValue.ts(19,1): error TS2629: Cannot assign to 'C' because it is a class. +assignmentLHSIsValue.ts(22,1): error TS2628: Cannot assign to 'E' because it is an enum. +assignmentLHSIsValue.ts(24,1): error TS2630: Cannot assign to 'foo' because it is a function. +assignmentLHSIsValue.ts(27,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(28,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(29,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(30,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(31,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(32,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(35,9): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. +assignmentLHSIsValue.ts(38,2): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(38,6): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(42,36): error TS1034: 'super' must be followed by an argument list or member access. +assignmentLHSIsValue.ts(44,19): error TS1034: 'super' must be followed by an argument list or member access. +assignmentLHSIsValue.ts(46,27): error TS1034: 'super' must be followed by an argument list or member access. +assignmentLHSIsValue.ts(50,20): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. +assignmentLHSIsValue.ts(51,11): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. +assignmentLHSIsValue.ts(51,13): error TS1005: ';' expected. +assignmentLHSIsValue.ts(54,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(57,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(58,2): error TS2631: Cannot assign to 'M' because it is a namespace. +assignmentLHSIsValue.ts(59,2): error TS2629: Cannot assign to 'C' because it is a class. +assignmentLHSIsValue.ts(60,2): error TS2628: Cannot assign to 'E' because it is an enum. +assignmentLHSIsValue.ts(61,2): error TS2630: Cannot assign to 'foo' because it is a function. +assignmentLHSIsValue.ts(62,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(63,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(64,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(65,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(66,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(67,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(68,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(69,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentLHSIsValue.ts(70,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (39 errors) ==== +==== assignmentLHSIsValue.ts (39 errors) ==== // expected error for all the LHS of assignments var value: any; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index bd6a4277393c4..81506efa54a4f 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts] //// + //// [assignmentLHSIsValue.ts] // expected error for all the LHS of assignments var value: any; diff --git a/tests/baselines/reference/assignmentLHSIsValue.symbols b/tests/baselines/reference/assignmentLHSIsValue.symbols index aad2ec2ed95ef..bb0d57e5dddd0 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.symbols +++ b/tests/baselines/reference/assignmentLHSIsValue.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts] //// + +=== assignmentLHSIsValue.ts === // expected error for all the LHS of assignments var value: any; >value : Symbol(value, Decl(assignmentLHSIsValue.ts, 1, 3)) diff --git a/tests/baselines/reference/assignmentLHSIsValue.types b/tests/baselines/reference/assignmentLHSIsValue.types index 06a8242c7e911..64c0ac4cebe92 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.types +++ b/tests/baselines/reference/assignmentLHSIsValue.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts] //// + +=== assignmentLHSIsValue.ts === // expected error for all the LHS of assignments var value: any; >value : any diff --git a/tests/baselines/reference/assignmentNestedInLiterals.js b/tests/baselines/reference/assignmentNestedInLiterals.js index 8a048082565d4..a2d6e9547f167 100644 --- a/tests/baselines/reference/assignmentNestedInLiterals.js +++ b/tests/baselines/reference/assignmentNestedInLiterals.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentNestedInLiterals.ts] //// + //// [assignmentNestedInLiterals.ts] var target, x, y; target = [x = 1, y = x]; diff --git a/tests/baselines/reference/assignmentNestedInLiterals.symbols b/tests/baselines/reference/assignmentNestedInLiterals.symbols index 761930ab9ce8d..30d6da770eff7 100644 --- a/tests/baselines/reference/assignmentNestedInLiterals.symbols +++ b/tests/baselines/reference/assignmentNestedInLiterals.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentNestedInLiterals.ts === +//// [tests/cases/compiler/assignmentNestedInLiterals.ts] //// + +=== assignmentNestedInLiterals.ts === var target, x, y; >target : Symbol(target, Decl(assignmentNestedInLiterals.ts, 0, 3)) >x : Symbol(x, Decl(assignmentNestedInLiterals.ts, 0, 11)) diff --git a/tests/baselines/reference/assignmentNestedInLiterals.types b/tests/baselines/reference/assignmentNestedInLiterals.types index 8ab73f80691f4..773a5fe1e39ef 100644 --- a/tests/baselines/reference/assignmentNestedInLiterals.types +++ b/tests/baselines/reference/assignmentNestedInLiterals.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentNestedInLiterals.ts === +//// [tests/cases/compiler/assignmentNestedInLiterals.ts] //// + +=== assignmentNestedInLiterals.ts === var target, x, y; >target : any >x : any diff --git a/tests/baselines/reference/assignmentNonObjectTypeConstraints.js b/tests/baselines/reference/assignmentNonObjectTypeConstraints.js index d26ac7802e7c5..2ad82c991588d 100644 --- a/tests/baselines/reference/assignmentNonObjectTypeConstraints.js +++ b/tests/baselines/reference/assignmentNonObjectTypeConstraints.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentNonObjectTypeConstraints.ts] //// + //// [assignmentNonObjectTypeConstraints.ts] const enum E { A, B, C } diff --git a/tests/baselines/reference/assignmentNonObjectTypeConstraints.symbols b/tests/baselines/reference/assignmentNonObjectTypeConstraints.symbols index 52596124e4220..b6c0b79b0bd1c 100644 --- a/tests/baselines/reference/assignmentNonObjectTypeConstraints.symbols +++ b/tests/baselines/reference/assignmentNonObjectTypeConstraints.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentNonObjectTypeConstraints.ts === +//// [tests/cases/compiler/assignmentNonObjectTypeConstraints.ts] //// + +=== assignmentNonObjectTypeConstraints.ts === const enum E { A, B, C } >E : Symbol(E, Decl(assignmentNonObjectTypeConstraints.ts, 0, 0)) >A : Symbol(E.A, Decl(assignmentNonObjectTypeConstraints.ts, 0, 14)) diff --git a/tests/baselines/reference/assignmentNonObjectTypeConstraints.types b/tests/baselines/reference/assignmentNonObjectTypeConstraints.types index fde1913876fb2..7ec6570afc760 100644 --- a/tests/baselines/reference/assignmentNonObjectTypeConstraints.types +++ b/tests/baselines/reference/assignmentNonObjectTypeConstraints.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentNonObjectTypeConstraints.ts === +//// [tests/cases/compiler/assignmentNonObjectTypeConstraints.ts] //// + +=== assignmentNonObjectTypeConstraints.ts === const enum E { A, B, C } >E : E >A : E.A diff --git a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt index 1c100d66d9a68..8ff32235ff726 100644 --- a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt +++ b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts(2,5): error TS2304: Cannot find name 'c'. -tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts(2,10): error TS2552: Cannot find name 'tupel'. Did you mean 'tuple'? +assignmentRestElementWithErrorSourceType.ts(2,5): error TS2304: Cannot find name 'c'. +assignmentRestElementWithErrorSourceType.ts(2,10): error TS2552: Cannot find name 'tupel'. Did you mean 'tuple'? -==== tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts (2 errors) ==== +==== assignmentRestElementWithErrorSourceType.ts (2 errors) ==== var tuple: [string, number]; [...c] = tupel; // intentionally misspelled ~ !!! error TS2304: Cannot find name 'c'. ~~~~~ !!! error TS2552: Cannot find name 'tupel'. Did you mean 'tuple'? -!!! related TS2728 tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts:1:5: 'tuple' is declared here. \ No newline at end of file +!!! related TS2728 assignmentRestElementWithErrorSourceType.ts:1:5: 'tuple' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.js b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.js index 0a1109a14f762..748b2b387aa61 100644 --- a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.js +++ b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts] //// + //// [assignmentRestElementWithErrorSourceType.ts] var tuple: [string, number]; [...c] = tupel; // intentionally misspelled diff --git a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.symbols b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.symbols index 3b88728b282e8..ca8cca9f60619 100644 --- a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.symbols +++ b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts === +//// [tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts] //// + +=== assignmentRestElementWithErrorSourceType.ts === var tuple: [string, number]; >tuple : Symbol(tuple, Decl(assignmentRestElementWithErrorSourceType.ts, 0, 3)) diff --git a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.types b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.types index 7ef47f6762f55..ebdb9ad6901d3 100644 --- a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.types +++ b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts === +//// [tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts] //// + +=== assignmentRestElementWithErrorSourceType.ts === var tuple: [string, number]; >tuple : [string, number] diff --git a/tests/baselines/reference/assignmentStricterConstraints.errors.txt b/tests/baselines/reference/assignmentStricterConstraints.errors.txt index 012c05e281a15..d72edc4cbaa14 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.errors.txt +++ b/tests/baselines/reference/assignmentStricterConstraints.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/assignmentStricterConstraints.ts(7,1): error TS2322: Type '(x: T, y: S) => void' is not assignable to type '(x: T, y: S) => void'. +assignmentStricterConstraints.ts(7,1): error TS2322: Type '(x: T, y: S) => void' is not assignable to type '(x: T, y: S) => void'. Types of parameters 'y' and 'y' are incompatible. Type 'S' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'S'. -==== tests/cases/compiler/assignmentStricterConstraints.ts (1 errors) ==== +==== assignmentStricterConstraints.ts (1 errors) ==== var f = function (x: T, y: S): void { x = y } @@ -17,6 +17,6 @@ tests/cases/compiler/assignmentStricterConstraints.ts(7,1): error TS2322: Type ' !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'S' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'S'. -!!! related TS2208 tests/cases/compiler/assignmentStricterConstraints.ts:5:22: This type parameter might need an `extends T` constraint. +!!! related TS2208 assignmentStricterConstraints.ts:5:22: This type parameter might need an `extends T` constraint. g(1, "") \ No newline at end of file diff --git a/tests/baselines/reference/assignmentStricterConstraints.js b/tests/baselines/reference/assignmentStricterConstraints.js index a7f554ade7d45..110f2157e0412 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.js +++ b/tests/baselines/reference/assignmentStricterConstraints.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentStricterConstraints.ts] //// + //// [assignmentStricterConstraints.ts] var f = function (x: T, y: S): void { x = y diff --git a/tests/baselines/reference/assignmentStricterConstraints.symbols b/tests/baselines/reference/assignmentStricterConstraints.symbols index aba29bf3e5b26..ccb882114fdd4 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.symbols +++ b/tests/baselines/reference/assignmentStricterConstraints.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentStricterConstraints.ts === +//// [tests/cases/compiler/assignmentStricterConstraints.ts] //// + +=== assignmentStricterConstraints.ts === var f = function (x: T, y: S): void { >f : Symbol(f, Decl(assignmentStricterConstraints.ts, 0, 3)) >T : Symbol(T, Decl(assignmentStricterConstraints.ts, 0, 18)) diff --git a/tests/baselines/reference/assignmentStricterConstraints.types b/tests/baselines/reference/assignmentStricterConstraints.types index dfbc3f66352df..119e54bab42e1 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.types +++ b/tests/baselines/reference/assignmentStricterConstraints.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentStricterConstraints.ts === +//// [tests/cases/compiler/assignmentStricterConstraints.ts] //// + +=== assignmentStricterConstraints.ts === var f = function (x: T, y: S): void { >f : (x: T, y: S) => void >function (x: T, y: S): void { x = y} : (x: T, y: S) => void diff --git a/tests/baselines/reference/assignmentToExpandingArrayType.js b/tests/baselines/reference/assignmentToExpandingArrayType.js index 5b885b6913f64..7e94d82cb69c7 100644 --- a/tests/baselines/reference/assignmentToExpandingArrayType.js +++ b/tests/baselines/reference/assignmentToExpandingArrayType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentToExpandingArrayType.ts] //// + //// [assignmentToExpandingArrayType.ts] // Fixes exponential time/space in #14628 let x = [] diff --git a/tests/baselines/reference/assignmentToExpandingArrayType.symbols b/tests/baselines/reference/assignmentToExpandingArrayType.symbols index c8285706f6e88..ababdebac9977 100644 --- a/tests/baselines/reference/assignmentToExpandingArrayType.symbols +++ b/tests/baselines/reference/assignmentToExpandingArrayType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToExpandingArrayType.ts === +//// [tests/cases/compiler/assignmentToExpandingArrayType.ts] //// + +=== assignmentToExpandingArrayType.ts === // Fixes exponential time/space in #14628 let x = [] >x : Symbol(x, Decl(assignmentToExpandingArrayType.ts, 1, 3)) diff --git a/tests/baselines/reference/assignmentToExpandingArrayType.types b/tests/baselines/reference/assignmentToExpandingArrayType.types index da923b23646e5..2a363a2262a5a 100644 --- a/tests/baselines/reference/assignmentToExpandingArrayType.types +++ b/tests/baselines/reference/assignmentToExpandingArrayType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToExpandingArrayType.ts === +//// [tests/cases/compiler/assignmentToExpandingArrayType.ts] //// + +=== assignmentToExpandingArrayType.ts === // Fixes exponential time/space in #14628 let x = [] >x : any[] diff --git a/tests/baselines/reference/assignmentToFunction.errors.txt b/tests/baselines/reference/assignmentToFunction.errors.txt index f415d9c79c9c8..fe15bb4dcd190 100644 --- a/tests/baselines/reference/assignmentToFunction.errors.txt +++ b/tests/baselines/reference/assignmentToFunction.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentToFunction.ts(2,1): error TS2630: Cannot assign to 'fn' because it is a function. -tests/cases/compiler/assignmentToFunction.ts(8,9): error TS2630: Cannot assign to 'bar' because it is a function. +assignmentToFunction.ts(2,1): error TS2630: Cannot assign to 'fn' because it is a function. +assignmentToFunction.ts(8,9): error TS2630: Cannot assign to 'bar' because it is a function. -==== tests/cases/compiler/assignmentToFunction.ts (2 errors) ==== +==== assignmentToFunction.ts (2 errors) ==== function fn() { } fn = () => 3; ~~ diff --git a/tests/baselines/reference/assignmentToFunction.js b/tests/baselines/reference/assignmentToFunction.js index 7462fdfcf3f84..ea3af0be6b9c6 100644 --- a/tests/baselines/reference/assignmentToFunction.js +++ b/tests/baselines/reference/assignmentToFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentToFunction.ts] //// + //// [assignmentToFunction.ts] function fn() { } fn = () => 3; diff --git a/tests/baselines/reference/assignmentToFunction.symbols b/tests/baselines/reference/assignmentToFunction.symbols index 5dc3b673489db..7b73b6ba2ccf1 100644 --- a/tests/baselines/reference/assignmentToFunction.symbols +++ b/tests/baselines/reference/assignmentToFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToFunction.ts === +//// [tests/cases/compiler/assignmentToFunction.ts] //// + +=== assignmentToFunction.ts === function fn() { } >fn : Symbol(fn, Decl(assignmentToFunction.ts, 0, 0)) diff --git a/tests/baselines/reference/assignmentToFunction.types b/tests/baselines/reference/assignmentToFunction.types index 68c659200f570..663631170895d 100644 --- a/tests/baselines/reference/assignmentToFunction.types +++ b/tests/baselines/reference/assignmentToFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToFunction.ts === +//// [tests/cases/compiler/assignmentToFunction.ts] //// + +=== assignmentToFunction.ts === function fn() { } >fn : () => void diff --git a/tests/baselines/reference/assignmentToObject.errors.txt b/tests/baselines/reference/assignmentToObject.errors.txt index aa1222bd79991..1ff6ae3b98dad 100644 --- a/tests/baselines/reference/assignmentToObject.errors.txt +++ b/tests/baselines/reference/assignmentToObject.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'. +assignmentToObject.ts(3,5): error TS2322: Type '{ toString: number; }' is not assignable to type 'Object'. Types of property 'toString' are incompatible. Type 'number' is not assignable to type '() => string'. -==== tests/cases/compiler/assignmentToObject.ts (1 errors) ==== +==== assignmentToObject.ts (1 errors) ==== var a = { toString: 5 }; var b: {} = a; // ok var c: Object = a; // should be error diff --git a/tests/baselines/reference/assignmentToObject.js b/tests/baselines/reference/assignmentToObject.js index d8134080c6a1a..aaa8c079afed5 100644 --- a/tests/baselines/reference/assignmentToObject.js +++ b/tests/baselines/reference/assignmentToObject.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentToObject.ts] //// + //// [assignmentToObject.ts] var a = { toString: 5 }; var b: {} = a; // ok diff --git a/tests/baselines/reference/assignmentToObject.symbols b/tests/baselines/reference/assignmentToObject.symbols index 498229ab10ff3..9a0baea6b8c4e 100644 --- a/tests/baselines/reference/assignmentToObject.symbols +++ b/tests/baselines/reference/assignmentToObject.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToObject.ts === +//// [tests/cases/compiler/assignmentToObject.ts] //// + +=== assignmentToObject.ts === var a = { toString: 5 }; >a : Symbol(a, Decl(assignmentToObject.ts, 0, 3)) >toString : Symbol(toString, Decl(assignmentToObject.ts, 0, 9)) diff --git a/tests/baselines/reference/assignmentToObject.types b/tests/baselines/reference/assignmentToObject.types index 56b396d9e4282..b9c6f55f6f8c5 100644 --- a/tests/baselines/reference/assignmentToObject.types +++ b/tests/baselines/reference/assignmentToObject.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToObject.ts === +//// [tests/cases/compiler/assignmentToObject.ts] //// + +=== assignmentToObject.ts === var a = { toString: 5 }; >a : { toString: number; } >{ toString: 5 } : { toString: number; } diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt index 897c96a1c8f7d..733139013e432 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt +++ b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/assignmentToObjectAndFunction.ts(1,24): error TS2322: Type 'number' is not assignable to type '() => string'. -tests/cases/compiler/assignmentToObjectAndFunction.ts(8,5): error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 3 more. -tests/cases/compiler/assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function'. +assignmentToObjectAndFunction.ts(1,24): error TS2322: Type 'number' is not assignable to type '() => string'. +assignmentToObjectAndFunction.ts(8,5): error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 3 more. +assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function'. Types of property 'apply' are incompatible. Type 'number' is not assignable to type '(this: Function, thisArg: any, argArray?: any) => any'. -==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ==== +==== assignmentToObjectAndFunction.ts (3 errors) ==== var errObj: Object = { toString: 0 }; // Error, incompatible toString ~~~~~~~~ !!! error TS2322: Type 'number' is not assignable to type '() => string'. diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.js b/tests/baselines/reference/assignmentToObjectAndFunction.js index d60e2de4a5a78..369fb082f381b 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.js +++ b/tests/baselines/reference/assignmentToObjectAndFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentToObjectAndFunction.ts] //// + //// [assignmentToObjectAndFunction.ts] var errObj: Object = { toString: 0 }; // Error, incompatible toString var goodObj: Object = { diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.symbols b/tests/baselines/reference/assignmentToObjectAndFunction.symbols index dd2f7afbf3d92..cd5cbab6dccf9 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.symbols +++ b/tests/baselines/reference/assignmentToObjectAndFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToObjectAndFunction.ts === +//// [tests/cases/compiler/assignmentToObjectAndFunction.ts] //// + +=== assignmentToObjectAndFunction.ts === var errObj: Object = { toString: 0 }; // Error, incompatible toString >errObj : Symbol(errObj, Decl(assignmentToObjectAndFunction.ts, 0, 3)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.types b/tests/baselines/reference/assignmentToObjectAndFunction.types index 882eb29ecd1b7..8835e94ec645d 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.types +++ b/tests/baselines/reference/assignmentToObjectAndFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToObjectAndFunction.ts === +//// [tests/cases/compiler/assignmentToObjectAndFunction.ts] //// + +=== assignmentToObjectAndFunction.ts === var errObj: Object = { toString: 0 }; // Error, incompatible toString >errObj : Object >{ toString: 0 } : { toString: number; } diff --git a/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt b/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt index ff8fa5d22b2ea..b553d060000d8 100644 --- a/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/assignmentToParenthesizedExpression1.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -tests/cases/compiler/assignmentToParenthesizedExpression1.ts(2,2): error TS2695: Left side of comma operator is unused and has no side effects. +assignmentToParenthesizedExpression1.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentToParenthesizedExpression1.ts(2,2): error TS2695: Left side of comma operator is unused and has no side effects. -==== tests/cases/compiler/assignmentToParenthesizedExpression1.ts (2 errors) ==== +==== assignmentToParenthesizedExpression1.ts (2 errors) ==== var x; (1, x)=0; ~~~~~~ diff --git a/tests/baselines/reference/assignmentToParenthesizedExpression1.js b/tests/baselines/reference/assignmentToParenthesizedExpression1.js index 8d8589b5f50aa..9164baa42a0e5 100644 --- a/tests/baselines/reference/assignmentToParenthesizedExpression1.js +++ b/tests/baselines/reference/assignmentToParenthesizedExpression1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentToParenthesizedExpression1.ts] //// + //// [assignmentToParenthesizedExpression1.ts] var x; (1, x)=0; diff --git a/tests/baselines/reference/assignmentToParenthesizedExpression1.symbols b/tests/baselines/reference/assignmentToParenthesizedExpression1.symbols index 63de71a6408a6..eac2d37288710 100644 --- a/tests/baselines/reference/assignmentToParenthesizedExpression1.symbols +++ b/tests/baselines/reference/assignmentToParenthesizedExpression1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToParenthesizedExpression1.ts === +//// [tests/cases/compiler/assignmentToParenthesizedExpression1.ts] //// + +=== assignmentToParenthesizedExpression1.ts === var x; >x : Symbol(x, Decl(assignmentToParenthesizedExpression1.ts, 0, 3)) diff --git a/tests/baselines/reference/assignmentToParenthesizedExpression1.types b/tests/baselines/reference/assignmentToParenthesizedExpression1.types index a1273376b75cd..b5910f656b23a 100644 --- a/tests/baselines/reference/assignmentToParenthesizedExpression1.types +++ b/tests/baselines/reference/assignmentToParenthesizedExpression1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToParenthesizedExpression1.ts === +//// [tests/cases/compiler/assignmentToParenthesizedExpression1.ts] //// + +=== assignmentToParenthesizedExpression1.ts === var x; >x : any diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index 51b15bee2aa10..168cb6b653be7 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -1,30 +1,30 @@ -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(4,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(5,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(13,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(14,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(15,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(18,2): error TS2631: Cannot assign to 'M' because it is a namespace. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(25,5): error TS2631: Cannot assign to 'M3' because it is a namespace. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(31,11): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(32,13): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(33,13): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(37,1): error TS2630: Cannot assign to 'fn' because it is a function. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(38,2): error TS2630: Cannot assign to 'fn' because it is a function. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(44,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(48,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(49,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(54,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(55,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(56,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(62,1): error TS2628: Cannot assign to 'E' because it is an enum. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(63,2): error TS2628: Cannot assign to 'E' because it is an enum. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(69,1): error TS2629: Cannot assign to 'C' because it is a class. -tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts(70,2): error TS2629: Cannot assign to 'C' because it is a class. +assignmentToParenthesizedIdentifiers.ts(4,1): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(5,1): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(13,1): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(14,1): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(15,1): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace. +assignmentToParenthesizedIdentifiers.ts(18,2): error TS2631: Cannot assign to 'M' because it is a namespace. +assignmentToParenthesizedIdentifiers.ts(25,5): error TS2631: Cannot assign to 'M3' because it is a namespace. +assignmentToParenthesizedIdentifiers.ts(31,11): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(32,13): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(33,13): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(37,1): error TS2630: Cannot assign to 'fn' because it is a function. +assignmentToParenthesizedIdentifiers.ts(38,2): error TS2630: Cannot assign to 'fn' because it is a function. +assignmentToParenthesizedIdentifiers.ts(43,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(44,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(48,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(49,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(54,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(55,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(56,5): error TS2322: Type 'string' is not assignable to type 'number'. +assignmentToParenthesizedIdentifiers.ts(62,1): error TS2628: Cannot assign to 'E' because it is an enum. +assignmentToParenthesizedIdentifiers.ts(63,2): error TS2628: Cannot assign to 'E' because it is an enum. +assignmentToParenthesizedIdentifiers.ts(69,1): error TS2629: Cannot assign to 'C' because it is a class. +assignmentToParenthesizedIdentifiers.ts(70,2): error TS2629: Cannot assign to 'C' because it is a class. -==== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts (24 errors) ==== +==== assignmentToParenthesizedIdentifiers.ts (24 errors) ==== var x: number; x = 3; // OK (x) = 3; // OK @@ -74,15 +74,15 @@ tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesize M2.M3 = { x: '' }; // Error ~ !!! error TS2322: Type 'string' is not assignable to type 'number'. -!!! related TS6500 tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts:22:20: The expected type comes from property 'x' which is declared here on type 'typeof M3' +!!! related TS6500 assignmentToParenthesizedIdentifiers.ts:22:20: The expected type comes from property 'x' which is declared here on type 'typeof M3' (M2).M3 = { x: '' }; // Error ~ !!! error TS2322: Type 'string' is not assignable to type 'number'. -!!! related TS6500 tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts:22:20: The expected type comes from property 'x' which is declared here on type 'typeof M3' +!!! related TS6500 assignmentToParenthesizedIdentifiers.ts:22:20: The expected type comes from property 'x' which is declared here on type 'typeof M3' (M2.M3) = { x: '' }; // Error ~ !!! error TS2322: Type 'string' is not assignable to type 'number'. -!!! related TS6500 tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts:22:20: The expected type comes from property 'x' which is declared here on type 'typeof M3' +!!! related TS6500 assignmentToParenthesizedIdentifiers.ts:22:20: The expected type comes from property 'x' which is declared here on type 'typeof M3' function fn() { } diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js index 543a54ca10e94..23f7e7ccf2d6c 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts] //// + //// [assignmentToParenthesizedIdentifiers.ts] var x: number; x = 3; // OK diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.symbols b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.symbols index 6330ac20b5fed..1d03e9f2944bd 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.symbols +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts === +//// [tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts] //// + +=== assignmentToParenthesizedIdentifiers.ts === var x: number; >x : Symbol(x, Decl(assignmentToParenthesizedIdentifiers.ts, 0, 3)) diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types index 80fe9f32b5adb..9e4ac0ffb949c 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts === +//// [tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts] //// + +=== assignmentToParenthesizedIdentifiers.ts === var x: number; >x : number diff --git a/tests/baselines/reference/assignmentToReferenceTypes.errors.txt b/tests/baselines/reference/assignmentToReferenceTypes.errors.txt index e283ab6ec9fb6..a0e6c842d91fa 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.errors.txt +++ b/tests/baselines/reference/assignmentToReferenceTypes.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/assignmentToReferenceTypes.ts(5,1): error TS2708: Cannot use namespace 'M' as a value. -tests/cases/compiler/assignmentToReferenceTypes.ts(9,1): error TS2629: Cannot assign to 'C' because it is a class. -tests/cases/compiler/assignmentToReferenceTypes.ts(13,1): error TS2628: Cannot assign to 'E' because it is an enum. -tests/cases/compiler/assignmentToReferenceTypes.ts(16,1): error TS2630: Cannot assign to 'f' because it is a function. +assignmentToReferenceTypes.ts(5,1): error TS2708: Cannot use namespace 'M' as a value. +assignmentToReferenceTypes.ts(9,1): error TS2629: Cannot assign to 'C' because it is a class. +assignmentToReferenceTypes.ts(13,1): error TS2628: Cannot assign to 'E' because it is an enum. +assignmentToReferenceTypes.ts(16,1): error TS2630: Cannot assign to 'f' because it is a function. -==== tests/cases/compiler/assignmentToReferenceTypes.ts (4 errors) ==== +==== assignmentToReferenceTypes.ts (4 errors) ==== // Should all be allowed module M { diff --git a/tests/baselines/reference/assignmentToReferenceTypes.js b/tests/baselines/reference/assignmentToReferenceTypes.js index b593240aec35d..4179585c5e74c 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.js +++ b/tests/baselines/reference/assignmentToReferenceTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/assignmentToReferenceTypes.ts] //// + //// [assignmentToReferenceTypes.ts] // Should all be allowed diff --git a/tests/baselines/reference/assignmentToReferenceTypes.symbols b/tests/baselines/reference/assignmentToReferenceTypes.symbols index 55a385f0b0344..67caa4e9c081a 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.symbols +++ b/tests/baselines/reference/assignmentToReferenceTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToReferenceTypes.ts === +//// [tests/cases/compiler/assignmentToReferenceTypes.ts] //// + +=== assignmentToReferenceTypes.ts === // Should all be allowed module M { diff --git a/tests/baselines/reference/assignmentToReferenceTypes.types b/tests/baselines/reference/assignmentToReferenceTypes.types index 99e9204cdf079..350788924eb02 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.types +++ b/tests/baselines/reference/assignmentToReferenceTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/assignmentToReferenceTypes.ts === +//// [tests/cases/compiler/assignmentToReferenceTypes.ts] //// + +=== assignmentToReferenceTypes.ts === // Should all be allowed module M { diff --git a/tests/baselines/reference/assignmentToVoidZero1.js b/tests/baselines/reference/assignmentToVoidZero1.js index c9bdab8606b83..2aba92d0edacc 100644 --- a/tests/baselines/reference/assignmentToVoidZero1.js +++ b/tests/baselines/reference/assignmentToVoidZero1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/salsa/assignmentToVoidZero1.ts] //// + //// [assignmentToVoidZero1.js] // #38552 exports.y = exports.x = void 0; diff --git a/tests/baselines/reference/assignmentToVoidZero1.symbols b/tests/baselines/reference/assignmentToVoidZero1.symbols index 814c82b35e21c..f3a34be94c795 100644 --- a/tests/baselines/reference/assignmentToVoidZero1.symbols +++ b/tests/baselines/reference/assignmentToVoidZero1.symbols @@ -1,11 +1,13 @@ -=== tests/cases/conformance/salsa/assignmentToVoidZero1.js === +//// [tests/cases/conformance/salsa/assignmentToVoidZero1.ts] //// + +=== assignmentToVoidZero1.js === // #38552 exports.y = exports.x = void 0; >exports.y : Symbol(y, Decl(assignmentToVoidZero1.js, 2, 14)) ->exports : Symbol("tests/cases/conformance/salsa/assignmentToVoidZero1", Decl(assignmentToVoidZero1.js, 0, 0)) +>exports : Symbol("assignmentToVoidZero1", Decl(assignmentToVoidZero1.js, 0, 0)) >y : Symbol(y, Decl(assignmentToVoidZero1.js, 2, 14)) >exports.x : Symbol(x, Decl(assignmentToVoidZero1.js, 1, 31)) ->exports : Symbol("tests/cases/conformance/salsa/assignmentToVoidZero1", Decl(assignmentToVoidZero1.js, 0, 0)) +>exports : Symbol("assignmentToVoidZero1", Decl(assignmentToVoidZero1.js, 0, 0)) >x : Symbol(x, Decl(assignmentToVoidZero1.js, 1, 31)) exports.x = 1; diff --git a/tests/baselines/reference/assignmentToVoidZero1.types b/tests/baselines/reference/assignmentToVoidZero1.types index fd73a19bd66cb..c10643e53c7d6 100644 --- a/tests/baselines/reference/assignmentToVoidZero1.types +++ b/tests/baselines/reference/assignmentToVoidZero1.types @@ -1,13 +1,15 @@ -=== tests/cases/conformance/salsa/assignmentToVoidZero1.js === +//// [tests/cases/conformance/salsa/assignmentToVoidZero1.ts] //// + +=== assignmentToVoidZero1.js === // #38552 exports.y = exports.x = void 0; >exports.y = exports.x = void 0 : undefined >exports.y : 2 ->exports : typeof import("tests/cases/conformance/salsa/assignmentToVoidZero1") +>exports : typeof import("assignmentToVoidZero1") >y : 2 >exports.x = void 0 : undefined >exports.x : 1 ->exports : typeof import("tests/cases/conformance/salsa/assignmentToVoidZero1") +>exports : typeof import("assignmentToVoidZero1") >x : 1 >void 0 : undefined >0 : 0 @@ -15,14 +17,14 @@ exports.y = exports.x = void 0; exports.x = 1; >exports.x = 1 : 1 >exports.x : 1 ->exports : typeof import("tests/cases/conformance/salsa/assignmentToVoidZero1") +>exports : typeof import("assignmentToVoidZero1") >x : 1 >1 : 1 exports.y = 2; >exports.y = 2 : 2 >exports.y : 2 ->exports : typeof import("tests/cases/conformance/salsa/assignmentToVoidZero1") +>exports : typeof import("assignmentToVoidZero1") >y : 2 >2 : 2 diff --git a/tests/baselines/reference/assignmentToVoidZero2.errors.txt b/tests/baselines/reference/assignmentToVoidZero2.errors.txt index b6e30bda5c93c..51f6eb97dae51 100644 --- a/tests/baselines/reference/assignmentToVoidZero2.errors.txt +++ b/tests/baselines/reference/assignmentToVoidZero2.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/salsa/assignmentToVoidZero2.js(2,9): error TS2339: Property 'k' does not exist on type 'typeof import("tests/cases/conformance/salsa/assignmentToVoidZero2")'. -tests/cases/conformance/salsa/assignmentToVoidZero2.js(5,3): error TS2339: Property 'y' does not exist on type 'typeof o'. -tests/cases/conformance/salsa/assignmentToVoidZero2.js(6,9): error TS2339: Property 'y' does not exist on type 'typeof o'. -tests/cases/conformance/salsa/assignmentToVoidZero2.js(10,10): error TS2339: Property 'q' does not exist on type 'C'. -tests/cases/conformance/salsa/assignmentToVoidZero2.js(13,9): error TS2339: Property 'q' does not exist on type 'C'. -tests/cases/conformance/salsa/importer.js(1,13): error TS2305: Module '"./assignmentToVoidZero2"' has no exported member 'k'. +assignmentToVoidZero2.js(2,9): error TS2339: Property 'k' does not exist on type 'typeof import("assignmentToVoidZero2")'. +assignmentToVoidZero2.js(5,3): error TS2339: Property 'y' does not exist on type 'typeof o'. +assignmentToVoidZero2.js(6,9): error TS2339: Property 'y' does not exist on type 'typeof o'. +assignmentToVoidZero2.js(10,10): error TS2339: Property 'q' does not exist on type 'C'. +assignmentToVoidZero2.js(13,9): error TS2339: Property 'q' does not exist on type 'C'. +importer.js(1,13): error TS2305: Module '"./assignmentToVoidZero2"' has no exported member 'k'. -==== tests/cases/conformance/salsa/assignmentToVoidZero2.js (5 errors) ==== +==== assignmentToVoidZero2.js (5 errors) ==== exports.j = 1; exports.k = void 0; ~ -!!! error TS2339: Property 'k' does not exist on type 'typeof import("tests/cases/conformance/salsa/assignmentToVoidZero2")'. +!!! error TS2339: Property 'k' does not exist on type 'typeof import("assignmentToVoidZero2")'. var o = {} o.x = 1 o.y = void 0 @@ -31,7 +31,7 @@ tests/cases/conformance/salsa/importer.js(1,13): error TS2305: Module '"./assign ~ !!! error TS2339: Property 'q' does not exist on type 'C'. -==== tests/cases/conformance/salsa/importer.js (1 errors) ==== +==== importer.js (1 errors) ==== import { j, k } from './assignmentToVoidZero2' ~ !!! error TS2305: Module '"./assignmentToVoidZero2"' has no exported member 'k'. diff --git a/tests/baselines/reference/assignmentToVoidZero2.symbols b/tests/baselines/reference/assignmentToVoidZero2.symbols index cbb5982023493..5851d8de8c671 100644 --- a/tests/baselines/reference/assignmentToVoidZero2.symbols +++ b/tests/baselines/reference/assignmentToVoidZero2.symbols @@ -1,11 +1,13 @@ -=== tests/cases/conformance/salsa/assignmentToVoidZero2.js === +//// [tests/cases/conformance/salsa/assignmentToVoidZero2.ts] //// + +=== assignmentToVoidZero2.js === exports.j = 1; >exports.j : Symbol(j, Decl(assignmentToVoidZero2.js, 0, 0)) >exports : Symbol(j, Decl(assignmentToVoidZero2.js, 0, 0)) >j : Symbol(j, Decl(assignmentToVoidZero2.js, 0, 0)) exports.k = void 0; ->exports : Symbol("tests/cases/conformance/salsa/assignmentToVoidZero2", Decl(assignmentToVoidZero2.js, 0, 0)) +>exports : Symbol("assignmentToVoidZero2", Decl(assignmentToVoidZero2.js, 0, 0)) var o = {} >o : Symbol(o, Decl(assignmentToVoidZero2.js, 2, 3), Decl(assignmentToVoidZero2.js, 2, 10)) @@ -45,7 +47,7 @@ c.p + c.q >p : Symbol(C.p, Decl(assignmentToVoidZero2.js, 7, 14)) >c : Symbol(c, Decl(assignmentToVoidZero2.js, 11, 3)) -=== tests/cases/conformance/salsa/importer.js === +=== importer.js === import { j, k } from './assignmentToVoidZero2' >j : Symbol(j, Decl(importer.js, 0, 8)) >k : Symbol(k, Decl(importer.js, 0, 11)) diff --git a/tests/baselines/reference/assignmentToVoidZero2.types b/tests/baselines/reference/assignmentToVoidZero2.types index 53455e654b2dd..0b8eaef467a86 100644 --- a/tests/baselines/reference/assignmentToVoidZero2.types +++ b/tests/baselines/reference/assignmentToVoidZero2.types @@ -1,15 +1,17 @@ -=== tests/cases/conformance/salsa/assignmentToVoidZero2.js === +//// [tests/cases/conformance/salsa/assignmentToVoidZero2.ts] //// + +=== assignmentToVoidZero2.js === exports.j = 1; >exports.j = 1 : 1 >exports.j : 1 ->exports : typeof import("tests/cases/conformance/salsa/assignmentToVoidZero2") +>exports : typeof import("assignmentToVoidZero2") >j : 1 >1 : 1 exports.k = void 0; >exports.k = void 0 : undefined >exports.k : any ->exports : typeof import("tests/cases/conformance/salsa/assignmentToVoidZero2") +>exports : typeof import("assignmentToVoidZero2") >k : any >void 0 : undefined >0 : 0 @@ -74,7 +76,7 @@ c.p + c.q >c : C >q : any -=== tests/cases/conformance/salsa/importer.js === +=== importer.js === import { j, k } from './assignmentToVoidZero2' >j : 1 >k : any diff --git a/tests/baselines/reference/assignmentTypeNarrowing.js b/tests/baselines/reference/assignmentTypeNarrowing.js index 24a08539eb7d2..9d67dd0c50c3b 100644 --- a/tests/baselines/reference/assignmentTypeNarrowing.js +++ b/tests/baselines/reference/assignmentTypeNarrowing.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts] //// + //// [assignmentTypeNarrowing.ts] let x: string | number | boolean | RegExp; diff --git a/tests/baselines/reference/assignmentTypeNarrowing.symbols b/tests/baselines/reference/assignmentTypeNarrowing.symbols index 36a2cf44dae8e..ba97395916459 100644 --- a/tests/baselines/reference/assignmentTypeNarrowing.symbols +++ b/tests/baselines/reference/assignmentTypeNarrowing.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts] //// + +=== assignmentTypeNarrowing.ts === let x: string | number | boolean | RegExp; >x : Symbol(x, Decl(assignmentTypeNarrowing.ts, 0, 3)) >RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/assignmentTypeNarrowing.types b/tests/baselines/reference/assignmentTypeNarrowing.types index 15b71c259aef8..702255a600541 100644 --- a/tests/baselines/reference/assignmentTypeNarrowing.types +++ b/tests/baselines/reference/assignmentTypeNarrowing.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts === +//// [tests/cases/conformance/expressions/assignmentOperator/assignmentTypeNarrowing.ts] //// + +=== assignmentTypeNarrowing.ts === let x: string | number | boolean | RegExp; >x : string | number | boolean | RegExp diff --git a/tests/baselines/reference/assignments.errors.txt b/tests/baselines/reference/assignments.errors.txt index 4d06a2e31dc91..d55a66a9b642e 100644 --- a/tests/baselines/reference/assignments.errors.txt +++ b/tests/baselines/reference/assignments.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(11,1): error TS2708: Cannot use namespace 'M' as a value. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(14,1): error TS2629: Cannot assign to 'C' because it is a class. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(17,1): error TS2628: Cannot assign to 'E' because it is an enum. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(18,3): error TS2540: Cannot assign to 'A' because it is a read-only property. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(21,1): error TS2630: Cannot assign to 'fn' because it is a function. -tests/cases/conformance/expressions/valuesAndReferences/assignments.ts(31,1): error TS2693: 'I' only refers to a type, but is being used as a value here. +assignments.ts(11,1): error TS2708: Cannot use namespace 'M' as a value. +assignments.ts(14,1): error TS2629: Cannot assign to 'C' because it is a class. +assignments.ts(17,1): error TS2628: Cannot assign to 'E' because it is an enum. +assignments.ts(18,3): error TS2540: Cannot assign to 'A' because it is a read-only property. +assignments.ts(21,1): error TS2630: Cannot assign to 'fn' because it is a function. +assignments.ts(31,1): error TS2693: 'I' only refers to a type, but is being used as a value here. -==== tests/cases/conformance/expressions/valuesAndReferences/assignments.ts (6 errors) ==== +==== assignments.ts (6 errors) ==== // In this file: // Assign to a module // Assign to a class diff --git a/tests/baselines/reference/assignments.js b/tests/baselines/reference/assignments.js index 8143490083424..0351bb7d702c1 100644 --- a/tests/baselines/reference/assignments.js +++ b/tests/baselines/reference/assignments.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/valuesAndReferences/assignments.ts] //// + //// [assignments.ts] // In this file: // Assign to a module diff --git a/tests/baselines/reference/assignments.symbols b/tests/baselines/reference/assignments.symbols index 731045c3133ee..5518dc9f75b8c 100644 --- a/tests/baselines/reference/assignments.symbols +++ b/tests/baselines/reference/assignments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/valuesAndReferences/assignments.ts === +//// [tests/cases/conformance/expressions/valuesAndReferences/assignments.ts] //// + +=== assignments.ts === // In this file: // Assign to a module // Assign to a class diff --git a/tests/baselines/reference/assignments.types b/tests/baselines/reference/assignments.types index 8c8182ea53be7..610b9e29f4cd7 100644 --- a/tests/baselines/reference/assignments.types +++ b/tests/baselines/reference/assignments.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/valuesAndReferences/assignments.ts === +//// [tests/cases/conformance/expressions/valuesAndReferences/assignments.ts] //// + +=== assignments.ts === // In this file: // Assign to a module // Assign to a class diff --git a/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt b/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt index 5e524e265e229..981fd01ac22cf 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt +++ b/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts(3,21): error TS1055: Type 'PromiseAlias' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +asyncAliasReturnType_es5.ts(3,21): error TS1055: Type 'PromiseAlias' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. -==== tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts (1 errors) ==== +==== asyncAliasReturnType_es5.ts (1 errors) ==== type PromiseAlias = Promise; async function f(): PromiseAlias { diff --git a/tests/baselines/reference/asyncAliasReturnType_es5.js b/tests/baselines/reference/asyncAliasReturnType_es5.js index 7684b413405f4..5a6514b88e691 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es5.js +++ b/tests/baselines/reference/asyncAliasReturnType_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts] //// + //// [asyncAliasReturnType_es5.ts] type PromiseAlias = Promise; diff --git a/tests/baselines/reference/asyncAliasReturnType_es5.symbols b/tests/baselines/reference/asyncAliasReturnType_es5.symbols index 45defd071e3f3..3790887a2328a 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es5.symbols +++ b/tests/baselines/reference/asyncAliasReturnType_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts] //// + +=== asyncAliasReturnType_es5.ts === type PromiseAlias = Promise; >PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es5.ts, 0, 0)) >T : Symbol(T, Decl(asyncAliasReturnType_es5.ts, 0, 18)) diff --git a/tests/baselines/reference/asyncAliasReturnType_es5.types b/tests/baselines/reference/asyncAliasReturnType_es5.types index 22ca9c932b303..b66e5cd18e0dc 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es5.types +++ b/tests/baselines/reference/asyncAliasReturnType_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts] //// + +=== asyncAliasReturnType_es5.ts === type PromiseAlias = Promise; >PromiseAlias : PromiseAlias diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.js b/tests/baselines/reference/asyncAliasReturnType_es6.js index 45fe3228f6ebd..47be5bd6b08a6 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es6.js +++ b/tests/baselines/reference/asyncAliasReturnType_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts] //// + //// [asyncAliasReturnType_es6.ts] type PromiseAlias = Promise; diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.symbols b/tests/baselines/reference/asyncAliasReturnType_es6.symbols index 820cbb87a060e..bd96d8c4e193e 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es6.symbols +++ b/tests/baselines/reference/asyncAliasReturnType_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts === +//// [tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts] //// + +=== asyncAliasReturnType_es6.ts === type PromiseAlias = Promise; >PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es6.ts, 0, 0)) >T : Symbol(T, Decl(asyncAliasReturnType_es6.ts, 0, 18)) diff --git a/tests/baselines/reference/asyncAliasReturnType_es6.types b/tests/baselines/reference/asyncAliasReturnType_es6.types index 943856611b568..29ef55d5d16d5 100644 --- a/tests/baselines/reference/asyncAliasReturnType_es6.types +++ b/tests/baselines/reference/asyncAliasReturnType_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts === +//// [tests/cases/conformance/async/es6/asyncAliasReturnType_es6.ts] //// + +=== asyncAliasReturnType_es6.ts === type PromiseAlias = Promise; >PromiseAlias : PromiseAlias diff --git a/tests/baselines/reference/asyncArrowFunction10_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction10_es2017.errors.txt index 90dbe5f76f6c3..f28716ba44090 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction10_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? +asyncArrowFunction10_es2017.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts (1 errors) ==== +==== asyncArrowFunction10_es2017.ts (1 errors) ==== var foo = async (): Promise => { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/baselines/reference/asyncArrowFunction10_es2017.js b/tests/baselines/reference/asyncArrowFunction10_es2017.js index 3fd29302a36da..a66589308c19c 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction10_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts] //// + //// [asyncArrowFunction10_es2017.ts] var foo = async (): Promise => { // Legal to use 'await' in a type context. diff --git a/tests/baselines/reference/asyncArrowFunction10_es2017.symbols b/tests/baselines/reference/asyncArrowFunction10_es2017.symbols index 0cdd8fc9d9b98..f8749c60ab5b2 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction10_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts] //// + +=== asyncArrowFunction10_es2017.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction10_es2017.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction10_es2017.types b/tests/baselines/reference/asyncArrowFunction10_es2017.types index dfe32056d1444..1ff5e267e45b9 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction10_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction10_es2017.ts] //// + +=== asyncArrowFunction10_es2017.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => { // Legal to use 'await' in a type context. var v: await;} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction10_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction10_es5.errors.txt index 2a465734aff4b..d6a9d124aa772 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction10_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? +asyncArrowFunction10_es5.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts (1 errors) ==== +==== asyncArrowFunction10_es5.ts (1 errors) ==== var foo = async (): Promise => { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/baselines/reference/asyncArrowFunction10_es5.js b/tests/baselines/reference/asyncArrowFunction10_es5.js index 5fc37de5f1873..521fb57df0cb4 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es5.js +++ b/tests/baselines/reference/asyncArrowFunction10_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts] //// + //// [asyncArrowFunction10_es5.ts] var foo = async (): Promise => { // Legal to use 'await' in a type context. diff --git a/tests/baselines/reference/asyncArrowFunction10_es5.symbols b/tests/baselines/reference/asyncArrowFunction10_es5.symbols index 62d85679e6684..ead6ad140015b 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction10_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts] //// + +=== asyncArrowFunction10_es5.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction10_es5.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction10_es5.types b/tests/baselines/reference/asyncArrowFunction10_es5.types index 41a3566651032..45e2b6fbdfa4e 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es5.types +++ b/tests/baselines/reference/asyncArrowFunction10_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction10_es5.ts] //// + +=== asyncArrowFunction10_es5.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => { // Legal to use 'await' in a type context. var v: await;} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt index 968ca849bc279..2bc1ef7a98985 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction10_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? +asyncArrowFunction10_es6.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts (1 errors) ==== +==== asyncArrowFunction10_es6.ts (1 errors) ==== var foo = async (): Promise => { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/baselines/reference/asyncArrowFunction10_es6.js b/tests/baselines/reference/asyncArrowFunction10_es6.js index 78c8b64327f80..c4d70600d9b85 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es6.js +++ b/tests/baselines/reference/asyncArrowFunction10_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts] //// + //// [asyncArrowFunction10_es6.ts] var foo = async (): Promise => { // Legal to use 'await' in a type context. diff --git a/tests/baselines/reference/asyncArrowFunction10_es6.symbols b/tests/baselines/reference/asyncArrowFunction10_es6.symbols index be222a4546234..03cfb8bc04025 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction10_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts] //// + +=== asyncArrowFunction10_es6.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction10_es6.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction10_es6.types b/tests/baselines/reference/asyncArrowFunction10_es6.types index 1b744fdbae924..f7ad360e438af 100644 --- a/tests/baselines/reference/asyncArrowFunction10_es6.types +++ b/tests/baselines/reference/asyncArrowFunction10_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts] //// + +=== asyncArrowFunction10_es6.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => { // Legal to use 'await' in a type context. var v: await;} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction11_es5.js b/tests/baselines/reference/asyncArrowFunction11_es5.js index a9d236abf5ab8..3f1f3491d7aca 100644 --- a/tests/baselines/reference/asyncArrowFunction11_es5.js +++ b/tests/baselines/reference/asyncArrowFunction11_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction11_es5.ts] //// + //// [asyncArrowFunction11_es5.ts] // https://github.com/Microsoft/TypeScript/issues/24722 class A { diff --git a/tests/baselines/reference/asyncArrowFunction11_es5.symbols b/tests/baselines/reference/asyncArrowFunction11_es5.symbols index b78c43d12eb52..9485f0a7b3094 100644 --- a/tests/baselines/reference/asyncArrowFunction11_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction11_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction11_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction11_es5.ts] //// + +=== asyncArrowFunction11_es5.ts === // https://github.com/Microsoft/TypeScript/issues/24722 class A { >A : Symbol(A, Decl(asyncArrowFunction11_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunction11_es5.types b/tests/baselines/reference/asyncArrowFunction11_es5.types index e3860195a5fa4..3785693ae9a7d 100644 --- a/tests/baselines/reference/asyncArrowFunction11_es5.types +++ b/tests/baselines/reference/asyncArrowFunction11_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction11_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction11_es5.ts] //// + +=== asyncArrowFunction11_es5.ts === // https://github.com/Microsoft/TypeScript/issues/24722 class A { >A : A diff --git a/tests/baselines/reference/asyncArrowFunction1_es2017.js b/tests/baselines/reference/asyncArrowFunction1_es2017.js index b946bc99428fb..6f5c29d33911c 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction1_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction1_es2017.ts] //// + //// [asyncArrowFunction1_es2017.ts] var foo = async (): Promise => { }; diff --git a/tests/baselines/reference/asyncArrowFunction1_es2017.symbols b/tests/baselines/reference/asyncArrowFunction1_es2017.symbols index 1bb56422c06a8..290302fb1a470 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction1_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction1_es2017.ts] //// + +=== asyncArrowFunction1_es2017.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es2017.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction1_es2017.types b/tests/baselines/reference/asyncArrowFunction1_es2017.types index 096ab2eacbe8e..b700ee335ac86 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction1_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction1_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction1_es2017.ts] //// + +=== asyncArrowFunction1_es2017.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => {} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction1_es5.js b/tests/baselines/reference/asyncArrowFunction1_es5.js index e26770d8fe9b2..def5dec68d75c 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es5.js +++ b/tests/baselines/reference/asyncArrowFunction1_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction1_es5.ts] //// + //// [asyncArrowFunction1_es5.ts] var foo = async (): Promise => { }; diff --git a/tests/baselines/reference/asyncArrowFunction1_es5.symbols b/tests/baselines/reference/asyncArrowFunction1_es5.symbols index 3f6d96830b725..4aa48f2b89eeb 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction1_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction1_es5.ts] //// + +=== asyncArrowFunction1_es5.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es5.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction1_es5.types b/tests/baselines/reference/asyncArrowFunction1_es5.types index 65c278d72bd51..51fc7a71965ec 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es5.types +++ b/tests/baselines/reference/asyncArrowFunction1_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction1_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction1_es5.ts] //// + +=== asyncArrowFunction1_es5.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => {} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.js b/tests/baselines/reference/asyncArrowFunction1_es6.js index 202864364f3e6..51be9a1d71c55 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.js +++ b/tests/baselines/reference/asyncArrowFunction1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts] //// + //// [asyncArrowFunction1_es6.ts] var foo = async (): Promise => { }; diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.symbols b/tests/baselines/reference/asyncArrowFunction1_es6.symbols index f6000f65735d2..ea03068b3ad18 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts] //// + +=== asyncArrowFunction1_es6.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.types b/tests/baselines/reference/asyncArrowFunction1_es6.types index 377a21558efb8..826f89528d61a 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.types +++ b/tests/baselines/reference/asyncArrowFunction1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts] //// + +=== asyncArrowFunction1_es6.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => {} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction2_es2017.js b/tests/baselines/reference/asyncArrowFunction2_es2017.js index d2a5d0306b10d..ec3fe6d438078 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction2_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction2_es2017.ts] //// + //// [asyncArrowFunction2_es2017.ts] var f = (await) => { } diff --git a/tests/baselines/reference/asyncArrowFunction2_es2017.symbols b/tests/baselines/reference/asyncArrowFunction2_es2017.symbols index a56c5bb62c839..80d74a7884975 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction2_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction2_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction2_es2017.ts] //// + +=== asyncArrowFunction2_es2017.ts === var f = (await) => { >f : Symbol(f, Decl(asyncArrowFunction2_es2017.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction2_es2017.ts, 0, 9)) diff --git a/tests/baselines/reference/asyncArrowFunction2_es2017.types b/tests/baselines/reference/asyncArrowFunction2_es2017.types index 1feb033e6eef8..69651d3850015 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction2_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction2_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction2_es2017.ts] //// + +=== asyncArrowFunction2_es2017.ts === var f = (await) => { >f : (await: any) => void >(await) => {} : (await: any) => void diff --git a/tests/baselines/reference/asyncArrowFunction2_es5.js b/tests/baselines/reference/asyncArrowFunction2_es5.js index d77837a5433e1..682593e04a2de 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es5.js +++ b/tests/baselines/reference/asyncArrowFunction2_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction2_es5.ts] //// + //// [asyncArrowFunction2_es5.ts] var f = (await) => { } diff --git a/tests/baselines/reference/asyncArrowFunction2_es5.symbols b/tests/baselines/reference/asyncArrowFunction2_es5.symbols index b195e9c269524..69ec6af7d71b8 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction2_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction2_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction2_es5.ts] //// + +=== asyncArrowFunction2_es5.ts === var f = (await) => { >f : Symbol(f, Decl(asyncArrowFunction2_es5.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction2_es5.ts, 0, 9)) diff --git a/tests/baselines/reference/asyncArrowFunction2_es5.types b/tests/baselines/reference/asyncArrowFunction2_es5.types index e51a17abd3553..ebf92de9cbea0 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es5.types +++ b/tests/baselines/reference/asyncArrowFunction2_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction2_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction2_es5.ts] //// + +=== asyncArrowFunction2_es5.ts === var f = (await) => { >f : (await: any) => void >(await) => {} : (await: any) => void diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.js b/tests/baselines/reference/asyncArrowFunction2_es6.js index 9d7f1d10ea65a..c7e10b6f70cd4 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es6.js +++ b/tests/baselines/reference/asyncArrowFunction2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts] //// + //// [asyncArrowFunction2_es6.ts] var f = (await) => { } diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.symbols b/tests/baselines/reference/asyncArrowFunction2_es6.symbols index dd8b4ea23908b..51a04d7107078 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts] //// + +=== asyncArrowFunction2_es6.ts === var f = (await) => { >f : Symbol(f, Decl(asyncArrowFunction2_es6.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction2_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/asyncArrowFunction2_es6.types b/tests/baselines/reference/asyncArrowFunction2_es6.types index 98808d175f868..4bc0fb421fd06 100644 --- a/tests/baselines/reference/asyncArrowFunction2_es6.types +++ b/tests/baselines/reference/asyncArrowFunction2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts] //// + +=== asyncArrowFunction2_es6.ts === var f = (await) => { >f : (await: any) => void >(await) => {} : (await: any) => void diff --git a/tests/baselines/reference/asyncArrowFunction3_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction3_es2017.errors.txt index 64b47bc6cd535..a62efe2e0bc86 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction3_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. +asyncArrowFunction3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts (1 errors) ==== +==== asyncArrowFunction3_es2017.ts (1 errors) ==== function f(await = await) { ~~~~~ !!! error TS2372: Parameter 'await' cannot reference itself. diff --git a/tests/baselines/reference/asyncArrowFunction3_es2017.js b/tests/baselines/reference/asyncArrowFunction3_es2017.js index 7ae371facc117..e51841e43764b 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction3_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts] //// + //// [asyncArrowFunction3_es2017.ts] function f(await = await) { } diff --git a/tests/baselines/reference/asyncArrowFunction3_es2017.symbols b/tests/baselines/reference/asyncArrowFunction3_es2017.symbols index 8564be785abdb..c106c601a531d 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction3_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts] //// + +=== asyncArrowFunction3_es2017.ts === function f(await = await) { >f : Symbol(f, Decl(asyncArrowFunction3_es2017.ts, 0, 0)) >await : Symbol(await, Decl(asyncArrowFunction3_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncArrowFunction3_es2017.types b/tests/baselines/reference/asyncArrowFunction3_es2017.types index bd5c2afc67af0..0ea16b3b5534a 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction3_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction3_es2017.ts] //// + +=== asyncArrowFunction3_es2017.ts === function f(await = await) { >f : (await?: any) => void >await : any diff --git a/tests/baselines/reference/asyncArrowFunction3_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction3_es5.errors.txt index 8540c90055960..b78f02690776d 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction3_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. +asyncArrowFunction3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts (1 errors) ==== +==== asyncArrowFunction3_es5.ts (1 errors) ==== function f(await = await) { ~~~~~ !!! error TS2372: Parameter 'await' cannot reference itself. diff --git a/tests/baselines/reference/asyncArrowFunction3_es5.js b/tests/baselines/reference/asyncArrowFunction3_es5.js index 3c73e6f9f58f9..9d000b0d1a880 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es5.js +++ b/tests/baselines/reference/asyncArrowFunction3_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts] //// + //// [asyncArrowFunction3_es5.ts] function f(await = await) { } diff --git a/tests/baselines/reference/asyncArrowFunction3_es5.symbols b/tests/baselines/reference/asyncArrowFunction3_es5.symbols index f91744bc7fe7c..2d83db3ce183a 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction3_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts] //// + +=== asyncArrowFunction3_es5.ts === function f(await = await) { >f : Symbol(f, Decl(asyncArrowFunction3_es5.ts, 0, 0)) >await : Symbol(await, Decl(asyncArrowFunction3_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncArrowFunction3_es5.types b/tests/baselines/reference/asyncArrowFunction3_es5.types index c4873df13717c..18ba6933c639f 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es5.types +++ b/tests/baselines/reference/asyncArrowFunction3_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction3_es5.ts] //// + +=== asyncArrowFunction3_es5.ts === function f(await = await) { >f : (await?: any) => void >await : any diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt index cfa4edcca4a71..7bac339266d1f 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction3_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. +asyncArrowFunction3_es6.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts (1 errors) ==== +==== asyncArrowFunction3_es6.ts (1 errors) ==== function f(await = await) { ~~~~~ !!! error TS2372: Parameter 'await' cannot reference itself. diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.js b/tests/baselines/reference/asyncArrowFunction3_es6.js index 9616336d76a82..60aa9910e5abc 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es6.js +++ b/tests/baselines/reference/asyncArrowFunction3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts] //// + //// [asyncArrowFunction3_es6.ts] function f(await = await) { } diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.symbols b/tests/baselines/reference/asyncArrowFunction3_es6.symbols index f623c139aa0bb..ce0f1d7d6fb18 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts] //// + +=== asyncArrowFunction3_es6.ts === function f(await = await) { >f : Symbol(f, Decl(asyncArrowFunction3_es6.ts, 0, 0)) >await : Symbol(await, Decl(asyncArrowFunction3_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncArrowFunction3_es6.types b/tests/baselines/reference/asyncArrowFunction3_es6.types index c43b50de4ae07..d55a678460e5f 100644 --- a/tests/baselines/reference/asyncArrowFunction3_es6.types +++ b/tests/baselines/reference/asyncArrowFunction3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts] //// + +=== asyncArrowFunction3_es6.ts === function f(await = await) { >f : (await?: any) => void >await : any diff --git a/tests/baselines/reference/asyncArrowFunction4_es2017.js b/tests/baselines/reference/asyncArrowFunction4_es2017.js index ebec1e6dbd67d..af9ef4449f81f 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction4_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction4_es2017.ts] //// + //// [asyncArrowFunction4_es2017.ts] var await = () => { } diff --git a/tests/baselines/reference/asyncArrowFunction4_es2017.symbols b/tests/baselines/reference/asyncArrowFunction4_es2017.symbols index b44fc0dbdf60d..5b5b8e1576d8f 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction4_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction4_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction4_es2017.ts] //// + +=== asyncArrowFunction4_es2017.ts === var await = () => { >await : Symbol(await, Decl(asyncArrowFunction4_es2017.ts, 0, 3)) } diff --git a/tests/baselines/reference/asyncArrowFunction4_es2017.types b/tests/baselines/reference/asyncArrowFunction4_es2017.types index 6af5f94c75869..94ea1aad24d9a 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction4_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction4_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction4_es2017.ts] //// + +=== asyncArrowFunction4_es2017.ts === var await = () => { >await : () => void >() => {} : () => void diff --git a/tests/baselines/reference/asyncArrowFunction4_es5.js b/tests/baselines/reference/asyncArrowFunction4_es5.js index cbaae99a9c6ba..36d3d52f6cd84 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es5.js +++ b/tests/baselines/reference/asyncArrowFunction4_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction4_es5.ts] //// + //// [asyncArrowFunction4_es5.ts] var await = () => { } diff --git a/tests/baselines/reference/asyncArrowFunction4_es5.symbols b/tests/baselines/reference/asyncArrowFunction4_es5.symbols index affb1f188a862..995114bd06be7 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction4_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction4_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction4_es5.ts] //// + +=== asyncArrowFunction4_es5.ts === var await = () => { >await : Symbol(await, Decl(asyncArrowFunction4_es5.ts, 0, 3)) } diff --git a/tests/baselines/reference/asyncArrowFunction4_es5.types b/tests/baselines/reference/asyncArrowFunction4_es5.types index 3b45236509571..fc17a297f7290 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es5.types +++ b/tests/baselines/reference/asyncArrowFunction4_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction4_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction4_es5.ts] //// + +=== asyncArrowFunction4_es5.ts === var await = () => { >await : () => void >() => {} : () => void diff --git a/tests/baselines/reference/asyncArrowFunction4_es6.js b/tests/baselines/reference/asyncArrowFunction4_es6.js index eb89d98bbeb80..7e80f55f30bd5 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es6.js +++ b/tests/baselines/reference/asyncArrowFunction4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts] //// + //// [asyncArrowFunction4_es6.ts] var await = () => { } diff --git a/tests/baselines/reference/asyncArrowFunction4_es6.symbols b/tests/baselines/reference/asyncArrowFunction4_es6.symbols index 1c0010407209e..680e3a585efdb 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts] //// + +=== asyncArrowFunction4_es6.ts === var await = () => { >await : Symbol(await, Decl(asyncArrowFunction4_es6.ts, 0, 3)) } diff --git a/tests/baselines/reference/asyncArrowFunction4_es6.types b/tests/baselines/reference/asyncArrowFunction4_es6.types index e23ff7861055a..1d8c0dec6b099 100644 --- a/tests/baselines/reference/asyncArrowFunction4_es6.types +++ b/tests/baselines/reference/asyncArrowFunction4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts] //// + +=== asyncArrowFunction4_es6.ts === var await = () => { >await : () => void >() => {} : () => void diff --git a/tests/baselines/reference/asyncArrowFunction5_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction5_es2017.errors.txt index 670669495cbbe..b7c2ad2a4628c 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction5_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncArrowFunction5_es2017.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts (1 errors) ==== +==== asyncArrowFunction5_es2017.ts (1 errors) ==== var foo = async (await): Promise => { ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/asyncArrowFunction5_es2017.js b/tests/baselines/reference/asyncArrowFunction5_es2017.js index 04beb16cd74d7..62da22fa6d5ce 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction5_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts] //// + //// [asyncArrowFunction5_es2017.ts] var foo = async (await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction5_es2017.symbols b/tests/baselines/reference/asyncArrowFunction5_es2017.symbols index b7d25bf2c3cff..007f6a1c0dcb9 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction5_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts] //// + +=== asyncArrowFunction5_es2017.ts === var foo = async (await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction5_es2017.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction5_es2017.ts, 0, 17)) diff --git a/tests/baselines/reference/asyncArrowFunction5_es2017.types b/tests/baselines/reference/asyncArrowFunction5_es2017.types index 0e5eb0875594a..60fc4e91e217d 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction5_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction5_es2017.ts] //// + +=== asyncArrowFunction5_es2017.ts === var foo = async (await): Promise => { >foo : (await: any) => Promise >async (await): Promise => {} : (await: any) => Promise diff --git a/tests/baselines/reference/asyncArrowFunction5_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction5_es5.errors.txt index 46dae75c2cea4..9d5b679d53bbc 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction5_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncArrowFunction5_es5.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts (1 errors) ==== +==== asyncArrowFunction5_es5.ts (1 errors) ==== var foo = async (await): Promise => { ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/asyncArrowFunction5_es5.js b/tests/baselines/reference/asyncArrowFunction5_es5.js index 073331f4bbc0e..395a3eebbc371 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es5.js +++ b/tests/baselines/reference/asyncArrowFunction5_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts] //// + //// [asyncArrowFunction5_es5.ts] var foo = async (await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction5_es5.symbols b/tests/baselines/reference/asyncArrowFunction5_es5.symbols index 757a80c283c3a..adb0eff473b15 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction5_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts] //// + +=== asyncArrowFunction5_es5.ts === var foo = async (await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction5_es5.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction5_es5.ts, 0, 17)) diff --git a/tests/baselines/reference/asyncArrowFunction5_es5.types b/tests/baselines/reference/asyncArrowFunction5_es5.types index c4bb0f1e21694..2337448458ee0 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es5.types +++ b/tests/baselines/reference/asyncArrowFunction5_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction5_es5.ts] //// + +=== asyncArrowFunction5_es5.ts === var foo = async (await): Promise => { >foo : (await: any) => Promise >async (await): Promise => {} : (await: any) => Promise diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt index f46b7cf418d3a..52f4f74fce63c 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncArrowFunction5_es6.ts(1,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts (1 errors) ==== +==== asyncArrowFunction5_es6.ts (1 errors) ==== var foo = async (await): Promise => { ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.js b/tests/baselines/reference/asyncArrowFunction5_es6.js index b9b30a0e49841..b42bc6709df62 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es6.js +++ b/tests/baselines/reference/asyncArrowFunction5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts] //// + //// [asyncArrowFunction5_es6.ts] var foo = async (await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.symbols b/tests/baselines/reference/asyncArrowFunction5_es6.symbols index 944fc8453ee9a..1e81feace5f3d 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts] //// + +=== asyncArrowFunction5_es6.ts === var foo = async (await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction5_es6.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction5_es6.ts, 0, 17)) diff --git a/tests/baselines/reference/asyncArrowFunction5_es6.types b/tests/baselines/reference/asyncArrowFunction5_es6.types index bc38b89b6ad74..bf5e28f7da731 100644 --- a/tests/baselines/reference/asyncArrowFunction5_es6.types +++ b/tests/baselines/reference/asyncArrowFunction5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts] //// + +=== asyncArrowFunction5_es6.ts === var foo = async (await): Promise => { >foo : (await: any) => Promise >async (await): Promise => {} : (await: any) => Promise diff --git a/tests/baselines/reference/asyncArrowFunction6_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction6_es2017.errors.txt index 9e35d990b1f39..70be6155b9cca 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction6_es2017.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts(1,27): error TS1109: Expression expected. +asyncArrowFunction6_es2017.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncArrowFunction6_es2017.ts(1,27): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts (2 errors) ==== +==== asyncArrowFunction6_es2017.ts (2 errors) ==== var foo = async (a = await): Promise => { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncArrowFunction6_es2017.js b/tests/baselines/reference/asyncArrowFunction6_es2017.js index 129460e868bd1..09d610694f293 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction6_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts] //// + //// [asyncArrowFunction6_es2017.ts] var foo = async (a = await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction6_es2017.symbols b/tests/baselines/reference/asyncArrowFunction6_es2017.symbols index 6a3865a76d202..b9b1c36f295c0 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction6_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts] //// + +=== asyncArrowFunction6_es2017.ts === var foo = async (a = await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction6_es2017.ts, 0, 3)) >a : Symbol(a, Decl(asyncArrowFunction6_es2017.ts, 0, 17)) diff --git a/tests/baselines/reference/asyncArrowFunction6_es2017.types b/tests/baselines/reference/asyncArrowFunction6_es2017.types index e6da9771b7423..eaf9979b44577 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction6_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction6_es2017.ts] //// + +=== asyncArrowFunction6_es2017.ts === var foo = async (a = await): Promise => { >foo : (a?: any) => Promise >async (a = await): Promise => {} : (a?: any) => Promise diff --git a/tests/baselines/reference/asyncArrowFunction6_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction6_es5.errors.txt index 9d0dbd748807a..1f4846d8df3c4 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction6_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts(1,27): error TS1109: Expression expected. +asyncArrowFunction6_es5.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncArrowFunction6_es5.ts(1,27): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts (2 errors) ==== +==== asyncArrowFunction6_es5.ts (2 errors) ==== var foo = async (a = await): Promise => { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncArrowFunction6_es5.js b/tests/baselines/reference/asyncArrowFunction6_es5.js index fe91930a1566c..80f48d6e47e85 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es5.js +++ b/tests/baselines/reference/asyncArrowFunction6_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts] //// + //// [asyncArrowFunction6_es5.ts] var foo = async (a = await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction6_es5.symbols b/tests/baselines/reference/asyncArrowFunction6_es5.symbols index f675827c431bc..164d2cfd84528 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction6_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts] //// + +=== asyncArrowFunction6_es5.ts === var foo = async (a = await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction6_es5.ts, 0, 3)) >a : Symbol(a, Decl(asyncArrowFunction6_es5.ts, 0, 17)) diff --git a/tests/baselines/reference/asyncArrowFunction6_es5.types b/tests/baselines/reference/asyncArrowFunction6_es5.types index 9b1ff5a8ecf84..a833db857f2cf 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es5.types +++ b/tests/baselines/reference/asyncArrowFunction6_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction6_es5.ts] //// + +=== asyncArrowFunction6_es5.ts === var foo = async (a = await): Promise => { >foo : (a?: any) => Promise >async (a = await): Promise => {} : (a?: any) => Promise diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt index 269fc60962f8f..a175d2a397c9e 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction6_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts(1,27): error TS1109: Expression expected. +asyncArrowFunction6_es6.ts(1,22): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncArrowFunction6_es6.ts(1,27): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts (2 errors) ==== +==== asyncArrowFunction6_es6.ts (2 errors) ==== var foo = async (a = await): Promise => { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.js b/tests/baselines/reference/asyncArrowFunction6_es6.js index 345764a688cf7..52726cebb0a87 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.js +++ b/tests/baselines/reference/asyncArrowFunction6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts] //// + //// [asyncArrowFunction6_es6.ts] var foo = async (a = await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.symbols b/tests/baselines/reference/asyncArrowFunction6_es6.symbols index c7a7900ae02df..f49f04ea76361 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts] //// + +=== asyncArrowFunction6_es6.ts === var foo = async (a = await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction6_es6.ts, 0, 3)) >a : Symbol(a, Decl(asyncArrowFunction6_es6.ts, 0, 17)) diff --git a/tests/baselines/reference/asyncArrowFunction6_es6.types b/tests/baselines/reference/asyncArrowFunction6_es6.types index 43f2914a353fd..8e4f1b8f32dcb 100644 --- a/tests/baselines/reference/asyncArrowFunction6_es6.types +++ b/tests/baselines/reference/asyncArrowFunction6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts] //// + +=== asyncArrowFunction6_es6.ts === var foo = async (a = await): Promise => { >foo : (a?: any) => Promise >async (a = await): Promise => {} : (a?: any) => Promise diff --git a/tests/baselines/reference/asyncArrowFunction7_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction7_es2017.errors.txt index 848ceb497f27f..bf687af4c8463 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction7_es2017.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts(3,29): error TS1109: Expression expected. +asyncArrowFunction7_es2017.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncArrowFunction7_es2017.ts(3,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts (2 errors) ==== +==== asyncArrowFunction7_es2017.ts (2 errors) ==== var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { diff --git a/tests/baselines/reference/asyncArrowFunction7_es2017.js b/tests/baselines/reference/asyncArrowFunction7_es2017.js index 05c78887561c9..5ed014d11f63a 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction7_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts] //// + //// [asyncArrowFunction7_es2017.ts] var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. diff --git a/tests/baselines/reference/asyncArrowFunction7_es2017.symbols b/tests/baselines/reference/asyncArrowFunction7_es2017.symbols index d6bf51f52f400..570b3f0dc170d 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction7_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts] //// + +=== asyncArrowFunction7_es2017.ts === var bar = async (): Promise => { >bar : Symbol(bar, Decl(asyncArrowFunction7_es2017.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction7_es2017.types b/tests/baselines/reference/asyncArrowFunction7_es2017.types index 233be1873b2ac..90075b16264b6 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction7_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction7_es2017.ts] //// + +=== asyncArrowFunction7_es2017.ts === var bar = async (): Promise => { >bar : () => Promise >async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { }} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction7_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction7_es5.errors.txt index 5d4f03cbc41b8..1a4faee91bd1d 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction7_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts(3,29): error TS1109: Expression expected. +asyncArrowFunction7_es5.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncArrowFunction7_es5.ts(3,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts (2 errors) ==== +==== asyncArrowFunction7_es5.ts (2 errors) ==== var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { diff --git a/tests/baselines/reference/asyncArrowFunction7_es5.js b/tests/baselines/reference/asyncArrowFunction7_es5.js index 6988d1d019a60..4bc3a52e1d391 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es5.js +++ b/tests/baselines/reference/asyncArrowFunction7_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts] //// + //// [asyncArrowFunction7_es5.ts] var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. diff --git a/tests/baselines/reference/asyncArrowFunction7_es5.symbols b/tests/baselines/reference/asyncArrowFunction7_es5.symbols index 2b309ec8e0b26..6843bc90b8ddc 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction7_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts] //// + +=== asyncArrowFunction7_es5.ts === var bar = async (): Promise => { >bar : Symbol(bar, Decl(asyncArrowFunction7_es5.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction7_es5.types b/tests/baselines/reference/asyncArrowFunction7_es5.types index e65f6c1646e21..b024f7e82083a 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es5.types +++ b/tests/baselines/reference/asyncArrowFunction7_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction7_es5.ts] //// + +=== asyncArrowFunction7_es5.ts === var bar = async (): Promise => { >bar : () => Promise >async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { }} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt index f37598985c72c..a6f62080ea7f8 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction7_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts(3,29): error TS1109: Expression expected. +asyncArrowFunction7_es6.ts(3,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncArrowFunction7_es6.ts(3,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts (2 errors) ==== +==== asyncArrowFunction7_es6.ts (2 errors) ==== var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.js b/tests/baselines/reference/asyncArrowFunction7_es6.js index 45d9cb3643a29..7e3182d9e2b48 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.js +++ b/tests/baselines/reference/asyncArrowFunction7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts] //// + //// [asyncArrowFunction7_es6.ts] var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.symbols b/tests/baselines/reference/asyncArrowFunction7_es6.symbols index fd1c2173a513d..df101fe46c404 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts] //// + +=== asyncArrowFunction7_es6.ts === var bar = async (): Promise => { >bar : Symbol(bar, Decl(asyncArrowFunction7_es6.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction7_es6.types b/tests/baselines/reference/asyncArrowFunction7_es6.types index 1ad05e652a816..8b9c91b9e478c 100644 --- a/tests/baselines/reference/asyncArrowFunction7_es6.types +++ b/tests/baselines/reference/asyncArrowFunction7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts] //// + +=== asyncArrowFunction7_es6.ts === var bar = async (): Promise => { >bar : () => Promise >async (): Promise => { // 'await' here is an identifier, and not an await expression. var foo = async (a = await): Promise => { }} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction8_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction8_es2017.errors.txt index d5fdfbef24d6a..8169ce607fe4b 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction8_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts(2,19): error TS1109: Expression expected. +asyncArrowFunction8_es2017.ts(2,19): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts (1 errors) ==== +==== asyncArrowFunction8_es2017.ts (1 errors) ==== var foo = async (): Promise => { var v = { [await]: foo } ~ diff --git a/tests/baselines/reference/asyncArrowFunction8_es2017.js b/tests/baselines/reference/asyncArrowFunction8_es2017.js index d5253c8b689ce..de63a0ece0d90 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction8_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts] //// + //// [asyncArrowFunction8_es2017.ts] var foo = async (): Promise => { var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncArrowFunction8_es2017.symbols b/tests/baselines/reference/asyncArrowFunction8_es2017.symbols index c7870ef873702..e4f7894318456 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction8_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts] //// + +=== asyncArrowFunction8_es2017.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction8_es2017.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction8_es2017.types b/tests/baselines/reference/asyncArrowFunction8_es2017.types index df476cab5c3db..e4d1d54fa6b5e 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction8_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction8_es2017.ts] //// + +=== asyncArrowFunction8_es2017.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => { var v = { [await]: foo }} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction8_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction8_es5.errors.txt index 620d0b5653b7c..47109bea85ff8 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction8_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts(2,19): error TS1109: Expression expected. +asyncArrowFunction8_es5.ts(2,19): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts (1 errors) ==== +==== asyncArrowFunction8_es5.ts (1 errors) ==== var foo = async (): Promise => { var v = { [await]: foo } ~ diff --git a/tests/baselines/reference/asyncArrowFunction8_es5.js b/tests/baselines/reference/asyncArrowFunction8_es5.js index aae263255b3d2..8d1c8f0cb0e17 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es5.js +++ b/tests/baselines/reference/asyncArrowFunction8_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts] //// + //// [asyncArrowFunction8_es5.ts] var foo = async (): Promise => { var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncArrowFunction8_es5.symbols b/tests/baselines/reference/asyncArrowFunction8_es5.symbols index c06d7e6c712a7..9eafcc8b60525 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction8_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts] //// + +=== asyncArrowFunction8_es5.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction8_es5.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction8_es5.types b/tests/baselines/reference/asyncArrowFunction8_es5.types index 05095f154fc8b..b91910b4fc2c2 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es5.types +++ b/tests/baselines/reference/asyncArrowFunction8_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction8_es5.ts] //// + +=== asyncArrowFunction8_es5.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => { var v = { [await]: foo }} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt index 7105311b06fca..021d5676033fe 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction8_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts(2,19): error TS1109: Expression expected. +asyncArrowFunction8_es6.ts(2,19): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts (1 errors) ==== +==== asyncArrowFunction8_es6.ts (1 errors) ==== var foo = async (): Promise => { var v = { [await]: foo } ~ diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.js b/tests/baselines/reference/asyncArrowFunction8_es6.js index 51ec4318c0a8a..951d39b867390 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.js +++ b/tests/baselines/reference/asyncArrowFunction8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts] //// + //// [asyncArrowFunction8_es6.ts] var foo = async (): Promise => { var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.symbols b/tests/baselines/reference/asyncArrowFunction8_es6.symbols index c04c0bc2fad4a..f406b40892f1e 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts] //// + +=== asyncArrowFunction8_es6.ts === var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction8_es6.ts, 0, 3)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncArrowFunction8_es6.types b/tests/baselines/reference/asyncArrowFunction8_es6.types index 89545c2fa84c3..84daabd559d02 100644 --- a/tests/baselines/reference/asyncArrowFunction8_es6.types +++ b/tests/baselines/reference/asyncArrowFunction8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts] //// + +=== asyncArrowFunction8_es6.ts === var foo = async (): Promise => { >foo : () => Promise >async (): Promise => { var v = { [await]: foo }} : () => Promise diff --git a/tests/baselines/reference/asyncArrowFunction9_es2017.errors.txt b/tests/baselines/reference/asyncArrowFunction9_es2017.errors.txt index afe4e610c1390..c94c30ef8584a 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es2017.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction9_es2017.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts(1,11): error TS2304: Cannot find name 'async'. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts(1,18): error TS2304: Cannot find name 'a'. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts(1,37): error TS1005: ',' expected. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts(1,46): error TS1005: ',' expected. -tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts(1,53): error TS1109: Expression expected. +asyncArrowFunction9_es2017.ts(1,11): error TS2304: Cannot find name 'async'. +asyncArrowFunction9_es2017.ts(1,18): error TS2304: Cannot find name 'a'. +asyncArrowFunction9_es2017.ts(1,37): error TS1005: ',' expected. +asyncArrowFunction9_es2017.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. +asyncArrowFunction9_es2017.ts(1,46): error TS1005: ',' expected. +asyncArrowFunction9_es2017.ts(1,53): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts (6 errors) ==== +==== asyncArrowFunction9_es2017.ts (6 errors) ==== var foo = async (a = await => await): Promise => { ~~~~~ !!! error TS2304: Cannot find name 'async'. @@ -16,7 +16,7 @@ tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es20 !!! error TS1005: ',' expected. ~~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. -!!! related TS6203 /.ts/lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here. +!!! related TS6203 lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here. ~ !!! error TS1005: ',' expected. ~~ diff --git a/tests/baselines/reference/asyncArrowFunction9_es2017.js b/tests/baselines/reference/asyncArrowFunction9_es2017.js index a101892eb1622..3f2cc6c9f69a7 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es2017.js +++ b/tests/baselines/reference/asyncArrowFunction9_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts] //// + //// [asyncArrowFunction9_es2017.ts] var foo = async (a = await => await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction9_es2017.symbols b/tests/baselines/reference/asyncArrowFunction9_es2017.symbols index be1a3e3d4ffcc..105f73549ec01 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunction9_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts] //// + +=== asyncArrowFunction9_es2017.ts === var foo = async (a = await => await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction9_es2017.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction9_es2017.ts, 0, 20)) diff --git a/tests/baselines/reference/asyncArrowFunction9_es2017.types b/tests/baselines/reference/asyncArrowFunction9_es2017.types index 48a296430167e..27735809b0645 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es2017.types +++ b/tests/baselines/reference/asyncArrowFunction9_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es2017.ts] //// + +=== asyncArrowFunction9_es2017.ts === var foo = async (a = await => await): Promise => { >foo : any >async (a = await => await) : any diff --git a/tests/baselines/reference/asyncArrowFunction9_es5.errors.txt b/tests/baselines/reference/asyncArrowFunction9_es5.errors.txt index 8761a65bbdef2..a1a1c9691c9dd 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction9_es5.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(1,11): error TS2304: Cannot find name 'async'. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(1,18): error TS2304: Cannot find name 'a'. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(1,37): error TS1005: ',' expected. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(1,46): error TS1005: ',' expected. -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(1,53): error TS1109: Expression expected. +asyncArrowFunction9_es5.ts(1,11): error TS2304: Cannot find name 'async'. +asyncArrowFunction9_es5.ts(1,18): error TS2304: Cannot find name 'a'. +asyncArrowFunction9_es5.ts(1,37): error TS1005: ',' expected. +asyncArrowFunction9_es5.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. +asyncArrowFunction9_es5.ts(1,46): error TS1005: ',' expected. +asyncArrowFunction9_es5.ts(1,53): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts (6 errors) ==== +==== asyncArrowFunction9_es5.ts (6 errors) ==== var foo = async (a = await => await): Promise => { ~~~~~ !!! error TS2304: Cannot find name 'async'. @@ -16,7 +16,7 @@ tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts( !!! error TS1005: ',' expected. ~~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. -!!! related TS6203 /.ts/lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here. +!!! related TS6203 lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here. ~ !!! error TS1005: ',' expected. ~~ diff --git a/tests/baselines/reference/asyncArrowFunction9_es5.js b/tests/baselines/reference/asyncArrowFunction9_es5.js index 457d5ddc4c4d7..8128f216ddcd6 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es5.js +++ b/tests/baselines/reference/asyncArrowFunction9_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts] //// + //// [asyncArrowFunction9_es5.ts] var foo = async (a = await => await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction9_es5.symbols b/tests/baselines/reference/asyncArrowFunction9_es5.symbols index 4eddf75c635f9..80756aada3c55 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunction9_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts] //// + +=== asyncArrowFunction9_es5.ts === var foo = async (a = await => await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction9_es5.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction9_es5.ts, 0, 20)) diff --git a/tests/baselines/reference/asyncArrowFunction9_es5.types b/tests/baselines/reference/asyncArrowFunction9_es5.types index 43f685a4e48e5..5634cad631c73 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es5.types +++ b/tests/baselines/reference/asyncArrowFunction9_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts] //// + +=== asyncArrowFunction9_es5.ts === var foo = async (a = await => await): Promise => { >foo : any >async (a = await => await) : any diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt index db51774a43e35..bf744661029d4 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction9_es6.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,11): error TS2304: Cannot find name 'async'. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,18): error TS2304: Cannot find name 'a'. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,37): error TS1005: ',' expected. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,46): error TS1005: ',' expected. -tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(1,53): error TS1109: Expression expected. +asyncArrowFunction9_es6.ts(1,11): error TS2304: Cannot find name 'async'. +asyncArrowFunction9_es6.ts(1,18): error TS2304: Cannot find name 'a'. +asyncArrowFunction9_es6.ts(1,37): error TS1005: ',' expected. +asyncArrowFunction9_es6.ts(1,39): error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. +asyncArrowFunction9_es6.ts(1,46): error TS1005: ',' expected. +asyncArrowFunction9_es6.ts(1,53): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts (6 errors) ==== +==== asyncArrowFunction9_es6.ts (6 errors) ==== var foo = async (a = await => await): Promise => { ~~~~~ !!! error TS2304: Cannot find name 'async'. @@ -16,7 +16,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts( !!! error TS1005: ',' expected. ~~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'. -!!! related TS6203 /.ts/lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here. +!!! related TS6203 lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here. ~ !!! error TS1005: ',' expected. ~~ diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.js b/tests/baselines/reference/asyncArrowFunction9_es6.js index d7d5a16758367..a9341bfb68cac 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.js +++ b/tests/baselines/reference/asyncArrowFunction9_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts] //// + //// [asyncArrowFunction9_es6.ts] var foo = async (a = await => await): Promise => { } diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.symbols b/tests/baselines/reference/asyncArrowFunction9_es6.symbols index 029ab5b1c3968..4a4d352d86384 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction9_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts] //// + +=== asyncArrowFunction9_es6.ts === var foo = async (a = await => await): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction9_es6.ts, 0, 3)) >await : Symbol(await, Decl(asyncArrowFunction9_es6.ts, 0, 20)) diff --git a/tests/baselines/reference/asyncArrowFunction9_es6.types b/tests/baselines/reference/asyncArrowFunction9_es6.types index 8bfa14b4ff538..58e45a77230d9 100644 --- a/tests/baselines/reference/asyncArrowFunction9_es6.types +++ b/tests/baselines/reference/asyncArrowFunction9_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts] //// + +=== asyncArrowFunction9_es6.ts === var foo = async (a = await => await): Promise => { >foo : any >async (a = await => await) : any diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.js index f7f813ad50230..55a9decaf245c 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es2017.ts] //// + //// [asyncArrowFunctionCapturesArguments_es2017.ts] class C { method() { diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.symbols index ccd9b48e400e5..4425e8bc28d96 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es2017.ts] //// + +=== asyncArrowFunctionCapturesArguments_es2017.ts === class C { >C : Symbol(C, Decl(asyncArrowFunctionCapturesArguments_es2017.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types index a7a80424e1977..452f1a7132a03 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es2017.ts] //// + +=== asyncArrowFunctionCapturesArguments_es2017.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.errors.txt b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.errors.txt index e0a1ef45e8c9f..840822005b8f0 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.errors.txt +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts(4,52): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression. +asyncArrowFunctionCapturesArguments_es5.ts(4,52): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression. -==== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts (1 errors) ==== +==== asyncArrowFunctionCapturesArguments_es5.ts (1 errors) ==== class C { method() { function other() {} diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.js index f9937c0dd6336..4ff229a21149e 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts] //// + //// [asyncArrowFunctionCapturesArguments_es5.ts] class C { method() { diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.symbols index bbfafadc6bfd4..4c7ec6afe1296 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts] //// + +=== asyncArrowFunctionCapturesArguments_es5.ts === class C { >C : Symbol(C, Decl(asyncArrowFunctionCapturesArguments_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types index 6eaff62c0bf96..20a9044c041db 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es5.ts] //// + +=== asyncArrowFunctionCapturesArguments_es5.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js index ca79eed6c8eb0..5fffa66d65eba 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts] //// + //// [asyncArrowFunctionCapturesArguments_es6.ts] class C { method() { diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols index 4b312fd464633..1a1c7f7e35058 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts] //// + +=== asyncArrowFunctionCapturesArguments_es6.ts === class C { >C : Symbol(C, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types index bb9df9af139dd..bb38f6f43c34d 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts] //// + +=== asyncArrowFunctionCapturesArguments_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.js index 13560557ffef0..92b716f2ec4a4 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesThis_es2017.ts] //// + //// [asyncArrowFunctionCapturesThis_es2017.ts] class C { method() { diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.symbols index bc14bafa0c5e6..7e4b2d63303ab 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesThis_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesThis_es2017.ts] //// + +=== asyncArrowFunctionCapturesThis_es2017.ts === class C { >C : Symbol(C, Decl(asyncArrowFunctionCapturesThis_es2017.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types index 57f59302bb5bc..0f906e4561caa 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesThis_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunctionCapturesThis_es2017.ts] //// + +=== asyncArrowFunctionCapturesThis_es2017.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.js index e475cbb1e3aaa..4d275a70215f0 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesThis_es5.ts] //// + //// [asyncArrowFunctionCapturesThis_es5.ts] class C { method() { diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.symbols index c041583989129..bc6bb2b9353fb 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesThis_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesThis_es5.ts] //// + +=== asyncArrowFunctionCapturesThis_es5.ts === class C { >C : Symbol(C, Decl(asyncArrowFunctionCapturesThis_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types index da378ee2718f9..e2c8adf8f269a 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesThis_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunctionCapturesThis_es5.ts] //// + +=== asyncArrowFunctionCapturesThis_es5.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js index de7eb23ed7811..1dd42adfc0339 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts] //// + //// [asyncArrowFunctionCapturesThis_es6.ts] class C { method() { diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols index 172937526729b..5a007f5e37e2c 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts] //// + +=== asyncArrowFunctionCapturesThis_es6.ts === class C { >C : Symbol(C, Decl(asyncArrowFunctionCapturesThis_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types index 5386a956ada9a..bc04e8910be6e 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types +++ b/tests/baselines/reference/asyncArrowFunctionCapturesThis_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts] //// + +=== asyncArrowFunctionCapturesThis_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncArrowFunction_allowJs.errors.txt b/tests/baselines/reference/asyncArrowFunction_allowJs.errors.txt index 632b50f703e54..417262fef3410 100644 --- a/tests/baselines/reference/asyncArrowFunction_allowJs.errors.txt +++ b/tests/baselines/reference/asyncArrowFunction_allowJs.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(3,17): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(6,24): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(7,23): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(10,24): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(12,2): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/async/es2017/asyncArrowFunction/file.js(19,3): error TS2345: Argument of type '() => Promise' is not assignable to parameter of type '() => string'. +file.js(3,17): error TS2322: Type 'number' is not assignable to type 'string'. +file.js(6,24): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +file.js(7,23): error TS2322: Type 'number' is not assignable to type 'string'. +file.js(10,24): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +file.js(12,2): error TS2322: Type 'number' is not assignable to type 'string'. +file.js(19,3): error TS2345: Argument of type '() => Promise' is not assignable to parameter of type '() => string'. Type 'Promise' is not assignable to type 'string'. -==== tests/cases/conformance/async/es2017/asyncArrowFunction/file.js (6 errors) ==== +==== file.js (6 errors) ==== // Error (good) /** @type {function(): string} */ const a = () => 0 diff --git a/tests/baselines/reference/asyncArrowFunction_allowJs.symbols b/tests/baselines/reference/asyncArrowFunction_allowJs.symbols index 929831b6f8afd..6cb66a2b9e6b2 100644 --- a/tests/baselines/reference/asyncArrowFunction_allowJs.symbols +++ b/tests/baselines/reference/asyncArrowFunction_allowJs.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/file.js === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction_allowJs.ts] //// + +=== file.js === // Error (good) /** @type {function(): string} */ const a = () => 0 diff --git a/tests/baselines/reference/asyncArrowFunction_allowJs.types b/tests/baselines/reference/asyncArrowFunction_allowJs.types index f0c6059cf21c7..0acd57abc8f56 100644 --- a/tests/baselines/reference/asyncArrowFunction_allowJs.types +++ b/tests/baselines/reference/asyncArrowFunction_allowJs.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/file.js === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction_allowJs.ts] //// + +=== file.js === // Error (good) /** @type {function(): string} */ const a = () => 0 diff --git a/tests/baselines/reference/asyncArrowInClassES5.js b/tests/baselines/reference/asyncArrowInClassES5.js index 08d9e0fe46e3d..d844b4310a8f8 100644 --- a/tests/baselines/reference/asyncArrowInClassES5.js +++ b/tests/baselines/reference/asyncArrowInClassES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncArrowInClassES5.ts] //// + //// [asyncArrowInClassES5.ts] // https://github.com/Microsoft/TypeScript/issues/16924 // Should capture `this` diff --git a/tests/baselines/reference/asyncArrowInClassES5.symbols b/tests/baselines/reference/asyncArrowInClassES5.symbols index a6cc9f75d6e3a..853677404a591 100644 --- a/tests/baselines/reference/asyncArrowInClassES5.symbols +++ b/tests/baselines/reference/asyncArrowInClassES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncArrowInClassES5.ts === +//// [tests/cases/compiler/asyncArrowInClassES5.ts] //// + +=== asyncArrowInClassES5.ts === // https://github.com/Microsoft/TypeScript/issues/16924 // Should capture `this` diff --git a/tests/baselines/reference/asyncArrowInClassES5.types b/tests/baselines/reference/asyncArrowInClassES5.types index 8da6d5d2eaf26..a0582cea978a8 100644 --- a/tests/baselines/reference/asyncArrowInClassES5.types +++ b/tests/baselines/reference/asyncArrowInClassES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncArrowInClassES5.ts === +//// [tests/cases/compiler/asyncArrowInClassES5.ts] //// + +=== asyncArrowInClassES5.ts === // https://github.com/Microsoft/TypeScript/issues/16924 // Should capture `this` diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt index 2485b1bda29c6..d31f2dc0c77fc 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt @@ -1,7 +1,7 @@ -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 'nodenext', or to add aliases to the 'paths' option? +asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts (1 errors) ==== +==== asyncAwaitIsolatedModules_es2017.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ !!! error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.js index 520d659c3f740..15dd3b1fc5c73 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts] //// + //// [asyncAwaitIsolatedModules_es2017.ts] import { MyPromise } from "missing"; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.symbols b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.symbols index d527bd69c4241..d3aa3f8d8f5fa 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.symbols +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts] //// + +=== asyncAwaitIsolatedModules_es2017.ts === import { MyPromise } from "missing"; >MyPromise : Symbol(MyPromise, Decl(asyncAwaitIsolatedModules_es2017.ts, 0, 8)) diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.types b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.types index c14b65535258c..5d0aaec063eea 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.types +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts] //// + +=== asyncAwaitIsolatedModules_es2017.ts === import { MyPromise } from "missing"; >MyPromise : any diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt index da84692b5326d..db8a11aa8690b 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. +asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. -==== tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts (1 errors) ==== +==== asyncAwaitIsolatedModules_es5.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ !!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js index 669af6e09ee6d..7c763f9ecf8ab 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts] //// + //// [asyncAwaitIsolatedModules_es5.ts] import { MyPromise } from "missing"; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.symbols b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.symbols index 8d3759aa5fa60..1d3dbd4f99ac5 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.symbols +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts] //// + +=== asyncAwaitIsolatedModules_es5.ts === import { MyPromise } from "missing"; >MyPromise : Symbol(MyPromise, Decl(asyncAwaitIsolatedModules_es5.ts, 0, 8)) diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.types b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.types index f4e9d55d40761..91aa642d20108 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.types +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts] //// + +=== asyncAwaitIsolatedModules_es5.ts === import { MyPromise } from "missing"; >MyPromise : any diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt index 270aabb9d5a79..9ee15a6cc8b1b 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt @@ -1,7 +1,7 @@ -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 'nodenext', or to add aliases to the 'paths' option? +asyncAwaitIsolatedModules_es6.ts(1,27): error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts (1 errors) ==== +==== asyncAwaitIsolatedModules_es6.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ !!! error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js index 81eb137f28bae..2e43b649fad6c 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts] //// + //// [asyncAwaitIsolatedModules_es6.ts] import { MyPromise } from "missing"; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.symbols b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.symbols index 93af9beff736f..88fd33ca0d127 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.symbols +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts === +//// [tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts] //// + +=== asyncAwaitIsolatedModules_es6.ts === import { MyPromise } from "missing"; >MyPromise : Symbol(MyPromise, Decl(asyncAwaitIsolatedModules_es6.ts, 0, 8)) diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.types b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.types index f412bdb40ec72..4dde03456f3dd 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.types +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts === +//// [tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts] //// + +=== asyncAwaitIsolatedModules_es6.ts === import { MyPromise } from "missing"; >MyPromise : any diff --git a/tests/baselines/reference/asyncAwaitNestedClasses_es5.js b/tests/baselines/reference/asyncAwaitNestedClasses_es5.js index f72dda7bec2af..01404f9e6a65f 100644 --- a/tests/baselines/reference/asyncAwaitNestedClasses_es5.js +++ b/tests/baselines/reference/asyncAwaitNestedClasses_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts] //// + //// [asyncAwaitNestedClasses_es5.ts] // https://github.com/Microsoft/TypeScript/issues/20744 class A { diff --git a/tests/baselines/reference/asyncAwaitNestedClasses_es5.symbols b/tests/baselines/reference/asyncAwaitNestedClasses_es5.symbols index 59259fb57136f..e8843e94ccfe9 100644 --- a/tests/baselines/reference/asyncAwaitNestedClasses_es5.symbols +++ b/tests/baselines/reference/asyncAwaitNestedClasses_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts] //// + +=== asyncAwaitNestedClasses_es5.ts === // https://github.com/Microsoft/TypeScript/issues/20744 class A { >A : Symbol(A, Decl(asyncAwaitNestedClasses_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncAwaitNestedClasses_es5.types b/tests/baselines/reference/asyncAwaitNestedClasses_es5.types index e2ebf8ffff715..097e9ea3425c8 100644 --- a/tests/baselines/reference/asyncAwaitNestedClasses_es5.types +++ b/tests/baselines/reference/asyncAwaitNestedClasses_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts] //// + +=== asyncAwaitNestedClasses_es5.ts === // https://github.com/Microsoft/TypeScript/issues/20744 class A { >A : A diff --git a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js index 259e6309449e1..fc8ef4ee2503f 100644 --- a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js +++ b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncAwaitWithCapturedBlockScopeVar.ts] //// + //// [asyncAwaitWithCapturedBlockScopeVar.ts] async function fn1() { let ar = []; diff --git a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.symbols b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.symbols index e169025ee3853..ac495b0ee54e4 100644 --- a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.symbols +++ b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncAwaitWithCapturedBlockScopeVar.ts === +//// [tests/cases/compiler/asyncAwaitWithCapturedBlockScopeVar.ts] //// + +=== asyncAwaitWithCapturedBlockScopeVar.ts === async function fn1() { >fn1 : Symbol(fn1, Decl(asyncAwaitWithCapturedBlockScopeVar.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.types b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.types index 865fe3550b04a..fcba2ee05b71a 100644 --- a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.types +++ b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncAwaitWithCapturedBlockScopeVar.ts === +//// [tests/cases/compiler/asyncAwaitWithCapturedBlockScopeVar.ts] //// + +=== asyncAwaitWithCapturedBlockScopeVar.ts === async function fn1() { >fn1 : () => Promise diff --git a/tests/baselines/reference/asyncAwait_es2017.js b/tests/baselines/reference/asyncAwait_es2017.js index 70a4c63be2e12..1bf1893e0a922 100644 --- a/tests/baselines/reference/asyncAwait_es2017.js +++ b/tests/baselines/reference/asyncAwait_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncAwait_es2017.ts] //// + //// [asyncAwait_es2017.ts] type MyPromise = Promise; declare var MyPromise: typeof Promise; diff --git a/tests/baselines/reference/asyncAwait_es2017.symbols b/tests/baselines/reference/asyncAwait_es2017.symbols index f0481fa39922e..6e9ce1fc21468 100644 --- a/tests/baselines/reference/asyncAwait_es2017.symbols +++ b/tests/baselines/reference/asyncAwait_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncAwait_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncAwait_es2017.ts] //// + +=== asyncAwait_es2017.ts === type MyPromise = Promise; >MyPromise : Symbol(MyPromise, Decl(asyncAwait_es2017.ts, 0, 0), Decl(asyncAwait_es2017.ts, 1, 11)) >T : Symbol(T, Decl(asyncAwait_es2017.ts, 0, 15)) diff --git a/tests/baselines/reference/asyncAwait_es2017.types b/tests/baselines/reference/asyncAwait_es2017.types index c3fecf0f7c8cc..c50a2c6fef6da 100644 --- a/tests/baselines/reference/asyncAwait_es2017.types +++ b/tests/baselines/reference/asyncAwait_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncAwait_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncAwait_es2017.ts] //// + +=== asyncAwait_es2017.ts === type MyPromise = Promise; >MyPromise : MyPromise diff --git a/tests/baselines/reference/asyncAwait_es5.js b/tests/baselines/reference/asyncAwait_es5.js index 0be5df06a9dc5..2fd12346bb883 100644 --- a/tests/baselines/reference/asyncAwait_es5.js +++ b/tests/baselines/reference/asyncAwait_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncAwait_es5.ts] //// + //// [asyncAwait_es5.ts] type MyPromise = Promise; declare var MyPromise: typeof Promise; diff --git a/tests/baselines/reference/asyncAwait_es5.symbols b/tests/baselines/reference/asyncAwait_es5.symbols index 19325dd0eca2e..997e0b0bc096b 100644 --- a/tests/baselines/reference/asyncAwait_es5.symbols +++ b/tests/baselines/reference/asyncAwait_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAwait_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAwait_es5.ts] //// + +=== asyncAwait_es5.ts === type MyPromise = Promise; >MyPromise : Symbol(MyPromise, Decl(asyncAwait_es5.ts, 0, 0), Decl(asyncAwait_es5.ts, 1, 11)) >T : Symbol(T, Decl(asyncAwait_es5.ts, 0, 15)) diff --git a/tests/baselines/reference/asyncAwait_es5.types b/tests/baselines/reference/asyncAwait_es5.types index be62067c30181..818045078feb3 100644 --- a/tests/baselines/reference/asyncAwait_es5.types +++ b/tests/baselines/reference/asyncAwait_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncAwait_es5.ts === +//// [tests/cases/conformance/async/es5/asyncAwait_es5.ts] //// + +=== asyncAwait_es5.ts === type MyPromise = Promise; >MyPromise : MyPromise diff --git a/tests/baselines/reference/asyncAwait_es6.js b/tests/baselines/reference/asyncAwait_es6.js index caab72bad9a99..5b18e3224a7d3 100644 --- a/tests/baselines/reference/asyncAwait_es6.js +++ b/tests/baselines/reference/asyncAwait_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncAwait_es6.ts] //// + //// [asyncAwait_es6.ts] type MyPromise = Promise; declare var MyPromise: typeof Promise; diff --git a/tests/baselines/reference/asyncAwait_es6.symbols b/tests/baselines/reference/asyncAwait_es6.symbols index fcbd69ea2f243..18f303a2da679 100644 --- a/tests/baselines/reference/asyncAwait_es6.symbols +++ b/tests/baselines/reference/asyncAwait_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncAwait_es6.ts === +//// [tests/cases/conformance/async/es6/asyncAwait_es6.ts] //// + +=== asyncAwait_es6.ts === type MyPromise = Promise; >MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) >T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15)) diff --git a/tests/baselines/reference/asyncAwait_es6.types b/tests/baselines/reference/asyncAwait_es6.types index 3933b9ce7daad..d9c6ea1df2efe 100644 --- a/tests/baselines/reference/asyncAwait_es6.types +++ b/tests/baselines/reference/asyncAwait_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncAwait_es6.ts === +//// [tests/cases/conformance/async/es6/asyncAwait_es6.ts] //// + +=== asyncAwait_es6.ts === type MyPromise = Promise; >MyPromise : MyPromise diff --git a/tests/baselines/reference/asyncClass_es5.errors.txt b/tests/baselines/reference/asyncClass_es5.errors.txt index e8f4efd4f07eb..214f940474879 100644 --- a/tests/baselines/reference/asyncClass_es5.errors.txt +++ b/tests/baselines/reference/asyncClass_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncClass_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncClass_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es5/asyncClass_es5.ts (1 errors) ==== +==== asyncClass_es5.ts (1 errors) ==== async class C { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncClass_es5.js b/tests/baselines/reference/asyncClass_es5.js index 9989e0ef3d7eb..98230308f700b 100644 --- a/tests/baselines/reference/asyncClass_es5.js +++ b/tests/baselines/reference/asyncClass_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncClass_es5.ts] //// + //// [asyncClass_es5.ts] async class C { } diff --git a/tests/baselines/reference/asyncClass_es5.symbols b/tests/baselines/reference/asyncClass_es5.symbols index f8f1ae8a06783..544c310e0e667 100644 --- a/tests/baselines/reference/asyncClass_es5.symbols +++ b/tests/baselines/reference/asyncClass_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncClass_es5.ts === +//// [tests/cases/conformance/async/es5/asyncClass_es5.ts] //// + +=== asyncClass_es5.ts === async class C { >C : Symbol(C, Decl(asyncClass_es5.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncClass_es5.types b/tests/baselines/reference/asyncClass_es5.types index 9d3a2d1453b32..d7cc0a45a8d6e 100644 --- a/tests/baselines/reference/asyncClass_es5.types +++ b/tests/baselines/reference/asyncClass_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncClass_es5.ts === +//// [tests/cases/conformance/async/es5/asyncClass_es5.ts] //// + +=== asyncClass_es5.ts === async class C { >C : C } diff --git a/tests/baselines/reference/asyncClass_es6.errors.txt b/tests/baselines/reference/asyncClass_es6.errors.txt index ee8a3a85dbc80..12c4f640b6210 100644 --- a/tests/baselines/reference/asyncClass_es6.errors.txt +++ b/tests/baselines/reference/asyncClass_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncClass_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncClass_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es6/asyncClass_es6.ts (1 errors) ==== +==== asyncClass_es6.ts (1 errors) ==== async class C { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncClass_es6.js b/tests/baselines/reference/asyncClass_es6.js index b5e1498f70c3f..505e8f45758dd 100644 --- a/tests/baselines/reference/asyncClass_es6.js +++ b/tests/baselines/reference/asyncClass_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncClass_es6.ts] //// + //// [asyncClass_es6.ts] async class C { } diff --git a/tests/baselines/reference/asyncClass_es6.symbols b/tests/baselines/reference/asyncClass_es6.symbols index a268c0f83510d..83f0dd49200f8 100644 --- a/tests/baselines/reference/asyncClass_es6.symbols +++ b/tests/baselines/reference/asyncClass_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncClass_es6.ts === +//// [tests/cases/conformance/async/es6/asyncClass_es6.ts] //// + +=== asyncClass_es6.ts === async class C { >C : Symbol(C, Decl(asyncClass_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncClass_es6.types b/tests/baselines/reference/asyncClass_es6.types index 1136f3f8210e3..b0ad6f8db5e2a 100644 --- a/tests/baselines/reference/asyncClass_es6.types +++ b/tests/baselines/reference/asyncClass_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncClass_es6.ts === +//// [tests/cases/conformance/async/es6/asyncClass_es6.ts] //// + +=== asyncClass_es6.ts === async class C { >C : C } diff --git a/tests/baselines/reference/asyncConstructor_es5.errors.txt b/tests/baselines/reference/asyncConstructor_es5.errors.txt index c24bf87ae67ff..5b56f8c1d8892 100644 --- a/tests/baselines/reference/asyncConstructor_es5.errors.txt +++ b/tests/baselines/reference/asyncConstructor_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncConstructor_es5.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration. +asyncConstructor_es5.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration. -==== tests/cases/conformance/async/es5/asyncConstructor_es5.ts (1 errors) ==== +==== asyncConstructor_es5.ts (1 errors) ==== class C { async constructor() { ~~~~~ diff --git a/tests/baselines/reference/asyncConstructor_es5.js b/tests/baselines/reference/asyncConstructor_es5.js index df48dbd634889..ad26e50f1ba3b 100644 --- a/tests/baselines/reference/asyncConstructor_es5.js +++ b/tests/baselines/reference/asyncConstructor_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncConstructor_es5.ts] //// + //// [asyncConstructor_es5.ts] class C { async constructor() { diff --git a/tests/baselines/reference/asyncConstructor_es5.symbols b/tests/baselines/reference/asyncConstructor_es5.symbols index 3895d80e0771d..131640ebb9364 100644 --- a/tests/baselines/reference/asyncConstructor_es5.symbols +++ b/tests/baselines/reference/asyncConstructor_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncConstructor_es5.ts === +//// [tests/cases/conformance/async/es5/asyncConstructor_es5.ts] //// + +=== asyncConstructor_es5.ts === class C { >C : Symbol(C, Decl(asyncConstructor_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncConstructor_es5.types b/tests/baselines/reference/asyncConstructor_es5.types index a7847ee6968a3..aaec66ad86f35 100644 --- a/tests/baselines/reference/asyncConstructor_es5.types +++ b/tests/baselines/reference/asyncConstructor_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncConstructor_es5.ts === +//// [tests/cases/conformance/async/es5/asyncConstructor_es5.ts] //// + +=== asyncConstructor_es5.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncConstructor_es6.errors.txt b/tests/baselines/reference/asyncConstructor_es6.errors.txt index 6eb18cf41a199..4cced2cee0686 100644 --- a/tests/baselines/reference/asyncConstructor_es6.errors.txt +++ b/tests/baselines/reference/asyncConstructor_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncConstructor_es6.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration. +asyncConstructor_es6.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration. -==== tests/cases/conformance/async/es6/asyncConstructor_es6.ts (1 errors) ==== +==== asyncConstructor_es6.ts (1 errors) ==== class C { async constructor() { ~~~~~ diff --git a/tests/baselines/reference/asyncConstructor_es6.js b/tests/baselines/reference/asyncConstructor_es6.js index a0cfa7709dfa4..c5797911bf022 100644 --- a/tests/baselines/reference/asyncConstructor_es6.js +++ b/tests/baselines/reference/asyncConstructor_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncConstructor_es6.ts] //// + //// [asyncConstructor_es6.ts] class C { async constructor() { diff --git a/tests/baselines/reference/asyncConstructor_es6.symbols b/tests/baselines/reference/asyncConstructor_es6.symbols index 82fdcf33e1eb6..9202dc8d3bdec 100644 --- a/tests/baselines/reference/asyncConstructor_es6.symbols +++ b/tests/baselines/reference/asyncConstructor_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncConstructor_es6.ts === +//// [tests/cases/conformance/async/es6/asyncConstructor_es6.ts] //// + +=== asyncConstructor_es6.ts === class C { >C : Symbol(C, Decl(asyncConstructor_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncConstructor_es6.types b/tests/baselines/reference/asyncConstructor_es6.types index cff36dbcb4059..9a45224aaf199 100644 --- a/tests/baselines/reference/asyncConstructor_es6.types +++ b/tests/baselines/reference/asyncConstructor_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncConstructor_es6.ts === +//// [tests/cases/conformance/async/es6/asyncConstructor_es6.ts] //// + +=== asyncConstructor_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncDeclare_es5.errors.txt b/tests/baselines/reference/asyncDeclare_es5.errors.txt index bfa467acca219..3aeac405b6f78 100644 --- a/tests/baselines/reference/asyncDeclare_es5.errors.txt +++ b/tests/baselines/reference/asyncDeclare_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncDeclare_es5.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context. +asyncDeclare_es5.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context. -==== tests/cases/conformance/async/es5/asyncDeclare_es5.ts (1 errors) ==== +==== asyncDeclare_es5.ts (1 errors) ==== declare async function foo(): Promise; ~~~~~ !!! error TS1040: 'async' modifier cannot be used in an ambient context. \ No newline at end of file diff --git a/tests/baselines/reference/asyncDeclare_es5.js b/tests/baselines/reference/asyncDeclare_es5.js index 80ee6017ad596..ee2b01033a50f 100644 --- a/tests/baselines/reference/asyncDeclare_es5.js +++ b/tests/baselines/reference/asyncDeclare_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncDeclare_es5.ts] //// + //// [asyncDeclare_es5.ts] declare async function foo(): Promise; diff --git a/tests/baselines/reference/asyncDeclare_es5.symbols b/tests/baselines/reference/asyncDeclare_es5.symbols index 30eeedbe8aa72..3b42f02b274ef 100644 --- a/tests/baselines/reference/asyncDeclare_es5.symbols +++ b/tests/baselines/reference/asyncDeclare_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncDeclare_es5.ts === +//// [tests/cases/conformance/async/es5/asyncDeclare_es5.ts] //// + +=== asyncDeclare_es5.ts === declare async function foo(): Promise; >foo : Symbol(foo, Decl(asyncDeclare_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncDeclare_es5.types b/tests/baselines/reference/asyncDeclare_es5.types index 6329d72ec7d94..44b53c7d8d53c 100644 --- a/tests/baselines/reference/asyncDeclare_es5.types +++ b/tests/baselines/reference/asyncDeclare_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncDeclare_es5.ts === +//// [tests/cases/conformance/async/es5/asyncDeclare_es5.ts] //// + +=== asyncDeclare_es5.ts === declare async function foo(): Promise; >foo : () => Promise diff --git a/tests/baselines/reference/asyncDeclare_es6.errors.txt b/tests/baselines/reference/asyncDeclare_es6.errors.txt index 65a4068e140e7..620963ba553c9 100644 --- a/tests/baselines/reference/asyncDeclare_es6.errors.txt +++ b/tests/baselines/reference/asyncDeclare_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncDeclare_es6.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context. +asyncDeclare_es6.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context. -==== tests/cases/conformance/async/es6/asyncDeclare_es6.ts (1 errors) ==== +==== asyncDeclare_es6.ts (1 errors) ==== declare async function foo(): Promise; ~~~~~ !!! error TS1040: 'async' modifier cannot be used in an ambient context. \ No newline at end of file diff --git a/tests/baselines/reference/asyncDeclare_es6.js b/tests/baselines/reference/asyncDeclare_es6.js index 096f43a248a16..1c1078c0f6bbe 100644 --- a/tests/baselines/reference/asyncDeclare_es6.js +++ b/tests/baselines/reference/asyncDeclare_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncDeclare_es6.ts] //// + //// [asyncDeclare_es6.ts] declare async function foo(): Promise; diff --git a/tests/baselines/reference/asyncDeclare_es6.symbols b/tests/baselines/reference/asyncDeclare_es6.symbols index 6d5fd2088dab6..aee92e49d985a 100644 --- a/tests/baselines/reference/asyncDeclare_es6.symbols +++ b/tests/baselines/reference/asyncDeclare_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncDeclare_es6.ts === +//// [tests/cases/conformance/async/es6/asyncDeclare_es6.ts] //// + +=== asyncDeclare_es6.ts === declare async function foo(): Promise; >foo : Symbol(foo, Decl(asyncDeclare_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncDeclare_es6.types b/tests/baselines/reference/asyncDeclare_es6.types index 384240cd1c90d..2550649c943b8 100644 --- a/tests/baselines/reference/asyncDeclare_es6.types +++ b/tests/baselines/reference/asyncDeclare_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncDeclare_es6.ts === +//// [tests/cases/conformance/async/es6/asyncDeclare_es6.ts] //// + +=== asyncDeclare_es6.ts === declare async function foo(): Promise; >foo : () => Promise diff --git a/tests/baselines/reference/asyncEnum_es5.errors.txt b/tests/baselines/reference/asyncEnum_es5.errors.txt index 6029ae9c9d0a1..fb944a716d817 100644 --- a/tests/baselines/reference/asyncEnum_es5.errors.txt +++ b/tests/baselines/reference/asyncEnum_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncEnum_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncEnum_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es5/asyncEnum_es5.ts (1 errors) ==== +==== asyncEnum_es5.ts (1 errors) ==== async enum E { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncEnum_es5.js b/tests/baselines/reference/asyncEnum_es5.js index d65b4bdb510af..abeacf3871a8c 100644 --- a/tests/baselines/reference/asyncEnum_es5.js +++ b/tests/baselines/reference/asyncEnum_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncEnum_es5.ts] //// + //// [asyncEnum_es5.ts] async enum E { Value diff --git a/tests/baselines/reference/asyncEnum_es5.symbols b/tests/baselines/reference/asyncEnum_es5.symbols index 5fedc239a7176..82ad1fc5a9435 100644 --- a/tests/baselines/reference/asyncEnum_es5.symbols +++ b/tests/baselines/reference/asyncEnum_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncEnum_es5.ts === +//// [tests/cases/conformance/async/es5/asyncEnum_es5.ts] //// + +=== asyncEnum_es5.ts === async enum E { >E : Symbol(E, Decl(asyncEnum_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncEnum_es5.types b/tests/baselines/reference/asyncEnum_es5.types index 97d27a1a09397..53bf30b7e5faa 100644 --- a/tests/baselines/reference/asyncEnum_es5.types +++ b/tests/baselines/reference/asyncEnum_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncEnum_es5.ts === +//// [tests/cases/conformance/async/es5/asyncEnum_es5.ts] //// + +=== asyncEnum_es5.ts === async enum E { >E : E diff --git a/tests/baselines/reference/asyncEnum_es6.errors.txt b/tests/baselines/reference/asyncEnum_es6.errors.txt index a50853fd8ea43..0ce795ed3aece 100644 --- a/tests/baselines/reference/asyncEnum_es6.errors.txt +++ b/tests/baselines/reference/asyncEnum_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncEnum_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncEnum_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es6/asyncEnum_es6.ts (1 errors) ==== +==== asyncEnum_es6.ts (1 errors) ==== async enum E { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncEnum_es6.js b/tests/baselines/reference/asyncEnum_es6.js index 074de3dd0aee1..368c7c29f176e 100644 --- a/tests/baselines/reference/asyncEnum_es6.js +++ b/tests/baselines/reference/asyncEnum_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncEnum_es6.ts] //// + //// [asyncEnum_es6.ts] async enum E { Value diff --git a/tests/baselines/reference/asyncEnum_es6.symbols b/tests/baselines/reference/asyncEnum_es6.symbols index ee5ef5df67b6b..a4298653c851c 100644 --- a/tests/baselines/reference/asyncEnum_es6.symbols +++ b/tests/baselines/reference/asyncEnum_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncEnum_es6.ts === +//// [tests/cases/conformance/async/es6/asyncEnum_es6.ts] //// + +=== asyncEnum_es6.ts === async enum E { >E : Symbol(E, Decl(asyncEnum_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncEnum_es6.types b/tests/baselines/reference/asyncEnum_es6.types index 22a560c2ca1cf..1754b9b4ed0c5 100644 --- a/tests/baselines/reference/asyncEnum_es6.types +++ b/tests/baselines/reference/asyncEnum_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncEnum_es6.ts === +//// [tests/cases/conformance/async/es6/asyncEnum_es6.ts] //// + +=== asyncEnum_es6.ts === async enum E { >E : E diff --git a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.js b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.js index c35f947d4db6f..fdd6ee01f6e84 100644 --- a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.js +++ b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionContextuallyTypedReturns.ts] //// + //// [asyncFunctionContextuallyTypedReturns.ts] declare function f(cb: (v: boolean) => [0] | PromiseLike<[0]>): void; f(v => v ? [0] : Promise.reject()); diff --git a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.symbols b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.symbols index cad5a299077eb..c936baf398500 100644 --- a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.symbols +++ b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionContextuallyTypedReturns.ts === +//// [tests/cases/compiler/asyncFunctionContextuallyTypedReturns.ts] //// + +=== asyncFunctionContextuallyTypedReturns.ts === declare function f(cb: (v: boolean) => [0] | PromiseLike<[0]>): void; >f : Symbol(f, Decl(asyncFunctionContextuallyTypedReturns.ts, 0, 0)) >cb : Symbol(cb, Decl(asyncFunctionContextuallyTypedReturns.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types index d639f34dcfbf6..a6bad3686e8a0 100644 --- a/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types +++ b/tests/baselines/reference/asyncFunctionContextuallyTypedReturns.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionContextuallyTypedReturns.ts === +//// [tests/cases/compiler/asyncFunctionContextuallyTypedReturns.ts] //// + +=== asyncFunctionContextuallyTypedReturns.ts === declare function f(cb: (v: boolean) => [0] | PromiseLike<[0]>): void; >f : (cb: (v: boolean) => [0] | PromiseLike<[0]>) => void >cb : (v: boolean) => [0] | PromiseLike<[0]> diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.errors.txt index c6877cc6b6a93..5358bbdc1de6e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts(1,30): error TS1109: Expression expected. +asyncFunctionDeclaration10_es2017.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration10_es2017.ts(1,30): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts (2 errors) ==== +==== asyncFunctionDeclaration10_es2017.ts (2 errors) ==== async function foo(a = await => await): Promise { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js index b27f4aedb6685..7be1f862134a9 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts] //// + //// [asyncFunctionDeclaration10_es2017.ts] async function foo(a = await => await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.symbols index 0705621581feb..b732af9e69abc 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts] //// + +=== asyncFunctionDeclaration10_es2017.ts === async function foo(a = await => await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration10_es2017.ts, 0, 0)) >a : Symbol(a, Decl(asyncFunctionDeclaration10_es2017.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.types index 30fdfa6456fc1..05575dcf3240e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration10_es2017.ts] //// + +=== asyncFunctionDeclaration10_es2017.ts === async function foo(a = await => await): Promise { >foo : (a: any, await: any) => Promise >a : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es5.errors.txt index 93e3e75ad47fb..6fc157649dd7c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts(1,30): error TS1109: Expression expected. +asyncFunctionDeclaration10_es5.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration10_es5.ts(1,30): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts (2 errors) ==== +==== asyncFunctionDeclaration10_es5.ts (2 errors) ==== async function foo(a = await => await): Promise { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5.js b/tests/baselines/reference/asyncFunctionDeclaration10_es5.js index e42e761c6984e..b8bdd55fde011 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts] //// + //// [asyncFunctionDeclaration10_es5.ts] async function foo(a = await => await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es5.symbols index 909bed0ea52b1..34bba7aeafc8b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts] //// + +=== asyncFunctionDeclaration10_es5.ts === async function foo(a = await => await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration10_es5.ts, 0, 0)) >a : Symbol(a, Decl(asyncFunctionDeclaration10_es5.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es5.types b/tests/baselines/reference/asyncFunctionDeclaration10_es5.types index d29b96391e4cf..68fb10f889b35 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration10_es5.ts] //// + +=== asyncFunctionDeclaration10_es5.ts === async function foo(a = await => await): Promise { >foo : (a: any, await: any) => Promise >a : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt index 09cbc3a7a2690..f0bbda0103ab4 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts(1,30): error TS1109: Expression expected. +asyncFunctionDeclaration10_es6.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration10_es6.ts(1,30): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts (2 errors) ==== +==== asyncFunctionDeclaration10_es6.ts (2 errors) ==== async function foo(a = await => await): Promise { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js index c5fe16ea05e20..75a83863abe3a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts] //// + //// [asyncFunctionDeclaration10_es6.ts] async function foo(a = await => await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols index 2c78cb0e0ddce..c6243f926ab74 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts] //// + +=== asyncFunctionDeclaration10_es6.ts === async function foo(a = await => await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration10_es6.ts, 0, 0)) >a : Symbol(a, Decl(asyncFunctionDeclaration10_es6.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration10_es6.types b/tests/baselines/reference/asyncFunctionDeclaration10_es6.types index fbf97067f01a8..62c842f0b7544 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration10_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration10_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts] //// + +=== asyncFunctionDeclaration10_es6.ts === async function foo(a = await => await): Promise { >foo : (a: any, await: any) => Promise >a : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration11_es2017.js index 0ae906ebfe13c..00efbea86c6e2 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration11_es2017.ts] //// + //// [asyncFunctionDeclaration11_es2017.ts] async function await(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es2017.symbols index dbe2b844a1e6c..16ed75d28a956 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration11_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration11_es2017.ts] //// + +=== asyncFunctionDeclaration11_es2017.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration11_es2017.types index 0ddbebfd33777..7c4ac75725fcd 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration11_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration11_es2017.ts] //// + +=== asyncFunctionDeclaration11_es2017.ts === async function await(): Promise { >await : () => Promise } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es5.js b/tests/baselines/reference/asyncFunctionDeclaration11_es5.js index 27d16ebb0c1f3..c7894f82f0137 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration11_es5.ts] //// + //// [asyncFunctionDeclaration11_es5.ts] async function await(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es5.symbols index d72d4f523818e..a10b56d0574ea 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration11_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration11_es5.ts] //// + +=== asyncFunctionDeclaration11_es5.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es5.types b/tests/baselines/reference/asyncFunctionDeclaration11_es5.types index 28db2d69bffc1..dec7f51ecb7d8 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration11_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration11_es5.ts] //// + +=== asyncFunctionDeclaration11_es5.ts === async function await(): Promise { >await : () => Promise } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js index 6fe8921434c84..75d0b74fff29f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts] //// + //// [asyncFunctionDeclaration11_es6.ts] async function await(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols index 02227946c87ce..3726ab97a03cf 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts] //// + +=== asyncFunctionDeclaration11_es6.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.types b/tests/baselines/reference/asyncFunctionDeclaration11_es6.types index 22afecd256663..9f98b6f394663 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts] //// + +=== asyncFunctionDeclaration11_es6.ts === async function await(): Promise { >await : () => Promise } diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.errors.txt index 100589c3a5491..a585575f1c93c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncFunctionDeclaration12_es2017.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts (1 errors) ==== +==== asyncFunctionDeclaration12_es2017.ts (1 errors) ==== var v = async function await(): Promise { } ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.js index 03401f2464e43..3cecf8c75d6e5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts] //// + //// [asyncFunctionDeclaration12_es2017.ts] var v = async function await(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.symbols index d8a9d115a4f7d..164950d82ee47 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts] //// + +=== asyncFunctionDeclaration12_es2017.ts === var v = async function await(): Promise { } >v : Symbol(v, Decl(asyncFunctionDeclaration12_es2017.ts, 0, 3)) >await : Symbol(await, Decl(asyncFunctionDeclaration12_es2017.ts, 0, 7)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.types index d2a4a00f1f56a..ef3043b9e4542 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration12_es2017.ts] //// + +=== asyncFunctionDeclaration12_es2017.ts === var v = async function await(): Promise { } >v : () => Promise >async function await(): Promise { } : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration12_es5.errors.txt index 70d25a1ac25aa..f6866f5bcaf7b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncFunctionDeclaration12_es5.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts (1 errors) ==== +==== asyncFunctionDeclaration12_es5.ts (1 errors) ==== var v = async function await(): Promise { } ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es5.js b/tests/baselines/reference/asyncFunctionDeclaration12_es5.js index d74aa370bfbb9..01ba79ec23bd2 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts] //// + //// [asyncFunctionDeclaration12_es5.ts] var v = async function await(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration12_es5.symbols index 113b8c18933d9..8b27ec5f04258 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts] //// + +=== asyncFunctionDeclaration12_es5.ts === var v = async function await(): Promise { } >v : Symbol(v, Decl(asyncFunctionDeclaration12_es5.ts, 0, 3)) >await : Symbol(await, Decl(asyncFunctionDeclaration12_es5.ts, 0, 7)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es5.types b/tests/baselines/reference/asyncFunctionDeclaration12_es5.types index 2feefbe43c02c..be6d1adec6a16 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration12_es5.ts] //// + +=== asyncFunctionDeclaration12_es5.ts === var v = async function await(): Promise { } >v : () => Promise >async function await(): Promise { } : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt index 125dda8d46290..ae772796a5a2a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncFunctionDeclaration12_es6.ts(1,24): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts (1 errors) ==== +==== asyncFunctionDeclaration12_es6.ts (1 errors) ==== var v = async function await(): Promise { } ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es6.js b/tests/baselines/reference/asyncFunctionDeclaration12_es6.js index d9982fab9337f..8cb102b18a5df 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts] //// + //// [asyncFunctionDeclaration12_es6.ts] var v = async function await(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration12_es6.symbols index ec1bbc9f7456f..e058c842b90e7 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts] //// + +=== asyncFunctionDeclaration12_es6.ts === var v = async function await(): Promise { } >v : Symbol(v, Decl(asyncFunctionDeclaration12_es6.ts, 0, 3)) >await : Symbol(await, Decl(asyncFunctionDeclaration12_es6.ts, 0, 7)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration12_es6.types b/tests/baselines/reference/asyncFunctionDeclaration12_es6.types index 2fc4113cb25af..7bb03a9b4d982 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration12_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration12_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts] //// + +=== asyncFunctionDeclaration12_es6.ts === var v = async function await(): Promise { } >v : () => Promise >async function await(): Promise { } : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.errors.txt index c18b0e84408ed..ec3047d9e902a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? +asyncFunctionDeclaration13_es2017.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts (1 errors) ==== +==== asyncFunctionDeclaration13_es2017.ts (1 errors) ==== async function foo(): Promise { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.js index a16236aea7fdc..4017c777eed8d 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts] //// + //// [asyncFunctionDeclaration13_es2017.ts] async function foo(): Promise { // Legal to use 'await' in a type context. diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.symbols index dc30e7c1e2463..dff10f41b6260 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts] //// + +=== asyncFunctionDeclaration13_es2017.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration13_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.types index cc70050f0bc77..2d50633704802 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration13_es2017.ts] //// + +=== asyncFunctionDeclaration13_es2017.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration13_es5.errors.txt index 58a7318d9aa34..b3138f28704d1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? +asyncFunctionDeclaration13_es5.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts (1 errors) ==== +==== asyncFunctionDeclaration13_es5.ts (1 errors) ==== async function foo(): Promise { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es5.js b/tests/baselines/reference/asyncFunctionDeclaration13_es5.js index e097192fbbf65..9c7612197116d 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts] //// + //// [asyncFunctionDeclaration13_es5.ts] async function foo(): Promise { // Legal to use 'await' in a type context. diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration13_es5.symbols index 5b45a24ee814d..12d18fdd19b74 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts] //// + +=== asyncFunctionDeclaration13_es5.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration13_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es5.types b/tests/baselines/reference/asyncFunctionDeclaration13_es5.types index 01d4f78dd5d91..cfff36a9c44c4 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration13_es5.ts] //// + +=== asyncFunctionDeclaration13_es5.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt index be0b1a8d9d004..834a9a16886c5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? +asyncFunctionDeclaration13_es6.ts(3,11): error TS2552: Cannot find name 'await'. Did you mean 'Awaited'? -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts (1 errors) ==== +==== asyncFunctionDeclaration13_es6.ts (1 errors) ==== async function foo(): Promise { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js index 6fab6c39947d3..1e358fb9303ac 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts] //// + //// [asyncFunctionDeclaration13_es6.ts] async function foo(): Promise { // Legal to use 'await' in a type context. diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration13_es6.symbols index c8558c80316a9..11bda1516b0b6 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts] //// + +=== asyncFunctionDeclaration13_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration13_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration13_es6.types b/tests/baselines/reference/asyncFunctionDeclaration13_es6.types index 5d4f320bdb6dc..ca188bccfdbb7 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration13_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration13_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts] //// + +=== asyncFunctionDeclaration13_es6.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration14_es2017.js index 308b8f1763cb1..90db5a5a9ca81 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration14_es2017.ts] //// + //// [asyncFunctionDeclaration14_es2017.ts] async function foo(): Promise { return; diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es2017.symbols index 95826d1ca6db6..9f5f829a179fd 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration14_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration14_es2017.ts] //// + +=== asyncFunctionDeclaration14_es2017.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration14_es2017.types index aca13d27113a8..7735e1613857b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration14_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration14_es2017.ts] //// + +=== asyncFunctionDeclaration14_es2017.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es5.js b/tests/baselines/reference/asyncFunctionDeclaration14_es5.js index 5ef6ce610843c..b5a208fa9355a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration14_es5.ts] //// + //// [asyncFunctionDeclaration14_es5.ts] async function foo(): Promise { return; diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es5.symbols index fb80e5b54a4bf..9b030b9e8e0ce 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration14_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration14_es5.ts] //// + +=== asyncFunctionDeclaration14_es5.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es5.types b/tests/baselines/reference/asyncFunctionDeclaration14_es5.types index 04c18734bc0ec..0c828d5eb6971 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration14_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration14_es5.ts] //// + +=== asyncFunctionDeclaration14_es5.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js index f584f9178426f..8183393a56120 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts] //// + //// [asyncFunctionDeclaration14_es6.ts] async function foo(): Promise { return; diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols index f5ad8c7635494..2b3bf9bdab6e0 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts] //// + +=== asyncFunctionDeclaration14_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.types b/tests/baselines/reference/asyncFunctionDeclaration14_es6.types index f7d6ae6a918f2..4486887d6e91e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts] //// + +=== asyncFunctionDeclaration14_es6.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt index a325fc1fbb544..4da34c9d28cca 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(6,23): error TS1055: Type '{}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(6,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(7,23): error TS1055: Type 'any' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(8,23): error TS1055: Type 'number' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(8,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(9,23): error TS1055: Type 'PromiseLike' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +asyncFunctionDeclaration15_es5.ts(6,23): error TS1055: Type '{}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +asyncFunctionDeclaration15_es5.ts(6,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +asyncFunctionDeclaration15_es5.ts(7,23): error TS1055: Type 'any' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +asyncFunctionDeclaration15_es5.ts(8,23): error TS1055: Type 'number' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +asyncFunctionDeclaration15_es5.ts(8,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +asyncFunctionDeclaration15_es5.ts(9,23): error TS1055: Type 'PromiseLike' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. Construct signature return types 'Thenable' and 'PromiseLike' are incompatible. The types returned by 'then(...)' are incompatible between these types. Type 'void' is not assignable to type 'PromiseLike'. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(17,16): error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. +asyncFunctionDeclaration15_es5.ts(17,16): error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member. +asyncFunctionDeclaration15_es5.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts (9 errors) ==== +==== asyncFunctionDeclaration15_es5.ts (9 errors) ==== declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.js b/tests/baselines/reference/asyncFunctionDeclaration15_es5.js index 5ca93d3eca85e..c0e2ff621519a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts] //// + //// [asyncFunctionDeclaration15_es5.ts] declare class Thenable { then(): void; } declare let a: any; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration15_es5.symbols index 3bc9a18ca814d..d36ffbddbffcf 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts] //// + +=== asyncFunctionDeclaration15_es5.ts === declare class Thenable { then(): void; } >Thenable : Symbol(Thenable, Decl(asyncFunctionDeclaration15_es5.ts, 0, 0)) >then : Symbol(Thenable.then, Decl(asyncFunctionDeclaration15_es5.ts, 0, 24)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.types b/tests/baselines/reference/asyncFunctionDeclaration15_es5.types index 7a5a1ce1e67ab..8aa3865103d78 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts] //// + +=== asyncFunctionDeclaration15_es5.ts === declare class Thenable { then(): void; } >Thenable : Thenable >then : () => void diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt index a4012f0a2a98a..555b3255e7a8a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{}>'? -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. +asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{}>'? +asyncFunctionDeclaration15_es6.ts(6,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +asyncFunctionDeclaration15_es6.ts(8,23): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +asyncFunctionDeclaration15_es6.ts(17,16): error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member. +asyncFunctionDeclaration15_es6.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (9 errors) ==== +==== asyncFunctionDeclaration15_es6.ts (9 errors) ==== declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js index 174a95d6f669f..91923bbd5a08b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts] //// + //// [asyncFunctionDeclaration15_es6.ts] declare class Thenable { then(): void; } declare let a: any; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration15_es6.symbols index daf0d23a7e8ab..b81676062b00e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts] //// + +=== asyncFunctionDeclaration15_es6.ts === declare class Thenable { then(): void; } >Thenable : Symbol(Thenable, Decl(asyncFunctionDeclaration15_es6.ts, 0, 0)) >then : Symbol(Thenable.then, Decl(asyncFunctionDeclaration15_es6.ts, 0, 24)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.types b/tests/baselines/reference/asyncFunctionDeclaration15_es6.types index 89f419ad48504..50bf6af7b05bf 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts] //// + +=== asyncFunctionDeclaration15_es6.ts === declare class Thenable { then(): void; } >Thenable : Thenable >then : () => void diff --git a/tests/baselines/reference/asyncFunctionDeclaration16_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration16_es5.errors.txt new file mode 100644 index 0000000000000..93362f0d805e1 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration16_es5.errors.txt @@ -0,0 +1,73 @@ +/a.js(21,14): error TS1055: Type 'string' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +/a.js(27,12): error TS1065: The return type of an async function or method must be the global Promise type. +/a.js(45,12): error TS1065: The return type of an async function or method must be the global Promise type. + Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. + Construct signature return types 'Thenable' and 'PromiseLike' are incompatible. + The types returned by 'then(...)' are incompatible between these types. + Type 'void' is not assignable to type 'PromiseLike'. + + +==== /types.d.ts (0 errors) ==== + declare class Thenable { then(): void; } + +==== /a.js (3 errors) ==== + /** + * @callback T1 + * @param {string} str + * @returns {string} + */ + + /** + * @callback T2 + * @param {string} str + * @returns {Promise} + */ + + /** + * @callback T3 + * @param {string} str + * @returns {Thenable} + */ + + /** + * @param {string} str + * @returns {string} + ~~~~~~ +!!! error TS1055: Type 'string' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. + */ + const f1 = async str => { + return str; + } + + /** @type {T1} */ + ~~ +!!! error TS1065: The return type of an async function or method must be the global Promise type. +!!! related TS1055 /a.js:4:14: Type 'string' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. + const f2 = async str => { + return str; + } + + /** + * @param {string} str + * @returns {Promise} + */ + const f3 = async str => { + return str; + } + + /** @type {T2} */ + const f4 = async str => { + return str; + } + + /** @type {T3} */ + ~~ +!!! error TS1065: The return type of an async function or method must be the global Promise type. +!!! error TS1065: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +!!! error TS1065: Construct signature return types 'Thenable' and 'PromiseLike' are incompatible. +!!! error TS1065: The types returned by 'then(...)' are incompatible between these types. +!!! error TS1065: Type 'void' is not assignable to type 'PromiseLike'. + const f5 = async str => { + return str; + } + \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration16_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration16_es5.symbols new file mode 100644 index 0000000000000..eea51dda2a834 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration16_es5.symbols @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration16_es5.ts] //// + +=== /types.d.ts === +declare class Thenable { then(): void; } +>Thenable : Symbol(Thenable, Decl(types.d.ts, 0, 0)) +>then : Symbol(Thenable.then, Decl(types.d.ts, 0, 24)) + +=== /a.js === +/** + * @callback T1 + * @param {string} str + * @returns {string} + */ + +/** + * @callback T2 + * @param {string} str + * @returns {Promise} + */ + +/** + * @callback T3 + * @param {string} str + * @returns {Thenable} + */ + +/** + * @param {string} str + * @returns {string} + */ +const f1 = async str => { +>f1 : Symbol(f1, Decl(a.js, 22, 5)) +>str : Symbol(str, Decl(a.js, 22, 16)) + + return str; +>str : Symbol(str, Decl(a.js, 22, 16)) +} + +/** @type {T1} */ +const f2 = async str => { +>f2 : Symbol(f2, Decl(a.js, 27, 5)) +>str : Symbol(str, Decl(a.js, 27, 16)) + + return str; +>str : Symbol(str, Decl(a.js, 27, 16)) +} + +/** + * @param {string} str + * @returns {Promise} + */ +const f3 = async str => { +>f3 : Symbol(f3, Decl(a.js, 35, 5)) +>str : Symbol(str, Decl(a.js, 35, 16)) + + return str; +>str : Symbol(str, Decl(a.js, 35, 16)) +} + +/** @type {T2} */ +const f4 = async str => { +>f4 : Symbol(f4, Decl(a.js, 40, 5)) +>str : Symbol(str, Decl(a.js, 40, 16)) + + return str; +>str : Symbol(str, Decl(a.js, 40, 16)) +} + +/** @type {T3} */ +const f5 = async str => { +>f5 : Symbol(f5, Decl(a.js, 45, 5)) +>str : Symbol(str, Decl(a.js, 45, 16)) + + return str; +>str : Symbol(str, Decl(a.js, 45, 16)) +} + diff --git a/tests/baselines/reference/asyncFunctionDeclaration16_es5.types b/tests/baselines/reference/asyncFunctionDeclaration16_es5.types new file mode 100644 index 0000000000000..c0a18f295701c --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration16_es5.types @@ -0,0 +1,82 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration16_es5.ts] //// + +=== /types.d.ts === +declare class Thenable { then(): void; } +>Thenable : Thenable +>then : () => void + +=== /a.js === +/** + * @callback T1 + * @param {string} str + * @returns {string} + */ + +/** + * @callback T2 + * @param {string} str + * @returns {Promise} + */ + +/** + * @callback T3 + * @param {string} str + * @returns {Thenable} + */ + +/** + * @param {string} str + * @returns {string} + */ +const f1 = async str => { +>f1 : (str: string) => string +>async str => { return str;} : (str: string) => string +>str : string + + return str; +>str : string +} + +/** @type {T1} */ +const f2 = async str => { +>f2 : T1 +>async str => { return str;} : (str: string) => string +>str : string + + return str; +>str : string +} + +/** + * @param {string} str + * @returns {Promise} + */ +const f3 = async str => { +>f3 : (str: string) => Promise +>async str => { return str;} : (str: string) => Promise +>str : string + + return str; +>str : string +} + +/** @type {T2} */ +const f4 = async str => { +>f4 : T2 +>async str => { return str;} : (str: string) => Promise +>str : string + + return str; +>str : string +} + +/** @type {T3} */ +const f5 = async str => { +>f5 : T3 +>async str => { return str;} : (str: string) => Thenable +>str : string + + return str; +>str : string +} + diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration1_es2017.js index 549fd226b2f34..5142149133142 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration1_es2017.ts] //// + //// [asyncFunctionDeclaration1_es2017.ts] async function foo(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es2017.symbols index 7ef3dc75919d8..ed1b11f4fc19a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration1_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration1_es2017.ts] //// + +=== asyncFunctionDeclaration1_es2017.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration1_es2017.types index 6e862303e8e33..7c7113d3108a9 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration1_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration1_es2017.ts] //// + +=== asyncFunctionDeclaration1_es2017.ts === async function foo(): Promise { >foo : () => Promise } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es5.js b/tests/baselines/reference/asyncFunctionDeclaration1_es5.js index 913a0b3c4e21f..3efe6e9b8031f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1_es5.ts] //// + //// [asyncFunctionDeclaration1_es5.ts] async function foo(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es5.symbols index 29bb887ed938f..08ad7c8bdc9cc 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1_es5.ts] //// + +=== asyncFunctionDeclaration1_es5.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es5.types b/tests/baselines/reference/asyncFunctionDeclaration1_es5.types index c2f7b9d99c3bc..ba69a9297c4e5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1_es5.ts] //// + +=== asyncFunctionDeclaration1_es5.ts === async function foo(): Promise { >foo : () => Promise } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js index e92d55dc0e2ce..f882cdc78e895 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts] //// + //// [asyncFunctionDeclaration1_es6.ts] async function foo(): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols index 545bfbbae92fe..0bba54250f62a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts] //// + +=== asyncFunctionDeclaration1_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.types b/tests/baselines/reference/asyncFunctionDeclaration1_es6.types index 18eb92432bcf3..77dbfcc292cbc 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts] //// + +=== asyncFunctionDeclaration1_es6.ts === async function foo(): Promise { >foo : () => Promise } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js index 6de061456e823..13e9ccaadf235 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration2_es2017.ts] //// + //// [asyncFunctionDeclaration2_es2017.ts] function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.symbols index aed41f50310c2..3433fd88834c5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration2_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration2_es2017.ts] //// + +=== asyncFunctionDeclaration2_es2017.ts === function f(await) { >f : Symbol(f, Decl(asyncFunctionDeclaration2_es2017.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration2_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.types index 8413bea692ad6..0fa9179868b24 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration2_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration2_es2017.ts] //// + +=== asyncFunctionDeclaration2_es2017.ts === function f(await) { >f : (await: any) => void >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5.js b/tests/baselines/reference/asyncFunctionDeclaration2_es5.js index 427fb2b1bf939..66c4cbddb1038 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration2_es5.ts] //// + //// [asyncFunctionDeclaration2_es5.ts] function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration2_es5.symbols index 78f4da3c25e71..389d222c8bdd1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration2_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration2_es5.ts] //// + +=== asyncFunctionDeclaration2_es5.ts === function f(await) { >f : Symbol(f, Decl(asyncFunctionDeclaration2_es5.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration2_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es5.types b/tests/baselines/reference/asyncFunctionDeclaration2_es5.types index 7add17dd5d646..c78988f0c4da2 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration2_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration2_es5.ts] //// + +=== asyncFunctionDeclaration2_es5.ts === function f(await) { >f : (await: any) => void >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.js b/tests/baselines/reference/asyncFunctionDeclaration2_es6.js index 1c54b9bc056f4..e9e4ad3a09d4a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts] //// + //// [asyncFunctionDeclaration2_es6.ts] function f(await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols index c709d7f7386de..5be44646b0eaf 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts] //// + +=== asyncFunctionDeclaration2_es6.ts === function f(await) { >f : Symbol(f, Decl(asyncFunctionDeclaration2_es6.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration2_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration2_es6.types b/tests/baselines/reference/asyncFunctionDeclaration2_es6.types index 9c9a19f3e763f..76d0d4bca8203 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration2_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts] //// + +=== asyncFunctionDeclaration2_es6.ts === function f(await) { >f : (await: any) => void >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.errors.txt index 599d481f3195b..e4466f0e465a3 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. +asyncFunctionDeclaration3_es2017.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts (1 errors) ==== +==== asyncFunctionDeclaration3_es2017.ts (1 errors) ==== function f(await = await) { ~~~~~ !!! error TS2372: Parameter 'await' cannot reference itself. diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js index d6110265fdc1f..59752e8624c7a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts] //// + //// [asyncFunctionDeclaration3_es2017.ts] function f(await = await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.symbols index b444d4e17f191..629ffa9b70769 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts] //// + +=== asyncFunctionDeclaration3_es2017.ts === function f(await = await) { >f : Symbol(f, Decl(asyncFunctionDeclaration3_es2017.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration3_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.types index c7c56f7bfa1a3..a57a0b3ba482b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration3_es2017.ts] //// + +=== asyncFunctionDeclaration3_es2017.ts === function f(await = await) { >f : (await?: any) => void >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration3_es5.errors.txt index c5b84f0602d26..2b2507b88297c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. +asyncFunctionDeclaration3_es5.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts (1 errors) ==== +==== asyncFunctionDeclaration3_es5.ts (1 errors) ==== function f(await = await) { ~~~~~ !!! error TS2372: Parameter 'await' cannot reference itself. diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5.js b/tests/baselines/reference/asyncFunctionDeclaration3_es5.js index 0bcc99b6bc7b2..db9cc78f082b5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts] //// + //// [asyncFunctionDeclaration3_es5.ts] function f(await = await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration3_es5.symbols index 379fe68381588..5f3342458e07f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts] //// + +=== asyncFunctionDeclaration3_es5.ts === function f(await = await) { >f : Symbol(f, Decl(asyncFunctionDeclaration3_es5.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration3_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es5.types b/tests/baselines/reference/asyncFunctionDeclaration3_es5.types index cec4e59ad867f..a8e59c6f34875 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration3_es5.ts] //// + +=== asyncFunctionDeclaration3_es5.ts === function f(await = await) { >f : (await?: any) => void >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt index 76ccd1269c693..a84543091b666 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. +asyncFunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'await' cannot reference itself. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts (1 errors) ==== +==== asyncFunctionDeclaration3_es6.ts (1 errors) ==== function f(await = await) { ~~~~~ !!! error TS2372: Parameter 'await' cannot reference itself. diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.js b/tests/baselines/reference/asyncFunctionDeclaration3_es6.js index 7038858d2c8cd..3771c751c3a54 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts] //// + //// [asyncFunctionDeclaration3_es6.ts] function f(await = await) { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration3_es6.symbols index b869e6d7b62b7..1d99d3085afb8 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts] //// + +=== asyncFunctionDeclaration3_es6.ts === function f(await = await) { >f : Symbol(f, Decl(asyncFunctionDeclaration3_es6.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration3_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration3_es6.types b/tests/baselines/reference/asyncFunctionDeclaration3_es6.types index 12677cbe27a0f..1af09c900cb5b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration3_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts] //// + +=== asyncFunctionDeclaration3_es6.ts === function f(await = await) { >f : (await?: any) => void >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration4_es2017.js index 6209531e5499a..7fc0fcd488113 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration4_es2017.ts] //// + //// [asyncFunctionDeclaration4_es2017.ts] function await() { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration4_es2017.symbols index 7afbd879c5964..51adc941ff8a3 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration4_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration4_es2017.ts] //// + +=== asyncFunctionDeclaration4_es2017.ts === function await() { >await : Symbol(await, Decl(asyncFunctionDeclaration4_es2017.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration4_es2017.types index f7c4248f7c35e..cedf020a2d67e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration4_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration4_es2017.ts] //// + +=== asyncFunctionDeclaration4_es2017.ts === function await() { >await : () => void } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es5.js b/tests/baselines/reference/asyncFunctionDeclaration4_es5.js index 8b6f58b84abdb..3a4b2beafbba5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration4_es5.ts] //// + //// [asyncFunctionDeclaration4_es5.ts] function await() { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration4_es5.symbols index 0690c33309566..c1c16fd7ae217 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration4_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration4_es5.ts] //// + +=== asyncFunctionDeclaration4_es5.ts === function await() { >await : Symbol(await, Decl(asyncFunctionDeclaration4_es5.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es5.types b/tests/baselines/reference/asyncFunctionDeclaration4_es5.types index 8dac22820321c..2e1e688b35068 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration4_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration4_es5.ts] //// + +=== asyncFunctionDeclaration4_es5.ts === function await() { >await : () => void } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es6.js b/tests/baselines/reference/asyncFunctionDeclaration4_es6.js index 8bfb7bf642f91..f6deb3948076c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts] //// + //// [asyncFunctionDeclaration4_es6.ts] function await() { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols index cdbe1f5a8db9e..b0cb765c4c9b9 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts] //// + +=== asyncFunctionDeclaration4_es6.ts === function await() { >await : Symbol(await, Decl(asyncFunctionDeclaration4_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration4_es6.types b/tests/baselines/reference/asyncFunctionDeclaration4_es6.types index 537661e2c661e..d437aad536c00 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration4_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts] //// + +=== asyncFunctionDeclaration4_es6.ts === function await() { >await : () => void } diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.errors.txt index 9b8504d2fa12d..b5a583152b844 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncFunctionDeclaration5_es2017.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts (1 errors) ==== +==== asyncFunctionDeclaration5_es2017.ts (1 errors) ==== async function foo(await): Promise { ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js index f660de5229ece..4d0a1a61ddd7e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts] //// + //// [asyncFunctionDeclaration5_es2017.ts] async function foo(await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.symbols index 58a4fe62aa395..ba487fcea954b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts] //// + +=== asyncFunctionDeclaration5_es2017.ts === async function foo(await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration5_es2017.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration5_es2017.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.types index a1ae2eefdc6a0..3f04224035a14 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts] //// + +=== asyncFunctionDeclaration5_es2017.ts === async function foo(await): Promise { >foo : (await: any) => Promise >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration5_es5.errors.txt index 5d37c723c6a9b..175409258281f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncFunctionDeclaration5_es5.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts (1 errors) ==== +==== asyncFunctionDeclaration5_es5.ts (1 errors) ==== async function foo(await): Promise { ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5.js b/tests/baselines/reference/asyncFunctionDeclaration5_es5.js index 7ebe3a54f54cf..30a48dd8795af 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts] //// + //// [asyncFunctionDeclaration5_es5.ts] async function foo(await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration5_es5.symbols index 50d7d0beafd67..55d2f2cdf0c90 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts] //// + +=== asyncFunctionDeclaration5_es5.ts === async function foo(await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration5_es5.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration5_es5.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es5.types b/tests/baselines/reference/asyncFunctionDeclaration5_es5.types index 093ce5645d80d..3279b15adeb06 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration5_es5.ts] //// + +=== asyncFunctionDeclaration5_es5.ts === async function foo(await): Promise { >foo : (await: any) => Promise >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt index bc4832ffcae22..86b6b318e942e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncFunctionDeclaration5_es6.ts(1,20): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts (1 errors) ==== +==== asyncFunctionDeclaration5_es6.ts (1 errors) ==== async function foo(await): Promise { ~~~~~ !!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.js b/tests/baselines/reference/asyncFunctionDeclaration5_es6.js index cb36ae4c3c253..e103205e1f95f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts] //// + //// [asyncFunctionDeclaration5_es6.ts] async function foo(await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration5_es6.symbols index 27e1ff6f5efb1..b7dd6ad009715 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts] //// + +=== asyncFunctionDeclaration5_es6.ts === async function foo(await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration5_es6.ts, 0, 0)) >await : Symbol(await, Decl(asyncFunctionDeclaration5_es6.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration5_es6.types b/tests/baselines/reference/asyncFunctionDeclaration5_es6.types index 58f5ccd8e489d..1795cda491f6b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration5_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts] //// + +=== asyncFunctionDeclaration5_es6.ts === async function foo(await): Promise { >foo : (await: any) => Promise >await : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.errors.txt index b5a5ddccdce5b..028a8000aa350 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts(1,29): error TS1109: Expression expected. +asyncFunctionDeclaration6_es2017.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration6_es2017.ts(1,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts (2 errors) ==== +==== asyncFunctionDeclaration6_es2017.ts (2 errors) ==== async function foo(a = await): Promise { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.js index 6df02000846d5..6e6abd59a198b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts] //// + //// [asyncFunctionDeclaration6_es2017.ts] async function foo(a = await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.symbols index 2edabb284fc02..da84e675c60f1 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts] //// + +=== asyncFunctionDeclaration6_es2017.ts === async function foo(a = await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration6_es2017.ts, 0, 0)) >a : Symbol(a, Decl(asyncFunctionDeclaration6_es2017.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.types index 8ffd052c81422..c2f9d3c9856aa 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration6_es2017.ts] //// + +=== asyncFunctionDeclaration6_es2017.ts === async function foo(a = await): Promise { >foo : (a?: any) => Promise >a : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es5.errors.txt index d8cf82fbc28e3..bfe5e9017af9f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts(1,29): error TS1109: Expression expected. +asyncFunctionDeclaration6_es5.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration6_es5.ts(1,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts (2 errors) ==== +==== asyncFunctionDeclaration6_es5.ts (2 errors) ==== async function foo(a = await): Promise { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es5.js b/tests/baselines/reference/asyncFunctionDeclaration6_es5.js index 282036f97def1..df1ff577c9a40 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts] //// + //// [asyncFunctionDeclaration6_es5.ts] async function foo(a = await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration6_es5.symbols index 579899c15804b..945428b81674c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts] //// + +=== asyncFunctionDeclaration6_es5.ts === async function foo(a = await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration6_es5.ts, 0, 0)) >a : Symbol(a, Decl(asyncFunctionDeclaration6_es5.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es5.types b/tests/baselines/reference/asyncFunctionDeclaration6_es5.types index e03f663dc68e7..175cc2d909cc3 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration6_es5.ts] //// + +=== asyncFunctionDeclaration6_es5.ts === async function foo(a = await): Promise { >foo : (a?: any) => Promise >a : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt index ee8abb7bdadf6..30db6e6ab469d 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts(1,29): error TS1109: Expression expected. +asyncFunctionDeclaration6_es6.ts(1,24): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration6_es6.ts(1,29): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts (2 errors) ==== +==== asyncFunctionDeclaration6_es6.ts (2 errors) ==== async function foo(a = await): Promise { ~~~~~ !!! error TS2524: 'await' expressions cannot be used in a parameter initializer. diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js index a70316989b380..986375ea359f3 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts] //// + //// [asyncFunctionDeclaration6_es6.ts] async function foo(a = await): Promise { } diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration6_es6.symbols index 712ac51c9b998..210abcc311944 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts] //// + +=== asyncFunctionDeclaration6_es6.ts === async function foo(a = await): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration6_es6.ts, 0, 0)) >a : Symbol(a, Decl(asyncFunctionDeclaration6_es6.ts, 0, 19)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration6_es6.types b/tests/baselines/reference/asyncFunctionDeclaration6_es6.types index 00e4afc840d2b..901d318b57a69 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration6_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts] //// + +=== asyncFunctionDeclaration6_es6.ts === async function foo(a = await): Promise { >foo : (a?: any) => Promise >a : any diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.errors.txt index ad9ec9a043a66..df299d9585b2e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts(3,31): error TS1109: Expression expected. +asyncFunctionDeclaration7_es2017.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration7_es2017.ts(3,31): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts (2 errors) ==== +==== asyncFunctionDeclaration7_es2017.ts (2 errors) ==== async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.js index c9aaa80b9b072..7a54a233f82dd 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts] //// + //// [asyncFunctionDeclaration7_es2017.ts] async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.symbols index 3f8119d84a7aa..d3cb8e9877c77 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts] //// + +=== asyncFunctionDeclaration7_es2017.ts === async function bar(): Promise { >bar : Symbol(bar, Decl(asyncFunctionDeclaration7_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.types index f16c9283df3fc..63f1b14ceb9fc 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration7_es2017.ts] //// + +=== asyncFunctionDeclaration7_es2017.ts === async function bar(): Promise { >bar : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es5.errors.txt index 48984724e4c16..6c51148ae758e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts(3,31): error TS1109: Expression expected. +asyncFunctionDeclaration7_es5.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration7_es5.ts(3,31): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts (2 errors) ==== +==== asyncFunctionDeclaration7_es5.ts (2 errors) ==== async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es5.js b/tests/baselines/reference/asyncFunctionDeclaration7_es5.js index 60dd0d6e3bf32..afab23a54e73a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts] //// + //// [asyncFunctionDeclaration7_es5.ts] async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration7_es5.symbols index ecfc50b18fc73..43e1d12448f06 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts] //// + +=== asyncFunctionDeclaration7_es5.ts === async function bar(): Promise { >bar : Symbol(bar, Decl(asyncFunctionDeclaration7_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es5.types b/tests/baselines/reference/asyncFunctionDeclaration7_es5.types index f6622a6ce5427..562c1ee334ce5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration7_es5.ts] //// + +=== asyncFunctionDeclaration7_es5.ts === async function bar(): Promise { >bar : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt index 91ba4508ba139..84d69c9a87e1a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts(3,31): error TS1109: Expression expected. +asyncFunctionDeclaration7_es6.ts(3,26): error TS2524: 'await' expressions cannot be used in a parameter initializer. +asyncFunctionDeclaration7_es6.ts(3,31): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts (2 errors) ==== +==== asyncFunctionDeclaration7_es6.ts (2 errors) ==== async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js index 0d360fa866ccb..4cbe0c2e25c42 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts] //// + //// [asyncFunctionDeclaration7_es6.ts] async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration7_es6.symbols index 934c41cba3a5b..20fabdd261731 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts] //// + +=== asyncFunctionDeclaration7_es6.ts === async function bar(): Promise { >bar : Symbol(bar, Decl(asyncFunctionDeclaration7_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration7_es6.types b/tests/baselines/reference/asyncFunctionDeclaration7_es6.types index b30bb44317dda..6a508d1763200 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration7_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts] //// + +=== asyncFunctionDeclaration7_es6.ts === async function bar(): Promise { >bar : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.errors.txt index b82f012d69478..7766d0ebf1655 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts (2 errors) ==== +==== asyncFunctionDeclaration8_es2017.ts (2 errors) ==== var v = { [await]: foo } ~~~~~ !!! error TS2304: Cannot find name 'await'. diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.js index db7bfa4f9fb6d..7231da90e5da0 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// + //// [asyncFunctionDeclaration8_es2017.ts] var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.symbols index 51eb4af032029..dc668d1a8c676 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// + +=== asyncFunctionDeclaration8_es2017.ts === var v = { [await]: foo } >v : Symbol(v, Decl(asyncFunctionDeclaration8_es2017.ts, 0, 3)) >[await] : Symbol([await], Decl(asyncFunctionDeclaration8_es2017.ts, 0, 9)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.types index 3e46e59409b83..b72464b7877ae 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// + +=== asyncFunctionDeclaration8_es2017.ts === var v = { [await]: foo } >v : { [x: number]: any; } >{ [await]: foo } : { [x: number]: any; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration8_es5.errors.txt index 7f2a4cc650b6c..d050d9263b74e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts (2 errors) ==== +==== asyncFunctionDeclaration8_es5.ts (2 errors) ==== var v = { [await]: foo } ~~~~~ !!! error TS2304: Cannot find name 'await'. diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es5.js b/tests/baselines/reference/asyncFunctionDeclaration8_es5.js index 994ebfe6c7c1a..c529aa25356b4 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// + //// [asyncFunctionDeclaration8_es5.ts] var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration8_es5.symbols index ea688e1c593ab..6f5cc8e635ae5 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// + +=== asyncFunctionDeclaration8_es5.ts === var v = { [await]: foo } >v : Symbol(v, Decl(asyncFunctionDeclaration8_es5.ts, 0, 3)) >[await] : Symbol([await], Decl(asyncFunctionDeclaration8_es5.ts, 0, 9)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es5.types b/tests/baselines/reference/asyncFunctionDeclaration8_es5.types index f8647156d1101..b235fece36e95 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// + +=== asyncFunctionDeclaration8_es5.ts === var v = { [await]: foo } >v : { [x: number]: any; } >{ [await]: foo } : { [x: number]: any; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt index c785ae41b170c..2c4900de934d9 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts (2 errors) ==== +==== asyncFunctionDeclaration8_es6.ts (2 errors) ==== var v = { [await]: foo } ~~~~~ !!! error TS2304: Cannot find name 'await'. diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es6.js b/tests/baselines/reference/asyncFunctionDeclaration8_es6.js index a363015f8abc8..9cc3cb7d1b7e0 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// + //// [asyncFunctionDeclaration8_es6.ts] var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration8_es6.symbols index 27e641dd5370b..4f5f883666825 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// + +=== asyncFunctionDeclaration8_es6.ts === var v = { [await]: foo } >v : Symbol(v, Decl(asyncFunctionDeclaration8_es6.ts, 0, 3)) >[await] : Symbol([await], Decl(asyncFunctionDeclaration8_es6.ts, 0, 9)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration8_es6.types b/tests/baselines/reference/asyncFunctionDeclaration8_es6.types index 43a0245c7e0d0..63dc4c3dbca35 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration8_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// + +=== asyncFunctionDeclaration8_es6.ts === var v = { [await]: foo } >v : { [x: number]: any; } >{ [await]: foo } : { [x: number]: any; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.errors.txt index 27c41d8b2538c..58539b26d4a55 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts(2,19): error TS1109: Expression expected. +asyncFunctionDeclaration9_es2017.ts(2,19): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts (1 errors) ==== +==== asyncFunctionDeclaration9_es2017.ts (1 errors) ==== async function foo(): Promise { var v = { [await]: foo } ~ diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.js index 08cb8e44ba070..a157c6af6b759 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts] //// + //// [asyncFunctionDeclaration9_es2017.ts] async function foo(): Promise { var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.symbols b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.symbols index 422d6c31b3460..a5d93abf63ed9 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts] //// + +=== asyncFunctionDeclaration9_es2017.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration9_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.types b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.types index e137ff2f05fc2..a0fc3ecb1bb60 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es2017.types +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts === +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration9_es2017.ts] //// + +=== asyncFunctionDeclaration9_es2017.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration9_es5.errors.txt index 8eed8dade45bc..878d099702c18 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts(2,19): error TS1109: Expression expected. +asyncFunctionDeclaration9_es5.ts(2,19): error TS1109: Expression expected. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts (1 errors) ==== +==== asyncFunctionDeclaration9_es5.ts (1 errors) ==== async function foo(): Promise { var v = { [await]: foo } ~ diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es5.js b/tests/baselines/reference/asyncFunctionDeclaration9_es5.js index 505ed08d840f1..bc1f7b6416c4b 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts] //// + //// [asyncFunctionDeclaration9_es5.ts] async function foo(): Promise { var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es5.symbols b/tests/baselines/reference/asyncFunctionDeclaration9_es5.symbols index 0bb00895b2cde..e6e3445756e7a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts] //// + +=== asyncFunctionDeclaration9_es5.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration9_es5.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es5.types b/tests/baselines/reference/asyncFunctionDeclaration9_es5.types index 9db2c54c2b644..1f0186b12159a 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration9_es5.ts] //// + +=== asyncFunctionDeclaration9_es5.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt index 235ef165bed2e..adadcdd3fd81f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts(2,19): error TS1109: Expression expected. +asyncFunctionDeclaration9_es6.ts(2,19): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts (1 errors) ==== +==== asyncFunctionDeclaration9_es6.ts (1 errors) ==== async function foo(): Promise { var v = { [await]: foo } ~ diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js index c57c0eb395a72..5e622d930843f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.js +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts] //// + //// [asyncFunctionDeclaration9_es6.ts] async function foo(): Promise { var v = { [await]: foo } diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration9_es6.symbols index e47aeaf990004..b3c0db1ab2f1e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts] //// + +=== asyncFunctionDeclaration9_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration9_es6.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration9_es6.types b/tests/baselines/reference/asyncFunctionDeclaration9_es6.types index c0a9edc7326f2..5052d860cf95e 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration9_es6.types +++ b/tests/baselines/reference/asyncFunctionDeclaration9_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts] //// + +=== asyncFunctionDeclaration9_es6.ts === async function foo(): Promise { >foo : () => Promise diff --git a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.errors.txt index 7a35b1d5223aa..0e90942cba168 100644 --- a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts(5,36): error TS2522: The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method. +asyncFunctionDeclarationCapturesArguments_es5.ts(5,36): error TS2522: The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method. -==== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts (1 errors) ==== +==== asyncFunctionDeclarationCapturesArguments_es5.ts (1 errors) ==== class C { method() { function other() {} diff --git a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.js b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.js index aa642819add4c..0f19b34c128f5 100644 --- a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.js +++ b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts] //// + //// [asyncFunctionDeclarationCapturesArguments_es5.ts] class C { method() { diff --git a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.symbols b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.symbols index 39aed2be1fe4c..ed65437339dca 100644 --- a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.symbols +++ b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts] //// + +=== asyncFunctionDeclarationCapturesArguments_es5.ts === class C { >C : Symbol(C, Decl(asyncFunctionDeclarationCapturesArguments_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.types b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.types index a93094991dfa1..13804289d6d79 100644 --- a/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.types +++ b/tests/baselines/reference/asyncFunctionDeclarationCapturesArguments_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts === +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclarationCapturesArguments_es5.ts] //// + +=== asyncFunctionDeclarationCapturesArguments_es5.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncFunctionNoReturnType.errors.txt b/tests/baselines/reference/asyncFunctionNoReturnType.errors.txt index e192b961fc807..57381660b994e 100644 --- a/tests/baselines/reference/asyncFunctionNoReturnType.errors.txt +++ b/tests/baselines/reference/asyncFunctionNoReturnType.errors.txt @@ -1,9 +1,9 @@ error TS2468: Cannot find global value 'Promise'. -tests/cases/compiler/asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. !!! error TS2468: Cannot find global value 'Promise'. -==== tests/cases/compiler/asyncFunctionNoReturnType.ts (1 errors) ==== +==== asyncFunctionNoReturnType.ts (1 errors) ==== async () => { ~~~~~~~~~~~~~ !!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. diff --git a/tests/baselines/reference/asyncFunctionNoReturnType.js b/tests/baselines/reference/asyncFunctionNoReturnType.js index 6a17af94903e3..fb4f9585cc2ae 100644 --- a/tests/baselines/reference/asyncFunctionNoReturnType.js +++ b/tests/baselines/reference/asyncFunctionNoReturnType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionNoReturnType.ts] //// + //// [asyncFunctionNoReturnType.ts] async () => { if (window) diff --git a/tests/baselines/reference/asyncFunctionNoReturnType.symbols b/tests/baselines/reference/asyncFunctionNoReturnType.symbols index 50911c4fb2f67..b480973dd2b22 100644 --- a/tests/baselines/reference/asyncFunctionNoReturnType.symbols +++ b/tests/baselines/reference/asyncFunctionNoReturnType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionNoReturnType.ts === +//// [tests/cases/compiler/asyncFunctionNoReturnType.ts] //// + +=== asyncFunctionNoReturnType.ts === async () => { if (window) >window : Symbol(window, Decl(lib.dom.d.ts, --, --)) diff --git a/tests/baselines/reference/asyncFunctionNoReturnType.types b/tests/baselines/reference/asyncFunctionNoReturnType.types index 64e86e1765913..ed5368da0d1cb 100644 --- a/tests/baselines/reference/asyncFunctionNoReturnType.types +++ b/tests/baselines/reference/asyncFunctionNoReturnType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionNoReturnType.ts === +//// [tests/cases/compiler/asyncFunctionNoReturnType.ts] //// + +=== asyncFunctionNoReturnType.ts === async () => { >async () => { if (window) return;} : () => Promise diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.errors.txt b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.errors.txt index 32e2309bc8e59..fc6997949ab66 100644 --- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.errors.txt +++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(11,28): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(16,21): error TS2322: Type 'number' is not assignable to type 'string'. +asyncFunctionReturnExpressionErrorSpans.ts(11,28): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +asyncFunctionReturnExpressionErrorSpans.ts(16,21): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts (2 errors) ==== +==== asyncFunctionReturnExpressionErrorSpans.ts (2 errors) ==== interface Foo { bar: { baz: { @@ -23,7 +23,7 @@ tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts(16,21): error TS thing: 1 ~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. -!!! related TS6500 tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts:5:17: The expected type comes from property 'thing' which is declared here on type '{ thing: string; }' +!!! related TS6500 asyncFunctionReturnExpressionErrorSpans.ts:5:17: The expected type comes from property 'thing' which is declared here on type '{ thing: string; }' } } } diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js index ac72fcd05feec..523416cff6a76 100644 --- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js +++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts] //// + //// [asyncFunctionReturnExpressionErrorSpans.ts] interface Foo { bar: { diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.symbols b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.symbols index de580b6b97c4d..cba72bb665eaf 100644 --- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.symbols +++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts === +//// [tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts] //// + +=== asyncFunctionReturnExpressionErrorSpans.ts === interface Foo { >Foo : Symbol(Foo, Decl(asyncFunctionReturnExpressionErrorSpans.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types index e381651ad9d23..c27188b2d2ee7 100644 --- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types +++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts === +//// [tests/cases/compiler/asyncFunctionReturnExpressionErrorSpans.ts] //// + +=== asyncFunctionReturnExpressionErrorSpans.ts === interface Foo { bar: { >bar : { baz: { inner: { thing: string; };}; } diff --git a/tests/baselines/reference/asyncFunctionReturnType.2.js b/tests/baselines/reference/asyncFunctionReturnType.2.js index 9405b3f2bb5b6..1580513685952 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.2.js +++ b/tests/baselines/reference/asyncFunctionReturnType.2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionReturnType.2.ts] //// + //// [asyncFunctionReturnType.2.ts] // https://github.com/microsoft/TypeScript/issues/47291 class X { diff --git a/tests/baselines/reference/asyncFunctionReturnType.2.symbols b/tests/baselines/reference/asyncFunctionReturnType.2.symbols index 2e9988be963d3..fe2ccd9a5ec0a 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.2.symbols +++ b/tests/baselines/reference/asyncFunctionReturnType.2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionReturnType.2.ts === +//// [tests/cases/compiler/asyncFunctionReturnType.2.ts] //// + +=== asyncFunctionReturnType.2.ts === // https://github.com/microsoft/TypeScript/issues/47291 class X { >X : Symbol(X, Decl(asyncFunctionReturnType.2.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncFunctionReturnType.2.types b/tests/baselines/reference/asyncFunctionReturnType.2.types index 1559dda5bf47f..9a9e2e2aa46bc 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.2.types +++ b/tests/baselines/reference/asyncFunctionReturnType.2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionReturnType.2.ts === +//// [tests/cases/compiler/asyncFunctionReturnType.2.ts] //// + +=== asyncFunctionReturnType.2.ts === // https://github.com/microsoft/TypeScript/issues/47291 class X { >X : X diff --git a/tests/baselines/reference/asyncFunctionReturnType.js b/tests/baselines/reference/asyncFunctionReturnType.js index 04b3a04a036d3..425e25904d59d 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.js +++ b/tests/baselines/reference/asyncFunctionReturnType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionReturnType.ts] //// + //// [asyncFunctionReturnType.ts] async function fAsync() { // Without explicit type annotation, this is just an array. diff --git a/tests/baselines/reference/asyncFunctionReturnType.symbols b/tests/baselines/reference/asyncFunctionReturnType.symbols index 72fe3c9c2a974..2ee94a9db640f 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.symbols +++ b/tests/baselines/reference/asyncFunctionReturnType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionReturnType.ts === +//// [tests/cases/compiler/asyncFunctionReturnType.ts] //// + +=== asyncFunctionReturnType.ts === async function fAsync() { >fAsync : Symbol(fAsync, Decl(asyncFunctionReturnType.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncFunctionReturnType.types b/tests/baselines/reference/asyncFunctionReturnType.types index 46acb1daf5198..36f64a7111f18 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.types +++ b/tests/baselines/reference/asyncFunctionReturnType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionReturnType.ts === +//// [tests/cases/compiler/asyncFunctionReturnType.ts] //// + +=== asyncFunctionReturnType.ts === async function fAsync() { >fAsync : () => Promise<(number | boolean)[]> diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping.js b/tests/baselines/reference/asyncFunctionTempVariableScoping.js index 9b8b83f93ee6a..16b6afaf7a54d 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping.js +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionTempVariableScoping.ts] //// + //// [asyncFunctionTempVariableScoping.ts] // https://github.com/Microsoft/TypeScript/issues/19187 diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping.symbols b/tests/baselines/reference/asyncFunctionTempVariableScoping.symbols index 578cda3ac7737..27e8ee0feb447 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping.symbols +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionTempVariableScoping.ts === +//// [tests/cases/compiler/asyncFunctionTempVariableScoping.ts] //// + +=== asyncFunctionTempVariableScoping.ts === // https://github.com/Microsoft/TypeScript/issues/19187 async ({ foo, bar, ...rest }) => bar(await foo); diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping.types b/tests/baselines/reference/asyncFunctionTempVariableScoping.types index 30b2399490368..a19291349dc24 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping.types +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionTempVariableScoping.ts === +//// [tests/cases/compiler/asyncFunctionTempVariableScoping.ts] //// + +=== asyncFunctionTempVariableScoping.ts === // https://github.com/Microsoft/TypeScript/issues/19187 async ({ foo, bar, ...rest }) => bar(await foo); diff --git a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js index 1ea24341d043f..ddc852cb93a92 100644 --- a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js +++ b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionWithForStatementNoInitializer.ts] //// + //// [asyncFunctionWithForStatementNoInitializer.ts] async function test1() { let i = 0 diff --git a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.symbols b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.symbols index b8b9e11b8bc8f..3c96d6e88f6c2 100644 --- a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.symbols +++ b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionWithForStatementNoInitializer.ts === +//// [tests/cases/compiler/asyncFunctionWithForStatementNoInitializer.ts] //// + +=== asyncFunctionWithForStatementNoInitializer.ts === async function test1() { >test1 : Symbol(test1, Decl(asyncFunctionWithForStatementNoInitializer.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.types b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.types index d475f1d2fe885..a65395fe4f2f7 100644 --- a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.types +++ b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionWithForStatementNoInitializer.ts === +//// [tests/cases/compiler/asyncFunctionWithForStatementNoInitializer.ts] //// + +=== asyncFunctionWithForStatementNoInitializer.ts === async function test1() { >test1 : () => Promise diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols b/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols index 2e9c52d5d91d5..b19b6e32113e7 100644 --- a/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/asyncFunctionsAcrossFiles.ts] //// + +=== a.ts === import { b } from './b'; >b : Symbol(b, Decl(a.ts, 0, 8)) @@ -14,7 +16,7 @@ export const a = { >f : Symbol(f, Decl(b.ts, 1, 18)) } }; -=== tests/cases/compiler/b.ts === +=== b.ts === import { a } from './a'; >a : Symbol(a, Decl(b.ts, 0, 8)) diff --git a/tests/baselines/reference/asyncFunctionsAcrossFiles.types b/tests/baselines/reference/asyncFunctionsAcrossFiles.types index 0b94614154189..b4fdd435ac2e5 100644 --- a/tests/baselines/reference/asyncFunctionsAcrossFiles.types +++ b/tests/baselines/reference/asyncFunctionsAcrossFiles.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/asyncFunctionsAcrossFiles.ts] //// + +=== a.ts === import { b } from './b'; >b : { f: () => Promise; } @@ -18,7 +20,7 @@ export const a = { >f : () => Promise } }; -=== tests/cases/compiler/b.ts === +=== b.ts === import { a } from './a'; >a : { f: () => Promise; } diff --git a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.js b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.js index a13f2f8b2195a..b04f3e7e8019d 100644 --- a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.js +++ b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncFunctionsAndStrictNullChecks.ts] //// + //// [asyncFunctionsAndStrictNullChecks.ts] declare namespace Windows.Foundation { interface IPromise { diff --git a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.symbols b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.symbols index 2e232ff3f4a96..20ccc56192b8f 100644 --- a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.symbols +++ b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionsAndStrictNullChecks.ts === +//// [tests/cases/compiler/asyncFunctionsAndStrictNullChecks.ts] //// + +=== asyncFunctionsAndStrictNullChecks.ts === declare namespace Windows.Foundation { >Windows : Symbol(Windows, Decl(asyncFunctionsAndStrictNullChecks.ts, 0, 0)) >Foundation : Symbol(Foundation, Decl(asyncFunctionsAndStrictNullChecks.ts, 0, 26)) diff --git a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types index f67fe49a61fb0..2e851b9bf27f3 100644 --- a/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types +++ b/tests/baselines/reference/asyncFunctionsAndStrictNullChecks.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncFunctionsAndStrictNullChecks.ts === +//// [tests/cases/compiler/asyncFunctionsAndStrictNullChecks.ts] //// + +=== asyncFunctionsAndStrictNullChecks.ts === declare namespace Windows.Foundation { interface IPromise { then(success?: (value: TResult) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; diff --git a/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.symbols b/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.symbols index 611c7587c69fc..d7c1605b9721f 100644 --- a/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.symbols +++ b/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/generators/asyncGeneratorGenericNonWrappedReturn.ts === +//// [tests/cases/conformance/generators/asyncGeneratorGenericNonWrappedReturn.ts] //// + +=== asyncGeneratorGenericNonWrappedReturn.ts === // #48966 export async function* test(a: T): AsyncGenerator { diff --git a/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.types b/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.types index d10c4619a516f..f0dbaca258920 100644 --- a/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.types +++ b/tests/baselines/reference/asyncGeneratorGenericNonWrappedReturn.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/generators/asyncGeneratorGenericNonWrappedReturn.ts === +//// [tests/cases/conformance/generators/asyncGeneratorGenericNonWrappedReturn.ts] //// + +=== asyncGeneratorGenericNonWrappedReturn.ts === // #48966 export async function* test(a: T): AsyncGenerator { diff --git a/tests/baselines/reference/asyncGetter_es5.errors.txt b/tests/baselines/reference/asyncGetter_es5.errors.txt index fd3fba40a60ec..8d0d28e07f394 100644 --- a/tests/baselines/reference/asyncGetter_es5.errors.txt +++ b/tests/baselines/reference/asyncGetter_es5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es5/asyncGetter_es5.ts(2,3): error TS1042: 'async' modifier cannot be used here. -tests/cases/conformance/async/es5/asyncGetter_es5.ts(2,13): error TS2378: A 'get' accessor must return a value. +asyncGetter_es5.ts(2,3): error TS1042: 'async' modifier cannot be used here. +asyncGetter_es5.ts(2,13): error TS2378: A 'get' accessor must return a value. -==== tests/cases/conformance/async/es5/asyncGetter_es5.ts (2 errors) ==== +==== asyncGetter_es5.ts (2 errors) ==== class C { async get foo() { ~~~~~ diff --git a/tests/baselines/reference/asyncGetter_es5.js b/tests/baselines/reference/asyncGetter_es5.js index d063c0166770e..4fff3daebb808 100644 --- a/tests/baselines/reference/asyncGetter_es5.js +++ b/tests/baselines/reference/asyncGetter_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncGetter_es5.ts] //// + //// [asyncGetter_es5.ts] class C { async get foo() { diff --git a/tests/baselines/reference/asyncGetter_es5.symbols b/tests/baselines/reference/asyncGetter_es5.symbols index c29c2e8dd3cfb..e8c3947b69dec 100644 --- a/tests/baselines/reference/asyncGetter_es5.symbols +++ b/tests/baselines/reference/asyncGetter_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncGetter_es5.ts === +//// [tests/cases/conformance/async/es5/asyncGetter_es5.ts] //// + +=== asyncGetter_es5.ts === class C { >C : Symbol(C, Decl(asyncGetter_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncGetter_es5.types b/tests/baselines/reference/asyncGetter_es5.types index 071de68c9d7db..77465292c4275 100644 --- a/tests/baselines/reference/asyncGetter_es5.types +++ b/tests/baselines/reference/asyncGetter_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncGetter_es5.ts === +//// [tests/cases/conformance/async/es5/asyncGetter_es5.ts] //// + +=== asyncGetter_es5.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncGetter_es6.errors.txt b/tests/baselines/reference/asyncGetter_es6.errors.txt index f6deea16d0699..6909cd19df1da 100644 --- a/tests/baselines/reference/asyncGetter_es6.errors.txt +++ b/tests/baselines/reference/asyncGetter_es6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/asyncGetter_es6.ts(2,3): error TS1042: 'async' modifier cannot be used here. -tests/cases/conformance/async/es6/asyncGetter_es6.ts(2,13): error TS2378: A 'get' accessor must return a value. +asyncGetter_es6.ts(2,3): error TS1042: 'async' modifier cannot be used here. +asyncGetter_es6.ts(2,13): error TS2378: A 'get' accessor must return a value. -==== tests/cases/conformance/async/es6/asyncGetter_es6.ts (2 errors) ==== +==== asyncGetter_es6.ts (2 errors) ==== class C { async get foo() { ~~~~~ diff --git a/tests/baselines/reference/asyncGetter_es6.js b/tests/baselines/reference/asyncGetter_es6.js index 606f4d95dc7f6..0f97533b0af06 100644 --- a/tests/baselines/reference/asyncGetter_es6.js +++ b/tests/baselines/reference/asyncGetter_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncGetter_es6.ts] //// + //// [asyncGetter_es6.ts] class C { async get foo() { diff --git a/tests/baselines/reference/asyncGetter_es6.symbols b/tests/baselines/reference/asyncGetter_es6.symbols index ee96c939468de..1019340e43052 100644 --- a/tests/baselines/reference/asyncGetter_es6.symbols +++ b/tests/baselines/reference/asyncGetter_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncGetter_es6.ts === +//// [tests/cases/conformance/async/es6/asyncGetter_es6.ts] //// + +=== asyncGetter_es6.ts === class C { >C : Symbol(C, Decl(asyncGetter_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncGetter_es6.types b/tests/baselines/reference/asyncGetter_es6.types index e71c16c4a8b32..8ef08a815f908 100644 --- a/tests/baselines/reference/asyncGetter_es6.types +++ b/tests/baselines/reference/asyncGetter_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncGetter_es6.ts === +//// [tests/cases/conformance/async/es6/asyncGetter_es6.ts] //// + +=== asyncGetter_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncIIFE.js b/tests/baselines/reference/asyncIIFE.js index e2096b4c6dea1..a05980d1d5dee 100644 --- a/tests/baselines/reference/asyncIIFE.js +++ b/tests/baselines/reference/asyncIIFE.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncIIFE.ts] //// + //// [asyncIIFE.ts] function f1() { (async () => { diff --git a/tests/baselines/reference/asyncIIFE.symbols b/tests/baselines/reference/asyncIIFE.symbols index ab7f297379e64..3e1f69a8c67ca 100644 --- a/tests/baselines/reference/asyncIIFE.symbols +++ b/tests/baselines/reference/asyncIIFE.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncIIFE.ts === +//// [tests/cases/compiler/asyncIIFE.ts] //// + +=== asyncIIFE.ts === function f1() { >f1 : Symbol(f1, Decl(asyncIIFE.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncIIFE.types b/tests/baselines/reference/asyncIIFE.types index 886c8c3e5ecdd..f9b43771f6f50 100644 --- a/tests/baselines/reference/asyncIIFE.types +++ b/tests/baselines/reference/asyncIIFE.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncIIFE.ts === +//// [tests/cases/compiler/asyncIIFE.ts] //// + +=== asyncIIFE.ts === function f1() { >f1 : () => void diff --git a/tests/baselines/reference/asyncImportNestedYield.js b/tests/baselines/reference/asyncImportNestedYield.js index cb95a0e65d7d6..92d8e7b908410 100644 --- a/tests/baselines/reference/asyncImportNestedYield.js +++ b/tests/baselines/reference/asyncImportNestedYield.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/asyncImportNestedYield.ts] //// + //// [asyncImportNestedYield.ts] async function* foo() { import((await import(yield "foo")).default); diff --git a/tests/baselines/reference/asyncImportNestedYield.symbols b/tests/baselines/reference/asyncImportNestedYield.symbols index 01107ba5bf6bf..de7eede61f1e2 100644 --- a/tests/baselines/reference/asyncImportNestedYield.symbols +++ b/tests/baselines/reference/asyncImportNestedYield.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncImportNestedYield.ts === +//// [tests/cases/compiler/asyncImportNestedYield.ts] //// + +=== asyncImportNestedYield.ts === async function* foo() { >foo : Symbol(foo, Decl(asyncImportNestedYield.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncImportNestedYield.types b/tests/baselines/reference/asyncImportNestedYield.types index 59cd72d54652a..53cb04d2f9a5d 100644 --- a/tests/baselines/reference/asyncImportNestedYield.types +++ b/tests/baselines/reference/asyncImportNestedYield.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/asyncImportNestedYield.ts === +//// [tests/cases/compiler/asyncImportNestedYield.ts] //// + +=== asyncImportNestedYield.ts === async function* foo() { >foo : () => AsyncGenerator diff --git a/tests/baselines/reference/asyncImportedPromise_es5.symbols b/tests/baselines/reference/asyncImportedPromise_es5.symbols index 257bea2eb9074..9aa3ff0871161 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.symbols +++ b/tests/baselines/reference/asyncImportedPromise_es5.symbols @@ -1,11 +1,13 @@ -=== tests/cases/conformance/async/es5/task.ts === +//// [tests/cases/conformance/async/es5/asyncImportedPromise_es5.ts] //// + +=== task.ts === export class Task extends Promise { } >Task : Symbol(Task, Decl(task.ts, 0, 0)) >T : Symbol(T, Decl(task.ts, 0, 18)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >T : Symbol(T, Decl(task.ts, 0, 18)) -=== tests/cases/conformance/async/es5/test.ts === +=== test.ts === import { Task } from "./task"; >Task : Symbol(Task, Decl(test.ts, 0, 8)) diff --git a/tests/baselines/reference/asyncImportedPromise_es5.types b/tests/baselines/reference/asyncImportedPromise_es5.types index c8ea6bdf61e5d..343b69cc5edbc 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.types +++ b/tests/baselines/reference/asyncImportedPromise_es5.types @@ -1,9 +1,11 @@ -=== tests/cases/conformance/async/es5/task.ts === +//// [tests/cases/conformance/async/es5/asyncImportedPromise_es5.ts] //// + +=== task.ts === export class Task extends Promise { } >Task : Task >Promise : Promise -=== tests/cases/conformance/async/es5/test.ts === +=== test.ts === import { Task } from "./task"; >Task : typeof Task diff --git a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt index 402470313be51..e26e60423e201 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.errors.txt +++ b/tests/baselines/reference/asyncImportedPromise_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es6/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -==== tests/cases/conformance/async/es6/task.ts (0 errors) ==== +==== task.ts (0 errors) ==== export class Task extends Promise { } -==== tests/cases/conformance/async/es6/test.ts (1 errors) ==== +==== test.ts (1 errors) ==== import { Task } from "./task"; class Test { async example(): Task { return; } diff --git a/tests/baselines/reference/asyncImportedPromise_es6.symbols b/tests/baselines/reference/asyncImportedPromise_es6.symbols index 388547c48adcd..dc8882fb9a89c 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.symbols +++ b/tests/baselines/reference/asyncImportedPromise_es6.symbols @@ -1,11 +1,13 @@ -=== tests/cases/conformance/async/es6/task.ts === +//// [tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts] //// + +=== task.ts === export class Task extends Promise { } >Task : Symbol(Task, Decl(task.ts, 0, 0)) >T : Symbol(T, Decl(task.ts, 0, 18)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >T : Symbol(T, Decl(task.ts, 0, 18)) -=== tests/cases/conformance/async/es6/test.ts === +=== test.ts === import { Task } from "./task"; >Task : Symbol(Task, Decl(test.ts, 0, 8)) diff --git a/tests/baselines/reference/asyncImportedPromise_es6.types b/tests/baselines/reference/asyncImportedPromise_es6.types index 05411f1dda588..3062e8cff5487 100644 --- a/tests/baselines/reference/asyncImportedPromise_es6.types +++ b/tests/baselines/reference/asyncImportedPromise_es6.types @@ -1,9 +1,11 @@ -=== tests/cases/conformance/async/es6/task.ts === +//// [tests/cases/conformance/async/es6/asyncImportedPromise_es6.ts] //// + +=== task.ts === export class Task extends Promise { } >Task : Task >Promise : Promise -=== tests/cases/conformance/async/es6/test.ts === +=== test.ts === import { Task } from "./task"; >Task : typeof Task diff --git a/tests/baselines/reference/asyncInterface_es5.errors.txt b/tests/baselines/reference/asyncInterface_es5.errors.txt index 30d2c554da718..931ebb1e21497 100644 --- a/tests/baselines/reference/asyncInterface_es5.errors.txt +++ b/tests/baselines/reference/asyncInterface_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncInterface_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncInterface_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es5/asyncInterface_es5.ts (1 errors) ==== +==== asyncInterface_es5.ts (1 errors) ==== async interface I { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncInterface_es5.js b/tests/baselines/reference/asyncInterface_es5.js index 280dade386942..5931d9bb76a39 100644 --- a/tests/baselines/reference/asyncInterface_es5.js +++ b/tests/baselines/reference/asyncInterface_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncInterface_es5.ts] //// + //// [asyncInterface_es5.ts] async interface I { } diff --git a/tests/baselines/reference/asyncInterface_es5.symbols b/tests/baselines/reference/asyncInterface_es5.symbols index d12228581dccc..95beee09f7c7d 100644 --- a/tests/baselines/reference/asyncInterface_es5.symbols +++ b/tests/baselines/reference/asyncInterface_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncInterface_es5.ts === +//// [tests/cases/conformance/async/es5/asyncInterface_es5.ts] //// + +=== asyncInterface_es5.ts === async interface I { >I : Symbol(I, Decl(asyncInterface_es5.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncInterface_es5.types b/tests/baselines/reference/asyncInterface_es5.types index cc1913e891b4b..6cb7fa0fb0f44 100644 --- a/tests/baselines/reference/asyncInterface_es5.types +++ b/tests/baselines/reference/asyncInterface_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncInterface_es5.ts === +//// [tests/cases/conformance/async/es5/asyncInterface_es5.ts] //// + +=== asyncInterface_es5.ts === async interface I { } diff --git a/tests/baselines/reference/asyncInterface_es6.errors.txt b/tests/baselines/reference/asyncInterface_es6.errors.txt index c7519ba040e17..699767d61309c 100644 --- a/tests/baselines/reference/asyncInterface_es6.errors.txt +++ b/tests/baselines/reference/asyncInterface_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncInterface_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncInterface_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es6/asyncInterface_es6.ts (1 errors) ==== +==== asyncInterface_es6.ts (1 errors) ==== async interface I { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncInterface_es6.js b/tests/baselines/reference/asyncInterface_es6.js index 36314fa2141a7..a27c90897b3f6 100644 --- a/tests/baselines/reference/asyncInterface_es6.js +++ b/tests/baselines/reference/asyncInterface_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncInterface_es6.ts] //// + //// [asyncInterface_es6.ts] async interface I { } diff --git a/tests/baselines/reference/asyncInterface_es6.symbols b/tests/baselines/reference/asyncInterface_es6.symbols index 9a09798a75577..c9dbb0adee80c 100644 --- a/tests/baselines/reference/asyncInterface_es6.symbols +++ b/tests/baselines/reference/asyncInterface_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncInterface_es6.ts === +//// [tests/cases/conformance/async/es6/asyncInterface_es6.ts] //// + +=== asyncInterface_es6.ts === async interface I { >I : Symbol(I, Decl(asyncInterface_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncInterface_es6.types b/tests/baselines/reference/asyncInterface_es6.types index 34e5f482911d4..cf86ff6b1ebf2 100644 --- a/tests/baselines/reference/asyncInterface_es6.types +++ b/tests/baselines/reference/asyncInterface_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncInterface_es6.ts === +//// [tests/cases/conformance/async/es6/asyncInterface_es6.ts] //// + +=== asyncInterface_es6.ts === async interface I { } diff --git a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js index 5e2a152b9e003..bdf1f507d4cd6 100644 --- a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js +++ b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncMethodWithSuperConflict_es6.ts] //// + //// [asyncMethodWithSuperConflict_es6.ts] class A { x() { diff --git a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.symbols b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.symbols index 161b6eca39b7b..2b8c5d7c69b41 100644 --- a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.symbols +++ b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncMethodWithSuperConflict_es6.ts === +//// [tests/cases/conformance/async/es2017/asyncMethodWithSuperConflict_es6.ts] //// + +=== asyncMethodWithSuperConflict_es6.ts === class A { >A : Symbol(A, Decl(asyncMethodWithSuperConflict_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.types b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.types index 02cd386877f4f..5eced00235481 100644 --- a/tests/baselines/reference/asyncMethodWithSuperConflict_es6.types +++ b/tests/baselines/reference/asyncMethodWithSuperConflict_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncMethodWithSuperConflict_es6.ts === +//// [tests/cases/conformance/async/es2017/asyncMethodWithSuperConflict_es6.ts] //// + +=== asyncMethodWithSuperConflict_es6.ts === class A { >A : A diff --git a/tests/baselines/reference/asyncMethodWithSuper_es2017.js b/tests/baselines/reference/asyncMethodWithSuper_es2017.js index 4c5a7aa9866fc..9db78311dca93 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es2017.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncMethodWithSuper_es2017.ts] //// + //// [asyncMethodWithSuper_es2017.ts] class A { x() { diff --git a/tests/baselines/reference/asyncMethodWithSuper_es2017.symbols b/tests/baselines/reference/asyncMethodWithSuper_es2017.symbols index bee97d8a0069f..7fe203087eaff 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es2017.symbols +++ b/tests/baselines/reference/asyncMethodWithSuper_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncMethodWithSuper_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncMethodWithSuper_es2017.ts] //// + +=== asyncMethodWithSuper_es2017.ts === class A { >A : Symbol(A, Decl(asyncMethodWithSuper_es2017.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncMethodWithSuper_es2017.types b/tests/baselines/reference/asyncMethodWithSuper_es2017.types index b76b13798b868..af77827e261e8 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es2017.types +++ b/tests/baselines/reference/asyncMethodWithSuper_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncMethodWithSuper_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncMethodWithSuper_es2017.ts] //// + +=== asyncMethodWithSuper_es2017.ts === class A { >A : A diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5.js b/tests/baselines/reference/asyncMethodWithSuper_es5.js index 441ad8875c412..d58d7f2f0a8f8 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es5.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts] //// + //// [asyncMethodWithSuper_es5.ts] class A { x() { diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5.symbols b/tests/baselines/reference/asyncMethodWithSuper_es5.symbols index c013058c85a4f..4155347523298 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es5.symbols +++ b/tests/baselines/reference/asyncMethodWithSuper_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts === +//// [tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts] //// + +=== asyncMethodWithSuper_es5.ts === class A { >A : Symbol(A, Decl(asyncMethodWithSuper_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5.types b/tests/baselines/reference/asyncMethodWithSuper_es5.types index 58f545dc93b25..14e48f10c74ee 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es5.types +++ b/tests/baselines/reference/asyncMethodWithSuper_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts === +//// [tests/cases/conformance/async/es5/asyncMethodWithSuper_es5.ts] //// + +=== asyncMethodWithSuper_es5.ts === class A { >A : A diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.js b/tests/baselines/reference/asyncMethodWithSuper_es6.js index 514fc52f4efc2..f011f488a83df 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.js +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts] //// + //// [asyncMethodWithSuper_es6.ts] class A { x() { diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols index ca3c70f048073..9658563aee3af 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.symbols +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts === +//// [tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts] //// + +=== asyncMethodWithSuper_es6.ts === class A { >A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncMethodWithSuper_es6.types b/tests/baselines/reference/asyncMethodWithSuper_es6.types index a2d5bf49b898b..314d02dcd96ea 100644 --- a/tests/baselines/reference/asyncMethodWithSuper_es6.types +++ b/tests/baselines/reference/asyncMethodWithSuper_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts === +//// [tests/cases/conformance/async/es6/asyncMethodWithSuper_es6.ts] //// + +=== asyncMethodWithSuper_es6.ts === class A { >A : A diff --git a/tests/baselines/reference/asyncModule_es5.errors.txt b/tests/baselines/reference/asyncModule_es5.errors.txt index f3f1b58828867..a9b7e9e3c542a 100644 --- a/tests/baselines/reference/asyncModule_es5.errors.txt +++ b/tests/baselines/reference/asyncModule_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncModule_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncModule_es5.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es5/asyncModule_es5.ts (1 errors) ==== +==== asyncModule_es5.ts (1 errors) ==== async module M { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncModule_es5.js b/tests/baselines/reference/asyncModule_es5.js index a36356463309e..cfdf3ded13a28 100644 --- a/tests/baselines/reference/asyncModule_es5.js +++ b/tests/baselines/reference/asyncModule_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncModule_es5.ts] //// + //// [asyncModule_es5.ts] async module M { } diff --git a/tests/baselines/reference/asyncModule_es5.symbols b/tests/baselines/reference/asyncModule_es5.symbols index 521d6e26b2355..9b13d3e78e3d2 100644 --- a/tests/baselines/reference/asyncModule_es5.symbols +++ b/tests/baselines/reference/asyncModule_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncModule_es5.ts === +//// [tests/cases/conformance/async/es5/asyncModule_es5.ts] //// + +=== asyncModule_es5.ts === async module M { >M : Symbol(M, Decl(asyncModule_es5.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncModule_es5.types b/tests/baselines/reference/asyncModule_es5.types index 0f59174940c0e..e373595000a7e 100644 --- a/tests/baselines/reference/asyncModule_es5.types +++ b/tests/baselines/reference/asyncModule_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncModule_es5.ts === +//// [tests/cases/conformance/async/es5/asyncModule_es5.ts] //// + +=== asyncModule_es5.ts === async module M { } diff --git a/tests/baselines/reference/asyncModule_es6.errors.txt b/tests/baselines/reference/asyncModule_es6.errors.txt index 91e5e8ccdd3c5..3b50471f3004c 100644 --- a/tests/baselines/reference/asyncModule_es6.errors.txt +++ b/tests/baselines/reference/asyncModule_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncModule_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. +asyncModule_es6.ts(1,1): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es6/asyncModule_es6.ts (1 errors) ==== +==== asyncModule_es6.ts (1 errors) ==== async module M { ~~~~~ !!! error TS1042: 'async' modifier cannot be used here. diff --git a/tests/baselines/reference/asyncModule_es6.js b/tests/baselines/reference/asyncModule_es6.js index e3e9306dbcbe6..fa4bc63d89891 100644 --- a/tests/baselines/reference/asyncModule_es6.js +++ b/tests/baselines/reference/asyncModule_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncModule_es6.ts] //// + //// [asyncModule_es6.ts] async module M { } diff --git a/tests/baselines/reference/asyncModule_es6.symbols b/tests/baselines/reference/asyncModule_es6.symbols index 3a1ebc8fcf63d..1d4c791afa101 100644 --- a/tests/baselines/reference/asyncModule_es6.symbols +++ b/tests/baselines/reference/asyncModule_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncModule_es6.ts === +//// [tests/cases/conformance/async/es6/asyncModule_es6.ts] //// + +=== asyncModule_es6.ts === async module M { >M : Symbol(M, Decl(asyncModule_es6.ts, 0, 0)) } diff --git a/tests/baselines/reference/asyncModule_es6.types b/tests/baselines/reference/asyncModule_es6.types index f4143cb7a386c..456b6d3ca8b8b 100644 --- a/tests/baselines/reference/asyncModule_es6.types +++ b/tests/baselines/reference/asyncModule_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncModule_es6.ts === +//// [tests/cases/conformance/async/es6/asyncModule_es6.ts] //// + +=== asyncModule_es6.ts === async module M { } diff --git a/tests/baselines/reference/asyncMultiFile_es5.symbols b/tests/baselines/reference/asyncMultiFile_es5.symbols index e8e5bf2850e84..e614d98bb2b29 100644 --- a/tests/baselines/reference/asyncMultiFile_es5.symbols +++ b/tests/baselines/reference/asyncMultiFile_es5.symbols @@ -1,8 +1,10 @@ -=== tests/cases/conformance/async/es5/a.ts === +//// [tests/cases/conformance/async/es5/asyncMultiFile_es5.ts] //// + +=== a.ts === async function f() {} >f : Symbol(f, Decl(a.ts, 0, 0)) -=== tests/cases/conformance/async/es5/b.ts === +=== b.ts === function g() { } >g : Symbol(g, Decl(b.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncMultiFile_es5.types b/tests/baselines/reference/asyncMultiFile_es5.types index 52ca4f49e813b..6bcba113f9101 100644 --- a/tests/baselines/reference/asyncMultiFile_es5.types +++ b/tests/baselines/reference/asyncMultiFile_es5.types @@ -1,8 +1,10 @@ -=== tests/cases/conformance/async/es5/a.ts === +//// [tests/cases/conformance/async/es5/asyncMultiFile_es5.ts] //// + +=== a.ts === async function f() {} >f : () => Promise -=== tests/cases/conformance/async/es5/b.ts === +=== b.ts === function g() { } >g : () => void diff --git a/tests/baselines/reference/asyncMultiFile_es6.symbols b/tests/baselines/reference/asyncMultiFile_es6.symbols index 790ceafef8f08..59ea7972f4de4 100644 --- a/tests/baselines/reference/asyncMultiFile_es6.symbols +++ b/tests/baselines/reference/asyncMultiFile_es6.symbols @@ -1,8 +1,10 @@ -=== tests/cases/conformance/async/es6/a.ts === +//// [tests/cases/conformance/async/es6/asyncMultiFile_es6.ts] //// + +=== a.ts === async function f() {} >f : Symbol(f, Decl(a.ts, 0, 0)) -=== tests/cases/conformance/async/es6/b.ts === +=== b.ts === function g() { } >g : Symbol(g, Decl(b.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncMultiFile_es6.types b/tests/baselines/reference/asyncMultiFile_es6.types index 70eebc0577a29..3dae140754340 100644 --- a/tests/baselines/reference/asyncMultiFile_es6.types +++ b/tests/baselines/reference/asyncMultiFile_es6.types @@ -1,8 +1,10 @@ -=== tests/cases/conformance/async/es6/a.ts === +//// [tests/cases/conformance/async/es6/asyncMultiFile_es6.ts] //// + +=== a.ts === async function f() {} >f : () => Promise -=== tests/cases/conformance/async/es6/b.ts === +=== b.ts === function g() { } >g : () => void diff --git a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.errors.txt b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.errors.txt index 4b18189d9c90b..2f031b8577301 100644 --- a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.errors.txt +++ b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts(14,9): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts(18,9): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts(22,11): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts(38,9): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts(42,9): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts(46,11): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +asyncOrYieldAsBindingIdentifier1.ts(14,9): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncOrYieldAsBindingIdentifier1.ts(18,9): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncOrYieldAsBindingIdentifier1.ts(22,11): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +asyncOrYieldAsBindingIdentifier1.ts(38,9): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +asyncOrYieldAsBindingIdentifier1.ts(42,9): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +asyncOrYieldAsBindingIdentifier1.ts(46,11): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -==== tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts (6 errors) ==== +==== asyncOrYieldAsBindingIdentifier1.ts (6 errors) ==== function f_let () { let await = 1 } diff --git a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.js b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.js index d770f71ab8a46..5b00ae26ea9d4 100644 --- a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.js +++ b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts] //// + //// [asyncOrYieldAsBindingIdentifier1.ts] function f_let () { let await = 1 diff --git a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.symbols b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.symbols index 830d08b69ad13..79aba91b15fb2 100644 --- a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.symbols +++ b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts] //// + +=== asyncOrYieldAsBindingIdentifier1.ts === function f_let () { >f_let : Symbol(f_let, Decl(asyncOrYieldAsBindingIdentifier1.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.types b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.types index e887b60eb21e4..ca37011ae7e6d 100644 --- a/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.types +++ b/tests/baselines/reference/asyncOrYieldAsBindingIdentifier1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts === +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncOrYieldAsBindingIdentifier1.ts] //// + +=== asyncOrYieldAsBindingIdentifier1.ts === function f_let () { >f_let : () => void diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.js b/tests/baselines/reference/asyncQualifiedReturnType_es5.js index 601dc8b3c476e..d6414fb7967ea 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.js +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts] //// + //// [asyncQualifiedReturnType_es5.ts] namespace X { export class MyPromise extends Promise { diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.symbols b/tests/baselines/reference/asyncQualifiedReturnType_es5.symbols index bca6709ec068d..ec66e0db875d1 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.symbols +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts === +//// [tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts] //// + +=== asyncQualifiedReturnType_es5.ts === namespace X { >X : Symbol(X, Decl(asyncQualifiedReturnType_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.types b/tests/baselines/reference/asyncQualifiedReturnType_es5.types index 8df2ac42c50c9..5b6c918be62a3 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es5.types +++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts === +//// [tests/cases/conformance/async/es5/asyncQualifiedReturnType_es5.ts] //// + +=== asyncQualifiedReturnType_es5.ts === namespace X { >X : typeof X diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt index 023579f6dcf51..4bdfe7668bfbc 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? +asyncQualifiedReturnType_es6.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise'? -==== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts (1 errors) ==== +==== asyncQualifiedReturnType_es6.ts (1 errors) ==== namespace X { export class MyPromise extends Promise { } diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.js b/tests/baselines/reference/asyncQualifiedReturnType_es6.js index 4d5aa87bbffb4..f75dca441f049 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.js +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts] //// + //// [asyncQualifiedReturnType_es6.ts] namespace X { export class MyPromise extends Promise { diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols b/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols index f2216a9f9858d..9754505189246 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts === +//// [tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts] //// + +=== asyncQualifiedReturnType_es6.ts === namespace X { >X : Symbol(X, Decl(asyncQualifiedReturnType_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es6.types b/tests/baselines/reference/asyncQualifiedReturnType_es6.types index f1878fed5d80f..3e80dbf0747c3 100644 --- a/tests/baselines/reference/asyncQualifiedReturnType_es6.types +++ b/tests/baselines/reference/asyncQualifiedReturnType_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts === +//// [tests/cases/conformance/async/es6/asyncQualifiedReturnType_es6.ts] //// + +=== asyncQualifiedReturnType_es6.ts === namespace X { >X : typeof X diff --git a/tests/baselines/reference/asyncSetter_es5.errors.txt b/tests/baselines/reference/asyncSetter_es5.errors.txt index 59557ec9313fc..d637655d34104 100644 --- a/tests/baselines/reference/asyncSetter_es5.errors.txt +++ b/tests/baselines/reference/asyncSetter_es5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es5/asyncSetter_es5.ts(2,3): error TS1042: 'async' modifier cannot be used here. +asyncSetter_es5.ts(2,3): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es5/asyncSetter_es5.ts (1 errors) ==== +==== asyncSetter_es5.ts (1 errors) ==== class C { async set foo(value) { ~~~~~ diff --git a/tests/baselines/reference/asyncSetter_es5.js b/tests/baselines/reference/asyncSetter_es5.js index a49ee1c73c99c..78ab925022a50 100644 --- a/tests/baselines/reference/asyncSetter_es5.js +++ b/tests/baselines/reference/asyncSetter_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncSetter_es5.ts] //// + //// [asyncSetter_es5.ts] class C { async set foo(value) { diff --git a/tests/baselines/reference/asyncSetter_es5.symbols b/tests/baselines/reference/asyncSetter_es5.symbols index c07af2778c524..cc3d1923c6ccf 100644 --- a/tests/baselines/reference/asyncSetter_es5.symbols +++ b/tests/baselines/reference/asyncSetter_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncSetter_es5.ts === +//// [tests/cases/conformance/async/es5/asyncSetter_es5.ts] //// + +=== asyncSetter_es5.ts === class C { >C : Symbol(C, Decl(asyncSetter_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncSetter_es5.types b/tests/baselines/reference/asyncSetter_es5.types index cd6c0b6677f8a..1c954df62497f 100644 --- a/tests/baselines/reference/asyncSetter_es5.types +++ b/tests/baselines/reference/asyncSetter_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncSetter_es5.ts === +//// [tests/cases/conformance/async/es5/asyncSetter_es5.ts] //// + +=== asyncSetter_es5.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncSetter_es6.errors.txt b/tests/baselines/reference/asyncSetter_es6.errors.txt index e60e05cbc550e..f2ac40afdeb8a 100644 --- a/tests/baselines/reference/asyncSetter_es6.errors.txt +++ b/tests/baselines/reference/asyncSetter_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/async/es6/asyncSetter_es6.ts(2,3): error TS1042: 'async' modifier cannot be used here. +asyncSetter_es6.ts(2,3): error TS1042: 'async' modifier cannot be used here. -==== tests/cases/conformance/async/es6/asyncSetter_es6.ts (1 errors) ==== +==== asyncSetter_es6.ts (1 errors) ==== class C { async set foo(value) { ~~~~~ diff --git a/tests/baselines/reference/asyncSetter_es6.js b/tests/baselines/reference/asyncSetter_es6.js index 303e483f9a96c..be7393244047e 100644 --- a/tests/baselines/reference/asyncSetter_es6.js +++ b/tests/baselines/reference/asyncSetter_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncSetter_es6.ts] //// + //// [asyncSetter_es6.ts] class C { async set foo(value) { diff --git a/tests/baselines/reference/asyncSetter_es6.symbols b/tests/baselines/reference/asyncSetter_es6.symbols index fa37e5bacc03e..ff6f23990fc42 100644 --- a/tests/baselines/reference/asyncSetter_es6.symbols +++ b/tests/baselines/reference/asyncSetter_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncSetter_es6.ts === +//// [tests/cases/conformance/async/es6/asyncSetter_es6.ts] //// + +=== asyncSetter_es6.ts === class C { >C : Symbol(C, Decl(asyncSetter_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/asyncSetter_es6.types b/tests/baselines/reference/asyncSetter_es6.types index 99a4a25cbda90..a538d72a6fae1 100644 --- a/tests/baselines/reference/asyncSetter_es6.types +++ b/tests/baselines/reference/asyncSetter_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncSetter_es6.ts === +//// [tests/cases/conformance/async/es6/asyncSetter_es6.ts] //// + +=== asyncSetter_es6.ts === class C { >C : C diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js index a3c73c5c1b517..42e28b3ced2c9 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es2017.ts] //// + //// [asyncUnParenthesizedArrowFunction_es2017.ts] declare function someOtherFunction(i: any): Promise; const x = async i => await someOtherFunction(i) diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.symbols b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.symbols index faefa051d3cbe..8c6dc5fd68120 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.symbols +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es2017.ts] //// + +=== asyncUnParenthesizedArrowFunction_es2017.ts === declare function someOtherFunction(i: any): Promise; >someOtherFunction : Symbol(someOtherFunction, Decl(asyncUnParenthesizedArrowFunction_es2017.ts, 0, 0)) >i : Symbol(i, Decl(asyncUnParenthesizedArrowFunction_es2017.ts, 0, 35)) diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.types b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.types index 255b86287eb15..a98247d46a15d 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.types +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es2017.ts] //// + +=== asyncUnParenthesizedArrowFunction_es2017.ts === declare function someOtherFunction(i: any): Promise; >someOtherFunction : (i: any) => Promise >i : any diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.js index 93062b6feee11..c614bd2aa4889 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es5.ts] //// + //// [asyncUnParenthesizedArrowFunction_es5.ts] declare function someOtherFunction(i: any): Promise; const x = async i => await someOtherFunction(i) diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.symbols b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.symbols index 6ed6d5f7ae38e..94e87d686eed8 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.symbols +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es5.ts] //// + +=== asyncUnParenthesizedArrowFunction_es5.ts === declare function someOtherFunction(i: any): Promise; >someOtherFunction : Symbol(someOtherFunction, Decl(asyncUnParenthesizedArrowFunction_es5.ts, 0, 0)) >i : Symbol(i, Decl(asyncUnParenthesizedArrowFunction_es5.ts, 0, 35)) diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.types b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.types index a1dff9ee0e768..6a823745c20de 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.types +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es5.ts === +//// [tests/cases/conformance/async/es5/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es5.ts] //// + +=== asyncUnParenthesizedArrowFunction_es5.ts === declare function someOtherFunction(i: any): Promise; >someOtherFunction : (i: any) => Promise >i : any diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js index dd5f793ae9dd3..676472b0adc74 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts] //// + //// [asyncUnParenthesizedArrowFunction_es6.ts] declare function someOtherFunction(i: any): Promise; const x = async i => await someOtherFunction(i) diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.symbols b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.symbols index 5350a1c16b810..8eb743b15e418 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.symbols +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts] //// + +=== asyncUnParenthesizedArrowFunction_es6.ts === declare function someOtherFunction(i: any): Promise; >someOtherFunction : Symbol(someOtherFunction, Decl(asyncUnParenthesizedArrowFunction_es6.ts, 0, 0)) >i : Symbol(i, Decl(asyncUnParenthesizedArrowFunction_es6.ts, 0, 35)) diff --git a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.types b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.types index 6919118925137..7aad9ce6f19cf 100644 --- a/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.types +++ b/tests/baselines/reference/asyncUnParenthesizedArrowFunction_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts === +//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncUnParenthesizedArrowFunction_es6.ts] //// + +=== asyncUnParenthesizedArrowFunction_es6.ts === declare function someOtherFunction(i: any): Promise; >someOtherFunction : (i: any) => Promise >i : any diff --git a/tests/baselines/reference/asyncUseStrict_es2017.js b/tests/baselines/reference/asyncUseStrict_es2017.js index 1b9d1dc7f205f..3dd25e9365d17 100644 --- a/tests/baselines/reference/asyncUseStrict_es2017.js +++ b/tests/baselines/reference/asyncUseStrict_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/asyncUseStrict_es2017.ts] //// + //// [asyncUseStrict_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/asyncUseStrict_es2017.symbols b/tests/baselines/reference/asyncUseStrict_es2017.symbols index d3ee149f8f42f..6fc5abe01b74f 100644 --- a/tests/baselines/reference/asyncUseStrict_es2017.symbols +++ b/tests/baselines/reference/asyncUseStrict_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncUseStrict_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncUseStrict_es2017.ts] //// + +=== asyncUseStrict_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(asyncUseStrict_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncUseStrict_es2017.types b/tests/baselines/reference/asyncUseStrict_es2017.types index 9b0aa4e5df40f..c905719083e5c 100644 --- a/tests/baselines/reference/asyncUseStrict_es2017.types +++ b/tests/baselines/reference/asyncUseStrict_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/asyncUseStrict_es2017.ts === +//// [tests/cases/conformance/async/es2017/asyncUseStrict_es2017.ts] //// + +=== asyncUseStrict_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/asyncUseStrict_es5.js b/tests/baselines/reference/asyncUseStrict_es5.js index 0a1b61b96d8aa..26eae828f0ed2 100644 --- a/tests/baselines/reference/asyncUseStrict_es5.js +++ b/tests/baselines/reference/asyncUseStrict_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/asyncUseStrict_es5.ts] //// + //// [asyncUseStrict_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/asyncUseStrict_es5.symbols b/tests/baselines/reference/asyncUseStrict_es5.symbols index 96322bdec9489..7091f0c4067a3 100644 --- a/tests/baselines/reference/asyncUseStrict_es5.symbols +++ b/tests/baselines/reference/asyncUseStrict_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncUseStrict_es5.ts === +//// [tests/cases/conformance/async/es5/asyncUseStrict_es5.ts] //// + +=== asyncUseStrict_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(asyncUseStrict_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncUseStrict_es5.types b/tests/baselines/reference/asyncUseStrict_es5.types index daea07dfb95d1..2d6f6902d1151 100644 --- a/tests/baselines/reference/asyncUseStrict_es5.types +++ b/tests/baselines/reference/asyncUseStrict_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/asyncUseStrict_es5.ts === +//// [tests/cases/conformance/async/es5/asyncUseStrict_es5.ts] //// + +=== asyncUseStrict_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/asyncUseStrict_es6.js b/tests/baselines/reference/asyncUseStrict_es6.js index 5475a71102ace..a27aa89e637f7 100644 --- a/tests/baselines/reference/asyncUseStrict_es6.js +++ b/tests/baselines/reference/asyncUseStrict_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncUseStrict_es6.ts] //// + //// [asyncUseStrict_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/asyncUseStrict_es6.symbols b/tests/baselines/reference/asyncUseStrict_es6.symbols index ebfea38de7c97..9d0cc2f55d633 100644 --- a/tests/baselines/reference/asyncUseStrict_es6.symbols +++ b/tests/baselines/reference/asyncUseStrict_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncUseStrict_es6.ts === +//// [tests/cases/conformance/async/es6/asyncUseStrict_es6.ts] //// + +=== asyncUseStrict_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(asyncUseStrict_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/asyncUseStrict_es6.types b/tests/baselines/reference/asyncUseStrict_es6.types index 73a8641ef47c1..98bfb8d75910b 100644 --- a/tests/baselines/reference/asyncUseStrict_es6.types +++ b/tests/baselines/reference/asyncUseStrict_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncUseStrict_es6.ts === +//// [tests/cases/conformance/async/es6/asyncUseStrict_es6.ts] //// + +=== asyncUseStrict_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.js b/tests/baselines/reference/asyncWithVarShadowing_es6.js index ecdffcd25a588..0d2060e9fa3ce 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.js +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts] //// + //// [asyncWithVarShadowing_es6.ts] // https://github.com/Microsoft/TypeScript/issues/20461 declare const y: any; diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.symbols b/tests/baselines/reference/asyncWithVarShadowing_es6.symbols index ff95648722f94..bdf57cb428441 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.symbols +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts === +//// [tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts] //// + +=== asyncWithVarShadowing_es6.ts === // https://github.com/Microsoft/TypeScript/issues/20461 declare const y: any; >y : Symbol(y, Decl(asyncWithVarShadowing_es6.ts, 1, 13)) diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.types b/tests/baselines/reference/asyncWithVarShadowing_es6.types index f87e452b2a1c2..b994c0ebf3fa3 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.types +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts === +//// [tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts] //// + +=== asyncWithVarShadowing_es6.ts === // https://github.com/Microsoft/TypeScript/issues/20461 declare const y: any; >y : any diff --git a/tests/baselines/reference/augmentArray.js b/tests/baselines/reference/augmentArray.js index 948f194404861..91c071d93ec32 100644 --- a/tests/baselines/reference/augmentArray.js +++ b/tests/baselines/reference/augmentArray.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentArray.ts] //// + //// [augmentArray.ts] interface Array { (): any[]; diff --git a/tests/baselines/reference/augmentArray.symbols b/tests/baselines/reference/augmentArray.symbols index c26db98bef963..106c3cd3497f8 100644 --- a/tests/baselines/reference/augmentArray.symbols +++ b/tests/baselines/reference/augmentArray.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentArray.ts === +//// [tests/cases/compiler/augmentArray.ts] //// + +=== augmentArray.ts === interface Array { >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(augmentArray.ts, 0, 0)) >T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(augmentArray.ts, 0, 16)) diff --git a/tests/baselines/reference/augmentArray.types b/tests/baselines/reference/augmentArray.types index 938f4c8d6003e..a449f415db301 100644 --- a/tests/baselines/reference/augmentArray.types +++ b/tests/baselines/reference/augmentArray.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentArray.ts === +//// [tests/cases/compiler/augmentArray.ts] //// + +=== augmentArray.ts === interface Array { (): any[]; diff --git a/tests/baselines/reference/augmentExportEquals1.errors.txt b/tests/baselines/reference/augmentExportEquals1.errors.txt index fb2429d1c7f9e..390b06946880c 100644 --- a/tests/baselines/reference/augmentExportEquals1.errors.txt +++ b/tests/baselines/reference/augmentExportEquals1.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/file2.ts(5,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. -tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. +file2.ts(5,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. +file3.ts(3,8): error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file3.ts (1 errors) ==== +==== file3.ts (1 errors) ==== import x = require("./file1"); import "./file2"; let a: x.A; // should not work ~ !!! error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file1.ts (0 errors) ==== +==== file1.ts (0 errors) ==== var x = 1; export = x; -==== tests/cases/compiler/file2.ts (1 errors) ==== +==== file2.ts (1 errors) ==== import x = require("./file1"); // augmentation for './file1' diff --git a/tests/baselines/reference/augmentExportEquals1.symbols b/tests/baselines/reference/augmentExportEquals1.symbols index f20b5b1fa43c2..2a49028ee95cb 100644 --- a/tests/baselines/reference/augmentExportEquals1.symbols +++ b/tests/baselines/reference/augmentExportEquals1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals1.ts] //// + +=== file3.ts === import x = require("./file1"); >x : Symbol(x, Decl(file3.ts, 0, 0)) @@ -8,14 +10,14 @@ let a: x.A; // should not work >x : Symbol(x) >A : Symbol(x.A) -=== tests/cases/compiler/file1.ts === +=== file1.ts === var x = 1; >x : Symbol(x, Decl(file1.ts, 0, 3)) export = x; >x : Symbol(x, Decl(file1.ts, 0, 3)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentExportEquals1.types b/tests/baselines/reference/augmentExportEquals1.types index 0b09c1239831c..46bd32b2579b9 100644 --- a/tests/baselines/reference/augmentExportEquals1.types +++ b/tests/baselines/reference/augmentExportEquals1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals1.ts] //// + +=== file3.ts === import x = require("./file1"); >x : number @@ -7,7 +9,7 @@ let a: x.A; // should not work >a : x.A >x : any -=== tests/cases/compiler/file1.ts === +=== file1.ts === var x = 1; >x : number >1 : 1 @@ -15,7 +17,7 @@ var x = 1; export = x; >x : number -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : number diff --git a/tests/baselines/reference/augmentExportEquals1_1.errors.txt b/tests/baselines/reference/augmentExportEquals1_1.errors.txt index a3d0b28a26138..2d4719c215c6a 100644 --- a/tests/baselines/reference/augmentExportEquals1_1.errors.txt +++ b/tests/baselines/reference/augmentExportEquals1_1.errors.txt @@ -1,20 +1,20 @@ -tests/cases/compiler/file2.ts(6,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. -tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. +file2.ts(6,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. +file3.ts(3,8): error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file3.ts (1 errors) ==== +==== file3.ts (1 errors) ==== import x = require("file1"); import "file2"; let a: x.A; // should not work ~ !!! error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file1.d.ts (0 errors) ==== +==== file1.d.ts (0 errors) ==== declare module "file1" { var x: number; export = x; } -==== tests/cases/compiler/file2.ts (1 errors) ==== +==== file2.ts (1 errors) ==== /// import x = require("file1"); diff --git a/tests/baselines/reference/augmentExportEquals1_1.symbols b/tests/baselines/reference/augmentExportEquals1_1.symbols index 1c88a126660c1..e095cbfcfe25a 100644 --- a/tests/baselines/reference/augmentExportEquals1_1.symbols +++ b/tests/baselines/reference/augmentExportEquals1_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals1_1.ts] //// + +=== file3.ts === import x = require("file1"); >x : Symbol(x, Decl(file3.ts, 0, 0)) @@ -8,7 +10,7 @@ let a: x.A; // should not work >x : Symbol(x) >A : Symbol(x.A) -=== tests/cases/compiler/file1.d.ts === +=== file1.d.ts === declare module "file1" { >"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) @@ -19,7 +21,7 @@ declare module "file1" { >x : Symbol(x, Decl(file1.d.ts, 1, 7)) } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentExportEquals1_1.types b/tests/baselines/reference/augmentExportEquals1_1.types index 53df1b7c7ce1f..3ebf8a5996627 100644 --- a/tests/baselines/reference/augmentExportEquals1_1.types +++ b/tests/baselines/reference/augmentExportEquals1_1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals1_1.ts] //// + +=== file3.ts === import x = require("file1"); >x : number @@ -7,7 +9,7 @@ let a: x.A; // should not work >a : x.A >x : any -=== tests/cases/compiler/file1.d.ts === +=== file1.d.ts === declare module "file1" { >"file1" : typeof import("file1") @@ -18,7 +20,7 @@ declare module "file1" { >x : number } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : number diff --git a/tests/baselines/reference/augmentExportEquals2.errors.txt b/tests/baselines/reference/augmentExportEquals2.errors.txt index 8e1bf70fac413..cfda8b47dd1ab 100644 --- a/tests/baselines/reference/augmentExportEquals2.errors.txt +++ b/tests/baselines/reference/augmentExportEquals2.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/file2.ts(4,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. -tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. +file2.ts(4,16): error TS2671: Cannot augment module './file1' because it resolves to a non-module entity. +file3.ts(3,8): error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file3.ts (1 errors) ==== +==== file3.ts (1 errors) ==== import x = require("./file1"); import "./file2"; let a: x.A; // should not work ~ !!! error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file1.ts (0 errors) ==== +==== file1.ts (0 errors) ==== function foo() {} export = foo; -==== tests/cases/compiler/file2.ts (1 errors) ==== +==== file2.ts (1 errors) ==== import x = require("./file1"); // should error since './file1' does not have namespace meaning diff --git a/tests/baselines/reference/augmentExportEquals2.symbols b/tests/baselines/reference/augmentExportEquals2.symbols index 6158be2584c57..3a47af235c0bc 100644 --- a/tests/baselines/reference/augmentExportEquals2.symbols +++ b/tests/baselines/reference/augmentExportEquals2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals2.ts] //// + +=== file3.ts === import x = require("./file1"); >x : Symbol(x, Decl(file3.ts, 0, 0)) @@ -8,14 +10,14 @@ let a: x.A; // should not work >x : Symbol(x) >A : Symbol(x.A) -=== tests/cases/compiler/file1.ts === +=== file1.ts === function foo() {} >foo : Symbol(foo, Decl(file1.ts, 0, 0)) export = foo; >foo : Symbol(foo, Decl(file1.ts, 0, 0)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentExportEquals2.types b/tests/baselines/reference/augmentExportEquals2.types index da3a353c87a66..a428d630e6c7a 100644 --- a/tests/baselines/reference/augmentExportEquals2.types +++ b/tests/baselines/reference/augmentExportEquals2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals2.ts] //// + +=== file3.ts === import x = require("./file1"); >x : () => void @@ -7,14 +9,14 @@ let a: x.A; // should not work >a : x.A >x : any -=== tests/cases/compiler/file1.ts === +=== file1.ts === function foo() {} >foo : () => void export = foo; >foo : () => void -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : () => void diff --git a/tests/baselines/reference/augmentExportEquals2_1.errors.txt b/tests/baselines/reference/augmentExportEquals2_1.errors.txt index c1e1f2cba9b49..f03369da40d65 100644 --- a/tests/baselines/reference/augmentExportEquals2_1.errors.txt +++ b/tests/baselines/reference/augmentExportEquals2_1.errors.txt @@ -1,20 +1,20 @@ -tests/cases/compiler/file2.ts(5,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. -tests/cases/compiler/file3.ts(3,8): error TS2503: Cannot find namespace 'x'. +file2.ts(5,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity. +file3.ts(3,8): error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file3.ts (1 errors) ==== +==== file3.ts (1 errors) ==== import x = require("file1"); import "file2"; let a: x.A; // should not work ~ !!! error TS2503: Cannot find namespace 'x'. -==== tests/cases/compiler/file1.d.ts (0 errors) ==== +==== file1.d.ts (0 errors) ==== declare module "file1" { function foo(): void; export = foo; } -==== tests/cases/compiler/file2.ts (1 errors) ==== +==== file2.ts (1 errors) ==== /// import x = require("file1"); diff --git a/tests/baselines/reference/augmentExportEquals2_1.symbols b/tests/baselines/reference/augmentExportEquals2_1.symbols index 6ffda37215ad2..a7ef0619bfd0f 100644 --- a/tests/baselines/reference/augmentExportEquals2_1.symbols +++ b/tests/baselines/reference/augmentExportEquals2_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals2_1.ts] //// + +=== file3.ts === import x = require("file1"); >x : Symbol(x, Decl(file3.ts, 0, 0)) @@ -8,7 +10,7 @@ let a: x.A; // should not work >x : Symbol(x) >A : Symbol(x.A) -=== tests/cases/compiler/file1.d.ts === +=== file1.d.ts === declare module "file1" { >"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) @@ -19,7 +21,7 @@ declare module "file1" { >foo : Symbol(foo, Decl(file1.d.ts, 0, 24)) } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentExportEquals2_1.types b/tests/baselines/reference/augmentExportEquals2_1.types index d27bfb3f43fab..28f3900df2f47 100644 --- a/tests/baselines/reference/augmentExportEquals2_1.types +++ b/tests/baselines/reference/augmentExportEquals2_1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file3.ts === +//// [tests/cases/compiler/augmentExportEquals2_1.ts] //// + +=== file3.ts === import x = require("file1"); >x : () => void @@ -7,7 +9,7 @@ let a: x.A; // should not work >a : x.A >x : any -=== tests/cases/compiler/file1.d.ts === +=== file1.d.ts === declare module "file1" { >"file1" : typeof import("file1") @@ -18,7 +20,7 @@ declare module "file1" { >foo : () => void } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : () => void diff --git a/tests/baselines/reference/augmentExportEquals3.symbols b/tests/baselines/reference/augmentExportEquals3.symbols index 9f0142c87f182..765e4342e409b 100644 --- a/tests/baselines/reference/augmentExportEquals3.symbols +++ b/tests/baselines/reference/augmentExportEquals3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/augmentExportEquals3.ts] //// + +=== file1.ts === function foo() {} >foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8)) @@ -11,7 +13,7 @@ namespace foo { export = foo; >foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 17), Decl(file2.ts, 1, 8)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) @@ -32,7 +34,7 @@ declare module "./file1" { >b : Symbol(b, Decl(file2.ts, 6, 7)) } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "./file1"; >x : Symbol(x, Decl(file3.ts, 0, 6)) diff --git a/tests/baselines/reference/augmentExportEquals3.types b/tests/baselines/reference/augmentExportEquals3.types index b73c0fcb8a370..d5274780fb71d 100644 --- a/tests/baselines/reference/augmentExportEquals3.types +++ b/tests/baselines/reference/augmentExportEquals3.types @@ -1,18 +1,20 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/augmentExportEquals3.ts] //// + +=== file1.ts === function foo() {} ->foo : typeof import("tests/cases/compiler/file1.ts") +>foo : typeof import("file1.ts") namespace foo { ->foo : typeof import("tests/cases/compiler/file1.ts") +>foo : typeof import("file1.ts") export var v = 1; >v : number >1 : 1 } export = foo; ->foo : typeof import("tests/cases/compiler/file1.ts") +>foo : typeof import("file1.ts") -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : typeof x @@ -34,7 +36,7 @@ declare module "./file1" { >b : number } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "./file1"; >x : typeof x diff --git a/tests/baselines/reference/augmentExportEquals3_1.symbols b/tests/baselines/reference/augmentExportEquals3_1.symbols index 3ffd84c3fc00e..35b57d0f18996 100644 --- a/tests/baselines/reference/augmentExportEquals3_1.symbols +++ b/tests/baselines/reference/augmentExportEquals3_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file1.d.ts === +//// [tests/cases/compiler/augmentExportEquals3_1.ts] //// + +=== file1.d.ts === declare module "file1" { >"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) @@ -16,7 +18,7 @@ declare module "file1" { } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) @@ -38,7 +40,7 @@ declare module "file1" { >b : Symbol(b, Decl(file2.ts, 7, 7)) } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "file1"; >x : Symbol(x, Decl(file3.ts, 0, 6)) diff --git a/tests/baselines/reference/augmentExportEquals3_1.types b/tests/baselines/reference/augmentExportEquals3_1.types index 4311b834f261b..8e87d323c6095 100644 --- a/tests/baselines/reference/augmentExportEquals3_1.types +++ b/tests/baselines/reference/augmentExportEquals3_1.types @@ -1,22 +1,24 @@ -=== tests/cases/compiler/file1.d.ts === +//// [tests/cases/compiler/augmentExportEquals3_1.ts] //// + +=== file1.d.ts === declare module "file1" { >"file1" : typeof import("file1") function foo(): void; ->foo : typeof import("tests/cases/compiler/file1.d.ts") +>foo : typeof import("file1.d.ts") namespace foo { ->foo : typeof import("tests/cases/compiler/file1.d.ts") +>foo : typeof import("file1.d.ts") export var v: number; >v : number } export = foo; ->foo : typeof import("tests/cases/compiler/file1.d.ts") +>foo : typeof import("file1.d.ts") } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : typeof x @@ -39,7 +41,7 @@ declare module "file1" { >b : number } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "file1"; >x : typeof x diff --git a/tests/baselines/reference/augmentExportEquals4.symbols b/tests/baselines/reference/augmentExportEquals4.symbols index 4bf1830f89524..1c03321f69e05 100644 --- a/tests/baselines/reference/augmentExportEquals4.symbols +++ b/tests/baselines/reference/augmentExportEquals4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/augmentExportEquals4.ts] //// + +=== file1.ts === class foo {} >foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8)) @@ -11,7 +13,7 @@ namespace foo { export = foo; >foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 8)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) @@ -32,7 +34,7 @@ declare module "./file1" { >b : Symbol(b, Decl(file2.ts, 6, 7)) } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "./file1"; >x : Symbol(x, Decl(file3.ts, 0, 6)) diff --git a/tests/baselines/reference/augmentExportEquals4.types b/tests/baselines/reference/augmentExportEquals4.types index 337ff507d976a..d0ff6e614daad 100644 --- a/tests/baselines/reference/augmentExportEquals4.types +++ b/tests/baselines/reference/augmentExportEquals4.types @@ -1,18 +1,20 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/augmentExportEquals4.ts] //// + +=== file1.ts === class foo {} ->foo : import("tests/cases/compiler/file1.ts") +>foo : import("file1.ts") namespace foo { ->foo : typeof import("tests/cases/compiler/file1.ts") +>foo : typeof import("file1.ts") export var v = 1; >v : number >1 : 1 } export = foo; ->foo : import("tests/cases/compiler/file1.ts") +>foo : import("file1.ts") -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : typeof x @@ -34,7 +36,7 @@ declare module "./file1" { >b : number } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "./file1"; >x : typeof x diff --git a/tests/baselines/reference/augmentExportEquals4_1.symbols b/tests/baselines/reference/augmentExportEquals4_1.symbols index 413926292e6f3..cfc4ac9f37eef 100644 --- a/tests/baselines/reference/augmentExportEquals4_1.symbols +++ b/tests/baselines/reference/augmentExportEquals4_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file1.d.ts === +//// [tests/cases/compiler/augmentExportEquals4_1.ts] //// + +=== file1.d.ts === declare module "file1" { >"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) @@ -16,7 +18,7 @@ declare module "file1" { } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) @@ -38,7 +40,7 @@ declare module "file1" { >b : Symbol(b, Decl(file2.ts, 7, 7)) } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "file1"; >x : Symbol(x, Decl(file3.ts, 0, 6)) diff --git a/tests/baselines/reference/augmentExportEquals4_1.types b/tests/baselines/reference/augmentExportEquals4_1.types index c0cdff353ab07..9e6fcbfdea856 100644 --- a/tests/baselines/reference/augmentExportEquals4_1.types +++ b/tests/baselines/reference/augmentExportEquals4_1.types @@ -1,22 +1,24 @@ -=== tests/cases/compiler/file1.d.ts === +//// [tests/cases/compiler/augmentExportEquals4_1.ts] //// + +=== file1.d.ts === declare module "file1" { >"file1" : typeof import("file1") class foo {} ->foo : import("tests/cases/compiler/file1.d.ts") +>foo : import("file1.d.ts") namespace foo { ->foo : typeof import("tests/cases/compiler/file1.d.ts") +>foo : typeof import("file1.d.ts") export var v: number; >v : number } export = foo; ->foo : import("tests/cases/compiler/file1.d.ts") +>foo : import("file1.d.ts") } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : typeof x @@ -39,7 +41,7 @@ declare module "file1" { >b : number } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "file1"; >x : typeof x diff --git a/tests/baselines/reference/augmentExportEquals5.symbols b/tests/baselines/reference/augmentExportEquals5.symbols index 8dc219b401b1b..b2bcb83b6f978 100644 --- a/tests/baselines/reference/augmentExportEquals5.symbols +++ b/tests/baselines/reference/augmentExportEquals5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/express.d.ts === +//// [tests/cases/compiler/augmentExportEquals5.ts] //// + +=== express.d.ts === declare module Express { >Express : Symbol(Express, Decl(express.d.ts, 0, 0)) @@ -163,7 +165,7 @@ declare module "express" { >e : Symbol(e, Decl(express.d.ts, 6, 26), Decl(express.d.ts, 7, 28), Decl(augmentation.ts, 1, 29)) } -=== tests/cases/compiler/augmentation.ts === +=== augmentation.ts === /// import * as e from "express"; >e : Symbol(e, Decl(augmentation.ts, 1, 6)) @@ -179,7 +181,7 @@ declare module "express" { } } -=== tests/cases/compiler/consumer.ts === +=== consumer.ts === import { Request } from "express"; >Request : Symbol(Request, Decl(consumer.ts, 0, 8)) diff --git a/tests/baselines/reference/augmentExportEquals5.types b/tests/baselines/reference/augmentExportEquals5.types index d71540ac377cf..942e3f181010a 100644 --- a/tests/baselines/reference/augmentExportEquals5.types +++ b/tests/baselines/reference/augmentExportEquals5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/express.d.ts === +//// [tests/cases/compiler/augmentExportEquals5.ts] //// + +=== express.d.ts === declare module Express { export interface Request { } export interface Response { } @@ -9,11 +11,11 @@ declare module "express" { >"express" : typeof import("express") function e(): e.Express; ->e : typeof import("tests/cases/compiler/express.d.ts") +>e : typeof import("express.d.ts") >e : any namespace e { ->e : typeof import("tests/cases/compiler/express.d.ts") +>e : typeof import("express.d.ts") interface IRoute { all(...handler: RequestHandler[]): IRoute; @@ -99,10 +101,10 @@ declare module "express" { } export = e; ->e : typeof import("tests/cases/compiler/express.d.ts") +>e : typeof import("express.d.ts") } -=== tests/cases/compiler/augmentation.ts === +=== augmentation.ts === /// import * as e from "express"; >e : typeof e @@ -116,7 +118,7 @@ declare module "express" { } } -=== tests/cases/compiler/consumer.ts === +=== consumer.ts === import { Request } from "express"; >Request : any diff --git a/tests/baselines/reference/augmentExportEquals6.symbols b/tests/baselines/reference/augmentExportEquals6.symbols index cb67ad4aad237..3174f4144504e 100644 --- a/tests/baselines/reference/augmentExportEquals6.symbols +++ b/tests/baselines/reference/augmentExportEquals6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/augmentExportEquals6.ts] //// + +=== file1.ts === class foo {} >foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10)) @@ -15,7 +17,7 @@ namespace foo { export = foo; >foo : Symbol(foo, Decl(file1.ts, 0, 0), Decl(file1.ts, 0, 12), Decl(file2.ts, 1, 10)) -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) @@ -42,7 +44,7 @@ declare module "./file1" { } } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "./file1"; >x : Symbol(x, Decl(file3.ts, 0, 6)) diff --git a/tests/baselines/reference/augmentExportEquals6.types b/tests/baselines/reference/augmentExportEquals6.types index cfa907e6919be..bf067695df748 100644 --- a/tests/baselines/reference/augmentExportEquals6.types +++ b/tests/baselines/reference/augmentExportEquals6.types @@ -1,9 +1,11 @@ -=== tests/cases/compiler/file1.ts === +//// [tests/cases/compiler/augmentExportEquals6.ts] //// + +=== file1.ts === class foo {} ->foo : import("tests/cases/compiler/file1.ts") +>foo : import("file1.ts") namespace foo { ->foo : typeof import("tests/cases/compiler/file1.ts") +>foo : typeof import("file1.ts") export class A {} >A : A @@ -13,9 +15,9 @@ namespace foo { >a : any } export = foo; ->foo : import("tests/cases/compiler/file1.ts") +>foo : import("file1.ts") -=== tests/cases/compiler/file2.ts === +=== file2.ts === import x = require("./file1"); >x : typeof x @@ -43,7 +45,7 @@ declare module "./file1" { } } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "./file1"; >x : typeof x diff --git a/tests/baselines/reference/augmentExportEquals6_1.symbols b/tests/baselines/reference/augmentExportEquals6_1.symbols index 3cdee59bd39f4..3a5b2f4e73f58 100644 --- a/tests/baselines/reference/augmentExportEquals6_1.symbols +++ b/tests/baselines/reference/augmentExportEquals6_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file1.d.ts === +//// [tests/cases/compiler/augmentExportEquals6_1.ts] //// + +=== file1.d.ts === declare module "file1" { >"file1" : Symbol("file1", Decl(file1.d.ts, 0, 0)) @@ -16,7 +18,7 @@ declare module "file1" { } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : Symbol(x, Decl(file2.ts, 0, 0)) @@ -30,7 +32,7 @@ declare module "file1" { >a : Symbol(A.a, Decl(file2.ts, 5, 17)) } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "file1"; >x : Symbol(x, Decl(file3.ts, 0, 6)) diff --git a/tests/baselines/reference/augmentExportEquals6_1.types b/tests/baselines/reference/augmentExportEquals6_1.types index 5e90fbc6eaf6c..f2d94679d48cc 100644 --- a/tests/baselines/reference/augmentExportEquals6_1.types +++ b/tests/baselines/reference/augmentExportEquals6_1.types @@ -1,22 +1,24 @@ -=== tests/cases/compiler/file1.d.ts === +//// [tests/cases/compiler/augmentExportEquals6_1.ts] //// + +=== file1.d.ts === declare module "file1" { >"file1" : typeof import("file1") class foo {} ->foo : import("tests/cases/compiler/file1.d.ts") +>foo : import("file1.d.ts") namespace foo { ->foo : typeof import("tests/cases/compiler/file1.d.ts") +>foo : typeof import("file1.d.ts") class A {} >A : A } export = foo; ->foo : import("tests/cases/compiler/file1.d.ts") +>foo : import("file1.d.ts") } -=== tests/cases/compiler/file2.ts === +=== file2.ts === /// import x = require("file1"); >x : typeof x @@ -29,7 +31,7 @@ declare module "file1" { >a : number } -=== tests/cases/compiler/file3.ts === +=== file3.ts === import * as x from "file1"; >x : typeof x diff --git a/tests/baselines/reference/augmentExportEquals7.symbols b/tests/baselines/reference/augmentExportEquals7.symbols index cdcd430e7aff5..2f01247e4579b 100644 --- a/tests/baselines/reference/augmentExportEquals7.symbols +++ b/tests/baselines/reference/augmentExportEquals7.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentExportEquals7.ts] //// + === /node_modules/lib/index.d.ts === declare var lib: () => void; >lib : Symbol(lib, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 28)) diff --git a/tests/baselines/reference/augmentExportEquals7.types b/tests/baselines/reference/augmentExportEquals7.types index 4558b5281f6a6..fdc26b6a99bfe 100644 --- a/tests/baselines/reference/augmentExportEquals7.types +++ b/tests/baselines/reference/augmentExportEquals7.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentExportEquals7.ts] //// + === /node_modules/lib/index.d.ts === declare var lib: () => void; >lib : () => void diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt index bc83e3e4dfaaf..5dc80d0a39df4 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts(3,9): error TS2300: Duplicate identifier 'prototype'. +augmentedClassWithPrototypePropertyOnModule.ts(3,9): error TS2300: Duplicate identifier 'prototype'. -==== tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts (1 errors) ==== +==== augmentedClassWithPrototypePropertyOnModule.ts (1 errors) ==== declare module m { var f; var prototype; // This should be error since prototype would be static property on class m diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js index ff3afb2da82e3..83d359a309eec 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// + //// [augmentedClassWithPrototypePropertyOnModule.ts] declare module m { var f; diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.symbols b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.symbols index 60f98e7ed26e3..1bf180daf067b 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.symbols +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts === +//// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// + +=== augmentedClassWithPrototypePropertyOnModule.ts === declare module m { >m : Symbol(m, Decl(augmentedClassWithPrototypePropertyOnModule.ts, 0, 0), Decl(augmentedClassWithPrototypePropertyOnModule.ts, 3, 1)) diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.types b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.types index 4437ab706f678..1a648e26eb856 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.types +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts === +//// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// + +=== augmentedClassWithPrototypePropertyOnModule.ts === declare module m { >m : typeof m diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index 18d295e5caa09..f309c78ac2051 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [n: number]: Bar; }'. +augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [n: number]: Bar; }'. Index signature for type 'number' is missing in type '() => void'. -==== tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts (1 errors) ==== +==== augmentedTypeAssignmentCompatIndexSignature.ts (1 errors) ==== interface Foo { a } interface Bar { b } diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js index 32fed237a2ea0..186a8ed20f8c5 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts] //// + //// [augmentedTypeAssignmentCompatIndexSignature.ts] interface Foo { a } interface Bar { b } diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.symbols b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.symbols index 2a89fb6e3a27c..5a2a7d8a2868e 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.symbols +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts === +//// [tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts] //// + +=== augmentedTypeAssignmentCompatIndexSignature.ts === interface Foo { a } >Foo : Symbol(Foo, Decl(augmentedTypeAssignmentCompatIndexSignature.ts, 0, 0)) >a : Symbol(Foo.a, Decl(augmentedTypeAssignmentCompatIndexSignature.ts, 0, 15)) diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.types b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.types index 32fc880870d9a..353a619a6ef81 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.types +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts === +//// [tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts] //// + +=== augmentedTypeAssignmentCompatIndexSignature.ts === interface Foo { a } >a : any diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js index 8d2c94899dce7..b69be07fad64c 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts] //// + //// [augmentedTypeBracketAccessIndexSignature.ts] interface Foo { a } interface Bar { b } diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols index 3ba42af44ba64..8e0dc871a4051 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts === +//// [tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts] //// + +=== augmentedTypeBracketAccessIndexSignature.ts === interface Foo { a } >Foo : Symbol(Foo, Decl(augmentedTypeBracketAccessIndexSignature.ts, 0, 0)) >a : Symbol(Foo.a, Decl(augmentedTypeBracketAccessIndexSignature.ts, 0, 15)) diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types index 62e04728b390d..1e443b10deeac 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts === +//// [tests/cases/conformance/types/members/augmentedTypeBracketAccessIndexSignature.ts] //// + +=== augmentedTypeBracketAccessIndexSignature.ts === interface Foo { a } >a : any diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js index 6ec653c69b598..77f4a07a7ae4d 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts] //// + //// [augmentedTypeBracketNamedPropertyAccess.ts] interface Object { data: number; diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols index 230635f9612bf..03648d4f68f0c 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts === +//// [tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts] //// + +=== augmentedTypeBracketNamedPropertyAccess.ts === interface Object { >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types index 8129150648594..cc5a6c07b7c94 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts === +//// [tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts] //// + +=== augmentedTypeBracketNamedPropertyAccess.ts === interface Object { data: number; >data : number diff --git a/tests/baselines/reference/augmentedTypesClass.errors.txt b/tests/baselines/reference/augmentedTypesClass.errors.txt index e5fd7a6d82eaa..370128c528ff0 100644 --- a/tests/baselines/reference/augmentedTypesClass.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/augmentedTypesClass.ts(2,7): error TS2300: Duplicate identifier 'c1'. -tests/cases/compiler/augmentedTypesClass.ts(3,5): error TS2300: Duplicate identifier 'c1'. -tests/cases/compiler/augmentedTypesClass.ts(6,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesClass.ts(7,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesClass.ts(2,7): error TS2300: Duplicate identifier 'c1'. +augmentedTypesClass.ts(3,5): error TS2300: Duplicate identifier 'c1'. +augmentedTypesClass.ts(6,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesClass.ts(7,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -==== tests/cases/compiler/augmentedTypesClass.ts (4 errors) ==== +==== augmentedTypesClass.ts (4 errors) ==== //// class then var class c1 { public foo() { } } ~~ diff --git a/tests/baselines/reference/augmentedTypesClass.js b/tests/baselines/reference/augmentedTypesClass.js index 01c39c98a1a49..9116fe462689a 100644 --- a/tests/baselines/reference/augmentedTypesClass.js +++ b/tests/baselines/reference/augmentedTypesClass.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesClass.ts] //// + //// [augmentedTypesClass.ts] //// class then var class c1 { public foo() { } } diff --git a/tests/baselines/reference/augmentedTypesClass.symbols b/tests/baselines/reference/augmentedTypesClass.symbols index 0f867f3deadcb..bb9de40261da8 100644 --- a/tests/baselines/reference/augmentedTypesClass.symbols +++ b/tests/baselines/reference/augmentedTypesClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass.ts === +//// [tests/cases/compiler/augmentedTypesClass.ts] //// + +=== augmentedTypesClass.ts === //// class then var class c1 { public foo() { } } >c1 : Symbol(c1, Decl(augmentedTypesClass.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesClass.types b/tests/baselines/reference/augmentedTypesClass.types index 91bffcf0d2ac8..75e67b3306cf3 100644 --- a/tests/baselines/reference/augmentedTypesClass.types +++ b/tests/baselines/reference/augmentedTypesClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass.ts === +//// [tests/cases/compiler/augmentedTypesClass.ts] //// + +=== augmentedTypesClass.ts === //// class then var class c1 { public foo() { } } >c1 : c1 diff --git a/tests/baselines/reference/augmentedTypesClass2.errors.txt b/tests/baselines/reference/augmentedTypesClass2.errors.txt index a7636499803c7..a3469041868e4 100644 --- a/tests/baselines/reference/augmentedTypesClass2.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/augmentedTypesClass2.ts(16,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesClass2.ts(16,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesClass2.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -==== tests/cases/compiler/augmentedTypesClass2.ts (2 errors) ==== +==== augmentedTypesClass2.ts (2 errors) ==== // Checking class with other things in type space not value space // class then interface diff --git a/tests/baselines/reference/augmentedTypesClass2.js b/tests/baselines/reference/augmentedTypesClass2.js index a289446e53fdb..0914b61b049f2 100644 --- a/tests/baselines/reference/augmentedTypesClass2.js +++ b/tests/baselines/reference/augmentedTypesClass2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesClass2.ts] //// + //// [augmentedTypesClass2.ts] // Checking class with other things in type space not value space diff --git a/tests/baselines/reference/augmentedTypesClass2.symbols b/tests/baselines/reference/augmentedTypesClass2.symbols index a9fbf1a4a13c6..9fa0c0d157685 100644 --- a/tests/baselines/reference/augmentedTypesClass2.symbols +++ b/tests/baselines/reference/augmentedTypesClass2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass2.ts === +//// [tests/cases/compiler/augmentedTypesClass2.ts] //// + +=== augmentedTypesClass2.ts === // Checking class with other things in type space not value space // class then interface diff --git a/tests/baselines/reference/augmentedTypesClass2.types b/tests/baselines/reference/augmentedTypesClass2.types index 4f80fe6d16ac2..170ff21d11965 100644 --- a/tests/baselines/reference/augmentedTypesClass2.types +++ b/tests/baselines/reference/augmentedTypesClass2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass2.ts === +//// [tests/cases/compiler/augmentedTypesClass2.ts] //// + +=== augmentedTypesClass2.ts === // Checking class with other things in type space not value space // class then interface diff --git a/tests/baselines/reference/augmentedTypesClass2a.errors.txt b/tests/baselines/reference/augmentedTypesClass2a.errors.txt index ee5573f4c903e..9482147e94466 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2a.errors.txt @@ -1,24 +1,24 @@ -tests/cases/compiler/augmentedTypesClass2a.ts(2,7): error TS2300: Duplicate identifier 'c2'. -tests/cases/compiler/augmentedTypesClass2a.ts(2,7): error TS2813: Class declaration cannot implement overload list for 'c2'. -tests/cases/compiler/augmentedTypesClass2a.ts(3,10): error TS2300: Duplicate identifier 'c2'. -tests/cases/compiler/augmentedTypesClass2a.ts(3,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/augmentedTypesClass2a.ts(4,5): error TS2300: Duplicate identifier 'c2'. +augmentedTypesClass2a.ts(2,7): error TS2300: Duplicate identifier 'c2'. +augmentedTypesClass2a.ts(2,7): error TS2813: Class declaration cannot implement overload list for 'c2'. +augmentedTypesClass2a.ts(3,10): error TS2300: Duplicate identifier 'c2'. +augmentedTypesClass2a.ts(3,10): error TS2814: Function with bodies can only merge with classes that are ambient. +augmentedTypesClass2a.ts(4,5): error TS2300: Duplicate identifier 'c2'. -==== tests/cases/compiler/augmentedTypesClass2a.ts (5 errors) ==== +==== augmentedTypesClass2a.ts (5 errors) ==== //// class then function class c2 { public foo() { } } // error ~~ !!! error TS2300: Duplicate identifier 'c2'. ~~ !!! error TS2813: Class declaration cannot implement overload list for 'c2'. -!!! related TS6506 tests/cases/compiler/augmentedTypesClass2a.ts:2:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 augmentedTypesClass2a.ts:2:7: Consider adding a 'declare' modifier to this class. function c2() { } // error ~~ !!! error TS2300: Duplicate identifier 'c2'. ~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/augmentedTypesClass2a.ts:2:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 augmentedTypesClass2a.ts:2:7: Consider adding a 'declare' modifier to this class. var c2 = () => { } ~~ !!! error TS2300: Duplicate identifier 'c2'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass2a.js b/tests/baselines/reference/augmentedTypesClass2a.js index cbda0bb256536..2de4ff0e052e0 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.js +++ b/tests/baselines/reference/augmentedTypesClass2a.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesClass2a.ts] //// + //// [augmentedTypesClass2a.ts] //// class then function class c2 { public foo() { } } // error diff --git a/tests/baselines/reference/augmentedTypesClass2a.symbols b/tests/baselines/reference/augmentedTypesClass2a.symbols index ca5558cfbc503..9f9f16dfff65f 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.symbols +++ b/tests/baselines/reference/augmentedTypesClass2a.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass2a.ts === +//// [tests/cases/compiler/augmentedTypesClass2a.ts] //// + +=== augmentedTypesClass2a.ts === //// class then function class c2 { public foo() { } } // error >c2 : Symbol(c2, Decl(augmentedTypesClass2a.ts, 1, 29), Decl(augmentedTypesClass2a.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesClass2a.types b/tests/baselines/reference/augmentedTypesClass2a.types index 81cde2c99e4fc..9634f29db0d27 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.types +++ b/tests/baselines/reference/augmentedTypesClass2a.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass2a.ts === +//// [tests/cases/compiler/augmentedTypesClass2a.ts] //// + +=== augmentedTypesClass2a.ts === //// class then function class c2 { public foo() { } } // error >c2 : c2 diff --git a/tests/baselines/reference/augmentedTypesClass3.js b/tests/baselines/reference/augmentedTypesClass3.js index 045109f858777..9d97315d6bd0e 100644 --- a/tests/baselines/reference/augmentedTypesClass3.js +++ b/tests/baselines/reference/augmentedTypesClass3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesClass3.ts] //// + //// [augmentedTypesClass3.ts] // class then module class c5 { public foo() { } } diff --git a/tests/baselines/reference/augmentedTypesClass3.symbols b/tests/baselines/reference/augmentedTypesClass3.symbols index e968ecd61ed5b..92feb7012c188 100644 --- a/tests/baselines/reference/augmentedTypesClass3.symbols +++ b/tests/baselines/reference/augmentedTypesClass3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass3.ts === +//// [tests/cases/compiler/augmentedTypesClass3.ts] //// + +=== augmentedTypesClass3.ts === // class then module class c5 { public foo() { } } >c5 : Symbol(c5, Decl(augmentedTypesClass3.ts, 0, 0), Decl(augmentedTypesClass3.ts, 1, 29)) diff --git a/tests/baselines/reference/augmentedTypesClass3.types b/tests/baselines/reference/augmentedTypesClass3.types index d59d519cb430e..f98458ab8aaae 100644 --- a/tests/baselines/reference/augmentedTypesClass3.types +++ b/tests/baselines/reference/augmentedTypesClass3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass3.ts === +//// [tests/cases/compiler/augmentedTypesClass3.ts] //// + +=== augmentedTypesClass3.ts === // class then module class c5 { public foo() { } } >c5 : c5 diff --git a/tests/baselines/reference/augmentedTypesClass4.errors.txt b/tests/baselines/reference/augmentedTypesClass4.errors.txt index 6df027ca511f0..e9ec7a0892017 100644 --- a/tests/baselines/reference/augmentedTypesClass4.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/augmentedTypesClass4.ts(2,7): error TS2300: Duplicate identifier 'c3'. -tests/cases/compiler/augmentedTypesClass4.ts(3,7): error TS2300: Duplicate identifier 'c3'. +augmentedTypesClass4.ts(2,7): error TS2300: Duplicate identifier 'c3'. +augmentedTypesClass4.ts(3,7): error TS2300: Duplicate identifier 'c3'. -==== tests/cases/compiler/augmentedTypesClass4.ts (2 errors) ==== +==== augmentedTypesClass4.ts (2 errors) ==== //// class then class class c3 { public foo() { } } // error ~~ diff --git a/tests/baselines/reference/augmentedTypesClass4.js b/tests/baselines/reference/augmentedTypesClass4.js index 086748bad61c0..bb790c245e84f 100644 --- a/tests/baselines/reference/augmentedTypesClass4.js +++ b/tests/baselines/reference/augmentedTypesClass4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesClass4.ts] //// + //// [augmentedTypesClass4.ts] //// class then class class c3 { public foo() { } } // error diff --git a/tests/baselines/reference/augmentedTypesClass4.symbols b/tests/baselines/reference/augmentedTypesClass4.symbols index 220545b6e0006..fa552f3d18535 100644 --- a/tests/baselines/reference/augmentedTypesClass4.symbols +++ b/tests/baselines/reference/augmentedTypesClass4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass4.ts === +//// [tests/cases/compiler/augmentedTypesClass4.ts] //// + +=== augmentedTypesClass4.ts === //// class then class class c3 { public foo() { } } // error >c3 : Symbol(c3, Decl(augmentedTypesClass4.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesClass4.types b/tests/baselines/reference/augmentedTypesClass4.types index 934d2314464f2..350e9ab3e3575 100644 --- a/tests/baselines/reference/augmentedTypesClass4.types +++ b/tests/baselines/reference/augmentedTypesClass4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesClass4.ts === +//// [tests/cases/compiler/augmentedTypesClass4.ts] //// + +=== augmentedTypesClass4.ts === //// class then class class c3 { public foo() { } } // error >c3 : c3 diff --git a/tests/baselines/reference/augmentedTypesEnum.errors.txt b/tests/baselines/reference/augmentedTypesEnum.errors.txt index ca661e5bcf53b..a8e9752429881 100644 --- a/tests/baselines/reference/augmentedTypesEnum.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/augmentedTypesEnum.ts(2,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(3,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(6,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(7,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(9,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(10,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(13,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(14,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum.ts(18,11): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. -tests/cases/compiler/augmentedTypesEnum.ts(20,12): error TS2300: Duplicate identifier 'One'. -tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2300: Duplicate identifier 'One'. -tests/cases/compiler/augmentedTypesEnum.ts(21,12): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +augmentedTypesEnum.ts(2,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(3,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(6,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(7,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(9,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(10,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(13,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(14,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum.ts(18,11): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +augmentedTypesEnum.ts(20,12): error TS2300: Duplicate identifier 'One'. +augmentedTypesEnum.ts(21,12): error TS2300: Duplicate identifier 'One'. +augmentedTypesEnum.ts(21,12): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. -==== tests/cases/compiler/augmentedTypesEnum.ts (12 errors) ==== +==== augmentedTypesEnum.ts (12 errors) ==== // enum then var enum e1111 { One } // error ~~~~~ diff --git a/tests/baselines/reference/augmentedTypesEnum.js b/tests/baselines/reference/augmentedTypesEnum.js index edd4a92d76706..e1f93a8703659 100644 --- a/tests/baselines/reference/augmentedTypesEnum.js +++ b/tests/baselines/reference/augmentedTypesEnum.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesEnum.ts] //// + //// [augmentedTypesEnum.ts] // enum then var enum e1111 { One } // error diff --git a/tests/baselines/reference/augmentedTypesEnum.symbols b/tests/baselines/reference/augmentedTypesEnum.symbols index b0d24b1be3928..1dd7fe3f24ff5 100644 --- a/tests/baselines/reference/augmentedTypesEnum.symbols +++ b/tests/baselines/reference/augmentedTypesEnum.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesEnum.ts === +//// [tests/cases/compiler/augmentedTypesEnum.ts] //// + +=== augmentedTypesEnum.ts === // enum then var enum e1111 { One } // error >e1111 : Symbol(e1111, Decl(augmentedTypesEnum.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesEnum.types b/tests/baselines/reference/augmentedTypesEnum.types index 27ce4f7c400ba..dec6d88e23267 100644 --- a/tests/baselines/reference/augmentedTypesEnum.types +++ b/tests/baselines/reference/augmentedTypesEnum.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesEnum.ts === +//// [tests/cases/compiler/augmentedTypesEnum.ts] //// + +=== augmentedTypesEnum.ts === // enum then var enum e1111 { One } // error >e1111 : e1111 diff --git a/tests/baselines/reference/augmentedTypesEnum2.errors.txt b/tests/baselines/reference/augmentedTypesEnum2.errors.txt index 2d47c26c896f2..296bf37fb29b8 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/augmentedTypesEnum2.ts(2,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum2.ts(4,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum2.ts(11,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesEnum2.ts(12,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum2.ts(2,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum2.ts(4,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum2.ts(11,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesEnum2.ts(12,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -==== tests/cases/compiler/augmentedTypesEnum2.ts (4 errors) ==== +==== augmentedTypesEnum2.ts (4 errors) ==== // enum then interface enum e1 { One } // error ~~ diff --git a/tests/baselines/reference/augmentedTypesEnum2.js b/tests/baselines/reference/augmentedTypesEnum2.js index 0e6e70df26363..bb376f71c34db 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.js +++ b/tests/baselines/reference/augmentedTypesEnum2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesEnum2.ts] //// + //// [augmentedTypesEnum2.ts] // enum then interface enum e1 { One } // error diff --git a/tests/baselines/reference/augmentedTypesEnum2.symbols b/tests/baselines/reference/augmentedTypesEnum2.symbols index eb65b4bab62ec..8fb5a50b674a0 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.symbols +++ b/tests/baselines/reference/augmentedTypesEnum2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesEnum2.ts === +//// [tests/cases/compiler/augmentedTypesEnum2.ts] //// + +=== augmentedTypesEnum2.ts === // enum then interface enum e1 { One } // error >e1 : Symbol(e1, Decl(augmentedTypesEnum2.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesEnum2.types b/tests/baselines/reference/augmentedTypesEnum2.types index 16232e0f3ffb7..a923ebf9f1aaa 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.types +++ b/tests/baselines/reference/augmentedTypesEnum2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesEnum2.ts === +//// [tests/cases/compiler/augmentedTypesEnum2.ts] //// + +=== augmentedTypesEnum2.ts === // enum then interface enum e1 { One } // error >e1 : e1 diff --git a/tests/baselines/reference/augmentedTypesEnum3.errors.txt b/tests/baselines/reference/augmentedTypesEnum3.errors.txt index 9ec4f4d81c508..a50b45318012d 100644 --- a/tests/baselines/reference/augmentedTypesEnum3.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/augmentedTypesEnum3.ts(16,5): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +augmentedTypesEnum3.ts(16,5): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. -==== tests/cases/compiler/augmentedTypesEnum3.ts (1 errors) ==== +==== augmentedTypesEnum3.ts (1 errors) ==== module E { var t; } diff --git a/tests/baselines/reference/augmentedTypesEnum3.js b/tests/baselines/reference/augmentedTypesEnum3.js index 4df9dada5305e..fbb2b81c09ccd 100644 --- a/tests/baselines/reference/augmentedTypesEnum3.js +++ b/tests/baselines/reference/augmentedTypesEnum3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesEnum3.ts] //// + //// [augmentedTypesEnum3.ts] module E { var t; diff --git a/tests/baselines/reference/augmentedTypesEnum3.symbols b/tests/baselines/reference/augmentedTypesEnum3.symbols index d5e6155969dd7..5b852406f2222 100644 --- a/tests/baselines/reference/augmentedTypesEnum3.symbols +++ b/tests/baselines/reference/augmentedTypesEnum3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesEnum3.ts === +//// [tests/cases/compiler/augmentedTypesEnum3.ts] //// + +=== augmentedTypesEnum3.ts === module E { >E : Symbol(E, Decl(augmentedTypesEnum3.ts, 0, 0), Decl(augmentedTypesEnum3.ts, 2, 1)) diff --git a/tests/baselines/reference/augmentedTypesEnum3.types b/tests/baselines/reference/augmentedTypesEnum3.types index 10e17c56d9804..1c03e617955dc 100644 --- a/tests/baselines/reference/augmentedTypesEnum3.types +++ b/tests/baselines/reference/augmentedTypesEnum3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesEnum3.ts === +//// [tests/cases/compiler/augmentedTypesEnum3.ts] //// + +=== augmentedTypesEnum3.ts === module E { >E : typeof E diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.js b/tests/baselines/reference/augmentedTypesExternalModule1.js index 4a56bb66c7ab3..2b7ad12f5c71b 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.js +++ b/tests/baselines/reference/augmentedTypesExternalModule1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesExternalModule1.ts] //// + //// [augmentedTypesExternalModule1.ts] export var a = 1; class c5 { public foo() { } } diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.symbols b/tests/baselines/reference/augmentedTypesExternalModule1.symbols index d44d1f213a06f..d97988d71b473 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.symbols +++ b/tests/baselines/reference/augmentedTypesExternalModule1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesExternalModule1.ts === +//// [tests/cases/compiler/augmentedTypesExternalModule1.ts] //// + +=== augmentedTypesExternalModule1.ts === export var a = 1; >a : Symbol(a, Decl(augmentedTypesExternalModule1.ts, 0, 10)) diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.types b/tests/baselines/reference/augmentedTypesExternalModule1.types index aeb8011dde3ef..513955aa6fe48 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.types +++ b/tests/baselines/reference/augmentedTypesExternalModule1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesExternalModule1.ts === +//// [tests/cases/compiler/augmentedTypesExternalModule1.ts] //// + +=== augmentedTypesExternalModule1.ts === export var a = 1; >a : number >1 : 1 diff --git a/tests/baselines/reference/augmentedTypesFunction.errors.txt b/tests/baselines/reference/augmentedTypesFunction.errors.txt index 0473730da1ee8..241e746460938 100644 --- a/tests/baselines/reference/augmentedTypesFunction.errors.txt +++ b/tests/baselines/reference/augmentedTypesFunction.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/augmentedTypesFunction.ts(2,10): error TS2300: Duplicate identifier 'y1'. -tests/cases/compiler/augmentedTypesFunction.ts(3,5): error TS2300: Duplicate identifier 'y1'. -tests/cases/compiler/augmentedTypesFunction.ts(6,10): error TS2393: Duplicate function implementation. -tests/cases/compiler/augmentedTypesFunction.ts(7,10): error TS2393: Duplicate function implementation. -tests/cases/compiler/augmentedTypesFunction.ts(9,10): error TS2300: Duplicate identifier 'y2a'. -tests/cases/compiler/augmentedTypesFunction.ts(10,5): error TS2300: Duplicate identifier 'y2a'. -tests/cases/compiler/augmentedTypesFunction.ts(13,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/augmentedTypesFunction.ts(14,7): error TS2813: Class declaration cannot implement overload list for 'y3'. -tests/cases/compiler/augmentedTypesFunction.ts(16,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/augmentedTypesFunction.ts(17,7): error TS2813: Class declaration cannot implement overload list for 'y3a'. -tests/cases/compiler/augmentedTypesFunction.ts(20,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesFunction.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesFunction.ts(2,10): error TS2300: Duplicate identifier 'y1'. +augmentedTypesFunction.ts(3,5): error TS2300: Duplicate identifier 'y1'. +augmentedTypesFunction.ts(6,10): error TS2393: Duplicate function implementation. +augmentedTypesFunction.ts(7,10): error TS2393: Duplicate function implementation. +augmentedTypesFunction.ts(9,10): error TS2300: Duplicate identifier 'y2a'. +augmentedTypesFunction.ts(10,5): error TS2300: Duplicate identifier 'y2a'. +augmentedTypesFunction.ts(13,10): error TS2814: Function with bodies can only merge with classes that are ambient. +augmentedTypesFunction.ts(14,7): error TS2813: Class declaration cannot implement overload list for 'y3'. +augmentedTypesFunction.ts(16,10): error TS2814: Function with bodies can only merge with classes that are ambient. +augmentedTypesFunction.ts(17,7): error TS2813: Class declaration cannot implement overload list for 'y3a'. +augmentedTypesFunction.ts(20,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesFunction.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -==== tests/cases/compiler/augmentedTypesFunction.ts (12 errors) ==== +==== augmentedTypesFunction.ts (12 errors) ==== // function then var function y1() { } // error ~~ @@ -40,20 +40,20 @@ tests/cases/compiler/augmentedTypesFunction.ts(21,6): error TS2567: Enum declara function y3() { } // error ~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:14:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 augmentedTypesFunction.ts:14:7: Consider adding a 'declare' modifier to this class. class y3 { } // error ~~ !!! error TS2813: Class declaration cannot implement overload list for 'y3'. -!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:14:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 augmentedTypesFunction.ts:14:7: Consider adding a 'declare' modifier to this class. function y3a() { } // error ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:17:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 augmentedTypesFunction.ts:17:7: Consider adding a 'declare' modifier to this class. class y3a { public foo() { } } // error ~~~ !!! error TS2813: Class declaration cannot implement overload list for 'y3a'. -!!! related TS6506 tests/cases/compiler/augmentedTypesFunction.ts:17:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 augmentedTypesFunction.ts:17:7: Consider adding a 'declare' modifier to this class. // function then enum function y4() { } // error diff --git a/tests/baselines/reference/augmentedTypesFunction.js b/tests/baselines/reference/augmentedTypesFunction.js index a2dd4a664a3a7..72009bde1219b 100644 --- a/tests/baselines/reference/augmentedTypesFunction.js +++ b/tests/baselines/reference/augmentedTypesFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesFunction.ts] //// + //// [augmentedTypesFunction.ts] // function then var function y1() { } // error diff --git a/tests/baselines/reference/augmentedTypesFunction.symbols b/tests/baselines/reference/augmentedTypesFunction.symbols index 007600e1f5b42..14814c2cf96ee 100644 --- a/tests/baselines/reference/augmentedTypesFunction.symbols +++ b/tests/baselines/reference/augmentedTypesFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesFunction.ts === +//// [tests/cases/compiler/augmentedTypesFunction.ts] //// + +=== augmentedTypesFunction.ts === // function then var function y1() { } // error >y1 : Symbol(y1, Decl(augmentedTypesFunction.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesFunction.types b/tests/baselines/reference/augmentedTypesFunction.types index 91d6f4f11b1c5..6d4445fb0c086 100644 --- a/tests/baselines/reference/augmentedTypesFunction.types +++ b/tests/baselines/reference/augmentedTypesFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesFunction.ts === +//// [tests/cases/compiler/augmentedTypesFunction.ts] //// + +=== augmentedTypesFunction.ts === // function then var function y1() { } // error >y1 : () => void diff --git a/tests/baselines/reference/augmentedTypesInterface.errors.txt b/tests/baselines/reference/augmentedTypesInterface.errors.txt index 758286896190a..10fe6678663c7 100644 --- a/tests/baselines/reference/augmentedTypesInterface.errors.txt +++ b/tests/baselines/reference/augmentedTypesInterface.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/augmentedTypesInterface.ts(23,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesInterface.ts(23,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesInterface.ts(26,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -==== tests/cases/compiler/augmentedTypesInterface.ts (2 errors) ==== +==== augmentedTypesInterface.ts (2 errors) ==== // interface then interface interface i { diff --git a/tests/baselines/reference/augmentedTypesInterface.js b/tests/baselines/reference/augmentedTypesInterface.js index 0409e157584a3..c0b7abd7b5c1e 100644 --- a/tests/baselines/reference/augmentedTypesInterface.js +++ b/tests/baselines/reference/augmentedTypesInterface.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesInterface.ts] //// + //// [augmentedTypesInterface.ts] // interface then interface diff --git a/tests/baselines/reference/augmentedTypesInterface.symbols b/tests/baselines/reference/augmentedTypesInterface.symbols index 602823e27c9e1..27c8cd8e34fec 100644 --- a/tests/baselines/reference/augmentedTypesInterface.symbols +++ b/tests/baselines/reference/augmentedTypesInterface.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesInterface.ts === +//// [tests/cases/compiler/augmentedTypesInterface.ts] //// + +=== augmentedTypesInterface.ts === // interface then interface interface i { diff --git a/tests/baselines/reference/augmentedTypesInterface.types b/tests/baselines/reference/augmentedTypesInterface.types index 1ee66d267c73b..b6dc695cd1125 100644 --- a/tests/baselines/reference/augmentedTypesInterface.types +++ b/tests/baselines/reference/augmentedTypesInterface.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesInterface.ts === +//// [tests/cases/compiler/augmentedTypesInterface.ts] //// + +=== augmentedTypesInterface.ts === // interface then interface interface i { diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 627df18464445..c5e17402e5b7e 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/augmentedTypesModules.ts(5,8): error TS2300: Duplicate identifier 'm1a'. -tests/cases/compiler/augmentedTypesModules.ts(6,5): error TS2300: Duplicate identifier 'm1a'. -tests/cases/compiler/augmentedTypesModules.ts(8,8): error TS2300: Duplicate identifier 'm1b'. -tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. -tests/cases/compiler/augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'. -tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. -tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules.ts(5,8): error TS2300: Duplicate identifier 'm1a'. +augmentedTypesModules.ts(6,5): error TS2300: Duplicate identifier 'm1a'. +augmentedTypesModules.ts(8,8): error TS2300: Duplicate identifier 'm1b'. +augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. +augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'. +augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. +augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -==== tests/cases/compiler/augmentedTypesModules.ts (9 errors) ==== +==== augmentedTypesModules.ts (9 errors) ==== // module then var module m1 { } var m1 = 1; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypesModules.js b/tests/baselines/reference/augmentedTypesModules.js index c0bb1747e6dc6..01c8a0548269f 100644 --- a/tests/baselines/reference/augmentedTypesModules.js +++ b/tests/baselines/reference/augmentedTypesModules.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesModules.ts] //// + //// [augmentedTypesModules.ts] // module then var module m1 { } diff --git a/tests/baselines/reference/augmentedTypesModules.symbols b/tests/baselines/reference/augmentedTypesModules.symbols index 1a0d6cc8ff708..4358e5cc595f5 100644 --- a/tests/baselines/reference/augmentedTypesModules.symbols +++ b/tests/baselines/reference/augmentedTypesModules.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules.ts === +//// [tests/cases/compiler/augmentedTypesModules.ts] //// + +=== augmentedTypesModules.ts === // module then var module m1 { } >m1 : Symbol(m1, Decl(augmentedTypesModules.ts, 0, 0), Decl(augmentedTypesModules.ts, 2, 3)) diff --git a/tests/baselines/reference/augmentedTypesModules.types b/tests/baselines/reference/augmentedTypesModules.types index c377381f7695c..db5d03d9f76e6 100644 --- a/tests/baselines/reference/augmentedTypesModules.types +++ b/tests/baselines/reference/augmentedTypesModules.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules.ts === +//// [tests/cases/compiler/augmentedTypesModules.ts] //// + +=== augmentedTypesModules.ts === // module then var module m1 { } var m1 = 1; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypesModules2.errors.txt b/tests/baselines/reference/augmentedTypesModules2.errors.txt index 788e55d805b72..2407ac456e8ff 100644 --- a/tests/baselines/reference/augmentedTypesModules2.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules2.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ==== +==== augmentedTypesModules2.ts (3 errors) ==== // module then function module m2 { } function m2() { }; // ok since the module is not instantiated diff --git a/tests/baselines/reference/augmentedTypesModules2.js b/tests/baselines/reference/augmentedTypesModules2.js index 995a85f39600d..c162d085674a5 100644 --- a/tests/baselines/reference/augmentedTypesModules2.js +++ b/tests/baselines/reference/augmentedTypesModules2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesModules2.ts] //// + //// [augmentedTypesModules2.ts] // module then function module m2 { } diff --git a/tests/baselines/reference/augmentedTypesModules2.symbols b/tests/baselines/reference/augmentedTypesModules2.symbols index 2d64e711c6a30..431cb3bc38370 100644 --- a/tests/baselines/reference/augmentedTypesModules2.symbols +++ b/tests/baselines/reference/augmentedTypesModules2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules2.ts === +//// [tests/cases/compiler/augmentedTypesModules2.ts] //// + +=== augmentedTypesModules2.ts === // module then function module m2 { } >m2 : Symbol(m2, Decl(augmentedTypesModules2.ts, 1, 13), Decl(augmentedTypesModules2.ts, 0, 0)) diff --git a/tests/baselines/reference/augmentedTypesModules2.types b/tests/baselines/reference/augmentedTypesModules2.types index 30b147934536d..517fa491044f5 100644 --- a/tests/baselines/reference/augmentedTypesModules2.types +++ b/tests/baselines/reference/augmentedTypesModules2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules2.ts === +//// [tests/cases/compiler/augmentedTypesModules2.ts] //// + +=== augmentedTypesModules2.ts === // module then function module m2 { } function m2() { }; // ok since the module is not instantiated diff --git a/tests/baselines/reference/augmentedTypesModules3.errors.txt b/tests/baselines/reference/augmentedTypesModules3.errors.txt index 46b27da0bec25..c93b9b5b3f2de 100644 --- a/tests/baselines/reference/augmentedTypesModules3.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -==== tests/cases/compiler/augmentedTypesModules3.ts (1 errors) ==== +==== augmentedTypesModules3.ts (1 errors) ==== //// module then class module m3 { } class m3 { } // ok since the module is not instantiated diff --git a/tests/baselines/reference/augmentedTypesModules3.js b/tests/baselines/reference/augmentedTypesModules3.js index 0537bd092b012..89f06aea9c533 100644 --- a/tests/baselines/reference/augmentedTypesModules3.js +++ b/tests/baselines/reference/augmentedTypesModules3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesModules3.ts] //// + //// [augmentedTypesModules3.ts] //// module then class module m3 { } diff --git a/tests/baselines/reference/augmentedTypesModules3.symbols b/tests/baselines/reference/augmentedTypesModules3.symbols index e5519b21a9806..53527859d14c4 100644 --- a/tests/baselines/reference/augmentedTypesModules3.symbols +++ b/tests/baselines/reference/augmentedTypesModules3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules3.ts === +//// [tests/cases/compiler/augmentedTypesModules3.ts] //// + +=== augmentedTypesModules3.ts === //// module then class module m3 { } >m3 : Symbol(m3, Decl(augmentedTypesModules3.ts, 0, 0), Decl(augmentedTypesModules3.ts, 1, 13)) diff --git a/tests/baselines/reference/augmentedTypesModules3.types b/tests/baselines/reference/augmentedTypesModules3.types index 2f95368414bc2..d242152cd667e 100644 --- a/tests/baselines/reference/augmentedTypesModules3.types +++ b/tests/baselines/reference/augmentedTypesModules3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules3.ts === +//// [tests/cases/compiler/augmentedTypesModules3.ts] //// + +=== augmentedTypesModules3.ts === //// module then class module m3 { } class m3 { } // ok since the module is not instantiated diff --git a/tests/baselines/reference/augmentedTypesModules3b.js b/tests/baselines/reference/augmentedTypesModules3b.js index 57957c13b8082..1af48a30b378f 100644 --- a/tests/baselines/reference/augmentedTypesModules3b.js +++ b/tests/baselines/reference/augmentedTypesModules3b.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesModules3b.ts] //// + //// [augmentedTypesModules3b.ts] class m3b { foo() { } } module m3b { var y = 2; } diff --git a/tests/baselines/reference/augmentedTypesModules3b.symbols b/tests/baselines/reference/augmentedTypesModules3b.symbols index abafc4855cacf..50faf044a6cb1 100644 --- a/tests/baselines/reference/augmentedTypesModules3b.symbols +++ b/tests/baselines/reference/augmentedTypesModules3b.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules3b.ts === +//// [tests/cases/compiler/augmentedTypesModules3b.ts] //// + +=== augmentedTypesModules3b.ts === class m3b { foo() { } } >m3b : Symbol(m3b, Decl(augmentedTypesModules3b.ts, 0, 0), Decl(augmentedTypesModules3b.ts, 0, 23)) >foo : Symbol(m3b.foo, Decl(augmentedTypesModules3b.ts, 0, 11)) diff --git a/tests/baselines/reference/augmentedTypesModules3b.types b/tests/baselines/reference/augmentedTypesModules3b.types index c165ae3cd3223..3e694aac7d1b6 100644 --- a/tests/baselines/reference/augmentedTypesModules3b.types +++ b/tests/baselines/reference/augmentedTypesModules3b.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules3b.ts === +//// [tests/cases/compiler/augmentedTypesModules3b.ts] //// + +=== augmentedTypesModules3b.ts === class m3b { foo() { } } >m3b : m3b >foo : () => void diff --git a/tests/baselines/reference/augmentedTypesModules4.js b/tests/baselines/reference/augmentedTypesModules4.js index b7a776ca16435..1af224b33b8d7 100644 --- a/tests/baselines/reference/augmentedTypesModules4.js +++ b/tests/baselines/reference/augmentedTypesModules4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesModules4.ts] //// + //// [augmentedTypesModules4.ts] // module then enum // should be errors diff --git a/tests/baselines/reference/augmentedTypesModules4.symbols b/tests/baselines/reference/augmentedTypesModules4.symbols index 8df383141ec6c..0da1a5be9b2d4 100644 --- a/tests/baselines/reference/augmentedTypesModules4.symbols +++ b/tests/baselines/reference/augmentedTypesModules4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules4.ts === +//// [tests/cases/compiler/augmentedTypesModules4.ts] //// + +=== augmentedTypesModules4.ts === // module then enum // should be errors module m4 { } diff --git a/tests/baselines/reference/augmentedTypesModules4.types b/tests/baselines/reference/augmentedTypesModules4.types index 61083db259112..efa0d6cf2d3f0 100644 --- a/tests/baselines/reference/augmentedTypesModules4.types +++ b/tests/baselines/reference/augmentedTypesModules4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesModules4.ts === +//// [tests/cases/compiler/augmentedTypesModules4.ts] //// + +=== augmentedTypesModules4.ts === // module then enum // should be errors module m4 { } diff --git a/tests/baselines/reference/augmentedTypesVar.errors.txt b/tests/baselines/reference/augmentedTypesVar.errors.txt index ae910b4f5be16..724b5660fd68f 100644 --- a/tests/baselines/reference/augmentedTypesVar.errors.txt +++ b/tests/baselines/reference/augmentedTypesVar.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/augmentedTypesVar.ts(6,5): error TS2300: Duplicate identifier 'x2'. -tests/cases/compiler/augmentedTypesVar.ts(7,10): error TS2300: Duplicate identifier 'x2'. -tests/cases/compiler/augmentedTypesVar.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. -tests/cases/compiler/augmentedTypesVar.ts(13,5): error TS2300: Duplicate identifier 'x4'. -tests/cases/compiler/augmentedTypesVar.ts(14,7): error TS2300: Duplicate identifier 'x4'. -tests/cases/compiler/augmentedTypesVar.ts(16,5): error TS2300: Duplicate identifier 'x4a'. -tests/cases/compiler/augmentedTypesVar.ts(17,7): error TS2300: Duplicate identifier 'x4a'. -tests/cases/compiler/augmentedTypesVar.ts(20,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesVar.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -tests/cases/compiler/augmentedTypesVar.ts(27,5): error TS2300: Duplicate identifier 'x6a'. -tests/cases/compiler/augmentedTypesVar.ts(28,8): error TS2300: Duplicate identifier 'x6a'. -tests/cases/compiler/augmentedTypesVar.ts(30,5): error TS2300: Duplicate identifier 'x6b'. -tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'. +augmentedTypesVar.ts(6,5): error TS2300: Duplicate identifier 'x2'. +augmentedTypesVar.ts(7,10): error TS2300: Duplicate identifier 'x2'. +augmentedTypesVar.ts(10,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. +augmentedTypesVar.ts(13,5): error TS2300: Duplicate identifier 'x4'. +augmentedTypesVar.ts(14,7): error TS2300: Duplicate identifier 'x4'. +augmentedTypesVar.ts(16,5): error TS2300: Duplicate identifier 'x4a'. +augmentedTypesVar.ts(17,7): error TS2300: Duplicate identifier 'x4a'. +augmentedTypesVar.ts(20,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesVar.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +augmentedTypesVar.ts(27,5): error TS2300: Duplicate identifier 'x6a'. +augmentedTypesVar.ts(28,8): error TS2300: Duplicate identifier 'x6a'. +augmentedTypesVar.ts(30,5): error TS2300: Duplicate identifier 'x6b'. +augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'. -==== tests/cases/compiler/augmentedTypesVar.ts (13 errors) ==== +==== augmentedTypesVar.ts (13 errors) ==== // var then var var x1 = 1; var x1 = 2; @@ -30,7 +30,7 @@ tests/cases/compiler/augmentedTypesVar.ts(31,8): error TS2300: Duplicate identif var x3 = () => { } // error ~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. -!!! related TS6203 tests/cases/compiler/augmentedTypesVar.ts:9:5: 'x3' was also declared here. +!!! related TS6203 augmentedTypesVar.ts:9:5: 'x3' was also declared here. // var then class var x4 = 1; // error diff --git a/tests/baselines/reference/augmentedTypesVar.js b/tests/baselines/reference/augmentedTypesVar.js index 9945737410d3a..d7850624dc5c9 100644 --- a/tests/baselines/reference/augmentedTypesVar.js +++ b/tests/baselines/reference/augmentedTypesVar.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/augmentedTypesVar.ts] //// + //// [augmentedTypesVar.ts] // var then var var x1 = 1; diff --git a/tests/baselines/reference/augmentedTypesVar.symbols b/tests/baselines/reference/augmentedTypesVar.symbols index 1b9e9be123151..c98dabfd200c3 100644 --- a/tests/baselines/reference/augmentedTypesVar.symbols +++ b/tests/baselines/reference/augmentedTypesVar.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesVar.ts === +//// [tests/cases/compiler/augmentedTypesVar.ts] //// + +=== augmentedTypesVar.ts === // var then var var x1 = 1; >x1 : Symbol(x1, Decl(augmentedTypesVar.ts, 1, 3), Decl(augmentedTypesVar.ts, 2, 3)) diff --git a/tests/baselines/reference/augmentedTypesVar.types b/tests/baselines/reference/augmentedTypesVar.types index 13a9db43c0866..dfcf1dbbfda15 100644 --- a/tests/baselines/reference/augmentedTypesVar.types +++ b/tests/baselines/reference/augmentedTypesVar.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/augmentedTypesVar.ts === +//// [tests/cases/compiler/augmentedTypesVar.ts] //// + +=== augmentedTypesVar.ts === // var then var var x1 = 1; >x1 : number diff --git a/tests/baselines/reference/autoAccessor1(target=es2015).js b/tests/baselines/reference/autoAccessor1(target=es2015).js index 5749b5605673f..8377a3ce303b6 100644 --- a/tests/baselines/reference/autoAccessor1(target=es2015).js +++ b/tests/baselines/reference/autoAccessor1(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + //// [autoAccessor1.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor1(target=es2015).symbols b/tests/baselines/reference/autoAccessor1(target=es2015).symbols index cc534d5d543f9..6f9d455b70f77 100644 --- a/tests/baselines/reference/autoAccessor1(target=es2015).symbols +++ b/tests/baselines/reference/autoAccessor1(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor1.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor1(target=es2015).types b/tests/baselines/reference/autoAccessor1(target=es2015).types index 2f31df539b8fa..1043c143a4708 100644 --- a/tests/baselines/reference/autoAccessor1(target=es2015).types +++ b/tests/baselines/reference/autoAccessor1(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor1(target=es2022).js b/tests/baselines/reference/autoAccessor1(target=es2022).js index 4b93d2f205dae..4611516123e27 100644 --- a/tests/baselines/reference/autoAccessor1(target=es2022).js +++ b/tests/baselines/reference/autoAccessor1(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + //// [autoAccessor1.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor1(target=es2022).symbols b/tests/baselines/reference/autoAccessor1(target=es2022).symbols index cc534d5d543f9..6f9d455b70f77 100644 --- a/tests/baselines/reference/autoAccessor1(target=es2022).symbols +++ b/tests/baselines/reference/autoAccessor1(target=es2022).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor1.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor1(target=es2022).types b/tests/baselines/reference/autoAccessor1(target=es2022).types index 2f31df539b8fa..1043c143a4708 100644 --- a/tests/baselines/reference/autoAccessor1(target=es2022).types +++ b/tests/baselines/reference/autoAccessor1(target=es2022).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor1(target=es5).errors.txt b/tests/baselines/reference/autoAccessor1(target=es5).errors.txt index aa03e0e14d00c..d20d2bfecf11e 100644 --- a/tests/baselines/reference/autoAccessor1(target=es5).errors.txt +++ b/tests/baselines/reference/autoAccessor1(target=es5).errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor1.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor1.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor1.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor1.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts (4 errors) ==== +==== autoAccessor1.ts (4 errors) ==== class C1 { accessor a: any; ~ diff --git a/tests/baselines/reference/autoAccessor1(target=es5).symbols b/tests/baselines/reference/autoAccessor1(target=es5).symbols index cc534d5d543f9..6f9d455b70f77 100644 --- a/tests/baselines/reference/autoAccessor1(target=es5).symbols +++ b/tests/baselines/reference/autoAccessor1(target=es5).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor1.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor1(target=es5).types b/tests/baselines/reference/autoAccessor1(target=es5).types index 2f31df539b8fa..1043c143a4708 100644 --- a/tests/baselines/reference/autoAccessor1(target=es5).types +++ b/tests/baselines/reference/autoAccessor1(target=es5).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor1(target=esnext).js b/tests/baselines/reference/autoAccessor1(target=esnext).js index 312758e2aa9f9..7be10ab1fe84c 100644 --- a/tests/baselines/reference/autoAccessor1(target=esnext).js +++ b/tests/baselines/reference/autoAccessor1(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + //// [autoAccessor1.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor1(target=esnext).symbols b/tests/baselines/reference/autoAccessor1(target=esnext).symbols index cc534d5d543f9..6f9d455b70f77 100644 --- a/tests/baselines/reference/autoAccessor1(target=esnext).symbols +++ b/tests/baselines/reference/autoAccessor1(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor1.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor1(target=esnext).types b/tests/baselines/reference/autoAccessor1(target=esnext).types index 2f31df539b8fa..1043c143a4708 100644 --- a/tests/baselines/reference/autoAccessor1(target=esnext).types +++ b/tests/baselines/reference/autoAccessor1(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor1.ts] //// + +=== autoAccessor1.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor10.js b/tests/baselines/reference/autoAccessor10.js index 4443bef9849d1..88c23c432e7df 100644 --- a/tests/baselines/reference/autoAccessor10.js +++ b/tests/baselines/reference/autoAccessor10.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor10.ts] //// + //// [autoAccessor10.ts] class C1 { accessor a0 = 1; diff --git a/tests/baselines/reference/autoAccessor10.symbols b/tests/baselines/reference/autoAccessor10.symbols index a21d4accf9575..155fb7f0d278e 100644 --- a/tests/baselines/reference/autoAccessor10.symbols +++ b/tests/baselines/reference/autoAccessor10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor10.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor10.ts] //// + +=== autoAccessor10.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor10.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor10.types b/tests/baselines/reference/autoAccessor10.types index bd26ccd90b25c..c63be1760b156 100644 --- a/tests/baselines/reference/autoAccessor10.types +++ b/tests/baselines/reference/autoAccessor10.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor10.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor10.ts] //// + +=== autoAccessor10.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor11.errors.txt b/tests/baselines/reference/autoAccessor11.errors.txt index c259aab977901..680fc6143013e 100644 --- a/tests/baselines/reference/autoAccessor11.errors.txt +++ b/tests/baselines/reference/autoAccessor11.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts(2,5): error TS2300: Duplicate identifier 'accessor'. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts(9,5): error TS2300: Duplicate identifier 'accessor'. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts(12,14): error TS2300: Duplicate identifier 'accessor'. +autoAccessor11.ts(2,5): error TS2300: Duplicate identifier 'accessor'. +autoAccessor11.ts(9,5): error TS2300: Duplicate identifier 'accessor'. +autoAccessor11.ts(12,14): error TS2300: Duplicate identifier 'accessor'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts (3 errors) ==== +==== autoAccessor11.ts (3 errors) ==== class C { accessor ~~~~~~~~ diff --git a/tests/baselines/reference/autoAccessor11.js b/tests/baselines/reference/autoAccessor11.js index 6cfa0dcf49dcf..30097d652c87e 100644 --- a/tests/baselines/reference/autoAccessor11.js +++ b/tests/baselines/reference/autoAccessor11.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts] //// + //// [autoAccessor11.ts] class C { accessor diff --git a/tests/baselines/reference/autoAccessor11.symbols b/tests/baselines/reference/autoAccessor11.symbols index d3daf272bb275..b3b2b974be512 100644 --- a/tests/baselines/reference/autoAccessor11.symbols +++ b/tests/baselines/reference/autoAccessor11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts] //// + +=== autoAccessor11.ts === class C { >C : Symbol(C, Decl(autoAccessor11.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor11.types b/tests/baselines/reference/autoAccessor11.types index 65a52437dafa9..d805452c31c31 100644 --- a/tests/baselines/reference/autoAccessor11.types +++ b/tests/baselines/reference/autoAccessor11.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor11.ts] //// + +=== autoAccessor11.ts === class C { >C : C diff --git a/tests/baselines/reference/autoAccessor2(target=es2015).js b/tests/baselines/reference/autoAccessor2(target=es2015).js index 7b4cb28008e9e..767c244a358f2 100644 --- a/tests/baselines/reference/autoAccessor2(target=es2015).js +++ b/tests/baselines/reference/autoAccessor2(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + //// [autoAccessor2.ts] class C1 { accessor #a: any; diff --git a/tests/baselines/reference/autoAccessor2(target=es2015).symbols b/tests/baselines/reference/autoAccessor2(target=es2015).symbols index 24e0c62880c3c..5d98c669150dd 100644 --- a/tests/baselines/reference/autoAccessor2(target=es2015).symbols +++ b/tests/baselines/reference/autoAccessor2(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + +=== autoAccessor2.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor2.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor2(target=es2015).types b/tests/baselines/reference/autoAccessor2(target=es2015).types index 0bff019ef3707..c0a0187da989f 100644 --- a/tests/baselines/reference/autoAccessor2(target=es2015).types +++ b/tests/baselines/reference/autoAccessor2(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + +=== autoAccessor2.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor2(target=es2022).js b/tests/baselines/reference/autoAccessor2(target=es2022).js index 7c847b3334ac9..45a4b6066bdfa 100644 --- a/tests/baselines/reference/autoAccessor2(target=es2022).js +++ b/tests/baselines/reference/autoAccessor2(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + //// [autoAccessor2.ts] class C1 { accessor #a: any; diff --git a/tests/baselines/reference/autoAccessor2(target=es2022).symbols b/tests/baselines/reference/autoAccessor2(target=es2022).symbols index 24e0c62880c3c..5d98c669150dd 100644 --- a/tests/baselines/reference/autoAccessor2(target=es2022).symbols +++ b/tests/baselines/reference/autoAccessor2(target=es2022).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + +=== autoAccessor2.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor2.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor2(target=es2022).types b/tests/baselines/reference/autoAccessor2(target=es2022).types index 0bff019ef3707..c0a0187da989f 100644 --- a/tests/baselines/reference/autoAccessor2(target=es2022).types +++ b/tests/baselines/reference/autoAccessor2(target=es2022).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + +=== autoAccessor2.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor2(target=esnext).js b/tests/baselines/reference/autoAccessor2(target=esnext).js index f184c001cd366..6840304ca67f9 100644 --- a/tests/baselines/reference/autoAccessor2(target=esnext).js +++ b/tests/baselines/reference/autoAccessor2(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + //// [autoAccessor2.ts] class C1 { accessor #a: any; diff --git a/tests/baselines/reference/autoAccessor2(target=esnext).symbols b/tests/baselines/reference/autoAccessor2(target=esnext).symbols index 24e0c62880c3c..5d98c669150dd 100644 --- a/tests/baselines/reference/autoAccessor2(target=esnext).symbols +++ b/tests/baselines/reference/autoAccessor2(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + +=== autoAccessor2.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor2.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor2(target=esnext).types b/tests/baselines/reference/autoAccessor2(target=esnext).types index 0bff019ef3707..c0a0187da989f 100644 --- a/tests/baselines/reference/autoAccessor2(target=esnext).types +++ b/tests/baselines/reference/autoAccessor2(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor2.ts] //// + +=== autoAccessor2.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor3(target=es2015).js b/tests/baselines/reference/autoAccessor3(target=es2015).js index c2bebd8dc6109..fce1f25d1801d 100644 --- a/tests/baselines/reference/autoAccessor3(target=es2015).js +++ b/tests/baselines/reference/autoAccessor3(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + //// [autoAccessor3.ts] class C1 { accessor "w": any; diff --git a/tests/baselines/reference/autoAccessor3(target=es2015).symbols b/tests/baselines/reference/autoAccessor3(target=es2015).symbols index 9cf05f23a9e4d..5f500402599e2 100644 --- a/tests/baselines/reference/autoAccessor3(target=es2015).symbols +++ b/tests/baselines/reference/autoAccessor3(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor3.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor3(target=es2015).types b/tests/baselines/reference/autoAccessor3(target=es2015).types index dec77973d0cd6..3980aaddfb7c3 100644 --- a/tests/baselines/reference/autoAccessor3(target=es2015).types +++ b/tests/baselines/reference/autoAccessor3(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor3(target=es2022).js b/tests/baselines/reference/autoAccessor3(target=es2022).js index 20453ef464fba..4cabe04e4382b 100644 --- a/tests/baselines/reference/autoAccessor3(target=es2022).js +++ b/tests/baselines/reference/autoAccessor3(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + //// [autoAccessor3.ts] class C1 { accessor "w": any; diff --git a/tests/baselines/reference/autoAccessor3(target=es2022).symbols b/tests/baselines/reference/autoAccessor3(target=es2022).symbols index 9cf05f23a9e4d..5f500402599e2 100644 --- a/tests/baselines/reference/autoAccessor3(target=es2022).symbols +++ b/tests/baselines/reference/autoAccessor3(target=es2022).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor3.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor3(target=es2022).types b/tests/baselines/reference/autoAccessor3(target=es2022).types index dec77973d0cd6..3980aaddfb7c3 100644 --- a/tests/baselines/reference/autoAccessor3(target=es2022).types +++ b/tests/baselines/reference/autoAccessor3(target=es2022).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor3(target=es5).errors.txt b/tests/baselines/reference/autoAccessor3(target=es5).errors.txt index deea9cec64f11..0637053416bfe 100644 --- a/tests/baselines/reference/autoAccessor3(target=es5).errors.txt +++ b/tests/baselines/reference/autoAccessor3(target=es5).errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor3.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor3.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor3.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor3.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts (4 errors) ==== +==== autoAccessor3.ts (4 errors) ==== class C1 { accessor "w": any; ~~~ diff --git a/tests/baselines/reference/autoAccessor3(target=es5).symbols b/tests/baselines/reference/autoAccessor3(target=es5).symbols index 9cf05f23a9e4d..5f500402599e2 100644 --- a/tests/baselines/reference/autoAccessor3(target=es5).symbols +++ b/tests/baselines/reference/autoAccessor3(target=es5).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor3.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor3(target=es5).types b/tests/baselines/reference/autoAccessor3(target=es5).types index dec77973d0cd6..3980aaddfb7c3 100644 --- a/tests/baselines/reference/autoAccessor3(target=es5).types +++ b/tests/baselines/reference/autoAccessor3(target=es5).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor3(target=esnext).js b/tests/baselines/reference/autoAccessor3(target=esnext).js index cad23cf54be1e..cb2e729e0df15 100644 --- a/tests/baselines/reference/autoAccessor3(target=esnext).js +++ b/tests/baselines/reference/autoAccessor3(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + //// [autoAccessor3.ts] class C1 { accessor "w": any; diff --git a/tests/baselines/reference/autoAccessor3(target=esnext).symbols b/tests/baselines/reference/autoAccessor3(target=esnext).symbols index 9cf05f23a9e4d..5f500402599e2 100644 --- a/tests/baselines/reference/autoAccessor3(target=esnext).symbols +++ b/tests/baselines/reference/autoAccessor3(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor3.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor3(target=esnext).types b/tests/baselines/reference/autoAccessor3(target=esnext).types index dec77973d0cd6..3980aaddfb7c3 100644 --- a/tests/baselines/reference/autoAccessor3(target=esnext).types +++ b/tests/baselines/reference/autoAccessor3(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor3.ts] //// + +=== autoAccessor3.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor4(target=es2015).js b/tests/baselines/reference/autoAccessor4(target=es2015).js index d529342e8d96d..b577b88791c1f 100644 --- a/tests/baselines/reference/autoAccessor4(target=es2015).js +++ b/tests/baselines/reference/autoAccessor4(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + //// [autoAccessor4.ts] class C1 { accessor 0: any; diff --git a/tests/baselines/reference/autoAccessor4(target=es2015).symbols b/tests/baselines/reference/autoAccessor4(target=es2015).symbols index 8452d711bfc0f..2e655a4af005a 100644 --- a/tests/baselines/reference/autoAccessor4(target=es2015).symbols +++ b/tests/baselines/reference/autoAccessor4(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor4.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor4(target=es2015).types b/tests/baselines/reference/autoAccessor4(target=es2015).types index d77c24d296b02..e2ba59574934f 100644 --- a/tests/baselines/reference/autoAccessor4(target=es2015).types +++ b/tests/baselines/reference/autoAccessor4(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor4(target=es2022).js b/tests/baselines/reference/autoAccessor4(target=es2022).js index 5f5cf868637c6..c3a0b5bf92580 100644 --- a/tests/baselines/reference/autoAccessor4(target=es2022).js +++ b/tests/baselines/reference/autoAccessor4(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + //// [autoAccessor4.ts] class C1 { accessor 0: any; diff --git a/tests/baselines/reference/autoAccessor4(target=es2022).symbols b/tests/baselines/reference/autoAccessor4(target=es2022).symbols index 8452d711bfc0f..2e655a4af005a 100644 --- a/tests/baselines/reference/autoAccessor4(target=es2022).symbols +++ b/tests/baselines/reference/autoAccessor4(target=es2022).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor4.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor4(target=es2022).types b/tests/baselines/reference/autoAccessor4(target=es2022).types index d77c24d296b02..e2ba59574934f 100644 --- a/tests/baselines/reference/autoAccessor4(target=es2022).types +++ b/tests/baselines/reference/autoAccessor4(target=es2022).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor4(target=es5).errors.txt b/tests/baselines/reference/autoAccessor4(target=es5).errors.txt index d53f1d01f0131..5c481a6438a95 100644 --- a/tests/baselines/reference/autoAccessor4(target=es5).errors.txt +++ b/tests/baselines/reference/autoAccessor4(target=es5).errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor4.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor4.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor4.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor4.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts (4 errors) ==== +==== autoAccessor4.ts (4 errors) ==== class C1 { accessor 0: any; ~ diff --git a/tests/baselines/reference/autoAccessor4(target=es5).symbols b/tests/baselines/reference/autoAccessor4(target=es5).symbols index 8452d711bfc0f..2e655a4af005a 100644 --- a/tests/baselines/reference/autoAccessor4(target=es5).symbols +++ b/tests/baselines/reference/autoAccessor4(target=es5).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor4.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor4(target=es5).types b/tests/baselines/reference/autoAccessor4(target=es5).types index d77c24d296b02..e2ba59574934f 100644 --- a/tests/baselines/reference/autoAccessor4(target=es5).types +++ b/tests/baselines/reference/autoAccessor4(target=es5).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor4(target=esnext).js b/tests/baselines/reference/autoAccessor4(target=esnext).js index 431d6dee3ef5a..1e0ae8b496e3e 100644 --- a/tests/baselines/reference/autoAccessor4(target=esnext).js +++ b/tests/baselines/reference/autoAccessor4(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + //// [autoAccessor4.ts] class C1 { accessor 0: any; diff --git a/tests/baselines/reference/autoAccessor4(target=esnext).symbols b/tests/baselines/reference/autoAccessor4(target=esnext).symbols index 8452d711bfc0f..2e655a4af005a 100644 --- a/tests/baselines/reference/autoAccessor4(target=esnext).symbols +++ b/tests/baselines/reference/autoAccessor4(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor4.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor4(target=esnext).types b/tests/baselines/reference/autoAccessor4(target=esnext).types index d77c24d296b02..e2ba59574934f 100644 --- a/tests/baselines/reference/autoAccessor4(target=esnext).types +++ b/tests/baselines/reference/autoAccessor4(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor4.ts] //// + +=== autoAccessor4.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor5(target=es2015).errors.txt b/tests/baselines/reference/autoAccessor5(target=es2015).errors.txt index 453fd4b6f7fe1..2ce40eaac06d3 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2015).errors.txt +++ b/tests/baselines/reference/autoAccessor5(target=es2015).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts (1 errors) ==== +==== autoAccessor5.ts (1 errors) ==== class C1 { accessor ["w"]: any; accessor ["x"] = 1; diff --git a/tests/baselines/reference/autoAccessor5(target=es2015).js b/tests/baselines/reference/autoAccessor5(target=es2015).js index 6f204b8217dcf..919278cb9fe68 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2015).js +++ b/tests/baselines/reference/autoAccessor5(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + //// [autoAccessor5.ts] class C1 { accessor ["w"]: any; diff --git a/tests/baselines/reference/autoAccessor5(target=es2015).symbols b/tests/baselines/reference/autoAccessor5(target=es2015).symbols index 71d59a6ef2281..43c686381522c 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2015).symbols +++ b/tests/baselines/reference/autoAccessor5(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor5.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor5(target=es2015).types b/tests/baselines/reference/autoAccessor5(target=es2015).types index 48b48c552dcf4..34d17d9f8e6f2 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2015).types +++ b/tests/baselines/reference/autoAccessor5(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor5(target=es2022).errors.txt b/tests/baselines/reference/autoAccessor5(target=es2022).errors.txt index 453fd4b6f7fe1..2ce40eaac06d3 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2022).errors.txt +++ b/tests/baselines/reference/autoAccessor5(target=es2022).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts (1 errors) ==== +==== autoAccessor5.ts (1 errors) ==== class C1 { accessor ["w"]: any; accessor ["x"] = 1; diff --git a/tests/baselines/reference/autoAccessor5(target=es2022).js b/tests/baselines/reference/autoAccessor5(target=es2022).js index f79577e076791..6e333433961fd 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2022).js +++ b/tests/baselines/reference/autoAccessor5(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + //// [autoAccessor5.ts] class C1 { accessor ["w"]: any; diff --git a/tests/baselines/reference/autoAccessor5(target=es2022).symbols b/tests/baselines/reference/autoAccessor5(target=es2022).symbols index 71d59a6ef2281..43c686381522c 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2022).symbols +++ b/tests/baselines/reference/autoAccessor5(target=es2022).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor5.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor5(target=es2022).types b/tests/baselines/reference/autoAccessor5(target=es2022).types index 48b48c552dcf4..34d17d9f8e6f2 100644 --- a/tests/baselines/reference/autoAccessor5(target=es2022).types +++ b/tests/baselines/reference/autoAccessor5(target=es2022).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor5(target=es5).errors.txt b/tests/baselines/reference/autoAccessor5(target=es5).errors.txt index a2290861f4db0..5800cd441ff26 100644 --- a/tests/baselines/reference/autoAccessor5(target=es5).errors.txt +++ b/tests/baselines/reference/autoAccessor5(target=es5).errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +autoAccessor5.ts(2,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor5.ts(3,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor5.ts(4,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor5.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. +autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts (5 errors) ==== +==== autoAccessor5.ts (5 errors) ==== class C1 { accessor ["w"]: any; ~~~~~ diff --git a/tests/baselines/reference/autoAccessor5(target=es5).js b/tests/baselines/reference/autoAccessor5(target=es5).js index beb08668b0d50..3e802faf6cb77 100644 --- a/tests/baselines/reference/autoAccessor5(target=es5).js +++ b/tests/baselines/reference/autoAccessor5(target=es5).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + //// [autoAccessor5.ts] class C1 { accessor ["w"]: any; diff --git a/tests/baselines/reference/autoAccessor5(target=es5).symbols b/tests/baselines/reference/autoAccessor5(target=es5).symbols index 71d59a6ef2281..43c686381522c 100644 --- a/tests/baselines/reference/autoAccessor5(target=es5).symbols +++ b/tests/baselines/reference/autoAccessor5(target=es5).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor5.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor5(target=es5).types b/tests/baselines/reference/autoAccessor5(target=es5).types index 48b48c552dcf4..34d17d9f8e6f2 100644 --- a/tests/baselines/reference/autoAccessor5(target=es5).types +++ b/tests/baselines/reference/autoAccessor5(target=es5).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor5(target=esnext).errors.txt b/tests/baselines/reference/autoAccessor5(target=esnext).errors.txt index 453fd4b6f7fe1..2ce40eaac06d3 100644 --- a/tests/baselines/reference/autoAccessor5(target=esnext).errors.txt +++ b/tests/baselines/reference/autoAccessor5(target=esnext).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +autoAccessor5.ts(10,14): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts (1 errors) ==== +==== autoAccessor5.ts (1 errors) ==== class C1 { accessor ["w"]: any; accessor ["x"] = 1; diff --git a/tests/baselines/reference/autoAccessor5(target=esnext).js b/tests/baselines/reference/autoAccessor5(target=esnext).js index d7620567c7b76..96847a123eb4e 100644 --- a/tests/baselines/reference/autoAccessor5(target=esnext).js +++ b/tests/baselines/reference/autoAccessor5(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + //// [autoAccessor5.ts] class C1 { accessor ["w"]: any; diff --git a/tests/baselines/reference/autoAccessor5(target=esnext).symbols b/tests/baselines/reference/autoAccessor5(target=esnext).symbols index 71d59a6ef2281..43c686381522c 100644 --- a/tests/baselines/reference/autoAccessor5(target=esnext).symbols +++ b/tests/baselines/reference/autoAccessor5(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor5.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor5(target=esnext).types b/tests/baselines/reference/autoAccessor5(target=esnext).types index 48b48c552dcf4..34d17d9f8e6f2 100644 --- a/tests/baselines/reference/autoAccessor5(target=esnext).types +++ b/tests/baselines/reference/autoAccessor5(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor5.ts] //// + +=== autoAccessor5.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).errors.txt b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).errors.txt index e8867ac42e138..d1c723039c5ac 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).errors.txt +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. +autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts (1 errors) ==== +==== autoAccessor6.ts (1 errors) ==== class C1 { accessor a: any; } diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).js index 0868215c3fe0c..3b8c4ecd41d52 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + //// [autoAccessor6.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).symbols b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).symbols index 81d3591d79d78..4ab6555095446 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).symbols +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).types b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).types index e93c302e46076..c109d41cc6ae3 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).types +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).errors.txt b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).errors.txt index e8867ac42e138..d1c723039c5ac 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).errors.txt +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. +autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts (1 errors) ==== +==== autoAccessor6.ts (1 errors) ==== class C1 { accessor a: any; } diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).js index 54ab76c1b4a48..4cee63158d1a5 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + //// [autoAccessor6.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).symbols b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).symbols index 81d3591d79d78..4ab6555095446 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).symbols +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).types b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).types index e93c302e46076..c109d41cc6ae3 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).types +++ b/tests/baselines/reference/autoAccessor6(target=es2015,usedefineforclassfields=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).errors.txt b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).errors.txt index e8867ac42e138..d1c723039c5ac 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).errors.txt +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. +autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts (1 errors) ==== +==== autoAccessor6.ts (1 errors) ==== class C1 { accessor a: any; } diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).js index 26181ea85fe31..a8a2db5f108db 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + //// [autoAccessor6.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).symbols b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).symbols index 81d3591d79d78..4ab6555095446 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).symbols +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).types b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).types index e93c302e46076..c109d41cc6ae3 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).types +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).errors.txt b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).errors.txt index e8867ac42e138..d1c723039c5ac 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).errors.txt +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. +autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts (1 errors) ==== +==== autoAccessor6.ts (1 errors) ==== class C1 { accessor a: any; } diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).js index 8092e0db5ae42..00a43f638f6d4 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + //// [autoAccessor6.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).symbols b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).symbols index 81d3591d79d78..4ab6555095446 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).symbols +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).types b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).types index e93c302e46076..c109d41cc6ae3 100644 --- a/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).types +++ b/tests/baselines/reference/autoAccessor6(target=es2022,usedefineforclassfields=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).errors.txt b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).errors.txt index e8867ac42e138..d1c723039c5ac 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).errors.txt +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. +autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts (1 errors) ==== +==== autoAccessor6.ts (1 errors) ==== class C1 { accessor a: any; } diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).js index 318657aa1d444..a1ee3e21c40e8 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + //// [autoAccessor6.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).symbols b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).symbols index 81d3591d79d78..4ab6555095446 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).symbols +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).types b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).types index e93c302e46076..c109d41cc6ae3 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).types +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).errors.txt b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).errors.txt index e8867ac42e138..d1c723039c5ac 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).errors.txt +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. +autoAccessor6.ts(6,5): error TS2610: 'a' is defined as an accessor in class 'C1', but is overridden here in 'C2' as an instance property. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts (1 errors) ==== +==== autoAccessor6.ts (1 errors) ==== class C1 { accessor a: any; } diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).js b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).js index 47d8e6c085d18..36724c5f20183 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).js +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + //// [autoAccessor6.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).symbols b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).symbols index 81d3591d79d78..4ab6555095446 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).symbols +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).types b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).types index e93c302e46076..c109d41cc6ae3 100644 --- a/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).types +++ b/tests/baselines/reference/autoAccessor6(target=esnext,usedefineforclassfields=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor6.ts] //// + +=== autoAccessor6.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).js b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).js index 1c1661a1f77f3..0d7a38e94bb49 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).js +++ b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + //// [autoAccessor7.ts] abstract class C1 { abstract accessor a: any; diff --git a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).symbols b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).symbols index 4e4fd71011864..a6331d8e92362 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).symbols +++ b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : Symbol(C1, Decl(autoAccessor7.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).types b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).types index e64536a22b8b2..38d94873afdb9 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).types +++ b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).js b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).js index 1c1661a1f77f3..0d7a38e94bb49 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).js +++ b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + //// [autoAccessor7.ts] abstract class C1 { abstract accessor a: any; diff --git a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).symbols b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).symbols index 4e4fd71011864..a6331d8e92362 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).symbols +++ b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : Symbol(C1, Decl(autoAccessor7.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).types b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).types index e64536a22b8b2..38d94873afdb9 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).types +++ b/tests/baselines/reference/autoAccessor7(target=es2015,usedefineforclassfields=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).js b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).js index 29f5e54f4080d..161887407b527 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).js +++ b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + //// [autoAccessor7.ts] abstract class C1 { abstract accessor a: any; diff --git a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).symbols b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).symbols index 4e4fd71011864..a6331d8e92362 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).symbols +++ b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : Symbol(C1, Decl(autoAccessor7.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).types b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).types index e64536a22b8b2..38d94873afdb9 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).types +++ b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).js b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).js index 29f5e54f4080d..161887407b527 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).js +++ b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + //// [autoAccessor7.ts] abstract class C1 { abstract accessor a: any; diff --git a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).symbols b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).symbols index 4e4fd71011864..a6331d8e92362 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).symbols +++ b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : Symbol(C1, Decl(autoAccessor7.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).types b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).types index e64536a22b8b2..38d94873afdb9 100644 --- a/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).types +++ b/tests/baselines/reference/autoAccessor7(target=es2022,usedefineforclassfields=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).js b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).js index 7d3989d8cbd58..4c3fccb2dc7f6 100644 --- a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).js +++ b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + //// [autoAccessor7.ts] abstract class C1 { abstract accessor a: any; diff --git a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).symbols b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).symbols index 4e4fd71011864..a6331d8e92362 100644 --- a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).symbols +++ b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : Symbol(C1, Decl(autoAccessor7.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).types b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).types index e64536a22b8b2..38d94873afdb9 100644 --- a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).types +++ b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).js b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).js index 7d3989d8cbd58..4c3fccb2dc7f6 100644 --- a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).js +++ b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + //// [autoAccessor7.ts] abstract class C1 { abstract accessor a: any; diff --git a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).symbols b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).symbols index 4e4fd71011864..a6331d8e92362 100644 --- a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).symbols +++ b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : Symbol(C1, Decl(autoAccessor7.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).types b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).types index e64536a22b8b2..38d94873afdb9 100644 --- a/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).types +++ b/tests/baselines/reference/autoAccessor7(target=esnext,usedefineforclassfields=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor7.ts] //// + +=== autoAccessor7.ts === abstract class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor8.js b/tests/baselines/reference/autoAccessor8.js index 3e553dc952ee0..cb2fb8c393d0f 100644 --- a/tests/baselines/reference/autoAccessor8.js +++ b/tests/baselines/reference/autoAccessor8.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor8.ts] //// + //// [autoAccessor8.ts] class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessor8.symbols b/tests/baselines/reference/autoAccessor8.symbols index 70179862f1f91..14aec322ce156 100644 --- a/tests/baselines/reference/autoAccessor8.symbols +++ b/tests/baselines/reference/autoAccessor8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor8.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor8.ts] //// + +=== autoAccessor8.ts === class C1 { >C1 : Symbol(C1, Decl(autoAccessor8.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessor8.types b/tests/baselines/reference/autoAccessor8.types index 39cd36ed09342..e075ba7989ddd 100644 --- a/tests/baselines/reference/autoAccessor8.types +++ b/tests/baselines/reference/autoAccessor8.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor8.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor8.ts] //// + +=== autoAccessor8.ts === class C1 { >C1 : C1 diff --git a/tests/baselines/reference/autoAccessor9.js b/tests/baselines/reference/autoAccessor9.js index 1f0f202c336ff..5a0552f0e3432 100644 --- a/tests/baselines/reference/autoAccessor9.js +++ b/tests/baselines/reference/autoAccessor9.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor9.ts] //// + //// [autoAccessor9.ts] // Auto-accessors do not use Set semantics themselves, so do not need to be transformed if there are no other // initializers that need to be transformed: diff --git a/tests/baselines/reference/autoAccessor9.symbols b/tests/baselines/reference/autoAccessor9.symbols index b06e6f344f523..cf89c9d8fcd7e 100644 --- a/tests/baselines/reference/autoAccessor9.symbols +++ b/tests/baselines/reference/autoAccessor9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor9.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor9.ts] //// + +=== autoAccessor9.ts === // Auto-accessors do not use Set semantics themselves, so do not need to be transformed if there are no other // initializers that need to be transformed: class C1 { diff --git a/tests/baselines/reference/autoAccessor9.types b/tests/baselines/reference/autoAccessor9.types index 68a2fa33f6e24..214a61e4db6b2 100644 --- a/tests/baselines/reference/autoAccessor9.types +++ b/tests/baselines/reference/autoAccessor9.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor9.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessor9.ts] //// + +=== autoAccessor9.ts === // Auto-accessors do not use Set semantics themselves, so do not need to be transformed if there are no other // initializers that need to be transformed: class C1 { diff --git a/tests/baselines/reference/autoAccessorAllowedModifiers.js b/tests/baselines/reference/autoAccessorAllowedModifiers.js index 3e91d75670421..204bdf2b5d55b 100644 --- a/tests/baselines/reference/autoAccessorAllowedModifiers.js +++ b/tests/baselines/reference/autoAccessorAllowedModifiers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorAllowedModifiers.ts] //// + //// [autoAccessorAllowedModifiers.ts] abstract class C1 { accessor a: any; diff --git a/tests/baselines/reference/autoAccessorDisallowedModifiers.errors.txt b/tests/baselines/reference/autoAccessorDisallowedModifiers.errors.txt index a74237a24824f..d9b841ee69892 100644 --- a/tests/baselines/reference/autoAccessorDisallowedModifiers.errors.txt +++ b/tests/baselines/reference/autoAccessorDisallowedModifiers.errors.txt @@ -1,36 +1,36 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(2,14): error TS1030: 'accessor' modifier already seen. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(3,14): error TS1243: 'accessor' modifier cannot be used with 'readonly' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(4,13): error TS1243: 'accessor' modifier cannot be used with 'declare' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(5,14): error TS1029: 'public' modifier must precede 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(6,14): error TS1029: 'private' modifier must precede 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(7,14): error TS1029: 'protected' modifier must precede 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(8,14): error TS1029: 'abstract' modifier must precede 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(9,14): error TS1029: 'static' modifier must precede 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(10,5): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(11,5): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(12,5): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(13,5): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(14,15): error TS1276: An 'accessor' property cannot be declared optional. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(15,14): error TS1243: 'readonly' modifier cannot be used with 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(16,14): error TS1243: 'declare' modifier cannot be used with 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(20,14): error TS1029: 'override' modifier must precede 'accessor' modifier. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(24,5): error TS1070: 'accessor' modifier cannot appear on a type member. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(27,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(28,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(29,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(30,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(31,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(32,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(33,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(34,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(35,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(35,25): error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(36,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(37,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts(38,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(2,14): error TS1030: 'accessor' modifier already seen. +autoAccessorDisallowedModifiers.ts(3,14): error TS1243: 'accessor' modifier cannot be used with 'readonly' modifier. +autoAccessorDisallowedModifiers.ts(4,13): error TS1243: 'accessor' modifier cannot be used with 'declare' modifier. +autoAccessorDisallowedModifiers.ts(5,14): error TS1029: 'public' modifier must precede 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(6,14): error TS1029: 'private' modifier must precede 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(7,14): error TS1029: 'protected' modifier must precede 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(8,14): error TS1029: 'abstract' modifier must precede 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(9,14): error TS1029: 'static' modifier must precede 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(10,5): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(11,5): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(12,5): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(13,5): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(14,15): error TS1276: An 'accessor' property cannot be declared optional. +autoAccessorDisallowedModifiers.ts(15,14): error TS1243: 'readonly' modifier cannot be used with 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(16,14): error TS1243: 'declare' modifier cannot be used with 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(20,14): error TS1029: 'override' modifier must precede 'accessor' modifier. +autoAccessorDisallowedModifiers.ts(24,5): error TS1070: 'accessor' modifier cannot appear on a type member. +autoAccessorDisallowedModifiers.ts(27,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(28,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(29,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(30,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(31,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(32,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(33,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(34,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(35,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(35,25): error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +autoAccessorDisallowedModifiers.ts(36,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(37,1): error TS1275: 'accessor' modifier can only appear on a property declaration. +autoAccessorDisallowedModifiers.ts(38,1): error TS1275: 'accessor' modifier can only appear on a property declaration. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts (30 errors) ==== +==== autoAccessorDisallowedModifiers.ts (30 errors) ==== abstract class C1 { accessor accessor a: any; ~~~~~~~~ diff --git a/tests/baselines/reference/autoAccessorDisallowedModifiers.js b/tests/baselines/reference/autoAccessorDisallowedModifiers.js index c6b438f0761f8..bdb7d73d0d9d2 100644 --- a/tests/baselines/reference/autoAccessorDisallowedModifiers.js +++ b/tests/baselines/reference/autoAccessorDisallowedModifiers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorDisallowedModifiers.ts] //// + //// [autoAccessorDisallowedModifiers.ts] abstract class C1 { accessor accessor a: any; diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).errors.txt b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).errors.txt index 059790cbfde3c..d3e03967973f7 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).errors.txt +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts(12,5): error TS1206: Decorators are not valid here. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts(15,5): error TS1206: Decorators are not valid here. +autoAccessorExperimentalDecorators.ts(12,5): error TS1206: Decorators are not valid here. +autoAccessorExperimentalDecorators.ts(15,5): error TS1206: Decorators are not valid here. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts (2 errors) ==== +==== autoAccessorExperimentalDecorators.ts (2 errors) ==== declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; class C1 { diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).js b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).js index 2a9c980122cf8..2057c2e3a2f81 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).js +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + //// [autoAccessorExperimentalDecorators.ts] declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).symbols b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).symbols index 361d8a357c257..00848072056f1 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).symbols +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + +=== autoAccessorExperimentalDecorators.ts === declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; >dec : Symbol(dec, Decl(autoAccessorExperimentalDecorators.ts, 0, 11)) >target : Symbol(target, Decl(autoAccessorExperimentalDecorators.ts, 0, 18)) diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).types b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).types index 3ddf3b2cce215..ec8f0a42c58be 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).types +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2015).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + +=== autoAccessorExperimentalDecorators.ts === declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; >dec : (target: any, key: PropertyKey, desc: PropertyDescriptor) => void >target : any diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).errors.txt b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).errors.txt index 059790cbfde3c..d3e03967973f7 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).errors.txt +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts(12,5): error TS1206: Decorators are not valid here. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts(15,5): error TS1206: Decorators are not valid here. +autoAccessorExperimentalDecorators.ts(12,5): error TS1206: Decorators are not valid here. +autoAccessorExperimentalDecorators.ts(15,5): error TS1206: Decorators are not valid here. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts (2 errors) ==== +==== autoAccessorExperimentalDecorators.ts (2 errors) ==== declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; class C1 { diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).js b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).js index 854ee9ffc82a4..e173147ff9bbd 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).js +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + //// [autoAccessorExperimentalDecorators.ts] declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).symbols b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).symbols index 361d8a357c257..00848072056f1 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).symbols +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + +=== autoAccessorExperimentalDecorators.ts === declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; >dec : Symbol(dec, Decl(autoAccessorExperimentalDecorators.ts, 0, 11)) >target : Symbol(target, Decl(autoAccessorExperimentalDecorators.ts, 0, 18)) diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).types b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).types index 3ddf3b2cce215..ec8f0a42c58be 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).types +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=es2022).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + +=== autoAccessorExperimentalDecorators.ts === declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; >dec : (target: any, key: PropertyKey, desc: PropertyDescriptor) => void >target : any diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).errors.txt b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).errors.txt index 059790cbfde3c..d3e03967973f7 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).errors.txt +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts(12,5): error TS1206: Decorators are not valid here. -tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts(15,5): error TS1206: Decorators are not valid here. +autoAccessorExperimentalDecorators.ts(12,5): error TS1206: Decorators are not valid here. +autoAccessorExperimentalDecorators.ts(15,5): error TS1206: Decorators are not valid here. -==== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts (2 errors) ==== +==== autoAccessorExperimentalDecorators.ts (2 errors) ==== declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; class C1 { diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).js b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).js index 20f3b3d513711..c3f5fdcc2267a 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).js +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + //// [autoAccessorExperimentalDecorators.ts] declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).symbols b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).symbols index 361d8a357c257..00848072056f1 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).symbols +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + +=== autoAccessorExperimentalDecorators.ts === declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; >dec : Symbol(dec, Decl(autoAccessorExperimentalDecorators.ts, 0, 11)) >target : Symbol(target, Decl(autoAccessorExperimentalDecorators.ts, 0, 18)) diff --git a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).types b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).types index 3ddf3b2cce215..ec8f0a42c58be 100644 --- a/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).types +++ b/tests/baselines/reference/autoAccessorExperimentalDecorators(target=esnext).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorExperimentalDecorators.ts] //// + +=== autoAccessorExperimentalDecorators.ts === declare var dec: (target: any, key: PropertyKey, desc: PropertyDescriptor) => void; >dec : (target: any, key: PropertyKey, desc: PropertyDescriptor) => void >target : any diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols index 3e0098e855f4a..4739c303d907a 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/file1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts] //// + +=== file1.ts === // https://github.com/microsoft/TypeScript/issues/51528 class C1 { >C1 : Symbol(C1, Decl(file1.ts, 0, 0)) @@ -7,7 +9,7 @@ class C1 { >x : Symbol(C1.x, Decl(file1.ts, 1, 10)) } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file2.ts === +=== file2.ts === class C2 { >C2 : Symbol(C2, Decl(file2.ts, 0, 0)) @@ -15,7 +17,7 @@ class C2 { >#x : Symbol(C2.#x, Decl(file2.ts, 0, 10)) } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts === +=== file3.ts === class C3 { >C3 : Symbol(C3, Decl(file3.ts, 0, 0)) @@ -25,7 +27,7 @@ class C3 { accessor #y = 0; } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts === +=== file3.ts === class C3 { >C3 : Symbol(C3, Decl(file3.ts, 0, 0)) @@ -33,7 +35,7 @@ class C3 { >x : Symbol(C3.x, Decl(file3.ts, 0, 10)) } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file4.ts === +=== file4.ts === class C4 { >C4 : Symbol(C4, Decl(file4.ts, 0, 0)) @@ -41,7 +43,7 @@ class C4 { >#x : Symbol(C4.#x, Decl(file4.ts, 0, 10)) } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file5.ts === +=== file5.ts === class C5 { >C5 : Symbol(C5, Decl(file5.ts, 0, 0)) @@ -52,7 +54,7 @@ class C5 { >#x : Symbol(C5.#x, Decl(file5.ts, 1, 10)) } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file6.ts === +=== file6.ts === class C6 { >C6 : Symbol(C6, Decl(file6.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types index a3a0b8c137629..c7ddf4f10e403 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/file1.ts === +//// [tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts] //// + +=== file1.ts === // https://github.com/microsoft/TypeScript/issues/51528 class C1 { >C1 : C1 @@ -8,7 +10,7 @@ class C1 { >0 : 0 } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file2.ts === +=== file2.ts === class C2 { >C2 : C2 @@ -17,7 +19,7 @@ class C2 { >0 : 0 } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts === +=== file3.ts === class C3 { >C3 : C3 @@ -28,7 +30,7 @@ class C3 { accessor #y = 0; } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts === +=== file3.ts === class C3 { >C3 : C3 @@ -37,7 +39,7 @@ class C3 { >0 : 0 } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file4.ts === +=== file4.ts === class C4 { >C4 : C4 @@ -46,7 +48,7 @@ class C4 { >0 : 0 } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file5.ts === +=== file5.ts === class C5 { >C5 : C5 @@ -59,7 +61,7 @@ class C5 { >1 : 1 } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file6.ts === +=== file6.ts === class C6 { >C6 : C6 diff --git a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js index 549a4ddccb8d7..4f8c382ee555b 100644 --- a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js +++ b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts] //// + //// [autoAsiForStaticsInClassDeclaration.ts] class C { static x diff --git a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.symbols b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.symbols index 199830dc191b1..395a7abe32c5b 100644 --- a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.symbols +++ b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts === +//// [tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts] //// + +=== autoAsiForStaticsInClassDeclaration.ts === class C { >C : Symbol(C, Decl(autoAsiForStaticsInClassDeclaration.ts, 0, 0)) diff --git a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.types b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.types index d902f0b3eaa6b..462d56f47ed35 100644 --- a/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.types +++ b/tests/baselines/reference/autoAsiForStaticsInClassDeclaration.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts === +//// [tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts] //// + +=== autoAsiForStaticsInClassDeclaration.ts === class C { >C : C diff --git a/tests/baselines/reference/autoLift2.errors.txt b/tests/baselines/reference/autoLift2.errors.txt index 63d1c2c3548b3..929046f1f9f11 100644 --- a/tests/baselines/reference/autoLift2.errors.txt +++ b/tests/baselines/reference/autoLift2.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. -tests/cases/compiler/autoLift2.ts(5,17): error TS1005: ';' expected. -tests/cases/compiler/autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. -tests/cases/compiler/autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. -tests/cases/compiler/autoLift2.ts(6,17): error TS1005: ';' expected. -tests/cases/compiler/autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. -tests/cases/compiler/autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. -tests/cases/compiler/autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. -tests/cases/compiler/autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. -tests/cases/compiler/autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. +autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. +autoLift2.ts(5,17): error TS1005: ';' expected. +autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. +autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. +autoLift2.ts(6,17): error TS1005: ';' expected. +autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. +autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. +autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. +autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. +autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'. -==== tests/cases/compiler/autoLift2.ts (10 errors) ==== +==== autoLift2.ts (10 errors) ==== class A { diff --git a/tests/baselines/reference/autoLift2.js b/tests/baselines/reference/autoLift2.js index 002e320e85377..09e5f9f812775 100644 --- a/tests/baselines/reference/autoLift2.js +++ b/tests/baselines/reference/autoLift2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/autoLift2.ts] //// + //// [autoLift2.ts] class A diff --git a/tests/baselines/reference/autoLift2.symbols b/tests/baselines/reference/autoLift2.symbols index 2547f1f25d0e9..9fe783bf2eaa6 100644 --- a/tests/baselines/reference/autoLift2.symbols +++ b/tests/baselines/reference/autoLift2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autoLift2.ts === +//// [tests/cases/compiler/autoLift2.ts] //// + +=== autoLift2.ts === class A >A : Symbol(A, Decl(autoLift2.ts, 0, 0)) diff --git a/tests/baselines/reference/autoLift2.types b/tests/baselines/reference/autoLift2.types index fe2f34ad8a267..c27de71fcb30e 100644 --- a/tests/baselines/reference/autoLift2.types +++ b/tests/baselines/reference/autoLift2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autoLift2.ts === +//// [tests/cases/compiler/autoLift2.ts] //// + +=== autoLift2.ts === class A >A : A diff --git a/tests/baselines/reference/autolift3.errors.txt b/tests/baselines/reference/autolift3.errors.txt index 384ad49866147..bcce297ea3c6c 100644 --- a/tests/baselines/reference/autolift3.errors.txt +++ b/tests/baselines/reference/autolift3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/autolift3.ts(26,3): error TS2339: Property 'foo' does not exist on type 'B'. +autolift3.ts(26,3): error TS2339: Property 'foo' does not exist on type 'B'. -==== tests/cases/compiler/autolift3.ts (1 errors) ==== +==== autolift3.ts (1 errors) ==== class B { constructor() { diff --git a/tests/baselines/reference/autolift3.js b/tests/baselines/reference/autolift3.js index b7355aaef0e77..67e174c4e3ebc 100644 --- a/tests/baselines/reference/autolift3.js +++ b/tests/baselines/reference/autolift3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/autolift3.ts] //// + //// [autolift3.ts] class B { diff --git a/tests/baselines/reference/autolift3.symbols b/tests/baselines/reference/autolift3.symbols index 846ab8f7989b0..2ae4c62e3a8b8 100644 --- a/tests/baselines/reference/autolift3.symbols +++ b/tests/baselines/reference/autolift3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autolift3.ts === +//// [tests/cases/compiler/autolift3.ts] //// + +=== autolift3.ts === class B { >B : Symbol(B, Decl(autolift3.ts, 0, 0)) diff --git a/tests/baselines/reference/autolift3.types b/tests/baselines/reference/autolift3.types index 6a4faebdf52ed..53ede39bc24c1 100644 --- a/tests/baselines/reference/autolift3.types +++ b/tests/baselines/reference/autolift3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autolift3.ts === +//// [tests/cases/compiler/autolift3.ts] //// + +=== autolift3.ts === class B { >B : B diff --git a/tests/baselines/reference/autolift4.errors.txt b/tests/baselines/reference/autolift4.errors.txt index b548479b6920f..e03acfda8daf4 100644 --- a/tests/baselines/reference/autolift4.errors.txt +++ b/tests/baselines/reference/autolift4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/autolift4.ts(19,70): error TS2339: Property 'm' does not exist on type 'Point3D'. +autolift4.ts(19,70): error TS2339: Property 'm' does not exist on type 'Point3D'. -==== tests/cases/compiler/autolift4.ts (1 errors) ==== +==== autolift4.ts (1 errors) ==== class Point { constructor(public x: number, public y: number) { diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 4c71eadc31db7..afa4a1b0aee32 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/autolift4.ts] //// + //// [autolift4.ts] class Point { diff --git a/tests/baselines/reference/autolift4.symbols b/tests/baselines/reference/autolift4.symbols index db309922d49e1..764a737bd7273 100644 --- a/tests/baselines/reference/autolift4.symbols +++ b/tests/baselines/reference/autolift4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autolift4.ts === +//// [tests/cases/compiler/autolift4.ts] //// + +=== autolift4.ts === class Point { >Point : Symbol(Point, Decl(autolift4.ts, 0, 0)) diff --git a/tests/baselines/reference/autolift4.types b/tests/baselines/reference/autolift4.types index dc34da815fcef..638469dd783f9 100644 --- a/tests/baselines/reference/autolift4.types +++ b/tests/baselines/reference/autolift4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autolift4.ts === +//// [tests/cases/compiler/autolift4.ts] //// + +=== autolift4.ts === class Point { >Point : Point diff --git a/tests/baselines/reference/autonumberingInEnums.js b/tests/baselines/reference/autonumberingInEnums.js index 218b10ae44cb2..244e77a96a8c9 100644 --- a/tests/baselines/reference/autonumberingInEnums.js +++ b/tests/baselines/reference/autonumberingInEnums.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/autonumberingInEnums.ts] //// + //// [autonumberingInEnums.ts] enum Foo { a = 1 diff --git a/tests/baselines/reference/autonumberingInEnums.symbols b/tests/baselines/reference/autonumberingInEnums.symbols index 8cfba4d1057dc..62bd3c92ca019 100644 --- a/tests/baselines/reference/autonumberingInEnums.symbols +++ b/tests/baselines/reference/autonumberingInEnums.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autonumberingInEnums.ts === +//// [tests/cases/compiler/autonumberingInEnums.ts] //// + +=== autonumberingInEnums.ts === enum Foo { >Foo : Symbol(Foo, Decl(autonumberingInEnums.ts, 0, 0), Decl(autonumberingInEnums.ts, 2, 1)) diff --git a/tests/baselines/reference/autonumberingInEnums.types b/tests/baselines/reference/autonumberingInEnums.types index 8e3606dd8b349..dc36205ff458e 100644 --- a/tests/baselines/reference/autonumberingInEnums.types +++ b/tests/baselines/reference/autonumberingInEnums.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/autonumberingInEnums.ts === +//// [tests/cases/compiler/autonumberingInEnums.ts] //// + +=== autonumberingInEnums.ts === enum Foo { >Foo : Foo diff --git a/tests/baselines/reference/avoid.js b/tests/baselines/reference/avoid.js index 5882fe6c3cc24..0d53ad58d2a0d 100644 --- a/tests/baselines/reference/avoid.js +++ b/tests/baselines/reference/avoid.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/avoid.ts] //// + //// [avoid.ts] function f() { var x=1; diff --git a/tests/baselines/reference/avoid.symbols b/tests/baselines/reference/avoid.symbols index e2f9e1c4507d2..2ee3330167a43 100644 --- a/tests/baselines/reference/avoid.symbols +++ b/tests/baselines/reference/avoid.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/avoid.ts === +//// [tests/cases/compiler/avoid.ts] //// + +=== avoid.ts === function f() { >f : Symbol(f, Decl(avoid.ts, 0, 0)) diff --git a/tests/baselines/reference/avoid.types b/tests/baselines/reference/avoid.types index a4ecdb6f2c622..067b22a7d7ea7 100644 --- a/tests/baselines/reference/avoid.types +++ b/tests/baselines/reference/avoid.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/avoid.ts === +//// [tests/cases/compiler/avoid.ts] //// + +=== avoid.ts === function f() { >f : () => void diff --git a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.errors.txt b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.errors.txt index 444fe284b26c7..08c9abc44a839 100644 --- a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.errors.txt +++ b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts(7,20): error TS2322: Type '() => Dog' is not assignable to type 'Dog'. +avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts(7,20): error TS2322: Type '() => Dog' is not assignable to type 'Dog'. -==== tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts (1 errors) ==== +==== avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts (1 errors) ==== interface Dog { barkable: true } @@ -11,5 +11,5 @@ tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignat export let x:Dog = getRover; ~~~~~~~~ !!! error TS2322: Type '() => Dog' is not assignable to type 'Dog'. -!!! related TS6212 tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts:7:20: Did you mean to call this expression? +!!! related TS6212 avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts:7:20: Did you mean to call this expression? // export let x: Dog = getRover; \ No newline at end of file diff --git a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.js b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.js index a69028fe28c80..75d61026b33b7 100644 --- a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.js +++ b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts] //// + //// [avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts] interface Dog { barkable: true diff --git a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.symbols b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.symbols index 2f6116fe78de9..c13a822aeac83 100644 --- a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.symbols +++ b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts === +//// [tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts] //// + +=== avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts === interface Dog { >Dog : Symbol(Dog, Decl(avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts, 0, 0)) diff --git a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.types b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.types index c3c7b18a67d82..64509da249e93 100644 --- a/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.types +++ b/tests/baselines/reference/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts === +//// [tests/cases/compiler/avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts] //// + +=== avoidListingPropertiesForTypesWithOnlyCallOrConstructSignatures.ts === interface Dog { barkable: true >barkable : true diff --git a/tests/baselines/reference/awaitAndYield.errors.txt b/tests/baselines/reference/awaitAndYield.errors.txt index 87842d35cc93f..41b5ab44b4ac8 100644 --- a/tests/baselines/reference/awaitAndYield.errors.txt +++ b/tests/baselines/reference/awaitAndYield.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/enums/awaitAndYield.ts(3,15): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/conformance/enums/awaitAndYield.ts(4,15): error TS1163: A 'yield' expression is only allowed in a generator body. +awaitAndYield.ts(3,15): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitAndYield.ts(4,15): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/enums/awaitAndYield.ts (2 errors) ==== +==== awaitAndYield.ts (2 errors) ==== async function* test(x: Promise) { enum E { foo = await x, diff --git a/tests/baselines/reference/awaitAndYield.js b/tests/baselines/reference/awaitAndYield.js index 34396ef795c86..09606a3e8aba5 100644 --- a/tests/baselines/reference/awaitAndYield.js +++ b/tests/baselines/reference/awaitAndYield.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/enums/awaitAndYield.ts] //// + //// [awaitAndYield.ts] async function* test(x: Promise) { enum E { diff --git a/tests/baselines/reference/awaitAndYieldInProperty.errors.txt b/tests/baselines/reference/awaitAndYieldInProperty.errors.txt index 46a05266a4dc9..023db166cc51b 100644 --- a/tests/baselines/reference/awaitAndYieldInProperty.errors.txt +++ b/tests/baselines/reference/awaitAndYieldInProperty.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(3,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(3,21): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(4,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(4,28): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(6,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(6,21): error TS1163: A 'yield' expression is only allowed in a generator body. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(7,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(7,28): error TS1163: A 'yield' expression is only allowed in a generator body. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(11,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(11,21): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(12,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(12,28): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(14,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(14,21): error TS1163: A 'yield' expression is only allowed in a generator body. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(15,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/conformance/classes/awaitAndYieldInProperty.ts(15,28): error TS1163: A 'yield' expression is only allowed in a generator body. +awaitAndYieldInProperty.ts(3,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(3,21): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitAndYieldInProperty.ts(4,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(4,28): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitAndYieldInProperty.ts(6,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(6,21): error TS1163: A 'yield' expression is only allowed in a generator body. +awaitAndYieldInProperty.ts(7,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(7,28): error TS1163: A 'yield' expression is only allowed in a generator body. +awaitAndYieldInProperty.ts(11,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(11,21): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitAndYieldInProperty.ts(12,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(12,28): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitAndYieldInProperty.ts(14,9): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(14,21): error TS1163: A 'yield' expression is only allowed in a generator body. +awaitAndYieldInProperty.ts(15,16): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +awaitAndYieldInProperty.ts(15,28): error TS1163: A 'yield' expression is only allowed in a generator body. -==== tests/cases/conformance/classes/awaitAndYieldInProperty.ts (16 errors) ==== +==== awaitAndYieldInProperty.ts (16 errors) ==== async function* test(x: Promise) { class C { [await x] = await x; diff --git a/tests/baselines/reference/awaitAndYieldInProperty.js b/tests/baselines/reference/awaitAndYieldInProperty.js index 73c04a612c2d0..f310dc83331f8 100644 --- a/tests/baselines/reference/awaitAndYieldInProperty.js +++ b/tests/baselines/reference/awaitAndYieldInProperty.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/classes/awaitAndYieldInProperty.ts] //// + //// [awaitAndYieldInProperty.ts] async function* test(x: Promise) { class C { diff --git a/tests/baselines/reference/awaitBinaryExpression1_es2017.js b/tests/baselines/reference/awaitBinaryExpression1_es2017.js index 9016a2b58269c..33d27b5348929 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es2017.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression1_es2017.ts] //// + //// [awaitBinaryExpression1_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression1_es2017.symbols b/tests/baselines/reference/awaitBinaryExpression1_es2017.symbols index ad065fad52929..a217566b63dba 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es2017.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression1_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression1_es2017.ts] //// + +=== awaitBinaryExpression1_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression1_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression1_es2017.types b/tests/baselines/reference/awaitBinaryExpression1_es2017.types index 18debcdf06ee9..f996a2564c336 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es2017.types +++ b/tests/baselines/reference/awaitBinaryExpression1_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression1_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression1_es2017.ts] //// + +=== awaitBinaryExpression1_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression1_es5.js b/tests/baselines/reference/awaitBinaryExpression1_es5.js index 41b090d2c4636..45bc1bc2b81cf 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es5.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression1_es5.ts] //// + //// [awaitBinaryExpression1_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression1_es5.symbols b/tests/baselines/reference/awaitBinaryExpression1_es5.symbols index 8e95936b90ea9..0dc858cb0d392 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es5.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression1_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression1_es5.ts] //// + +=== awaitBinaryExpression1_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression1_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression1_es5.types b/tests/baselines/reference/awaitBinaryExpression1_es5.types index a5c096c71d1f7..4b527456ef613 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es5.types +++ b/tests/baselines/reference/awaitBinaryExpression1_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression1_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression1_es5.ts] //// + +=== awaitBinaryExpression1_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.js b/tests/baselines/reference/awaitBinaryExpression1_es6.js index 83979a5b19b5b..bb1f31174f325 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts] //// + //// [awaitBinaryExpression1_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols index bc05923beb054..57dba0377cdfd 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts] //// + +=== awaitBinaryExpression1_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression1_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.types b/tests/baselines/reference/awaitBinaryExpression1_es6.types index f967dacd4fc90..2ffe25bb051bc 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts] //// + +=== awaitBinaryExpression1_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression2_es2017.js b/tests/baselines/reference/awaitBinaryExpression2_es2017.js index 1d5ad324fdab7..68dd53ad85f6e 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es2017.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression2_es2017.ts] //// + //// [awaitBinaryExpression2_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es2017.symbols b/tests/baselines/reference/awaitBinaryExpression2_es2017.symbols index 42536e4d89700..a0a46c08f241d 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es2017.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression2_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression2_es2017.ts] //// + +=== awaitBinaryExpression2_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression2_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression2_es2017.types b/tests/baselines/reference/awaitBinaryExpression2_es2017.types index 1836a016282d5..addca45157103 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es2017.types +++ b/tests/baselines/reference/awaitBinaryExpression2_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression2_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression2_es2017.ts] //// + +=== awaitBinaryExpression2_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression2_es5.js b/tests/baselines/reference/awaitBinaryExpression2_es5.js index dd84d069c27f8..0ee30666df4da 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es5.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression2_es5.ts] //// + //// [awaitBinaryExpression2_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es5.symbols b/tests/baselines/reference/awaitBinaryExpression2_es5.symbols index 75c0767d1006f..eb049b94ddeed 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es5.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression2_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression2_es5.ts] //// + +=== awaitBinaryExpression2_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression2_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression2_es5.types b/tests/baselines/reference/awaitBinaryExpression2_es5.types index dc7ea12e9fb25..0e7f25a7ea82d 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es5.types +++ b/tests/baselines/reference/awaitBinaryExpression2_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression2_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression2_es5.ts] //// + +=== awaitBinaryExpression2_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.js b/tests/baselines/reference/awaitBinaryExpression2_es6.js index a40a948576de7..7d28a411cdf6f 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts] //// + //// [awaitBinaryExpression2_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols index 536f268c77ea1..d0145536563ab 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts] //// + +=== awaitBinaryExpression2_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression2_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.types b/tests/baselines/reference/awaitBinaryExpression2_es6.types index 92fe14fa848d5..34113f4b7c7e0 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts] //// + +=== awaitBinaryExpression2_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression3_es2017.js b/tests/baselines/reference/awaitBinaryExpression3_es2017.js index c752ec3be4a56..46eecdd1e9c66 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es2017.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression3_es2017.ts] //// + //// [awaitBinaryExpression3_es2017.ts] declare var a: number; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es2017.symbols b/tests/baselines/reference/awaitBinaryExpression3_es2017.symbols index 98a0d9f43aba0..133f6ec4570d4 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es2017.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression3_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression3_es2017.ts] //// + +=== awaitBinaryExpression3_es2017.ts === declare var a: number; >a : Symbol(a, Decl(awaitBinaryExpression3_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression3_es2017.types b/tests/baselines/reference/awaitBinaryExpression3_es2017.types index 7e9c41f20576b..b45b095379cdd 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es2017.types +++ b/tests/baselines/reference/awaitBinaryExpression3_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression3_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression3_es2017.ts] //// + +=== awaitBinaryExpression3_es2017.ts === declare var a: number; >a : number diff --git a/tests/baselines/reference/awaitBinaryExpression3_es5.js b/tests/baselines/reference/awaitBinaryExpression3_es5.js index 0c301dec2c8ca..7993f92d10ec7 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es5.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression3_es5.ts] //// + //// [awaitBinaryExpression3_es5.ts] declare var a: number; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es5.symbols b/tests/baselines/reference/awaitBinaryExpression3_es5.symbols index b64e81b641512..c3b62990ed57f 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es5.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression3_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression3_es5.ts] //// + +=== awaitBinaryExpression3_es5.ts === declare var a: number; >a : Symbol(a, Decl(awaitBinaryExpression3_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression3_es5.types b/tests/baselines/reference/awaitBinaryExpression3_es5.types index 63952297d9684..8512ac2f232be 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es5.types +++ b/tests/baselines/reference/awaitBinaryExpression3_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression3_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression3_es5.ts] //// + +=== awaitBinaryExpression3_es5.ts === declare var a: number; >a : number diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.js b/tests/baselines/reference/awaitBinaryExpression3_es6.js index 56092a490b3ea..1d22fc27cbf38 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts] //// + //// [awaitBinaryExpression3_es6.ts] declare var a: number; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols index 0b8a9c11a96f4..2a08c2e16b8cc 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts] //// + +=== awaitBinaryExpression3_es6.ts === declare var a: number; >a : Symbol(a, Decl(awaitBinaryExpression3_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.types b/tests/baselines/reference/awaitBinaryExpression3_es6.types index 4dcf987d908b2..a1a5f25b2a5b1 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts] //// + +=== awaitBinaryExpression3_es6.ts === declare var a: number; >a : number diff --git a/tests/baselines/reference/awaitBinaryExpression4_es2017.js b/tests/baselines/reference/awaitBinaryExpression4_es2017.js index 3fc296ea14250..2151cbf68e8a3 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es2017.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression4_es2017.ts] //// + //// [awaitBinaryExpression4_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es2017.symbols b/tests/baselines/reference/awaitBinaryExpression4_es2017.symbols index fa15673393ccf..9d6efa5de6e75 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es2017.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression4_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression4_es2017.ts] //// + +=== awaitBinaryExpression4_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression4_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression4_es2017.types b/tests/baselines/reference/awaitBinaryExpression4_es2017.types index dbc114471f210..497db247cd912 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es2017.types +++ b/tests/baselines/reference/awaitBinaryExpression4_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression4_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression4_es2017.ts] //// + +=== awaitBinaryExpression4_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression4_es5.js b/tests/baselines/reference/awaitBinaryExpression4_es5.js index 26c0e5de5f1fa..b2bf508740e16 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es5.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression4_es5.ts] //// + //// [awaitBinaryExpression4_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es5.symbols b/tests/baselines/reference/awaitBinaryExpression4_es5.symbols index 000c99b2537d4..7aa7e4f99831a 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es5.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression4_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression4_es5.ts] //// + +=== awaitBinaryExpression4_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression4_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression4_es5.types b/tests/baselines/reference/awaitBinaryExpression4_es5.types index 0df132ed5d578..e8f891d7ff3bd 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es5.types +++ b/tests/baselines/reference/awaitBinaryExpression4_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression4_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression4_es5.ts] //// + +=== awaitBinaryExpression4_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.js b/tests/baselines/reference/awaitBinaryExpression4_es6.js index 1e909282d43b7..9fa78e1fe1bec 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts] //// + //// [awaitBinaryExpression4_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols index 1e1c195bf073f..7cb82789da236 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts] //// + +=== awaitBinaryExpression4_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression4_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.types b/tests/baselines/reference/awaitBinaryExpression4_es6.types index 01eb1f10b1e23..bd862fa85497b 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts] //// + +=== awaitBinaryExpression4_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression5_es2017.js b/tests/baselines/reference/awaitBinaryExpression5_es2017.js index b6c5e12ce761f..5ae9c21e79298 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es2017.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression5_es2017.ts] //// + //// [awaitBinaryExpression5_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es2017.symbols b/tests/baselines/reference/awaitBinaryExpression5_es2017.symbols index 4b7f46d906125..5dfedcb7a6fa0 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es2017.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression5_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression5_es2017.ts] //// + +=== awaitBinaryExpression5_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression5_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression5_es2017.types b/tests/baselines/reference/awaitBinaryExpression5_es2017.types index 0fbaa72e6e043..77a3af53e17a6 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es2017.types +++ b/tests/baselines/reference/awaitBinaryExpression5_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression5_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitBinaryExpression/awaitBinaryExpression5_es2017.ts] //// + +=== awaitBinaryExpression5_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression5_es5.js b/tests/baselines/reference/awaitBinaryExpression5_es5.js index 4e07e40a174f4..0444d8c2facb2 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es5.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression5_es5.ts] //// + //// [awaitBinaryExpression5_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es5.symbols b/tests/baselines/reference/awaitBinaryExpression5_es5.symbols index fffaa83eda927..48de721f06af9 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es5.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression5_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression5_es5.ts] //// + +=== awaitBinaryExpression5_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression5_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression5_es5.types b/tests/baselines/reference/awaitBinaryExpression5_es5.types index 70a93686478e0..dd2e4c4cab87d 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es5.types +++ b/tests/baselines/reference/awaitBinaryExpression5_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression5_es5.ts === +//// [tests/cases/conformance/async/es5/awaitBinaryExpression/awaitBinaryExpression5_es5.ts] //// + +=== awaitBinaryExpression5_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.js b/tests/baselines/reference/awaitBinaryExpression5_es6.js index 1b5d7677b5229..52c236a5c79b8 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.js +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts] //// + //// [awaitBinaryExpression5_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols index 4a3aac229ffb0..19140345dfb34 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts] //// + +=== awaitBinaryExpression5_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitBinaryExpression5_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.types b/tests/baselines/reference/awaitBinaryExpression5_es6.types index bfaa09b2a50b8..90d6319e8fcbc 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.types +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts === +//// [tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts] //// + +=== awaitBinaryExpression5_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression1_es2017.js b/tests/baselines/reference/awaitCallExpression1_es2017.js index 89fe7dfd91269..a90317da20826 100644 --- a/tests/baselines/reference/awaitCallExpression1_es2017.js +++ b/tests/baselines/reference/awaitCallExpression1_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression1_es2017.ts] //// + //// [awaitCallExpression1_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression1_es2017.symbols b/tests/baselines/reference/awaitCallExpression1_es2017.symbols index 35acd3663e519..af954f876d909 100644 --- a/tests/baselines/reference/awaitCallExpression1_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression1_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression1_es2017.ts] //// + +=== awaitCallExpression1_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression1_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression1_es2017.types b/tests/baselines/reference/awaitCallExpression1_es2017.types index beec53fbff754..cba3850227d29 100644 --- a/tests/baselines/reference/awaitCallExpression1_es2017.types +++ b/tests/baselines/reference/awaitCallExpression1_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression1_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression1_es2017.ts] //// + +=== awaitCallExpression1_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression1_es5.js b/tests/baselines/reference/awaitCallExpression1_es5.js index dfc0e2cbd8494..c190a216ae514 100644 --- a/tests/baselines/reference/awaitCallExpression1_es5.js +++ b/tests/baselines/reference/awaitCallExpression1_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression1_es5.ts] //// + //// [awaitCallExpression1_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression1_es5.symbols b/tests/baselines/reference/awaitCallExpression1_es5.symbols index 14389422c6bb7..d9a3bdde8fbc6 100644 --- a/tests/baselines/reference/awaitCallExpression1_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression1_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression1_es5.ts] //// + +=== awaitCallExpression1_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression1_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression1_es5.types b/tests/baselines/reference/awaitCallExpression1_es5.types index 51036264464e4..d0d72ef138269 100644 --- a/tests/baselines/reference/awaitCallExpression1_es5.types +++ b/tests/baselines/reference/awaitCallExpression1_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression1_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression1_es5.ts] //// + +=== awaitCallExpression1_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression1_es6.js b/tests/baselines/reference/awaitCallExpression1_es6.js index 19ac51a6dad2d..124f72e021271 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.js +++ b/tests/baselines/reference/awaitCallExpression1_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts] //// + //// [awaitCallExpression1_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.symbols b/tests/baselines/reference/awaitCallExpression1_es6.symbols index 1f918b01d0dcf..2370127d6123f 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts] //// + +=== awaitCallExpression1_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression1_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression1_es6.types b/tests/baselines/reference/awaitCallExpression1_es6.types index 46717889edecc..d27c2f8309a27 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.types +++ b/tests/baselines/reference/awaitCallExpression1_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts] //// + +=== awaitCallExpression1_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression2_es2017.js b/tests/baselines/reference/awaitCallExpression2_es2017.js index 24b3012f85d33..ab83926fd675a 100644 --- a/tests/baselines/reference/awaitCallExpression2_es2017.js +++ b/tests/baselines/reference/awaitCallExpression2_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression2_es2017.ts] //// + //// [awaitCallExpression2_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression2_es2017.symbols b/tests/baselines/reference/awaitCallExpression2_es2017.symbols index c11aa164277a5..832b0978d825d 100644 --- a/tests/baselines/reference/awaitCallExpression2_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression2_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression2_es2017.ts] //// + +=== awaitCallExpression2_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression2_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression2_es2017.types b/tests/baselines/reference/awaitCallExpression2_es2017.types index 311a79bedcb7f..f67e4449ba406 100644 --- a/tests/baselines/reference/awaitCallExpression2_es2017.types +++ b/tests/baselines/reference/awaitCallExpression2_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression2_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression2_es2017.ts] //// + +=== awaitCallExpression2_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression2_es5.js b/tests/baselines/reference/awaitCallExpression2_es5.js index d9c51e84822d0..353e76241f417 100644 --- a/tests/baselines/reference/awaitCallExpression2_es5.js +++ b/tests/baselines/reference/awaitCallExpression2_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression2_es5.ts] //// + //// [awaitCallExpression2_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression2_es5.symbols b/tests/baselines/reference/awaitCallExpression2_es5.symbols index 260f69eeb532c..606a70307ca8c 100644 --- a/tests/baselines/reference/awaitCallExpression2_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression2_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression2_es5.ts] //// + +=== awaitCallExpression2_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression2_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression2_es5.types b/tests/baselines/reference/awaitCallExpression2_es5.types index 51ffd1d4ba776..d4d823de0ea56 100644 --- a/tests/baselines/reference/awaitCallExpression2_es5.types +++ b/tests/baselines/reference/awaitCallExpression2_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression2_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression2_es5.ts] //// + +=== awaitCallExpression2_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression2_es6.js b/tests/baselines/reference/awaitCallExpression2_es6.js index d8a45fa1bf89a..6931c3ad0db3d 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.js +++ b/tests/baselines/reference/awaitCallExpression2_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts] //// + //// [awaitCallExpression2_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression2_es6.symbols b/tests/baselines/reference/awaitCallExpression2_es6.symbols index 4f1faeb6621d0..c1dfe7985421d 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts] //// + +=== awaitCallExpression2_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression2_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression2_es6.types b/tests/baselines/reference/awaitCallExpression2_es6.types index fed499e59871a..c0c2dcb87a4aa 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.types +++ b/tests/baselines/reference/awaitCallExpression2_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts] //// + +=== awaitCallExpression2_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression3_es2017.js b/tests/baselines/reference/awaitCallExpression3_es2017.js index 6b432851b000c..f1cabaaa45592 100644 --- a/tests/baselines/reference/awaitCallExpression3_es2017.js +++ b/tests/baselines/reference/awaitCallExpression3_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression3_es2017.ts] //// + //// [awaitCallExpression3_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression3_es2017.symbols b/tests/baselines/reference/awaitCallExpression3_es2017.symbols index f7662a55198e9..402445a297698 100644 --- a/tests/baselines/reference/awaitCallExpression3_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression3_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression3_es2017.ts] //// + +=== awaitCallExpression3_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression3_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression3_es2017.types b/tests/baselines/reference/awaitCallExpression3_es2017.types index 5f3c7e3825d31..9c85506038070 100644 --- a/tests/baselines/reference/awaitCallExpression3_es2017.types +++ b/tests/baselines/reference/awaitCallExpression3_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression3_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression3_es2017.ts] //// + +=== awaitCallExpression3_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression3_es5.js b/tests/baselines/reference/awaitCallExpression3_es5.js index 685616b23dd1b..0bac1918e7bf1 100644 --- a/tests/baselines/reference/awaitCallExpression3_es5.js +++ b/tests/baselines/reference/awaitCallExpression3_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression3_es5.ts] //// + //// [awaitCallExpression3_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression3_es5.symbols b/tests/baselines/reference/awaitCallExpression3_es5.symbols index 627ada51b5281..720f10eb2fbbf 100644 --- a/tests/baselines/reference/awaitCallExpression3_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression3_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression3_es5.ts] //// + +=== awaitCallExpression3_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression3_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression3_es5.types b/tests/baselines/reference/awaitCallExpression3_es5.types index 7999f82f6ce6e..5d6dce34c4d3d 100644 --- a/tests/baselines/reference/awaitCallExpression3_es5.types +++ b/tests/baselines/reference/awaitCallExpression3_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression3_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression3_es5.ts] //// + +=== awaitCallExpression3_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression3_es6.js b/tests/baselines/reference/awaitCallExpression3_es6.js index cf19e28b8679e..0818f2fc0c513 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.js +++ b/tests/baselines/reference/awaitCallExpression3_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts] //// + //// [awaitCallExpression3_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression3_es6.symbols b/tests/baselines/reference/awaitCallExpression3_es6.symbols index 305f46608943d..8f08d7d54f718 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts] //// + +=== awaitCallExpression3_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression3_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression3_es6.types b/tests/baselines/reference/awaitCallExpression3_es6.types index 56596ad7f5f82..f863af2aaead1 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.types +++ b/tests/baselines/reference/awaitCallExpression3_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts] //// + +=== awaitCallExpression3_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression4_es2017.js b/tests/baselines/reference/awaitCallExpression4_es2017.js index 9243ac58f82ab..639061aff622e 100644 --- a/tests/baselines/reference/awaitCallExpression4_es2017.js +++ b/tests/baselines/reference/awaitCallExpression4_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression4_es2017.ts] //// + //// [awaitCallExpression4_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression4_es2017.symbols b/tests/baselines/reference/awaitCallExpression4_es2017.symbols index 0f87fa9cb0e25..eaaf2c8d4e875 100644 --- a/tests/baselines/reference/awaitCallExpression4_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression4_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression4_es2017.ts] //// + +=== awaitCallExpression4_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression4_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression4_es2017.types b/tests/baselines/reference/awaitCallExpression4_es2017.types index d394487c1d05b..0c92e0c2efb69 100644 --- a/tests/baselines/reference/awaitCallExpression4_es2017.types +++ b/tests/baselines/reference/awaitCallExpression4_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression4_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression4_es2017.ts] //// + +=== awaitCallExpression4_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression4_es5.js b/tests/baselines/reference/awaitCallExpression4_es5.js index 88c3cea35bd0d..b3994d9309ef2 100644 --- a/tests/baselines/reference/awaitCallExpression4_es5.js +++ b/tests/baselines/reference/awaitCallExpression4_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression4_es5.ts] //// + //// [awaitCallExpression4_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression4_es5.symbols b/tests/baselines/reference/awaitCallExpression4_es5.symbols index c77e27e690c30..5c27056a0d3d5 100644 --- a/tests/baselines/reference/awaitCallExpression4_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression4_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression4_es5.ts] //// + +=== awaitCallExpression4_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression4_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression4_es5.types b/tests/baselines/reference/awaitCallExpression4_es5.types index 204590a2d38ed..b3e27137b5547 100644 --- a/tests/baselines/reference/awaitCallExpression4_es5.types +++ b/tests/baselines/reference/awaitCallExpression4_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression4_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression4_es5.ts] //// + +=== awaitCallExpression4_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression4_es6.js b/tests/baselines/reference/awaitCallExpression4_es6.js index 832f0cf20e30d..43458f2c97f49 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.js +++ b/tests/baselines/reference/awaitCallExpression4_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts] //// + //// [awaitCallExpression4_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression4_es6.symbols b/tests/baselines/reference/awaitCallExpression4_es6.symbols index e881a66b83bbc..b0f288a6d53d1 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts] //// + +=== awaitCallExpression4_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression4_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression4_es6.types b/tests/baselines/reference/awaitCallExpression4_es6.types index 203e4c364551e..7ef06e25dec7f 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.types +++ b/tests/baselines/reference/awaitCallExpression4_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts] //// + +=== awaitCallExpression4_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression5_es2017.js b/tests/baselines/reference/awaitCallExpression5_es2017.js index d08823ac5a354..a9d593b78f817 100644 --- a/tests/baselines/reference/awaitCallExpression5_es2017.js +++ b/tests/baselines/reference/awaitCallExpression5_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression5_es2017.ts] //// + //// [awaitCallExpression5_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression5_es2017.symbols b/tests/baselines/reference/awaitCallExpression5_es2017.symbols index 30dc5f47eeaae..f42856d1c8139 100644 --- a/tests/baselines/reference/awaitCallExpression5_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression5_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression5_es2017.ts] //// + +=== awaitCallExpression5_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression5_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression5_es2017.types b/tests/baselines/reference/awaitCallExpression5_es2017.types index 4c404d55472ac..8e701d0299dd6 100644 --- a/tests/baselines/reference/awaitCallExpression5_es2017.types +++ b/tests/baselines/reference/awaitCallExpression5_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression5_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression5_es2017.ts] //// + +=== awaitCallExpression5_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression5_es5.js b/tests/baselines/reference/awaitCallExpression5_es5.js index 72c0e200c8d1f..284434e553937 100644 --- a/tests/baselines/reference/awaitCallExpression5_es5.js +++ b/tests/baselines/reference/awaitCallExpression5_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression5_es5.ts] //// + //// [awaitCallExpression5_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression5_es5.symbols b/tests/baselines/reference/awaitCallExpression5_es5.symbols index e63a1e5023bdd..8e3a1ff17f2f0 100644 --- a/tests/baselines/reference/awaitCallExpression5_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression5_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression5_es5.ts] //// + +=== awaitCallExpression5_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression5_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression5_es5.types b/tests/baselines/reference/awaitCallExpression5_es5.types index 2b619bafe9d56..bd3351bdb70f3 100644 --- a/tests/baselines/reference/awaitCallExpression5_es5.types +++ b/tests/baselines/reference/awaitCallExpression5_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression5_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression5_es5.ts] //// + +=== awaitCallExpression5_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression5_es6.js b/tests/baselines/reference/awaitCallExpression5_es6.js index 05b06e7fc2f0f..73bb7a30e09b7 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.js +++ b/tests/baselines/reference/awaitCallExpression5_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts] //// + //// [awaitCallExpression5_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression5_es6.symbols b/tests/baselines/reference/awaitCallExpression5_es6.symbols index 2ae8b7e1c4f51..0f4fcb8a823a5 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts] //// + +=== awaitCallExpression5_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression5_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression5_es6.types b/tests/baselines/reference/awaitCallExpression5_es6.types index 115310d5913cf..aec49c7be3a32 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.types +++ b/tests/baselines/reference/awaitCallExpression5_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts] //// + +=== awaitCallExpression5_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression6_es2017.js b/tests/baselines/reference/awaitCallExpression6_es2017.js index 77a47ba806589..335ba9b533773 100644 --- a/tests/baselines/reference/awaitCallExpression6_es2017.js +++ b/tests/baselines/reference/awaitCallExpression6_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression6_es2017.ts] //// + //// [awaitCallExpression6_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression6_es2017.symbols b/tests/baselines/reference/awaitCallExpression6_es2017.symbols index b79361a3d2d9d..9553f77c70d49 100644 --- a/tests/baselines/reference/awaitCallExpression6_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression6_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression6_es2017.ts] //// + +=== awaitCallExpression6_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression6_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression6_es2017.types b/tests/baselines/reference/awaitCallExpression6_es2017.types index 22be57f670c62..5eeaaf8fe6e9b 100644 --- a/tests/baselines/reference/awaitCallExpression6_es2017.types +++ b/tests/baselines/reference/awaitCallExpression6_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression6_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression6_es2017.ts] //// + +=== awaitCallExpression6_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression6_es5.js b/tests/baselines/reference/awaitCallExpression6_es5.js index 23def82fee72a..be9b5ed244d97 100644 --- a/tests/baselines/reference/awaitCallExpression6_es5.js +++ b/tests/baselines/reference/awaitCallExpression6_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression6_es5.ts] //// + //// [awaitCallExpression6_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression6_es5.symbols b/tests/baselines/reference/awaitCallExpression6_es5.symbols index 7b524508032cd..cee460dc1e7a4 100644 --- a/tests/baselines/reference/awaitCallExpression6_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression6_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression6_es5.ts] //// + +=== awaitCallExpression6_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression6_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression6_es5.types b/tests/baselines/reference/awaitCallExpression6_es5.types index a09d92fee05f0..29d1d6acdbfff 100644 --- a/tests/baselines/reference/awaitCallExpression6_es5.types +++ b/tests/baselines/reference/awaitCallExpression6_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression6_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression6_es5.ts] //// + +=== awaitCallExpression6_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression6_es6.js b/tests/baselines/reference/awaitCallExpression6_es6.js index ba488d5334791..08f5aed3bae1b 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.js +++ b/tests/baselines/reference/awaitCallExpression6_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts] //// + //// [awaitCallExpression6_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression6_es6.symbols b/tests/baselines/reference/awaitCallExpression6_es6.symbols index 109afe1365509..5cc058825a1b8 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts] //// + +=== awaitCallExpression6_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression6_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression6_es6.types b/tests/baselines/reference/awaitCallExpression6_es6.types index d7353a88196df..7bb3c91516fc2 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.types +++ b/tests/baselines/reference/awaitCallExpression6_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts] //// + +=== awaitCallExpression6_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression7_es2017.js b/tests/baselines/reference/awaitCallExpression7_es2017.js index b3391ced6b605..297de57f614a3 100644 --- a/tests/baselines/reference/awaitCallExpression7_es2017.js +++ b/tests/baselines/reference/awaitCallExpression7_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression7_es2017.ts] //// + //// [awaitCallExpression7_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression7_es2017.symbols b/tests/baselines/reference/awaitCallExpression7_es2017.symbols index 9502156a7a703..c6a9556fac9db 100644 --- a/tests/baselines/reference/awaitCallExpression7_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression7_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression7_es2017.ts] //// + +=== awaitCallExpression7_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression7_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression7_es2017.types b/tests/baselines/reference/awaitCallExpression7_es2017.types index 574fde5a8f652..ad40df752ec4a 100644 --- a/tests/baselines/reference/awaitCallExpression7_es2017.types +++ b/tests/baselines/reference/awaitCallExpression7_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression7_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression7_es2017.ts] //// + +=== awaitCallExpression7_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression7_es5.js b/tests/baselines/reference/awaitCallExpression7_es5.js index dd69abc051417..b6e6ac95d28b5 100644 --- a/tests/baselines/reference/awaitCallExpression7_es5.js +++ b/tests/baselines/reference/awaitCallExpression7_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression7_es5.ts] //// + //// [awaitCallExpression7_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression7_es5.symbols b/tests/baselines/reference/awaitCallExpression7_es5.symbols index 89c055b7aceb1..7f48849b27f8d 100644 --- a/tests/baselines/reference/awaitCallExpression7_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression7_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression7_es5.ts] //// + +=== awaitCallExpression7_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression7_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression7_es5.types b/tests/baselines/reference/awaitCallExpression7_es5.types index 6cdb961aedd83..da843996f6933 100644 --- a/tests/baselines/reference/awaitCallExpression7_es5.types +++ b/tests/baselines/reference/awaitCallExpression7_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression7_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression7_es5.ts] //// + +=== awaitCallExpression7_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression7_es6.js b/tests/baselines/reference/awaitCallExpression7_es6.js index 2eb830986d966..b661dc26d320f 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.js +++ b/tests/baselines/reference/awaitCallExpression7_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts] //// + //// [awaitCallExpression7_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression7_es6.symbols b/tests/baselines/reference/awaitCallExpression7_es6.symbols index 8a345d92daa09..a5164086fb4a6 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts] //// + +=== awaitCallExpression7_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression7_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression7_es6.types b/tests/baselines/reference/awaitCallExpression7_es6.types index 9acc195ad0cd3..142afeb9a338f 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.types +++ b/tests/baselines/reference/awaitCallExpression7_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts] //// + +=== awaitCallExpression7_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression8_es2017.js b/tests/baselines/reference/awaitCallExpression8_es2017.js index 7e04402e90aef..b790da7663c09 100644 --- a/tests/baselines/reference/awaitCallExpression8_es2017.js +++ b/tests/baselines/reference/awaitCallExpression8_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts] //// + //// [awaitCallExpression8_es2017.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression8_es2017.symbols b/tests/baselines/reference/awaitCallExpression8_es2017.symbols index 92360982200fe..d6d4c64d3a127 100644 --- a/tests/baselines/reference/awaitCallExpression8_es2017.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts] //// + +=== awaitCallExpression8_es2017.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression8_es2017.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression8_es2017.types b/tests/baselines/reference/awaitCallExpression8_es2017.types index 6fcbed0fd0d3e..ebfc051597cfa 100644 --- a/tests/baselines/reference/awaitCallExpression8_es2017.types +++ b/tests/baselines/reference/awaitCallExpression8_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitCallExpression/awaitCallExpression8_es2017.ts] //// + +=== awaitCallExpression8_es2017.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression8_es5.js b/tests/baselines/reference/awaitCallExpression8_es5.js index 6d7d5dceba96d..5fcadfb65d87b 100644 --- a/tests/baselines/reference/awaitCallExpression8_es5.js +++ b/tests/baselines/reference/awaitCallExpression8_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression8_es5.ts] //// + //// [awaitCallExpression8_es5.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression8_es5.symbols b/tests/baselines/reference/awaitCallExpression8_es5.symbols index a525179b0c69a..1cc9dde97ba72 100644 --- a/tests/baselines/reference/awaitCallExpression8_es5.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression8_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression8_es5.ts] //// + +=== awaitCallExpression8_es5.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression8_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression8_es5.types b/tests/baselines/reference/awaitCallExpression8_es5.types index 46e4088898daa..3a6c5a79afad8 100644 --- a/tests/baselines/reference/awaitCallExpression8_es5.types +++ b/tests/baselines/reference/awaitCallExpression8_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression8_es5.ts === +//// [tests/cases/conformance/async/es5/awaitCallExpression/awaitCallExpression8_es5.ts] //// + +=== awaitCallExpression8_es5.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpression8_es6.js b/tests/baselines/reference/awaitCallExpression8_es6.js index ecf36a319369c..aabb7a2d1764f 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.js +++ b/tests/baselines/reference/awaitCallExpression8_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts] //// + //// [awaitCallExpression8_es6.ts] declare var a: boolean; declare var p: Promise; diff --git a/tests/baselines/reference/awaitCallExpression8_es6.symbols b/tests/baselines/reference/awaitCallExpression8_es6.symbols index 68b107162139e..060ba0df8bee8 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts] //// + +=== awaitCallExpression8_es6.ts === declare var a: boolean; >a : Symbol(a, Decl(awaitCallExpression8_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitCallExpression8_es6.types b/tests/baselines/reference/awaitCallExpression8_es6.types index ed0dbb8abd68e..a557513594e85 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.types +++ b/tests/baselines/reference/awaitCallExpression8_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts === +//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts] //// + +=== awaitCallExpression8_es6.ts === declare var a: boolean; >a : boolean diff --git a/tests/baselines/reference/awaitCallExpressionInSyncFunction.errors.txt b/tests/baselines/reference/awaitCallExpressionInSyncFunction.errors.txt index 51d7f4d4694a7..8694ba619803f 100644 --- a/tests/baselines/reference/awaitCallExpressionInSyncFunction.errors.txt +++ b/tests/baselines/reference/awaitCallExpressionInSyncFunction.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/awaitCallExpressionInSyncFunction.ts(2,16): error TS2311: Cannot find name 'await'. Did you mean to write this in an async function? +awaitCallExpressionInSyncFunction.ts(2,16): error TS2311: Cannot find name 'await'. Did you mean to write this in an async function? -==== tests/cases/compiler/awaitCallExpressionInSyncFunction.ts (1 errors) ==== +==== awaitCallExpressionInSyncFunction.ts (1 errors) ==== function foo() { const foo = await(Promise.resolve(1)); ~~~~~ diff --git a/tests/baselines/reference/awaitCallExpressionInSyncFunction.js b/tests/baselines/reference/awaitCallExpressionInSyncFunction.js index 2fef4c398d4e5..1982c1a6b0dfa 100644 --- a/tests/baselines/reference/awaitCallExpressionInSyncFunction.js +++ b/tests/baselines/reference/awaitCallExpressionInSyncFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitCallExpressionInSyncFunction.ts] //// + //// [awaitCallExpressionInSyncFunction.ts] function foo() { const foo = await(Promise.resolve(1)); diff --git a/tests/baselines/reference/awaitCallExpressionInSyncFunction.symbols b/tests/baselines/reference/awaitCallExpressionInSyncFunction.symbols index 898725dce4b28..cf628c446627a 100644 --- a/tests/baselines/reference/awaitCallExpressionInSyncFunction.symbols +++ b/tests/baselines/reference/awaitCallExpressionInSyncFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitCallExpressionInSyncFunction.ts === +//// [tests/cases/compiler/awaitCallExpressionInSyncFunction.ts] //// + +=== awaitCallExpressionInSyncFunction.ts === function foo() { >foo : Symbol(foo, Decl(awaitCallExpressionInSyncFunction.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitCallExpressionInSyncFunction.types b/tests/baselines/reference/awaitCallExpressionInSyncFunction.types index aa5b0a415a297..5a1d333165632 100644 --- a/tests/baselines/reference/awaitCallExpressionInSyncFunction.types +++ b/tests/baselines/reference/awaitCallExpressionInSyncFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitCallExpressionInSyncFunction.ts === +//// [tests/cases/compiler/awaitCallExpressionInSyncFunction.ts] //// + +=== awaitCallExpressionInSyncFunction.ts === function foo() { >foo : () => any diff --git a/tests/baselines/reference/awaitClassExpression_es2017.js b/tests/baselines/reference/awaitClassExpression_es2017.js index d84f01f61cfa4..c063d02c8e60f 100644 --- a/tests/baselines/reference/awaitClassExpression_es2017.js +++ b/tests/baselines/reference/awaitClassExpression_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitClassExpression_es2017.ts] //// + //// [awaitClassExpression_es2017.ts] declare class C { } declare var p: Promise; diff --git a/tests/baselines/reference/awaitClassExpression_es2017.symbols b/tests/baselines/reference/awaitClassExpression_es2017.symbols index 2933a55f8ecd5..cad42a467b630 100644 --- a/tests/baselines/reference/awaitClassExpression_es2017.symbols +++ b/tests/baselines/reference/awaitClassExpression_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitClassExpression_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitClassExpression_es2017.ts] //// + +=== awaitClassExpression_es2017.ts === declare class C { } >C : Symbol(C, Decl(awaitClassExpression_es2017.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitClassExpression_es2017.types b/tests/baselines/reference/awaitClassExpression_es2017.types index 83927633d99c7..c6cf5333a2cf3 100644 --- a/tests/baselines/reference/awaitClassExpression_es2017.types +++ b/tests/baselines/reference/awaitClassExpression_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitClassExpression_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitClassExpression_es2017.ts] //// + +=== awaitClassExpression_es2017.ts === declare class C { } >C : C diff --git a/tests/baselines/reference/awaitClassExpression_es5.js b/tests/baselines/reference/awaitClassExpression_es5.js index ecd98628c15b0..0ca60ff15829c 100644 --- a/tests/baselines/reference/awaitClassExpression_es5.js +++ b/tests/baselines/reference/awaitClassExpression_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitClassExpression_es5.ts] //// + //// [awaitClassExpression_es5.ts] declare class C { } declare var p: Promise; diff --git a/tests/baselines/reference/awaitClassExpression_es5.symbols b/tests/baselines/reference/awaitClassExpression_es5.symbols index aeed866e7b396..313741564dcb9 100644 --- a/tests/baselines/reference/awaitClassExpression_es5.symbols +++ b/tests/baselines/reference/awaitClassExpression_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitClassExpression_es5.ts === +//// [tests/cases/conformance/async/es5/awaitClassExpression_es5.ts] //// + +=== awaitClassExpression_es5.ts === declare class C { } >C : Symbol(C, Decl(awaitClassExpression_es5.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitClassExpression_es5.types b/tests/baselines/reference/awaitClassExpression_es5.types index d413b62262405..87c65731e6f4a 100644 --- a/tests/baselines/reference/awaitClassExpression_es5.types +++ b/tests/baselines/reference/awaitClassExpression_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitClassExpression_es5.ts === +//// [tests/cases/conformance/async/es5/awaitClassExpression_es5.ts] //// + +=== awaitClassExpression_es5.ts === declare class C { } >C : C diff --git a/tests/baselines/reference/awaitClassExpression_es6.js b/tests/baselines/reference/awaitClassExpression_es6.js index 26740b9de6daf..e8c6b88e4a3e3 100644 --- a/tests/baselines/reference/awaitClassExpression_es6.js +++ b/tests/baselines/reference/awaitClassExpression_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitClassExpression_es6.ts] //// + //// [awaitClassExpression_es6.ts] declare class C { } declare var p: Promise; diff --git a/tests/baselines/reference/awaitClassExpression_es6.symbols b/tests/baselines/reference/awaitClassExpression_es6.symbols index 63162c138ac85..b51b29a718039 100644 --- a/tests/baselines/reference/awaitClassExpression_es6.symbols +++ b/tests/baselines/reference/awaitClassExpression_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitClassExpression_es6.ts === +//// [tests/cases/conformance/async/es6/awaitClassExpression_es6.ts] //// + +=== awaitClassExpression_es6.ts === declare class C { } >C : Symbol(C, Decl(awaitClassExpression_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitClassExpression_es6.types b/tests/baselines/reference/awaitClassExpression_es6.types index 5dccdb045eea2..0e2d24d2ac144 100644 --- a/tests/baselines/reference/awaitClassExpression_es6.types +++ b/tests/baselines/reference/awaitClassExpression_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitClassExpression_es6.ts === +//// [tests/cases/conformance/async/es6/awaitClassExpression_es6.ts] //// + +=== awaitClassExpression_es6.ts === declare class C { } >C : C diff --git a/tests/baselines/reference/awaitExpressionInnerCommentEmit.js b/tests/baselines/reference/awaitExpressionInnerCommentEmit.js index 4cc1ccad8b5d0..a2a475643cb0c 100644 --- a/tests/baselines/reference/awaitExpressionInnerCommentEmit.js +++ b/tests/baselines/reference/awaitExpressionInnerCommentEmit.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitExpressionInnerCommentEmit.ts] //// + //// [awaitExpressionInnerCommentEmit.ts] async function foo() { /*comment1*/ await 1; diff --git a/tests/baselines/reference/awaitExpressionInnerCommentEmit.symbols b/tests/baselines/reference/awaitExpressionInnerCommentEmit.symbols index 862c8bbb0a543..55ff491d8ff5a 100644 --- a/tests/baselines/reference/awaitExpressionInnerCommentEmit.symbols +++ b/tests/baselines/reference/awaitExpressionInnerCommentEmit.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitExpressionInnerCommentEmit.ts === +//// [tests/cases/compiler/awaitExpressionInnerCommentEmit.ts] //// + +=== awaitExpressionInnerCommentEmit.ts === async function foo() { >foo : Symbol(foo, Decl(awaitExpressionInnerCommentEmit.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitExpressionInnerCommentEmit.types b/tests/baselines/reference/awaitExpressionInnerCommentEmit.types index 4075710397291..bfcf857bacbe5 100644 --- a/tests/baselines/reference/awaitExpressionInnerCommentEmit.types +++ b/tests/baselines/reference/awaitExpressionInnerCommentEmit.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitExpressionInnerCommentEmit.ts === +//// [tests/cases/compiler/awaitExpressionInnerCommentEmit.ts] //// + +=== awaitExpressionInnerCommentEmit.ts === async function foo() { >foo : () => Promise diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt b/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt index 53d4a48dd45af..a718b31e75cc9 100644 --- a/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/awaitInClassInAsyncFunction.ts(9,15): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInClassInAsyncFunction.ts(9,15): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -==== tests/cases/compiler/awaitInClassInAsyncFunction.ts (1 errors) ==== +==== awaitInClassInAsyncFunction.ts (1 errors) ==== // https://github.com/microsoft/TypeScript/issues/34887 async function bar() { diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.js b/tests/baselines/reference/awaitInClassInAsyncFunction.js index a9d3c38f5c640..0fe81a619f8fa 100644 --- a/tests/baselines/reference/awaitInClassInAsyncFunction.js +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitInClassInAsyncFunction.ts] //// + //// [awaitInClassInAsyncFunction.ts] // https://github.com/microsoft/TypeScript/issues/34887 diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.symbols b/tests/baselines/reference/awaitInClassInAsyncFunction.symbols index 31fc7b10916b5..f7bbb2daff101 100644 --- a/tests/baselines/reference/awaitInClassInAsyncFunction.symbols +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitInClassInAsyncFunction.ts === +//// [tests/cases/compiler/awaitInClassInAsyncFunction.ts] //// + +=== awaitInClassInAsyncFunction.ts === // https://github.com/microsoft/TypeScript/issues/34887 async function bar() { diff --git a/tests/baselines/reference/awaitInClassInAsyncFunction.types b/tests/baselines/reference/awaitInClassInAsyncFunction.types index 441e1f84459b9..e40c71e5efd3d 100644 --- a/tests/baselines/reference/awaitInClassInAsyncFunction.types +++ b/tests/baselines/reference/awaitInClassInAsyncFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitInClassInAsyncFunction.ts === +//// [tests/cases/compiler/awaitInClassInAsyncFunction.ts] //// + +=== awaitInClassInAsyncFunction.ts === // https://github.com/microsoft/TypeScript/issues/34887 async function bar() { diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt b/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt index f97a066c8c80d..2af730bfb9e8c 100644 --- a/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt +++ b/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt @@ -1,77 +1,77 @@ -tests/cases/compiler/awaitInNonAsyncFunction.ts(4,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(5,10): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(9,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(10,10): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(14,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(15,3): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(19,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(20,10): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(24,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(25,9): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(30,9): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(34,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitInNonAsyncFunction.ts(4,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(5,10): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(9,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(10,10): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(14,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(15,3): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(19,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(20,10): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(24,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(25,9): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(30,9): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(34,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. -==== tests/cases/compiler/awaitInNonAsyncFunction.ts (16 errors) ==== +==== awaitInNonAsyncFunction.ts (16 errors) ==== // https://github.com/Microsoft/TypeScript/issues/26586 function normalFunc(p: Promise) { for await (const _ of []); ~~~~~ !!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:3:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:3:10: Did you mean to mark this function as 'async'? return await p; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:3:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:3:10: Did you mean to mark this function as 'async'? } export function exportedFunc(p: Promise) { for await (const _ of []); ~~~~~ !!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:8:17: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:8:17: Did you mean to mark this function as 'async'? return await p; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:8:17: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:8:17: Did you mean to mark this function as 'async'? } const functionExpression = function(p: Promise) { for await (const _ of []); ~~~~~ !!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'? await p; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'? } const arrowFunc = (p: Promise) => { for await (const _ of []); ~~~~~ !!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:18:19: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:18:19: Did you mean to mark this function as 'async'? return await p; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:18:19: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:18:19: Did you mean to mark this function as 'async'? }; function* generatorFunc(p: Promise) { for await (const _ of []); ~~~~~ !!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:23:11: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:23:11: Did you mean to mark this function as 'async'? yield await p; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:23:11: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:23:11: Did you mean to mark this function as 'async'? } class clazz { @@ -87,11 +87,11 @@ tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level ' for await (const _ of []); ~~~~~ !!! error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:33:3: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:33:3: Did you mean to mark this function as 'async'? await p; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:33:3: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitInNonAsyncFunction.ts:33:3: Did you mean to mark this function as 'async'? } } diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.js b/tests/baselines/reference/awaitInNonAsyncFunction.js index 83f75aa5633eb..e7edd15494cdb 100644 --- a/tests/baselines/reference/awaitInNonAsyncFunction.js +++ b/tests/baselines/reference/awaitInNonAsyncFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitInNonAsyncFunction.ts] //// + //// [awaitInNonAsyncFunction.ts] // https://github.com/Microsoft/TypeScript/issues/26586 diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.symbols b/tests/baselines/reference/awaitInNonAsyncFunction.symbols index cf184637e6f06..c58d11e9413ef 100644 --- a/tests/baselines/reference/awaitInNonAsyncFunction.symbols +++ b/tests/baselines/reference/awaitInNonAsyncFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitInNonAsyncFunction.ts === +//// [tests/cases/compiler/awaitInNonAsyncFunction.ts] //// + +=== awaitInNonAsyncFunction.ts === // https://github.com/Microsoft/TypeScript/issues/26586 function normalFunc(p: Promise) { diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.types b/tests/baselines/reference/awaitInNonAsyncFunction.types index cbdc8878b25aa..e0c1fd4f0f669 100644 --- a/tests/baselines/reference/awaitInNonAsyncFunction.types +++ b/tests/baselines/reference/awaitInNonAsyncFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitInNonAsyncFunction.ts === +//// [tests/cases/compiler/awaitInNonAsyncFunction.ts] //// + +=== awaitInNonAsyncFunction.ts === // https://github.com/Microsoft/TypeScript/issues/26586 function normalFunc(p: Promise) { diff --git a/tests/baselines/reference/awaitInheritedPromise_es2017.js b/tests/baselines/reference/awaitInheritedPromise_es2017.js index e973d0b166aeb..4845410cd892b 100644 --- a/tests/baselines/reference/awaitInheritedPromise_es2017.js +++ b/tests/baselines/reference/awaitInheritedPromise_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts] //// + //// [awaitInheritedPromise_es2017.ts] interface A extends Promise {} declare var a: A; diff --git a/tests/baselines/reference/awaitInheritedPromise_es2017.symbols b/tests/baselines/reference/awaitInheritedPromise_es2017.symbols index 4ffc0e63b0929..734a9d2962130 100644 --- a/tests/baselines/reference/awaitInheritedPromise_es2017.symbols +++ b/tests/baselines/reference/awaitInheritedPromise_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts] //// + +=== awaitInheritedPromise_es2017.ts === interface A extends Promise {} >A : Symbol(A, Decl(awaitInheritedPromise_es2017.ts, 0, 0)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) diff --git a/tests/baselines/reference/awaitInheritedPromise_es2017.types b/tests/baselines/reference/awaitInheritedPromise_es2017.types index c41160297ebc9..2859119f8510f 100644 --- a/tests/baselines/reference/awaitInheritedPromise_es2017.types +++ b/tests/baselines/reference/awaitInheritedPromise_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts === +//// [tests/cases/conformance/async/es2017/awaitInheritedPromise_es2017.ts] //// + +=== awaitInheritedPromise_es2017.ts === interface A extends Promise {} declare var a: A; >a : A diff --git a/tests/baselines/reference/awaitLiteralValues.errors.txt b/tests/baselines/reference/awaitLiteralValues.errors.txt index b2e882eb44027..dd6beaa1d4cc7 100644 --- a/tests/baselines/reference/awaitLiteralValues.errors.txt +++ b/tests/baselines/reference/awaitLiteralValues.errors.txt @@ -1,51 +1,51 @@ -tests/cases/compiler/awaitLiteralValues.ts(2,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitLiteralValues.ts(6,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitLiteralValues.ts(10,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitLiteralValues.ts(14,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitLiteralValues.ts(18,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -tests/cases/compiler/awaitLiteralValues.ts(22,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitLiteralValues.ts(2,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitLiteralValues.ts(6,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitLiteralValues.ts(10,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitLiteralValues.ts(14,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitLiteralValues.ts(18,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. +awaitLiteralValues.ts(22,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -==== tests/cases/compiler/awaitLiteralValues.ts (6 errors) ==== +==== awaitLiteralValues.ts (6 errors) ==== function awaitString() { await 'literal'; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:1:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitLiteralValues.ts:1:10: Did you mean to mark this function as 'async'? } function awaitNumber() { await 1; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:5:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitLiteralValues.ts:5:10: Did you mean to mark this function as 'async'? } function awaitTrue() { await true; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:9:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitLiteralValues.ts:9:10: Did you mean to mark this function as 'async'? } function awaitFalse() { await false; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:13:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitLiteralValues.ts:13:10: Did you mean to mark this function as 'async'? } function awaitNull() { await null; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:17:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitLiteralValues.ts:17:10: Did you mean to mark this function as 'async'? } function awaitUndefined() { await undefined; ~~~~~ !!! error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules. -!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:21:10: Did you mean to mark this function as 'async'? +!!! related TS1356 awaitLiteralValues.ts:21:10: Did you mean to mark this function as 'async'? } \ No newline at end of file diff --git a/tests/baselines/reference/awaitLiteralValues.js b/tests/baselines/reference/awaitLiteralValues.js index cc5a06a0c1909..1d8959ea6d3f4 100644 --- a/tests/baselines/reference/awaitLiteralValues.js +++ b/tests/baselines/reference/awaitLiteralValues.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitLiteralValues.ts] //// + //// [awaitLiteralValues.ts] function awaitString() { await 'literal'; diff --git a/tests/baselines/reference/awaitLiteralValues.symbols b/tests/baselines/reference/awaitLiteralValues.symbols index 2f5e8191b2011..18a80a8cbb1ba 100644 --- a/tests/baselines/reference/awaitLiteralValues.symbols +++ b/tests/baselines/reference/awaitLiteralValues.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitLiteralValues.ts === +//// [tests/cases/compiler/awaitLiteralValues.ts] //// + +=== awaitLiteralValues.ts === function awaitString() { >awaitString : Symbol(awaitString, Decl(awaitLiteralValues.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitLiteralValues.types b/tests/baselines/reference/awaitLiteralValues.types index 4e98a31218223..6af99894582c6 100644 --- a/tests/baselines/reference/awaitLiteralValues.types +++ b/tests/baselines/reference/awaitLiteralValues.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitLiteralValues.ts === +//// [tests/cases/compiler/awaitLiteralValues.ts] //// + +=== awaitLiteralValues.ts === function awaitString() { >awaitString : () => void diff --git a/tests/baselines/reference/awaitUnionPromise.js b/tests/baselines/reference/awaitUnionPromise.js index 0698d66238e48..934de1582e59f 100644 --- a/tests/baselines/reference/awaitUnionPromise.js +++ b/tests/baselines/reference/awaitUnionPromise.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitUnionPromise.ts] //// + //// [awaitUnionPromise.ts] // https://github.com/Microsoft/TypeScript/issues/18186 diff --git a/tests/baselines/reference/awaitUnionPromise.symbols b/tests/baselines/reference/awaitUnionPromise.symbols index 7a25841b68506..b1cb1d36d9307 100644 --- a/tests/baselines/reference/awaitUnionPromise.symbols +++ b/tests/baselines/reference/awaitUnionPromise.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitUnionPromise.ts === +//// [tests/cases/compiler/awaitUnionPromise.ts] //// + +=== awaitUnionPromise.ts === // https://github.com/Microsoft/TypeScript/issues/18186 class AsyncEnumeratorDone { }; diff --git a/tests/baselines/reference/awaitUnionPromise.types b/tests/baselines/reference/awaitUnionPromise.types index fc82e964c1349..14c95ffdb4585 100644 --- a/tests/baselines/reference/awaitUnionPromise.types +++ b/tests/baselines/reference/awaitUnionPromise.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitUnionPromise.ts === +//// [tests/cases/compiler/awaitUnionPromise.ts] //// + +=== awaitUnionPromise.ts === // https://github.com/Microsoft/TypeScript/issues/18186 class AsyncEnumeratorDone { }; diff --git a/tests/baselines/reference/awaitUnion_es5.js b/tests/baselines/reference/awaitUnion_es5.js index e4ebaa4f62ec4..110a56b0d46f6 100644 --- a/tests/baselines/reference/awaitUnion_es5.js +++ b/tests/baselines/reference/awaitUnion_es5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es5/awaitUnion_es5.ts] //// + //// [awaitUnion_es5.ts] declare let a: number | string; declare let b: PromiseLike | PromiseLike; diff --git a/tests/baselines/reference/awaitUnion_es5.symbols b/tests/baselines/reference/awaitUnion_es5.symbols index b8fb6dbed38f7..56817ad81c7f3 100644 --- a/tests/baselines/reference/awaitUnion_es5.symbols +++ b/tests/baselines/reference/awaitUnion_es5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitUnion_es5.ts === +//// [tests/cases/conformance/async/es5/awaitUnion_es5.ts] //// + +=== awaitUnion_es5.ts === declare let a: number | string; >a : Symbol(a, Decl(awaitUnion_es5.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitUnion_es5.types b/tests/baselines/reference/awaitUnion_es5.types index 443b9ba64695c..54a14a545a329 100644 --- a/tests/baselines/reference/awaitUnion_es5.types +++ b/tests/baselines/reference/awaitUnion_es5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es5/awaitUnion_es5.ts === +//// [tests/cases/conformance/async/es5/awaitUnion_es5.ts] //// + +=== awaitUnion_es5.ts === declare let a: number | string; >a : string | number diff --git a/tests/baselines/reference/awaitUnion_es6.js b/tests/baselines/reference/awaitUnion_es6.js index 628e488cb4fac..1402cf2bb3590 100644 --- a/tests/baselines/reference/awaitUnion_es6.js +++ b/tests/baselines/reference/awaitUnion_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/awaitUnion_es6.ts] //// + //// [awaitUnion_es6.ts] declare let a: number | string; declare let b: PromiseLike | PromiseLike; diff --git a/tests/baselines/reference/awaitUnion_es6.symbols b/tests/baselines/reference/awaitUnion_es6.symbols index c301f3c5b8dd7..2f754c8f35fb0 100644 --- a/tests/baselines/reference/awaitUnion_es6.symbols +++ b/tests/baselines/reference/awaitUnion_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitUnion_es6.ts === +//// [tests/cases/conformance/async/es6/awaitUnion_es6.ts] //// + +=== awaitUnion_es6.ts === declare let a: number | string; >a : Symbol(a, Decl(awaitUnion_es6.ts, 0, 11)) diff --git a/tests/baselines/reference/awaitUnion_es6.types b/tests/baselines/reference/awaitUnion_es6.types index 2f1f31a008281..17017ede6c766 100644 --- a/tests/baselines/reference/awaitUnion_es6.types +++ b/tests/baselines/reference/awaitUnion_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/awaitUnion_es6.ts === +//// [tests/cases/conformance/async/es6/awaitUnion_es6.ts] //// + +=== awaitUnion_es6.ts === declare let a: number | string; >a : string | number diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).errors.txt new file mode 100644 index 0000000000000..52470b2456f61 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).errors.txt @@ -0,0 +1,145 @@ +awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(45,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(52,13): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(57,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(60,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(63,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(67,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(70,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(74,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(79,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(85,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(90,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + +==== awaitUsingDeclarations.1.ts (15 errors) ==== + await using d1 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } + + const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; + }; + + class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } + } + + { + await using d19 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + try { + await using d23 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + else { + await using d27 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + while (true); + + for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js new file mode 100644 index 0000000000000..704d04dd43c5b --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js @@ -0,0 +1,540 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.1.ts] //// + +//// [awaitUsingDeclarations.1.ts] +await using d1 = { async [Symbol.asyncDispose]() {} }; + +async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; +} + +async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; +} + +const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; +}; + +class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } +} + +{ + await using d19 = { async [Symbol.asyncDispose]() {} }; +} + +switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + break; +} + +if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + break; + } + +try { + await using d23 = { async [Symbol.asyncDispose]() {} }; +} +catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; +} +finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; +} + +if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; +} +else { + await using d27 = { async [Symbol.asyncDispose]() {} }; +} + +while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + break; +} + +do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + break; +} +while (true); + +for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + break; +} + +for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; +} + +for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.1.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +function af() { + return __awaiter(this, void 0, void 0, function* () { + const env_15 = { stack: [], error: void 0, hasError: false }; + try { + const d3 = __addDisposableResource(env_15, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + yield null; + } + catch (e_15) { + env_15.error = e_15; + env_15.hasError = true; + } + finally { + const result_15 = __disposeResources(env_15); + if (result_15) + yield result_15; + } + }); +} +function ag() { + return __asyncGenerator(this, arguments, function* ag_1() { + const env_16 = { stack: [], error: void 0, hasError: false }; + try { + const d5 = __addDisposableResource(env_16, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + yield yield __await(void 0); + yield __await(null); + } + catch (e_16) { + env_16.error = e_16; + env_16.hasError = true; + } + finally { + const result_16 = __disposeResources(env_16); + if (result_16) + yield __await(result_16); + } + }); +} +var d1, a, C1, env_1; +const env_2 = { stack: [], error: void 0, hasError: false }; +try { + d1 = __addDisposableResource(env_2, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + a = () => __awaiter(void 0, void 0, void 0, function* () { + const env_17 = { stack: [], error: void 0, hasError: false }; + try { + const d6 = __addDisposableResource(env_17, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_17) { + env_17.error = e_17; + env_17.hasError = true; + } + finally { + const result_17 = __disposeResources(env_17); + if (result_17) + yield result_17; + } + }); + C1 = class C1 { + constructor() { + this.a = () => __awaiter(this, void 0, void 0, function* () { + const env_18 = { stack: [], error: void 0, hasError: false }; + try { + const d7 = __addDisposableResource(env_18, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_18) { + env_18.error = e_18; + env_18.hasError = true; + } + finally { + const result_18 = __disposeResources(env_18); + if (result_18) + yield result_18; + } + }); + } + am() { + return __awaiter(this, void 0, void 0, function* () { + const env_19 = { stack: [], error: void 0, hasError: false }; + try { + const d13 = __addDisposableResource(env_19, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + yield null; + } + catch (e_19) { + env_19.error = e_19; + env_19.hasError = true; + } + finally { + const result_19 = __disposeResources(env_19); + if (result_19) + yield result_19; + } + }); + } + ag() { + return __asyncGenerator(this, arguments, function* ag_2() { + const env_20 = { stack: [], error: void 0, hasError: false }; + try { + const d15 = __addDisposableResource(env_20, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + yield yield __await(void 0); + yield __await(null); + } + catch (e_20) { + env_20.error = e_20; + env_20.hasError = true; + } + finally { + const result_20 = __disposeResources(env_20); + if (result_20) + yield __await(result_20); + } + }); + } + }; + { + const env_3 = { stack: [], error: void 0, hasError: false }; + try { + const d19 = __addDisposableResource(env_3, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_1) { + env_3.error = e_1; + env_3.hasError = true; + } + finally { + const result_1 = __disposeResources(env_3); + if (result_1) + await result_1; + } + } + env_1 = { stack: [], error: void 0, hasError: false }; + try { + switch (Math.random()) { + case 0: + const d20 = __addDisposableResource(env_1, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + break; + case 1: + const d21 = __addDisposableResource(env_1, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + break; + } + } + catch (e_2) { + env_1.error = e_2; + env_1.hasError = true; + } + finally { + const result_2 = __disposeResources(env_1); + if (result_2) + await result_2; + } + if (true) { + const env_4 = { stack: [], error: void 0, hasError: false }; + try { + switch (0) { + case 0: + const d22 = __addDisposableResource(env_4, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + break; + } + } + catch (e_3) { + env_4.error = e_3; + env_4.hasError = true; + } + finally { + const result_3 = __disposeResources(env_4); + if (result_3) + await result_3; + } + } + try { + const env_5 = { stack: [], error: void 0, hasError: false }; + try { + const d23 = __addDisposableResource(env_5, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_4) { + env_5.error = e_4; + env_5.hasError = true; + } + finally { + const result_4 = __disposeResources(env_5); + if (result_4) + await result_4; + } + } + catch (_a) { + const env_6 = { stack: [], error: void 0, hasError: false }; + try { + const d24 = __addDisposableResource(env_6, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_5) { + env_6.error = e_5; + env_6.hasError = true; + } + finally { + const result_5 = __disposeResources(env_6); + if (result_5) + await result_5; + } + } + finally { + const env_7 = { stack: [], error: void 0, hasError: false }; + try { + const d25 = __addDisposableResource(env_7, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_6) { + env_7.error = e_6; + env_7.hasError = true; + } + finally { + const result_6 = __disposeResources(env_7); + if (result_6) + await result_6; + } + } + if (true) { + const env_8 = { stack: [], error: void 0, hasError: false }; + try { + const d26 = __addDisposableResource(env_8, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_7) { + env_8.error = e_7; + env_8.hasError = true; + } + finally { + const result_7 = __disposeResources(env_8); + if (result_7) + await result_7; + } + } + else { + const env_9 = { stack: [], error: void 0, hasError: false }; + try { + const d27 = __addDisposableResource(env_9, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_8) { + env_9.error = e_8; + env_9.hasError = true; + } + finally { + const result_8 = __disposeResources(env_9); + if (result_8) + await result_8; + } + } + while (true) { + const env_10 = { stack: [], error: void 0, hasError: false }; + try { + const d28 = __addDisposableResource(env_10, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + break; + } + catch (e_9) { + env_10.error = e_9; + env_10.hasError = true; + } + finally { + const result_9 = __disposeResources(env_10); + if (result_9) + await result_9; + } + } + do { + const env_11 = { stack: [], error: void 0, hasError: false }; + try { + const d29 = __addDisposableResource(env_11, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + break; + } + catch (e_10) { + env_11.error = e_10; + env_11.hasError = true; + } + finally { + const result_10 = __disposeResources(env_11); + if (result_10) + await result_10; + } + } while (true); + for (;;) { + const env_12 = { stack: [], error: void 0, hasError: false }; + try { + const d30 = __addDisposableResource(env_12, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + break; + } + catch (e_11) { + env_12.error = e_11; + env_12.hasError = true; + } + finally { + const result_11 = __disposeResources(env_12); + if (result_11) + await result_11; + } + } + for (const x in {}) { + const env_13 = { stack: [], error: void 0, hasError: false }; + try { + const d31 = __addDisposableResource(env_13, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_12) { + env_13.error = e_12; + env_13.hasError = true; + } + finally { + const result_12 = __disposeResources(env_13); + if (result_12) + await result_12; + } + } + for (const x of []) { + const env_14 = { stack: [], error: void 0, hasError: false }; + try { + const d32 = __addDisposableResource(env_14, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_13) { + env_14.error = e_13; + env_14.hasError = true; + } + finally { + const result_13 = __disposeResources(env_14); + if (result_13) + await result_13; + } + } +} +catch (e_14) { + env_2.error = e_14; + env_2.hasError = true; +} +finally { + const result_14 = __disposeResources(env_2); + if (result_14) + await result_14; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js new file mode 100644 index 0000000000000..90b68228db0e9 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js @@ -0,0 +1,485 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.1.ts] //// + +//// [awaitUsingDeclarations.1.ts] +await using d1 = { async [Symbol.asyncDispose]() {} }; + +async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; +} + +async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; +} + +const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; +}; + +class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } +} + +{ + await using d19 = { async [Symbol.asyncDispose]() {} }; +} + +switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + break; +} + +if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + break; + } + +try { + await using d23 = { async [Symbol.asyncDispose]() {} }; +} +catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; +} +finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; +} + +if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; +} +else { + await using d27 = { async [Symbol.asyncDispose]() {} }; +} + +while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + break; +} + +do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + break; +} +while (true); + +for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + break; +} + +for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; +} + +for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.1.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +async function af() { + const env_15 = { stack: [], error: void 0, hasError: false }; + try { + const d3 = __addDisposableResource(env_15, { async [Symbol.asyncDispose]() { } }, true); + await null; + } + catch (e_15) { + env_15.error = e_15; + env_15.hasError = true; + } + finally { + const result_15 = __disposeResources(env_15); + if (result_15) + await result_15; + } +} +function ag() { + return __asyncGenerator(this, arguments, function* ag_1() { + const env_16 = { stack: [], error: void 0, hasError: false }; + try { + const d5 = __addDisposableResource(env_16, { async [Symbol.asyncDispose]() { } }, true); + yield yield __await(void 0); + yield __await(null); + } + catch (e_16) { + env_16.error = e_16; + env_16.hasError = true; + } + finally { + const result_16 = __disposeResources(env_16); + if (result_16) + yield __await(result_16); + } + }); +} +var d1, a, C1, env_1; +const env_2 = { stack: [], error: void 0, hasError: false }; +try { + d1 = __addDisposableResource(env_2, { async [Symbol.asyncDispose]() { } }, true); + a = async () => { + const env_17 = { stack: [], error: void 0, hasError: false }; + try { + const d6 = __addDisposableResource(env_17, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_17) { + env_17.error = e_17; + env_17.hasError = true; + } + finally { + const result_17 = __disposeResources(env_17); + if (result_17) + await result_17; + } + }; + C1 = class C1 { + constructor() { + this.a = async () => { + const env_18 = { stack: [], error: void 0, hasError: false }; + try { + const d7 = __addDisposableResource(env_18, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_18) { + env_18.error = e_18; + env_18.hasError = true; + } + finally { + const result_18 = __disposeResources(env_18); + if (result_18) + await result_18; + } + }; + } + async am() { + const env_19 = { stack: [], error: void 0, hasError: false }; + try { + const d13 = __addDisposableResource(env_19, { async [Symbol.asyncDispose]() { } }, true); + await null; + } + catch (e_19) { + env_19.error = e_19; + env_19.hasError = true; + } + finally { + const result_19 = __disposeResources(env_19); + if (result_19) + await result_19; + } + } + ag() { + return __asyncGenerator(this, arguments, function* ag_2() { + const env_20 = { stack: [], error: void 0, hasError: false }; + try { + const d15 = __addDisposableResource(env_20, { async [Symbol.asyncDispose]() { } }, true); + yield yield __await(void 0); + yield __await(null); + } + catch (e_20) { + env_20.error = e_20; + env_20.hasError = true; + } + finally { + const result_20 = __disposeResources(env_20); + if (result_20) + yield __await(result_20); + } + }); + } + }; + { + const env_3 = { stack: [], error: void 0, hasError: false }; + try { + const d19 = __addDisposableResource(env_3, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_1) { + env_3.error = e_1; + env_3.hasError = true; + } + finally { + const result_1 = __disposeResources(env_3); + if (result_1) + await result_1; + } + } + env_1 = { stack: [], error: void 0, hasError: false }; + try { + switch (Math.random()) { + case 0: + const d20 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + break; + case 1: + const d21 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + break; + } + } + catch (e_2) { + env_1.error = e_2; + env_1.hasError = true; + } + finally { + const result_2 = __disposeResources(env_1); + if (result_2) + await result_2; + } + if (true) { + const env_4 = { stack: [], error: void 0, hasError: false }; + try { + switch (0) { + case 0: + const d22 = __addDisposableResource(env_4, { async [Symbol.asyncDispose]() { } }, true); + break; + } + } + catch (e_3) { + env_4.error = e_3; + env_4.hasError = true; + } + finally { + const result_3 = __disposeResources(env_4); + if (result_3) + await result_3; + } + } + try { + const env_5 = { stack: [], error: void 0, hasError: false }; + try { + const d23 = __addDisposableResource(env_5, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_4) { + env_5.error = e_4; + env_5.hasError = true; + } + finally { + const result_4 = __disposeResources(env_5); + if (result_4) + await result_4; + } + } + catch (_a) { + const env_6 = { stack: [], error: void 0, hasError: false }; + try { + const d24 = __addDisposableResource(env_6, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_5) { + env_6.error = e_5; + env_6.hasError = true; + } + finally { + const result_5 = __disposeResources(env_6); + if (result_5) + await result_5; + } + } + finally { + const env_7 = { stack: [], error: void 0, hasError: false }; + try { + const d25 = __addDisposableResource(env_7, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_6) { + env_7.error = e_6; + env_7.hasError = true; + } + finally { + const result_6 = __disposeResources(env_7); + if (result_6) + await result_6; + } + } + if (true) { + const env_8 = { stack: [], error: void 0, hasError: false }; + try { + const d26 = __addDisposableResource(env_8, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_7) { + env_8.error = e_7; + env_8.hasError = true; + } + finally { + const result_7 = __disposeResources(env_8); + if (result_7) + await result_7; + } + } + else { + const env_9 = { stack: [], error: void 0, hasError: false }; + try { + const d27 = __addDisposableResource(env_9, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_8) { + env_9.error = e_8; + env_9.hasError = true; + } + finally { + const result_8 = __disposeResources(env_9); + if (result_8) + await result_8; + } + } + while (true) { + const env_10 = { stack: [], error: void 0, hasError: false }; + try { + const d28 = __addDisposableResource(env_10, { async [Symbol.asyncDispose]() { } }, true); + break; + } + catch (e_9) { + env_10.error = e_9; + env_10.hasError = true; + } + finally { + const result_9 = __disposeResources(env_10); + if (result_9) + await result_9; + } + } + do { + const env_11 = { stack: [], error: void 0, hasError: false }; + try { + const d29 = __addDisposableResource(env_11, { async [Symbol.asyncDispose]() { } }, true); + break; + } + catch (e_10) { + env_11.error = e_10; + env_11.hasError = true; + } + finally { + const result_10 = __disposeResources(env_11); + if (result_10) + await result_10; + } + } while (true); + for (;;) { + const env_12 = { stack: [], error: void 0, hasError: false }; + try { + const d30 = __addDisposableResource(env_12, { async [Symbol.asyncDispose]() { } }, true); + break; + } + catch (e_11) { + env_12.error = e_11; + env_12.hasError = true; + } + finally { + const result_11 = __disposeResources(env_12); + if (result_11) + await result_11; + } + } + for (const x in {}) { + const env_13 = { stack: [], error: void 0, hasError: false }; + try { + const d31 = __addDisposableResource(env_13, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_12) { + env_13.error = e_12; + env_13.hasError = true; + } + finally { + const result_12 = __disposeResources(env_13); + if (result_12) + await result_12; + } + } + for (const x of []) { + const env_14 = { stack: [], error: void 0, hasError: false }; + try { + const d32 = __addDisposableResource(env_14, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_13) { + env_14.error = e_13; + env_14.hasError = true; + } + finally { + const result_13 = __disposeResources(env_14); + if (result_13) + await result_13; + } + } +} +catch (e_14) { + env_2.error = e_14; + env_2.hasError = true; +} +finally { + const result_14 = __disposeResources(env_2); + if (result_14) + await result_14; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2022).js new file mode 100644 index 0000000000000..2cd219cdd2473 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2022).js @@ -0,0 +1,467 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.1.ts] //// + +//// [awaitUsingDeclarations.1.ts] +await using d1 = { async [Symbol.asyncDispose]() {} }; + +async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; +} + +async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; +} + +const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; +}; + +class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } +} + +{ + await using d19 = { async [Symbol.asyncDispose]() {} }; +} + +switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + break; +} + +if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + break; + } + +try { + await using d23 = { async [Symbol.asyncDispose]() {} }; +} +catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; +} +finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; +} + +if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; +} +else { + await using d27 = { async [Symbol.asyncDispose]() {} }; +} + +while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + break; +} + +do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + break; +} +while (true); + +for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + break; +} + +for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; +} + +for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.1.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +async function af() { + const env_15 = { stack: [], error: void 0, hasError: false }; + try { + const d3 = __addDisposableResource(env_15, { async [Symbol.asyncDispose]() { } }, true); + await null; + } + catch (e_15) { + env_15.error = e_15; + env_15.hasError = true; + } + finally { + const result_15 = __disposeResources(env_15); + if (result_15) + await result_15; + } +} +async function* ag() { + const env_16 = { stack: [], error: void 0, hasError: false }; + try { + const d5 = __addDisposableResource(env_16, { async [Symbol.asyncDispose]() { } }, true); + yield; + await null; + } + catch (e_16) { + env_16.error = e_16; + env_16.hasError = true; + } + finally { + const result_16 = __disposeResources(env_16); + if (result_16) + await result_16; + } +} +var d1, a, C1, env_1; +const env_2 = { stack: [], error: void 0, hasError: false }; +try { + d1 = __addDisposableResource(env_2, { async [Symbol.asyncDispose]() { } }, true); + a = async () => { + const env_17 = { stack: [], error: void 0, hasError: false }; + try { + const d6 = __addDisposableResource(env_17, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_17) { + env_17.error = e_17; + env_17.hasError = true; + } + finally { + const result_17 = __disposeResources(env_17); + if (result_17) + await result_17; + } + }; + C1 = class C1 { + a = async () => { + const env_18 = { stack: [], error: void 0, hasError: false }; + try { + const d7 = __addDisposableResource(env_18, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_18) { + env_18.error = e_18; + env_18.hasError = true; + } + finally { + const result_18 = __disposeResources(env_18); + if (result_18) + await result_18; + } + }; + async am() { + const env_19 = { stack: [], error: void 0, hasError: false }; + try { + const d13 = __addDisposableResource(env_19, { async [Symbol.asyncDispose]() { } }, true); + await null; + } + catch (e_19) { + env_19.error = e_19; + env_19.hasError = true; + } + finally { + const result_19 = __disposeResources(env_19); + if (result_19) + await result_19; + } + } + async *ag() { + const env_20 = { stack: [], error: void 0, hasError: false }; + try { + const d15 = __addDisposableResource(env_20, { async [Symbol.asyncDispose]() { } }, true); + yield; + await null; + } + catch (e_20) { + env_20.error = e_20; + env_20.hasError = true; + } + finally { + const result_20 = __disposeResources(env_20); + if (result_20) + await result_20; + } + } + }; + { + const env_3 = { stack: [], error: void 0, hasError: false }; + try { + const d19 = __addDisposableResource(env_3, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_1) { + env_3.error = e_1; + env_3.hasError = true; + } + finally { + const result_1 = __disposeResources(env_3); + if (result_1) + await result_1; + } + } + env_1 = { stack: [], error: void 0, hasError: false }; + try { + switch (Math.random()) { + case 0: + const d20 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + break; + case 1: + const d21 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + break; + } + } + catch (e_2) { + env_1.error = e_2; + env_1.hasError = true; + } + finally { + const result_2 = __disposeResources(env_1); + if (result_2) + await result_2; + } + if (true) { + const env_4 = { stack: [], error: void 0, hasError: false }; + try { + switch (0) { + case 0: + const d22 = __addDisposableResource(env_4, { async [Symbol.asyncDispose]() { } }, true); + break; + } + } + catch (e_3) { + env_4.error = e_3; + env_4.hasError = true; + } + finally { + const result_3 = __disposeResources(env_4); + if (result_3) + await result_3; + } + } + try { + const env_5 = { stack: [], error: void 0, hasError: false }; + try { + const d23 = __addDisposableResource(env_5, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_4) { + env_5.error = e_4; + env_5.hasError = true; + } + finally { + const result_4 = __disposeResources(env_5); + if (result_4) + await result_4; + } + } + catch { + const env_6 = { stack: [], error: void 0, hasError: false }; + try { + const d24 = __addDisposableResource(env_6, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_5) { + env_6.error = e_5; + env_6.hasError = true; + } + finally { + const result_5 = __disposeResources(env_6); + if (result_5) + await result_5; + } + } + finally { + const env_7 = { stack: [], error: void 0, hasError: false }; + try { + const d25 = __addDisposableResource(env_7, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_6) { + env_7.error = e_6; + env_7.hasError = true; + } + finally { + const result_6 = __disposeResources(env_7); + if (result_6) + await result_6; + } + } + if (true) { + const env_8 = { stack: [], error: void 0, hasError: false }; + try { + const d26 = __addDisposableResource(env_8, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_7) { + env_8.error = e_7; + env_8.hasError = true; + } + finally { + const result_7 = __disposeResources(env_8); + if (result_7) + await result_7; + } + } + else { + const env_9 = { stack: [], error: void 0, hasError: false }; + try { + const d27 = __addDisposableResource(env_9, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_8) { + env_9.error = e_8; + env_9.hasError = true; + } + finally { + const result_8 = __disposeResources(env_9); + if (result_8) + await result_8; + } + } + while (true) { + const env_10 = { stack: [], error: void 0, hasError: false }; + try { + const d28 = __addDisposableResource(env_10, { async [Symbol.asyncDispose]() { } }, true); + break; + } + catch (e_9) { + env_10.error = e_9; + env_10.hasError = true; + } + finally { + const result_9 = __disposeResources(env_10); + if (result_9) + await result_9; + } + } + do { + const env_11 = { stack: [], error: void 0, hasError: false }; + try { + const d29 = __addDisposableResource(env_11, { async [Symbol.asyncDispose]() { } }, true); + break; + } + catch (e_10) { + env_11.error = e_10; + env_11.hasError = true; + } + finally { + const result_10 = __disposeResources(env_11); + if (result_10) + await result_10; + } + } while (true); + for (;;) { + const env_12 = { stack: [], error: void 0, hasError: false }; + try { + const d30 = __addDisposableResource(env_12, { async [Symbol.asyncDispose]() { } }, true); + break; + } + catch (e_11) { + env_12.error = e_11; + env_12.hasError = true; + } + finally { + const result_11 = __disposeResources(env_12); + if (result_11) + await result_11; + } + } + for (const x in {}) { + const env_13 = { stack: [], error: void 0, hasError: false }; + try { + const d31 = __addDisposableResource(env_13, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_12) { + env_13.error = e_12; + env_13.hasError = true; + } + finally { + const result_12 = __disposeResources(env_13); + if (result_12) + await result_12; + } + } + for (const x of []) { + const env_14 = { stack: [], error: void 0, hasError: false }; + try { + const d32 = __addDisposableResource(env_14, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_13) { + env_14.error = e_13; + env_14.hasError = true; + } + finally { + const result_13 = __disposeResources(env_14); + if (result_13) + await result_13; + } + } +} +catch (e_14) { + env_2.error = e_14; + env_2.hasError = true; +} +finally { + const result_14 = __disposeResources(env_2); + if (result_14) + await result_14; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt new file mode 100644 index 0000000000000..52470b2456f61 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).errors.txt @@ -0,0 +1,145 @@ +awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(45,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(52,13): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(57,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(60,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(63,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(67,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(70,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(74,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(79,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(85,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(90,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. +awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + +==== awaitUsingDeclarations.1.ts (15 errors) ==== + await using d1 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } + + const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; + }; + + class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } + } + + { + await using d19 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + try { + await using d23 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + else { + await using d27 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + while (true); + + for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + break; + } + + for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js new file mode 100644 index 0000000000000..296356438e964 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js @@ -0,0 +1,711 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.1.ts] //// + +//// [awaitUsingDeclarations.1.ts] +await using d1 = { async [Symbol.asyncDispose]() {} }; + +async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; +} + +async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; +} + +const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; +}; + +class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } +} + +{ + await using d19 = { async [Symbol.asyncDispose]() {} }; +} + +switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + break; +} + +if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + break; + } + +try { + await using d23 = { async [Symbol.asyncDispose]() {} }; +} +catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; +} +finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; +} + +if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; +} +else { + await using d27 = { async [Symbol.asyncDispose]() {} }; +} + +while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + break; +} + +do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + break; +} +while (true); + +for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + break; +} + +for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; +} + +for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.1.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; +function af() { + return __awaiter(this, void 0, void 0, function () { + var env_15, d3, e_15, result_15; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + env_15 = { stack: [], error: void 0, hasError: false }; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 7]); + d3 = __addDisposableResource(env_15, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + return [4 /*yield*/, null]; + case 2: + _b.sent(); + return [3 /*break*/, 7]; + case 3: + e_15 = _b.sent(); + env_15.error = e_15; + env_15.hasError = true; + return [3 /*break*/, 7]; + case 4: + result_15 = __disposeResources(env_15); + if (!result_15) return [3 /*break*/, 6]; + return [4 /*yield*/, result_15]; + case 5: + _b.sent(); + _b.label = 6; + case 6: return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); +} +function ag() { + return __asyncGenerator(this, arguments, function ag_1() { + var env_16, d5, e_16, result_16; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + env_16 = { stack: [], error: void 0, hasError: false }; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 9]); + d5 = __addDisposableResource(env_16, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + return [4 /*yield*/, __await(void 0)]; + case 2: return [4 /*yield*/, _b.sent()]; + case 3: + _b.sent(); + return [4 /*yield*/, __await(null)]; + case 4: + _b.sent(); + return [3 /*break*/, 9]; + case 5: + e_16 = _b.sent(); + env_16.error = e_16; + env_16.hasError = true; + return [3 /*break*/, 9]; + case 6: + result_16 = __disposeResources(env_16); + if (!result_16) return [3 /*break*/, 8]; + return [4 /*yield*/, __await(result_16)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: return [7 /*endfinally*/]; + case 9: return [2 /*return*/]; + } + }); + }); +} +var d1, a, C1, env_1; +var env_2 = { stack: [], error: void 0, hasError: false }; +try { + d1 = __addDisposableResource(env_2, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + a = function () { return __awaiter(void 0, void 0, void 0, function () { + var env_17, d6, e_17, result_17; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + env_17 = { stack: [], error: void 0, hasError: false }; + _b.label = 1; + case 1: + _b.trys.push([1, 2, 3, 6]); + d6 = __addDisposableResource(env_17, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + return [3 /*break*/, 6]; + case 2: + e_17 = _b.sent(); + env_17.error = e_17; + env_17.hasError = true; + return [3 /*break*/, 6]; + case 3: + result_17 = __disposeResources(env_17); + if (!result_17) return [3 /*break*/, 5]; + return [4 /*yield*/, result_17]; + case 4: + _b.sent(); + _b.label = 5; + case 5: return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); }; + C1 = /** @class */ (function () { + function C1() { + var _this = this; + this.a = function () { return __awaiter(_this, void 0, void 0, function () { + var env_18, d7, e_18, result_18; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + env_18 = { stack: [], error: void 0, hasError: false }; + _b.label = 1; + case 1: + _b.trys.push([1, 2, 3, 6]); + d7 = __addDisposableResource(env_18, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + return [3 /*break*/, 6]; + case 2: + e_18 = _b.sent(); + env_18.error = e_18; + env_18.hasError = true; + return [3 /*break*/, 6]; + case 3: + result_18 = __disposeResources(env_18); + if (!result_18) return [3 /*break*/, 5]; + return [4 /*yield*/, result_18]; + case 4: + _b.sent(); + _b.label = 5; + case 5: return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); }; + } + C1.prototype.am = function () { + return __awaiter(this, void 0, void 0, function () { + var env_19, d13, e_19, result_19; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + env_19 = { stack: [], error: void 0, hasError: false }; + _b.label = 1; + case 1: + _b.trys.push([1, 3, 4, 7]); + d13 = __addDisposableResource(env_19, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + return [4 /*yield*/, null]; + case 2: + _b.sent(); + return [3 /*break*/, 7]; + case 3: + e_19 = _b.sent(); + env_19.error = e_19; + env_19.hasError = true; + return [3 /*break*/, 7]; + case 4: + result_19 = __disposeResources(env_19); + if (!result_19) return [3 /*break*/, 6]; + return [4 /*yield*/, result_19]; + case 5: + _b.sent(); + _b.label = 6; + case 6: return [7 /*endfinally*/]; + case 7: return [2 /*return*/]; + } + }); + }); + }; + C1.prototype.ag = function () { + return __asyncGenerator(this, arguments, function ag_2() { + var env_20, d15, e_20, result_20; + var _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + env_20 = { stack: [], error: void 0, hasError: false }; + _b.label = 1; + case 1: + _b.trys.push([1, 5, 6, 9]); + d15 = __addDisposableResource(env_20, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true); + return [4 /*yield*/, __await(void 0)]; + case 2: return [4 /*yield*/, _b.sent()]; + case 3: + _b.sent(); + return [4 /*yield*/, __await(null)]; + case 4: + _b.sent(); + return [3 /*break*/, 9]; + case 5: + e_20 = _b.sent(); + env_20.error = e_20; + env_20.hasError = true; + return [3 /*break*/, 9]; + case 6: + result_20 = __disposeResources(env_20); + if (!result_20) return [3 /*break*/, 8]; + return [4 /*yield*/, __await(result_20)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: return [7 /*endfinally*/]; + case 9: return [2 /*return*/]; + } + }); + }); + }; + return C1; + }()); + { + var env_3 = { stack: [], error: void 0, hasError: false }; + try { + var d19 = __addDisposableResource(env_3, (_b = {}, _b[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _b), true); + } + catch (e_1) { + env_3.error = e_1; + env_3.hasError = true; + } + finally { + var result_1 = __disposeResources(env_3); + if (result_1) + await result_1; + } + } + env_1 = { stack: [], error: void 0, hasError: false }; + try { + switch (Math.random()) { + case 0: + var d20 = __addDisposableResource(env_1, (_c = {}, _c[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _c), true); + break; + case 1: + var d21 = __addDisposableResource(env_1, (_d = {}, _d[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _d), true); + break; + } + } + catch (e_2) { + env_1.error = e_2; + env_1.hasError = true; + } + finally { + var result_2 = __disposeResources(env_1); + if (result_2) + await result_2; + } + if (true) { + var env_4 = { stack: [], error: void 0, hasError: false }; + try { + switch (0) { + case 0: + var d22 = __addDisposableResource(env_4, (_e = {}, _e[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _e), true); + break; + } + } + catch (e_3) { + env_4.error = e_3; + env_4.hasError = true; + } + finally { + var result_3 = __disposeResources(env_4); + if (result_3) + await result_3; + } + } + try { + var env_5 = { stack: [], error: void 0, hasError: false }; + try { + var d23 = __addDisposableResource(env_5, (_f = {}, _f[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _f), true); + } + catch (e_4) { + env_5.error = e_4; + env_5.hasError = true; + } + finally { + var result_4 = __disposeResources(env_5); + if (result_4) + await result_4; + } + } + catch (_r) { + var env_6 = { stack: [], error: void 0, hasError: false }; + try { + var d24 = __addDisposableResource(env_6, (_g = {}, _g[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _g), true); + } + catch (e_5) { + env_6.error = e_5; + env_6.hasError = true; + } + finally { + var result_5 = __disposeResources(env_6); + if (result_5) + await result_5; + } + } + finally { + var env_7 = { stack: [], error: void 0, hasError: false }; + try { + var d25 = __addDisposableResource(env_7, (_h = {}, _h[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _h), true); + } + catch (e_6) { + env_7.error = e_6; + env_7.hasError = true; + } + finally { + var result_6 = __disposeResources(env_7); + if (result_6) + await result_6; + } + } + if (true) { + var env_8 = { stack: [], error: void 0, hasError: false }; + try { + var d26 = __addDisposableResource(env_8, (_j = {}, _j[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _j), true); + } + catch (e_7) { + env_8.error = e_7; + env_8.hasError = true; + } + finally { + var result_7 = __disposeResources(env_8); + if (result_7) + await result_7; + } + } + else { + var env_9 = { stack: [], error: void 0, hasError: false }; + try { + var d27 = __addDisposableResource(env_9, (_k = {}, _k[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _k), true); + } + catch (e_8) { + env_9.error = e_8; + env_9.hasError = true; + } + finally { + var result_8 = __disposeResources(env_9); + if (result_8) + await result_8; + } + } + while (true) { + var env_10 = { stack: [], error: void 0, hasError: false }; + try { + var d28 = __addDisposableResource(env_10, (_l = {}, _l[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _l), true); + break; + } + catch (e_9) { + env_10.error = e_9; + env_10.hasError = true; + } + finally { + var result_9 = __disposeResources(env_10); + if (result_9) + await result_9; + } + } + do { + var env_11 = { stack: [], error: void 0, hasError: false }; + try { + var d29 = __addDisposableResource(env_11, (_m = {}, _m[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _m), true); + break; + } + catch (e_10) { + env_11.error = e_10; + env_11.hasError = true; + } + finally { + var result_10 = __disposeResources(env_11); + if (result_10) + await result_10; + } + } while (true); + for (;;) { + var env_12 = { stack: [], error: void 0, hasError: false }; + try { + var d30 = __addDisposableResource(env_12, (_o = {}, _o[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _o), true); + break; + } + catch (e_11) { + env_12.error = e_11; + env_12.hasError = true; + } + finally { + var result_11 = __disposeResources(env_12); + if (result_11) + await result_11; + } + } + for (var x in {}) { + var env_13 = { stack: [], error: void 0, hasError: false }; + try { + var d31 = __addDisposableResource(env_13, (_p = {}, _p[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _p), true); + } + catch (e_12) { + env_13.error = e_12; + env_13.hasError = true; + } + finally { + var result_12 = __disposeResources(env_13); + if (result_12) + await result_12; + } + } + for (var _i = 0, _s = []; _i < _s.length; _i++) { + var x = _s[_i]; + var env_14 = { stack: [], error: void 0, hasError: false }; + try { + var d32 = __addDisposableResource(env_14, (_q = {}, _q[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _q), true); + } + catch (e_13) { + env_14.error = e_13; + env_14.hasError = true; + } + finally { + var result_13 = __disposeResources(env_14); + if (result_13) + await result_13; + } + } +} +catch (e_14) { + env_2.error = e_14; + env_2.hasError = true; +} +finally { + var result_14 = __disposeResources(env_2); + if (result_14) + await result_14; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=esnext).js new file mode 100644 index 0000000000000..66107e393d6f8 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=esnext).js @@ -0,0 +1,180 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.1.ts] //// + +//// [awaitUsingDeclarations.1.ts] +await using d1 = { async [Symbol.asyncDispose]() {} }; + +async function af() { + await using d3 = { async [Symbol.asyncDispose]() {} }; + await null; +} + +async function * ag() { + await using d5 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; +} + +const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() {} }; +}; + +class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() {} }; + }; + + async am() { + await using d13 = { async [Symbol.asyncDispose]() {} }; + await null; + } + + async * ag() { + await using d15 = { async [Symbol.asyncDispose]() {} }; + yield; + await null; + } +} + +{ + await using d19 = { async [Symbol.asyncDispose]() {} }; +} + +switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() {} }; + break; + + case 1: + await using d21 = { async [Symbol.asyncDispose]() {} }; + break; +} + +if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() {} }; + break; + } + +try { + await using d23 = { async [Symbol.asyncDispose]() {} }; +} +catch { + await using d24 = { async [Symbol.asyncDispose]() {} }; +} +finally { + await using d25 = { async [Symbol.asyncDispose]() {} }; +} + +if (true) { + await using d26 = { async [Symbol.asyncDispose]() {} }; +} +else { + await using d27 = { async [Symbol.asyncDispose]() {} }; +} + +while (true) { + await using d28 = { async [Symbol.asyncDispose]() {} }; + break; +} + +do { + await using d29 = { async [Symbol.asyncDispose]() {} }; + break; +} +while (true); + +for (;;) { + await using d30 = { async [Symbol.asyncDispose]() {} }; + break; +} + +for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() {} }; +} + +for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.1.js] +await using d1 = { async [Symbol.asyncDispose]() { } }; +async function af() { + await using d3 = { async [Symbol.asyncDispose]() { } }; + await null; +} +async function* ag() { + await using d5 = { async [Symbol.asyncDispose]() { } }; + yield; + await null; +} +const a = async () => { + await using d6 = { async [Symbol.asyncDispose]() { } }; +}; +class C1 { + a = async () => { + await using d7 = { async [Symbol.asyncDispose]() { } }; + }; + async am() { + await using d13 = { async [Symbol.asyncDispose]() { } }; + await null; + } + async *ag() { + await using d15 = { async [Symbol.asyncDispose]() { } }; + yield; + await null; + } +} +{ + await using d19 = { async [Symbol.asyncDispose]() { } }; +} +switch (Math.random()) { + case 0: + await using d20 = { async [Symbol.asyncDispose]() { } }; + break; + case 1: + await using d21 = { async [Symbol.asyncDispose]() { } }; + break; +} +if (true) + switch (0) { + case 0: + await using d22 = { async [Symbol.asyncDispose]() { } }; + break; + } +try { + await using d23 = { async [Symbol.asyncDispose]() { } }; +} +catch { + await using d24 = { async [Symbol.asyncDispose]() { } }; +} +finally { + await using d25 = { async [Symbol.asyncDispose]() { } }; +} +if (true) { + await using d26 = { async [Symbol.asyncDispose]() { } }; +} +else { + await using d27 = { async [Symbol.asyncDispose]() { } }; +} +while (true) { + await using d28 = { async [Symbol.asyncDispose]() { } }; + break; +} +do { + await using d29 = { async [Symbol.asyncDispose]() { } }; + break; +} while (true); +for (;;) { + await using d30 = { async [Symbol.asyncDispose]() { } }; + break; +} +for (const x in {}) { + await using d31 = { async [Symbol.asyncDispose]() { } }; +} +for (const x of []) { + await using d32 = { async [Symbol.asyncDispose]() { } }; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.10.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.10.errors.txt new file mode 100644 index 0000000000000..897a5a03a1181 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.10.errors.txt @@ -0,0 +1,12 @@ +awaitUsingDeclarations.10.ts(5,12): error TS1156: 'await using' declarations can only be declared inside a block. + + +==== awaitUsingDeclarations.10.ts (1 errors) ==== + export {}; + + declare var x: any; + async function f() { + if (x) await using a = null; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1156: 'await using' declarations can only be declared inside a block. + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.10.js b/tests/baselines/reference/awaitUsingDeclarations.10.js new file mode 100644 index 0000000000000..6ddcffab885ae --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.10.js @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.10.ts] //// + +//// [awaitUsingDeclarations.10.ts] +export {}; + +declare var x: any; +async function f() { + if (x) await using a = null; +} + +//// [awaitUsingDeclarations.10.js] +async function f() { + if (x) + await using a = null; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.11.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.11.errors.txt new file mode 100644 index 0000000000000..51de3ea074156 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.11.errors.txt @@ -0,0 +1,12 @@ +awaitUsingDeclarations.11.ts(1,1): error TS1495: 'export' modifier cannot appear on an 'await using' declaration. +awaitUsingDeclarations.11.ts(2,1): error TS1495: 'declare' modifier cannot appear on an 'await using' declaration. + + +==== awaitUsingDeclarations.11.ts (2 errors) ==== + export await using x = null; + ~~~~~~ +!!! error TS1495: 'export' modifier cannot appear on an 'await using' declaration. + declare await using y: null; + ~~~~~~~ +!!! error TS1495: 'declare' modifier cannot appear on an 'await using' declaration. + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.11.js b/tests/baselines/reference/awaitUsingDeclarations.11.js new file mode 100644 index 0000000000000..76087f4f9f26e --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.11.js @@ -0,0 +1,9 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.11.ts] //// + +//// [awaitUsingDeclarations.11.ts] +export await using x = null; +declare await using y: null; + + +//// [awaitUsingDeclarations.11.js] +export await using x = null; diff --git a/tests/baselines/reference/awaitUsingDeclarations.12.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.12.errors.txt new file mode 100644 index 0000000000000..623aecbad99b6 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.12.errors.txt @@ -0,0 +1,9 @@ +awaitUsingDeclarations.12.ts(2,21): error TS2851: The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + + +==== awaitUsingDeclarations.12.ts (1 errors) ==== + async function f() { + await using x = {}; + ~~ +!!! error TS2851: The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.12.js b/tests/baselines/reference/awaitUsingDeclarations.12.js new file mode 100644 index 0000000000000..32de989383c3c --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.12.js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.12.ts] //// + +//// [awaitUsingDeclarations.12.ts] +async function f() { + await using x = {}; +} + +//// [awaitUsingDeclarations.12.js] +async function f() { + await using x = {}; +} diff --git a/tests/baselines/reference/awaitUsingDeclarations.13.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.13.errors.txt new file mode 100644 index 0000000000000..abe9121a84204 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.13.errors.txt @@ -0,0 +1,15 @@ +awaitUsingDeclarations.13.ts(1,1): error TS2853: 'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. +awaitUsingDeclarations.13.ts(4,5): error TS2852: 'await using' statements are only allowed within async functions and at the top levels of modules. + + +==== awaitUsingDeclarations.13.ts (2 errors) ==== + await using x = null; + ~~~~~ +!!! error TS2853: 'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. + + function f() { + await using x = null; + ~~~~~ +!!! error TS2852: 'await using' statements are only allowed within async functions and at the top levels of modules. +!!! related TS1356 awaitUsingDeclarations.13.ts:3:10: Did you mean to mark this function as 'async'? + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.13.js b/tests/baselines/reference/awaitUsingDeclarations.13.js new file mode 100644 index 0000000000000..f8a1d89e9f2ee --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.13.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.13.ts] //// + +//// [awaitUsingDeclarations.13.ts] +await using x = null; + +function f() { + await using x = null; +} + +//// [awaitUsingDeclarations.13.js] +await using x = null; +function f() { + await using x = null; +} diff --git a/tests/baselines/reference/awaitUsingDeclarations.14.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.14.errors.txt new file mode 100644 index 0000000000000..bffdf3a179e43 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.14.errors.txt @@ -0,0 +1,18 @@ +awaitUsingDeclarations.14.ts(3,9): error TS18054: 'await using' statements cannot be used inside a class static block. +awaitUsingDeclarations.14.ts(5,13): error TS18054: 'await using' statements cannot be used inside a class static block. + + +==== awaitUsingDeclarations.14.ts (2 errors) ==== + class C { + static { + await using x = null; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS18054: 'await using' statements cannot be used inside a class static block. + { + await using y = null; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS18054: 'await using' statements cannot be used inside a class static block. + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.14.js b/tests/baselines/reference/awaitUsingDeclarations.14.js new file mode 100644 index 0000000000000..223c913e74869 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.14.js @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.14.ts] //// + +//// [awaitUsingDeclarations.14.ts] +class C { + static { + await using x = null; + { + await using y = null; + } + } +} + + +//// [awaitUsingDeclarations.14.js] +class C { + static { + await using x = null; + { + await using y = null; + } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarations.15.js b/tests/baselines/reference/awaitUsingDeclarations.15.js new file mode 100644 index 0000000000000..af20512995cc6 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.15.js @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.15.ts] //// + +//// [awaitUsingDeclarations.15.ts] +async function f() { + await using _ = { async [Symbol.asyncDispose]() {} }; +} + +//// [awaitUsingDeclarations.15.js] +async function f() { + await using _ = { async [Symbol.asyncDispose]() { } }; +} diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es2015).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2015).errors.txt new file mode 100644 index 0000000000000..b6d2d529f8b04 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2015).errors.txt @@ -0,0 +1,12 @@ +awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + +==== awaitUsingDeclarations.2.ts (1 errors) ==== + { + await using d1 = { async [Symbol.asyncDispose]() {} }, + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + d2 = { async [Symbol.asyncDispose]() {} }; + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2015).js new file mode 100644 index 0000000000000..ac277978edc2b --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2015).js @@ -0,0 +1,85 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts] //// + +//// [awaitUsingDeclarations.2.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.2.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +{ + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true), d2 = __addDisposableResource(env_1, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2017).js new file mode 100644 index 0000000000000..33a940df87258 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2017).js @@ -0,0 +1,72 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts] //// + +//// [awaitUsingDeclarations.2.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.2.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +{ + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true), d2 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2022).js new file mode 100644 index 0000000000000..33a940df87258 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es2022).js @@ -0,0 +1,72 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts] //// + +//// [awaitUsingDeclarations.2.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.2.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +{ + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true), d2 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt new file mode 100644 index 0000000000000..b6d2d529f8b04 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).errors.txt @@ -0,0 +1,12 @@ +awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + +==== awaitUsingDeclarations.2.ts (1 errors) ==== + { + await using d1 = { async [Symbol.asyncDispose]() {} }, + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + d2 = { async [Symbol.asyncDispose]() {} }; + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js new file mode 100644 index 0000000000000..1bff5fb36570f --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js @@ -0,0 +1,117 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts] //// + +//// [awaitUsingDeclarations.2.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.2.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var _a, _b; +{ + var env_1 = { stack: [], error: void 0, hasError: false }; + try { + var d1 = __addDisposableResource(env_1, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true), d2 = __addDisposableResource(env_1, (_b = {}, _b[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _b), true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + var result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarations.2(target=esnext).js new file mode 100644 index 0000000000000..081606105eef8 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=esnext).js @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.2.ts] //// + +//// [awaitUsingDeclarations.2.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.2.js] +{ + await using d1 = { async [Symbol.asyncDispose]() { } }, d2 = { async [Symbol.asyncDispose]() { } }; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es2015).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2015).errors.txt new file mode 100644 index 0000000000000..955e5041b7826 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2015).errors.txt @@ -0,0 +1,14 @@ +awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + +==== awaitUsingDeclarations.3.ts (1 errors) ==== + { + await using d1 = { async [Symbol.asyncDispose]() {} }, + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2015).js new file mode 100644 index 0000000000000..e21dc4c3a4789 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2015).js @@ -0,0 +1,85 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.3.ts] //// + +//// [awaitUsingDeclarations.3.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.3.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +{ + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true), d2 = __addDisposableResource(env_1, null, true), d3 = __addDisposableResource(env_1, undefined, true), d4 = __addDisposableResource(env_1, { [Symbol.dispose]() { } }, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2017).js new file mode 100644 index 0000000000000..b070220f5d8ae --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2017).js @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.3.ts] //// + +//// [awaitUsingDeclarations.3.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.3.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +{ + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true), d2 = __addDisposableResource(env_1, null, true), d3 = __addDisposableResource(env_1, undefined, true), d4 = __addDisposableResource(env_1, { [Symbol.dispose]() { } }, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2022).js new file mode 100644 index 0000000000000..b070220f5d8ae --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es2022).js @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.3.ts] //// + +//// [awaitUsingDeclarations.3.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.3.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +{ + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true), d2 = __addDisposableResource(env_1, null, true), d3 = __addDisposableResource(env_1, undefined, true), d4 = __addDisposableResource(env_1, { [Symbol.dispose]() { } }, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt new file mode 100644 index 0000000000000..955e5041b7826 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).errors.txt @@ -0,0 +1,14 @@ +awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + + +==== awaitUsingDeclarations.3.ts (1 errors) ==== + { + await using d1 = { async [Symbol.asyncDispose]() {} }, + ~~~~~ +!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher. + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js new file mode 100644 index 0000000000000..b198385d9c93c --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js @@ -0,0 +1,115 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.3.ts] //// + +//// [awaitUsingDeclarations.3.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.3.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var _a, _b; +{ + var env_1 = { stack: [], error: void 0, hasError: false }; + try { + var d1 = __addDisposableResource(env_1, (_a = {}, _a[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _a), true), d2 = __addDisposableResource(env_1, null, true), d3 = __addDisposableResource(env_1, undefined, true), d4 = __addDisposableResource(env_1, (_b = {}, _b[Symbol.dispose] = function () { }, _b), true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + var result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarations.3(target=esnext).js new file mode 100644 index 0000000000000..fa149c69753d2 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=esnext).js @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.3.ts] //// + +//// [awaitUsingDeclarations.3.ts] +{ + await using d1 = { async [Symbol.asyncDispose]() {} }, + d2 = null, + d3 = undefined, + d4 = { [Symbol.dispose]() {} }; +} + +export {}; + +//// [awaitUsingDeclarations.3.js] +{ + await using d1 = { async [Symbol.asyncDispose]() { } }, d2 = null, d3 = undefined, d4 = { [Symbol.dispose]() { } }; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.4.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.4.errors.txt new file mode 100644 index 0000000000000..7fb6182713739 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.4.errors.txt @@ -0,0 +1,17 @@ +awaitUsingDeclarations.4.ts(2,11): error TS2304: Cannot find name 'using'. +awaitUsingDeclarations.4.ts(2,18): error TS2304: Cannot find name 'a'. +awaitUsingDeclarations.4.ts(2,21): error TS1005: ';' expected. + + +==== awaitUsingDeclarations.4.ts (3 errors) ==== + { + await using [a] = null; + ~~~~~ +!!! error TS2304: Cannot find name 'using'. + ~ +!!! error TS2304: Cannot find name 'a'. + ~ +!!! error TS1005: ';' expected. + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.4.js b/tests/baselines/reference/awaitUsingDeclarations.4.js new file mode 100644 index 0000000000000..887cb629eba02 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.4.js @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.4.ts] //// + +//// [awaitUsingDeclarations.4.ts] +{ + await using [a] = null; +} + +export {}; + +//// [awaitUsingDeclarations.4.js] +{ + await using[a]; + null; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.5.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.5.errors.txt new file mode 100644 index 0000000000000..370cc3a6c7a45 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.5.errors.txt @@ -0,0 +1,16 @@ +awaitUsingDeclarations.5.ts(3,17): error TS1492: 'await using' declarations may not have binding patterns. +awaitUsingDeclarations.5.ts(3,17): error TS2488: Type 'null' must have a '[Symbol.iterator]()' method that returns an iterator. + + +==== awaitUsingDeclarations.5.ts (2 errors) ==== + { + await using a = null, + [b] = null, + ~~~ +!!! error TS1492: 'await using' declarations may not have binding patterns. + ~~~ +!!! error TS2488: Type 'null' must have a '[Symbol.iterator]()' method that returns an iterator. + c = null; + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.5.js b/tests/baselines/reference/awaitUsingDeclarations.5.js new file mode 100644 index 0000000000000..8a436907cdc89 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.5.js @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.5.ts] //// + +//// [awaitUsingDeclarations.5.ts] +{ + await using a = null, + [b] = null, + c = null; +} + +export {}; + +//// [awaitUsingDeclarations.5.js] +{ + await using a = null, [b] = null, c = null; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.6.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.6.errors.txt new file mode 100644 index 0000000000000..7f471afa221e7 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.6.errors.txt @@ -0,0 +1,15 @@ +awaitUsingDeclarations.6.ts(2,17): error TS1492: 'await using' declarations may not have binding patterns. +awaitUsingDeclarations.6.ts(2,18): error TS2339: Property 'a' does not exist on type 'null'. + + +==== awaitUsingDeclarations.6.ts (2 errors) ==== + { + await using {a} = null; + ~~~ +!!! error TS1492: 'await using' declarations may not have binding patterns. + ~ +!!! error TS2339: Property 'a' does not exist on type 'null'. + } + + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.6.js b/tests/baselines/reference/awaitUsingDeclarations.6.js new file mode 100644 index 0000000000000..56ee8073b9dbd --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.6.js @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.6.ts] //// + +//// [awaitUsingDeclarations.6.ts] +{ + await using {a} = null; +} + + +export {}; + +//// [awaitUsingDeclarations.6.js] +{ + await using { a } = null; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.7.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.7.errors.txt new file mode 100644 index 0000000000000..c3061741e4f39 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.7.errors.txt @@ -0,0 +1,17 @@ +awaitUsingDeclarations.7.ts(2,5): error TS2853: 'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. +awaitUsingDeclarations.7.ts(3,17): error TS1492: 'await using' declarations may not have binding patterns. +awaitUsingDeclarations.7.ts(3,18): error TS2339: Property 'b' does not exist on type 'null'. + + +==== awaitUsingDeclarations.7.ts (3 errors) ==== + { + await using a = null, + ~~~~~ +!!! error TS2853: 'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. + {b} = null, + ~~~ +!!! error TS1492: 'await using' declarations may not have binding patterns. + ~ +!!! error TS2339: Property 'b' does not exist on type 'null'. + c = null; + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.7.js b/tests/baselines/reference/awaitUsingDeclarations.7.js new file mode 100644 index 0000000000000..c409558f39f9e --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.7.js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.7.ts] //// + +//// [awaitUsingDeclarations.7.ts] +{ + await using a = null, + {b} = null, + c = null; +} + +//// [awaitUsingDeclarations.7.js] +{ + await using a = null, { b } = null, c = null; +} diff --git a/tests/baselines/reference/awaitUsingDeclarations.8.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.8.errors.txt new file mode 100644 index 0000000000000..f564b8c3004c1 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.8.errors.txt @@ -0,0 +1,11 @@ +awaitUsingDeclarations.8.ts(2,17): error TS1155: 'await using' declarations must be initialized. + + +==== awaitUsingDeclarations.8.ts (1 errors) ==== + { + await using a; + ~ +!!! error TS1155: 'await using' declarations must be initialized. + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.8.js b/tests/baselines/reference/awaitUsingDeclarations.8.js new file mode 100644 index 0000000000000..5e42d69e70c57 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.8.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.8.ts] //// + +//// [awaitUsingDeclarations.8.ts] +{ + await using a; +} + +export {}; + +//// [awaitUsingDeclarations.8.js] +{ + await using a; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarations.9.errors.txt b/tests/baselines/reference/awaitUsingDeclarations.9.errors.txt new file mode 100644 index 0000000000000..51b6a5e7d194a --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.9.errors.txt @@ -0,0 +1,12 @@ +error TS2318: Cannot find global type 'AsyncDisposable'. +error TS2318: Cannot find global type 'Disposable'. + + +!!! error TS2318: Cannot find global type 'AsyncDisposable'. +!!! error TS2318: Cannot find global type 'Disposable'. +==== awaitUsingDeclarations.9.ts (0 errors) ==== + { + await using a = null; + } + + export {}; \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarations.9.js b/tests/baselines/reference/awaitUsingDeclarations.9.js new file mode 100644 index 0000000000000..291c6d1330279 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarations.9.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarations.9.ts] //// + +//// [awaitUsingDeclarations.9.ts] +{ + await using a = null; +} + +export {}; + +//// [awaitUsingDeclarations.9.js] +{ + await using a = null; +} +export {}; diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js new file mode 100644 index 0000000000000..bca9ebbbe23b7 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2015).js @@ -0,0 +1,89 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInFor.ts] //// + +//// [awaitUsingDeclarationsInFor.ts] +async function main() { + for (await using d1 = { [Symbol.dispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }, + d3 = null, + d4 = undefined;;) { + } +} + +//// [awaitUsingDeclarationsInFor.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +function main() { + return __awaiter(this, void 0, void 0, function* () { + { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { [Symbol.dispose]() { } }, true), d2 = __addDisposableResource(env_1, { [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, true), d3 = __addDisposableResource(env_1, null, true), d4 = __addDisposableResource(env_1, undefined, true); + for (;;) { + } + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + yield result_1; + } + } + }); +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js new file mode 100644 index 0000000000000..b8190e4b8203c --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2017).js @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInFor.ts] //// + +//// [awaitUsingDeclarationsInFor.ts] +async function main() { + for (await using d1 = { [Symbol.dispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }, + d3 = null, + d4 = undefined;;) { + } +} + +//// [awaitUsingDeclarationsInFor.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +async function main() { + { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { [Symbol.dispose]() { } }, true), d2 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true), d3 = __addDisposableResource(env_1, null, true), d4 = __addDisposableResource(env_1, undefined, true); + for (;;) { + } + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js new file mode 100644 index 0000000000000..b8190e4b8203c --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es2022).js @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInFor.ts] //// + +//// [awaitUsingDeclarationsInFor.ts] +async function main() { + for (await using d1 = { [Symbol.dispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }, + d3 = null, + d4 = undefined;;) { + } +} + +//// [awaitUsingDeclarationsInFor.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +async function main() { + { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, { [Symbol.dispose]() { } }, true), d2 = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true), d3 = __addDisposableResource(env_1, null, true), d4 = __addDisposableResource(env_1, undefined, true); + for (;;) { + } + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js new file mode 100644 index 0000000000000..61b4144ebb5a8 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js @@ -0,0 +1,130 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInFor.ts] //// + +//// [awaitUsingDeclarationsInFor.ts] +async function main() { + for (await using d1 = { [Symbol.dispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }, + d3 = null, + d4 = undefined;;) { + } +} + +//// [awaitUsingDeclarationsInFor.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +function main() { + return __awaiter(this, void 0, void 0, function () { + var env_1, d1, d2, d3, d4, e_1, result_1; + var _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + env_1 = { stack: [], error: void 0, hasError: false }; + _c.label = 1; + case 1: + _c.trys.push([1, 2, 3, 6]); + d1 = __addDisposableResource(env_1, (_a = {}, _a[Symbol.dispose] = function () { }, _a), true), d2 = __addDisposableResource(env_1, (_b = {}, _b[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _b), true), d3 = __addDisposableResource(env_1, null, true), d4 = __addDisposableResource(env_1, undefined, true); + for (;;) { + } + return [3 /*break*/, 6]; + case 2: + e_1 = _c.sent(); + env_1.error = e_1; + env_1.hasError = true; + return [3 /*break*/, 6]; + case 3: + result_1 = __disposeResources(env_1); + if (!result_1) return [3 /*break*/, 5]; + return [4 /*yield*/, result_1]; + case 4: + _c.sent(); + _c.label = 5; + case 5: return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js new file mode 100644 index 0000000000000..d7e96493ed8a3 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=esnext).js @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInFor.ts] //// + +//// [awaitUsingDeclarationsInFor.ts] +async function main() { + for (await using d1 = { [Symbol.dispose]() {} }, + d2 = { async [Symbol.asyncDispose]() {} }, + d3 = null, + d4 = undefined;;) { + } +} + +//// [awaitUsingDeclarationsInFor.js] +async function main() { + for (await using d1 = { [Symbol.dispose]() { } }, d2 = { async [Symbol.asyncDispose]() { } }, d3 = null, d4 = undefined;;) { + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js new file mode 100644 index 0000000000000..d9256e21a2bcd --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2015).js @@ -0,0 +1,104 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForAwaitOf.ts] //// + +//// [awaitUsingDeclarationsInForAwaitOf.ts] +async function main() { + for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + +//// [awaitUsingDeclarationsInForAwaitOf.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +function main() { + var _a, e_1, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + try { + for (var _d = true, _e = __asyncValues([{ [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, { [Symbol.dispose]() { } }, null, undefined]), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const d1_1 = _c; + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, d1_1, true); + } + catch (e_2) { + env_1.error = e_2; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + yield result_1; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); + } + finally { if (e_1) throw e_1.error; } + } + }); +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js new file mode 100644 index 0000000000000..905825b1b3081 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2017).js @@ -0,0 +1,91 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForAwaitOf.ts] //// + +//// [awaitUsingDeclarationsInForAwaitOf.ts] +async function main() { + for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + +//// [awaitUsingDeclarationsInForAwaitOf.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +async function main() { + var _a, e_1, _b, _c; + try { + for (var _d = true, _e = __asyncValues([{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const d1_1 = _c; + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, d1_1, true); + } + catch (e_2) { + env_1.error = e_2; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (!_d && !_a && (_b = _e.return)) await _b.call(_e); + } + finally { if (e_1) throw e_1.error; } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js new file mode 100644 index 0000000000000..e440639100fe7 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es2022).js @@ -0,0 +1,71 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForAwaitOf.ts] //// + +//// [awaitUsingDeclarationsInForAwaitOf.ts] +async function main() { + for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + +//// [awaitUsingDeclarationsInForAwaitOf.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +async function main() { + for await (const d1_1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, d1_1, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js new file mode 100644 index 0000000000000..9f6518c1e034b --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js @@ -0,0 +1,162 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForAwaitOf.ts] //// + +//// [awaitUsingDeclarationsInForAwaitOf.ts] +async function main() { + for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + +//// [awaitUsingDeclarationsInForAwaitOf.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +function main() { + var _a, e_1, _b, _c; + return __awaiter(this, void 0, void 0, function () { + var _d, _e, _f, d1_1, env_1, d1, e_2, result_1, e_1_1; + var _g, _h; + return __generator(this, function (_j) { + switch (_j.label) { + case 0: + _j.trys.push([0, 10, 11, 16]); + _d = true, _e = __asyncValues([(_g = {}, _g[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _g), (_h = {}, _h[Symbol.dispose] = function () { }, _h), null, undefined]); + _j.label = 1; + case 1: return [4 /*yield*/, _e.next()]; + case 2: + if (!(_f = _j.sent(), _a = _f.done, !_a)) return [3 /*break*/, 9]; + _c = _f.value; + _d = false; + d1_1 = _c; + env_1 = { stack: [], error: void 0, hasError: false }; + _j.label = 3; + case 3: + _j.trys.push([3, 4, 5, 8]); + d1 = __addDisposableResource(env_1, d1_1, true); + return [3 /*break*/, 8]; + case 4: + e_2 = _j.sent(); + env_1.error = e_2; + env_1.hasError = true; + return [3 /*break*/, 8]; + case 5: + result_1 = __disposeResources(env_1); + if (!result_1) return [3 /*break*/, 7]; + return [4 /*yield*/, result_1]; + case 6: + _j.sent(); + _j.label = 7; + case 7: return [7 /*endfinally*/]; + case 8: + _d = true; + return [3 /*break*/, 1]; + case 9: return [3 /*break*/, 16]; + case 10: + e_1_1 = _j.sent(); + e_1 = { error: e_1_1 }; + return [3 /*break*/, 16]; + case 11: + _j.trys.push([11, , 14, 15]); + if (!(!_d && !_a && (_b = _e.return))) return [3 /*break*/, 13]; + return [4 /*yield*/, _b.call(_e)]; + case 12: + _j.sent(); + _j.label = 13; + case 13: return [3 /*break*/, 15]; + case 14: + if (e_1) throw e_1.error; + return [7 /*endfinally*/]; + case 15: return [7 /*endfinally*/]; + case 16: return [2 /*return*/]; + } + }); + }); +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js new file mode 100644 index 0000000000000..454e995313d07 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=esnext).js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForAwaitOf.ts] //// + +//// [awaitUsingDeclarationsInForAwaitOf.ts] +async function main() { + for await (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + +//// [awaitUsingDeclarationsInForAwaitOf.js] +async function main() { + for await (await using d1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForIn.errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForIn.errors.txt new file mode 100644 index 0000000000000..50f340e645a6b --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForIn.errors.txt @@ -0,0 +1,11 @@ +awaitUsingDeclarationsInForIn.ts(2,10): error TS1494: The left-hand side of a 'for...in' statement cannot be an 'await using' declaration. + + +==== awaitUsingDeclarationsInForIn.ts (1 errors) ==== + async function main() { + for (await using x in {}) { + ~~~~~~~~~~~~~ +!!! error TS1494: The left-hand side of a 'for...in' statement cannot be an 'await using' declaration. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForIn.js b/tests/baselines/reference/awaitUsingDeclarationsInForIn.js new file mode 100644 index 0000000000000..60b8eecfdcdac --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForIn.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForIn.ts] //// + +//// [awaitUsingDeclarationsInForIn.ts] +async function main() { + for (await using x in {}) { + } +} + + +//// [awaitUsingDeclarationsInForIn.js] +async function main() { + for (await using x in {}) { + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js new file mode 100644 index 0000000000000..f3e50b24326ec --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2015).js @@ -0,0 +1,85 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.1.ts] //// + +//// [awaitUsingDeclarationsInForOf.1.ts] +async function main() { + for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + + +//// [awaitUsingDeclarationsInForOf.1.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +function main() { + return __awaiter(this, void 0, void 0, function* () { + for (const d1_1 of [{ [Symbol.asyncDispose]() { + return __awaiter(this, void 0, void 0, function* () { }); + } }, { [Symbol.dispose]() { } }, null, undefined]) { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, d1_1, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + yield result_1; + } + } + }); +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js new file mode 100644 index 0000000000000..80b040f2096c9 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2017).js @@ -0,0 +1,72 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.1.ts] //// + +//// [awaitUsingDeclarationsInForOf.1.ts] +async function main() { + for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + + +//// [awaitUsingDeclarationsInForOf.1.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +async function main() { + for (const d1_1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, d1_1, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js new file mode 100644 index 0000000000000..80b040f2096c9 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es2022).js @@ -0,0 +1,72 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.1.ts] //// + +//// [awaitUsingDeclarationsInForOf.1.ts] +async function main() { + for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + + +//// [awaitUsingDeclarationsInForOf.1.js] +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +async function main() { + for (const d1_1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const d1 = __addDisposableResource(env_1, d1_1, true); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js new file mode 100644 index 0000000000000..84357ba7b9be1 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js @@ -0,0 +1,134 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.1.ts] //// + +//// [awaitUsingDeclarationsInForOf.1.ts] +async function main() { + for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + + +//// [awaitUsingDeclarationsInForOf.1.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); +function main() { + return __awaiter(this, void 0, void 0, function () { + var _i, _a, d1_1, env_1, d1, e_1, result_1; + var _b, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _i = 0, _a = [(_b = {}, _b[Symbol.asyncDispose] = function () { + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { + return [2 /*return*/]; + }); }); + }, _b), (_c = {}, _c[Symbol.dispose] = function () { }, _c), null, undefined]; + _d.label = 1; + case 1: + if (!(_i < _a.length)) return [3 /*break*/, 8]; + d1_1 = _a[_i]; + env_1 = { stack: [], error: void 0, hasError: false }; + _d.label = 2; + case 2: + _d.trys.push([2, 3, 4, 7]); + d1 = __addDisposableResource(env_1, d1_1, true); + return [3 /*break*/, 7]; + case 3: + e_1 = _d.sent(); + env_1.error = e_1; + env_1.hasError = true; + return [3 /*break*/, 7]; + case 4: + result_1 = __disposeResources(env_1); + if (!result_1) return [3 /*break*/, 6]; + return [4 /*yield*/, result_1]; + case 5: + _d.sent(); + _d.label = 6; + case 6: return [7 /*endfinally*/]; + case 7: + _i++; + return [3 /*break*/, 1]; + case 8: return [2 /*return*/]; + } + }); + }); +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js new file mode 100644 index 0000000000000..28c6d451bf2ae --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=esnext).js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.1.ts] //// + +//// [awaitUsingDeclarationsInForOf.1.ts] +async function main() { + for (await using d1 of [{ async [Symbol.asyncDispose]() {} }, { [Symbol.dispose]() {} }, null, undefined]) { + } +} + + +//// [awaitUsingDeclarationsInForOf.1.js] +async function main() { + for (await using d1 of [{ async [Symbol.asyncDispose]() { } }, { [Symbol.dispose]() { } }, null, undefined]) { + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.errors.txt new file mode 100644 index 0000000000000..2fd47176982f0 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.errors.txt @@ -0,0 +1,20 @@ +awaitUsingDeclarationsInForOf.2.ts(2,10): error TS2487: The left-hand side of a 'for...of' statement must be a variable or a property access. +awaitUsingDeclarationsInForOf.2.ts(2,16): error TS2304: Cannot find name 'using'. +awaitUsingDeclarationsInForOf.2.ts(2,25): error TS2304: Cannot find name 'of'. +awaitUsingDeclarationsInForOf.2.ts(2,29): error TS1011: An element access expression should take an argument. + + +==== awaitUsingDeclarationsInForOf.2.ts (4 errors) ==== + async function main() { + for (await using of of []) { + ~~~~~~~~~~~ +!!! error TS2487: The left-hand side of a 'for...of' statement must be a variable or a property access. + ~~~~~ +!!! error TS2304: Cannot find name 'using'. + ~~ +!!! error TS2304: Cannot find name 'of'. + +!!! error TS1011: An element access expression should take an argument. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js new file mode 100644 index 0000000000000..19d7b7d575da2 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.2.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.2.ts] //// + +//// [awaitUsingDeclarationsInForOf.2.ts] +async function main() { + for (await using of of []) { + } +} + + +//// [awaitUsingDeclarationsInForOf.2.js] +async function main() { + for (await using of of[]) { + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.errors.txt b/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.errors.txt new file mode 100644 index 0000000000000..1379bfb713d0d --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.errors.txt @@ -0,0 +1,11 @@ +awaitUsingDeclarationsInForOf.3.ts(2,22): error TS1492: 'await using' declarations may not have binding patterns. + + +==== awaitUsingDeclarationsInForOf.3.ts (1 errors) ==== + async function main() { + for (await using {} of []) { + ~~ +!!! error TS1492: 'await using' declarations may not have binding patterns. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js new file mode 100644 index 0000000000000..0b25f1b2cb39e --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.3.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsInForOf.3.ts] //// + +//// [awaitUsingDeclarationsInForOf.3.ts] +async function main() { + for (await using {} of []) { + } +} + + +//// [awaitUsingDeclarationsInForOf.3.js] +async function main() { + for (await using {} of []) { + } +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=esnext).js b/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=esnext).js new file mode 100644 index 0000000000000..6d86c80c6c9ad --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=esnext).js @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsTopLevelOfModule.1.ts] //// + +//// [awaitUsingDeclarationsTopLevelOfModule.1.ts] +export const x = 1; +export { y }; + +await using z = { async [Symbol.asyncDispose]() {} }; + +const y = 2; + +export const w = 3; + +export default 4; + +console.log(w, x, y, z); + + +//// [awaitUsingDeclarationsTopLevelOfModule.1.js] +export const x = 1; +export { y }; +export { _default as default }; +var z, y, _default; +export let w; +const env_1 = { stack: [], error: void 0, hasError: false }; +try { + z = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + y = 2; + w = 3; + _default = 4; + console.log(w, x, y, z); +} +catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; +} +finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; +} diff --git a/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=system).js b/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=system).js new file mode 100644 index 0000000000000..f321eda5ed28c --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=system).js @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsTopLevelOfModule.1.ts] //// + +//// [awaitUsingDeclarationsTopLevelOfModule.1.ts] +export const x = 1; +export { y }; + +await using z = { async [Symbol.asyncDispose]() {} }; + +const y = 2; + +export const w = 3; + +export default 4; + +console.log(w, x, y, z); + + +//// [awaitUsingDeclarationsTopLevelOfModule.1.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var x, z, y, _default, w, env_1; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: async function () { + exports_1("x", x = 1); + env_1 = { stack: [], error: void 0, hasError: false }; + try { + z = __addDisposableResource(env_1, { async [Symbol.asyncDispose]() { } }, true); + exports_1("y", y = 2); + exports_1("w", w = 3); + exports_1("default", _default = 4); + console.log(w, x, y, z); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + const result_1 = __disposeResources(env_1); + if (result_1) + await result_1; + } + } + }; +}); diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithImportHelpers.errors.txt b/tests/baselines/reference/awaitUsingDeclarationsWithImportHelpers.errors.txt new file mode 100644 index 0000000000000..42a94f7728dcc --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithImportHelpers.errors.txt @@ -0,0 +1,11 @@ +awaitUsingDeclarationsWithImportHelpers.ts(4,5): error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found. + + +==== awaitUsingDeclarationsWithImportHelpers.ts (1 errors) ==== + export {}; + + async function f() { + await using a = null; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found. + } \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithImportHelpers.js b/tests/baselines/reference/awaitUsingDeclarationsWithImportHelpers.js new file mode 100644 index 0000000000000..fcc0a66c43116 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithImportHelpers.js @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithImportHelpers.ts] //// + +//// [awaitUsingDeclarationsWithImportHelpers.ts] +export {}; + +async function f() { + await using a = null; +} + +//// [awaitUsingDeclarationsWithImportHelpers.js] +async function f() { + await using a = null; +} +export {}; diff --git a/tests/baselines/reference/await_incorrectThisType.errors.txt b/tests/baselines/reference/await_incorrectThisType.errors.txt index eea59d55e6a23..62ae6c75aadcd 100644 --- a/tests/baselines/reference/await_incorrectThisType.errors.txt +++ b/tests/baselines/reference/await_incorrectThisType.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es2017/await_incorrectThisType.ts(40,1): error TS2684: The 'this' context of type 'EPromise' is not assignable to method's 'this' of type 'EPromise'. +await_incorrectThisType.ts(40,1): error TS2684: The 'this' context of type 'EPromise' is not assignable to method's 'this' of type 'EPromise'. Type 'number' is not assignable to type 'never'. -tests/cases/conformance/async/es2017/await_incorrectThisType.ts(43,5): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. +await_incorrectThisType.ts(43,5): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member. The 'this' context of type 'EPromise' is not assignable to method's 'this' of type 'EPromise'. -==== tests/cases/conformance/async/es2017/await_incorrectThisType.ts (2 errors) ==== +==== await_incorrectThisType.ts (2 errors) ==== // https://github.com/microsoft/TypeScript/issues/47711 type Either = Left | Right; type Left = { tag: 'Left', e: E }; diff --git a/tests/baselines/reference/await_unaryExpression_es2017.js b/tests/baselines/reference/await_unaryExpression_es2017.js index f05bda125fc11..320795458eaaa 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017.js +++ b/tests/baselines/reference/await_unaryExpression_es2017.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017.ts] //// + //// [await_unaryExpression_es2017.ts] async function bar() { !await 42; // OK diff --git a/tests/baselines/reference/await_unaryExpression_es2017.symbols b/tests/baselines/reference/await_unaryExpression_es2017.symbols index 51955ac03b7e2..8c9b3bafa6542 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017.symbols +++ b/tests/baselines/reference/await_unaryExpression_es2017.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017.ts] //// + +=== await_unaryExpression_es2017.ts === async function bar() { >bar : Symbol(bar, Decl(await_unaryExpression_es2017.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es2017.types b/tests/baselines/reference/await_unaryExpression_es2017.types index 5402038cc7bf3..a7de8e8b62239 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017.types +++ b/tests/baselines/reference/await_unaryExpression_es2017.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017.ts] //// + +=== await_unaryExpression_es2017.ts === async function bar() { >bar : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt b/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt index 304487da24e8a..75fedee4d72db 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(10,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es2017_1.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es2017_1.ts(10,12): error TS2703: The operand of a 'delete' operator must be a property reference. -==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts (2 errors) ==== +==== await_unaryExpression_es2017_1.ts (2 errors) ==== async function bar() { !await 42; // OK } diff --git a/tests/baselines/reference/await_unaryExpression_es2017_1.js b/tests/baselines/reference/await_unaryExpression_es2017_1.js index 49a3b34b172e4..5d6dc238e16af 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_1.js +++ b/tests/baselines/reference/await_unaryExpression_es2017_1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts] //// + //// [await_unaryExpression_es2017_1.ts] async function bar() { !await 42; // OK diff --git a/tests/baselines/reference/await_unaryExpression_es2017_1.symbols b/tests/baselines/reference/await_unaryExpression_es2017_1.symbols index 75c3ad6dddda9..5c005050aa583 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_1.symbols +++ b/tests/baselines/reference/await_unaryExpression_es2017_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts] //// + +=== await_unaryExpression_es2017_1.ts === async function bar() { >bar : Symbol(bar, Decl(await_unaryExpression_es2017_1.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es2017_1.types b/tests/baselines/reference/await_unaryExpression_es2017_1.types index 40b84797069a8..478039f5354b6 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_1.types +++ b/tests/baselines/reference/await_unaryExpression_es2017_1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts] //// + +=== await_unaryExpression_es2017_1.ts === async function bar() { >bar : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt b/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt index b42186810fb1b..759a110ce535c 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(2,12): error TS2703: The operand of a 'delete' operator must be a property reference. -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es2017_2.ts(2,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es2017_2.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. -==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts (2 errors) ==== +==== await_unaryExpression_es2017_2.ts (2 errors) ==== async function bar1() { delete await 42; ~~~~~~~~ diff --git a/tests/baselines/reference/await_unaryExpression_es2017_2.js b/tests/baselines/reference/await_unaryExpression_es2017_2.js index 8978e460e7df9..2b3aaf1d3af8c 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_2.js +++ b/tests/baselines/reference/await_unaryExpression_es2017_2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts] //// + //// [await_unaryExpression_es2017_2.ts] async function bar1() { delete await 42; diff --git a/tests/baselines/reference/await_unaryExpression_es2017_2.symbols b/tests/baselines/reference/await_unaryExpression_es2017_2.symbols index 93ff1c1d94f0c..66b4d04e0d579 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_2.symbols +++ b/tests/baselines/reference/await_unaryExpression_es2017_2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts] //// + +=== await_unaryExpression_es2017_2.ts === async function bar1() { >bar1 : Symbol(bar1, Decl(await_unaryExpression_es2017_2.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es2017_2.types b/tests/baselines/reference/await_unaryExpression_es2017_2.types index 2c46832d574bb..ed6bc70e261fc 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_2.types +++ b/tests/baselines/reference/await_unaryExpression_es2017_2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts] //// + +=== await_unaryExpression_es2017_2.ts === async function bar1() { >bar1 : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es2017_3.errors.txt b/tests/baselines/reference/await_unaryExpression_es2017_3.errors.txt index da533765a0788..c01809029be6a 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_3.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es2017_3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts(2,7): error TS1109: Expression expected. -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts(6,7): error TS1109: Expression expected. +await_unaryExpression_es2017_3.ts(2,7): error TS1109: Expression expected. +await_unaryExpression_es2017_3.ts(6,7): error TS1109: Expression expected. -==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts (2 errors) ==== +==== await_unaryExpression_es2017_3.ts (2 errors) ==== async function bar1() { ++await 42; // Error ~~~~~ diff --git a/tests/baselines/reference/await_unaryExpression_es2017_3.js b/tests/baselines/reference/await_unaryExpression_es2017_3.js index b2a1593a9d0bd..f7e57dbda8159 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_3.js +++ b/tests/baselines/reference/await_unaryExpression_es2017_3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts] //// + //// [await_unaryExpression_es2017_3.ts] async function bar1() { ++await 42; // Error diff --git a/tests/baselines/reference/await_unaryExpression_es2017_3.symbols b/tests/baselines/reference/await_unaryExpression_es2017_3.symbols index 05a4cb4c8eaad..4aeeb540fd987 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_3.symbols +++ b/tests/baselines/reference/await_unaryExpression_es2017_3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts] //// + +=== await_unaryExpression_es2017_3.ts === async function bar1() { >bar1 : Symbol(bar1, Decl(await_unaryExpression_es2017_3.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es2017_3.types b/tests/baselines/reference/await_unaryExpression_es2017_3.types index b60ea42b2a0d5..e7507961e9a7c 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_3.types +++ b/tests/baselines/reference/await_unaryExpression_es2017_3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts === +//// [tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts] //// + +=== await_unaryExpression_es2017_3.ts === async function bar1() { >bar1 : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es6.js b/tests/baselines/reference/await_unaryExpression_es6.js index 69eef17361396..7c202885a4187 100644 --- a/tests/baselines/reference/await_unaryExpression_es6.js +++ b/tests/baselines/reference/await_unaryExpression_es6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6.ts] //// + //// [await_unaryExpression_es6.ts] async function bar() { !await 42; // OK diff --git a/tests/baselines/reference/await_unaryExpression_es6.symbols b/tests/baselines/reference/await_unaryExpression_es6.symbols index 57dfbbc67e37c..1fef1a5d98517 100644 --- a/tests/baselines/reference/await_unaryExpression_es6.symbols +++ b/tests/baselines/reference/await_unaryExpression_es6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6.ts] //// + +=== await_unaryExpression_es6.ts === async function bar() { >bar : Symbol(bar, Decl(await_unaryExpression_es6.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es6.types b/tests/baselines/reference/await_unaryExpression_es6.types index 15d9193660334..62d58f404394b 100644 --- a/tests/baselines/reference/await_unaryExpression_es6.types +++ b/tests/baselines/reference/await_unaryExpression_es6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6.ts] //// + +=== await_unaryExpression_es6.ts === async function bar() { >bar : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt b/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt index 9bbf96f64d7fa..8cc0cdf650abb 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. -tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(10,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es6_1.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es6_1.ts(10,12): error TS2703: The operand of a 'delete' operator must be a property reference. -==== tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts (2 errors) ==== +==== await_unaryExpression_es6_1.ts (2 errors) ==== async function bar() { !await 42; // OK } diff --git a/tests/baselines/reference/await_unaryExpression_es6_1.js b/tests/baselines/reference/await_unaryExpression_es6_1.js index 3a205f05ea9b1..7c10722aa1990 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_1.js +++ b/tests/baselines/reference/await_unaryExpression_es6_1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts] //// + //// [await_unaryExpression_es6_1.ts] async function bar() { !await 42; // OK diff --git a/tests/baselines/reference/await_unaryExpression_es6_1.symbols b/tests/baselines/reference/await_unaryExpression_es6_1.symbols index a4c33ee825c7d..c270eb88cabb0 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_1.symbols +++ b/tests/baselines/reference/await_unaryExpression_es6_1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts] //// + +=== await_unaryExpression_es6_1.ts === async function bar() { >bar : Symbol(bar, Decl(await_unaryExpression_es6_1.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es6_1.types b/tests/baselines/reference/await_unaryExpression_es6_1.types index a5887f4e472b3..b07a8f61227df 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_1.types +++ b/tests/baselines/reference/await_unaryExpression_es6_1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts] //// + +=== await_unaryExpression_es6_1.ts === async function bar() { >bar : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt b/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt index 7960c2f5a62b8..c9e294c02cef1 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(2,12): error TS2703: The operand of a 'delete' operator must be a property reference. -tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es6_2.ts(2,12): error TS2703: The operand of a 'delete' operator must be a property reference. +await_unaryExpression_es6_2.ts(6,12): error TS2703: The operand of a 'delete' operator must be a property reference. -==== tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts (2 errors) ==== +==== await_unaryExpression_es6_2.ts (2 errors) ==== async function bar1() { delete await 42; ~~~~~~~~ diff --git a/tests/baselines/reference/await_unaryExpression_es6_2.js b/tests/baselines/reference/await_unaryExpression_es6_2.js index ee59f5825ae43..983fae901d339 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_2.js +++ b/tests/baselines/reference/await_unaryExpression_es6_2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts] //// + //// [await_unaryExpression_es6_2.ts] async function bar1() { delete await 42; diff --git a/tests/baselines/reference/await_unaryExpression_es6_2.symbols b/tests/baselines/reference/await_unaryExpression_es6_2.symbols index 54a48e43ea63f..a79c87294370a 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_2.symbols +++ b/tests/baselines/reference/await_unaryExpression_es6_2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts] //// + +=== await_unaryExpression_es6_2.ts === async function bar1() { >bar1 : Symbol(bar1, Decl(await_unaryExpression_es6_2.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es6_2.types b/tests/baselines/reference/await_unaryExpression_es6_2.types index 15dc820bbbbec..87dd7c45e83ac 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_2.types +++ b/tests/baselines/reference/await_unaryExpression_es6_2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts] //// + +=== await_unaryExpression_es6_2.ts === async function bar1() { >bar1 : () => Promise diff --git a/tests/baselines/reference/await_unaryExpression_es6_3.errors.txt b/tests/baselines/reference/await_unaryExpression_es6_3.errors.txt index 373e6739461b4..f4afa780cdcdc 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_3.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es6_3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts(2,7): error TS1109: Expression expected. -tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts(6,7): error TS1109: Expression expected. +await_unaryExpression_es6_3.ts(2,7): error TS1109: Expression expected. +await_unaryExpression_es6_3.ts(6,7): error TS1109: Expression expected. -==== tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts (2 errors) ==== +==== await_unaryExpression_es6_3.ts (2 errors) ==== async function bar1() { ++await 42; // Error ~~~~~ diff --git a/tests/baselines/reference/await_unaryExpression_es6_3.js b/tests/baselines/reference/await_unaryExpression_es6_3.js index 42643caa262ae..d0c5145775e44 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_3.js +++ b/tests/baselines/reference/await_unaryExpression_es6_3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts] //// + //// [await_unaryExpression_es6_3.ts] async function bar1() { ++await 42; // Error diff --git a/tests/baselines/reference/await_unaryExpression_es6_3.symbols b/tests/baselines/reference/await_unaryExpression_es6_3.symbols index 4d61bfde3c136..a47c164beb4e8 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_3.symbols +++ b/tests/baselines/reference/await_unaryExpression_es6_3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts] //// + +=== await_unaryExpression_es6_3.ts === async function bar1() { >bar1 : Symbol(bar1, Decl(await_unaryExpression_es6_3.ts, 0, 0)) diff --git a/tests/baselines/reference/await_unaryExpression_es6_3.types b/tests/baselines/reference/await_unaryExpression_es6_3.types index db18c88955375..335574765e5d2 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_3.types +++ b/tests/baselines/reference/await_unaryExpression_es6_3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts === +//// [tests/cases/conformance/async/es6/await_unaryExpression_es6_3.ts] //// + +=== await_unaryExpression_es6_3.ts === async function bar1() { >bar1 : () => Promise diff --git a/tests/baselines/reference/awaitedType.errors.txt b/tests/baselines/reference/awaitedType.errors.txt index 9bee5c5dbd1c9..ccbcba1b24342 100644 --- a/tests/baselines/reference/awaitedType.errors.txt +++ b/tests/baselines/reference/awaitedType.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/awaitedType.ts(22,12): error TS2589: Type instantiation is excessively deep and possibly infinite. -tests/cases/compiler/awaitedType.ts(26,12): error TS2589: Type instantiation is excessively deep and possibly infinite. -tests/cases/compiler/awaitedType.ts(236,28): error TS2493: Tuple type '[number]' of length '1' has no element at index '1'. +awaitedType.ts(22,12): error TS2589: Type instantiation is excessively deep and possibly infinite. +awaitedType.ts(26,12): error TS2589: Type instantiation is excessively deep and possibly infinite. +awaitedType.ts(236,28): error TS2493: Tuple type '[number]' of length '1' has no element at index '1'. -==== tests/cases/compiler/awaitedType.ts (3 errors) ==== +==== awaitedType.ts (3 errors) ==== type T1 = Awaited; type T2 = Awaited>; type T3 = Awaited>; diff --git a/tests/baselines/reference/awaitedType.js b/tests/baselines/reference/awaitedType.js index b1c68031b7933..d0d5da213a9d6 100644 --- a/tests/baselines/reference/awaitedType.js +++ b/tests/baselines/reference/awaitedType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitedType.ts] //// + //// [awaitedType.ts] type T1 = Awaited; type T2 = Awaited>; diff --git a/tests/baselines/reference/awaitedType.symbols b/tests/baselines/reference/awaitedType.symbols index 0c99833b129a6..5dc6ae820d652 100644 --- a/tests/baselines/reference/awaitedType.symbols +++ b/tests/baselines/reference/awaitedType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedType.ts === +//// [tests/cases/compiler/awaitedType.ts] //// + +=== awaitedType.ts === type T1 = Awaited; >T1 : Symbol(T1, Decl(awaitedType.ts, 0, 0)) >Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/awaitedType.types b/tests/baselines/reference/awaitedType.types index cc96d847d8459..35dfcc5c39b54 100644 --- a/tests/baselines/reference/awaitedType.types +++ b/tests/baselines/reference/awaitedType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedType.ts === +//// [tests/cases/compiler/awaitedType.ts] //// + +=== awaitedType.ts === type T1 = Awaited; >T1 : number diff --git a/tests/baselines/reference/awaitedTypeCrash.js b/tests/baselines/reference/awaitedTypeCrash.js index 9cefb23cd492c..5f662c946231a 100644 --- a/tests/baselines/reference/awaitedTypeCrash.js +++ b/tests/baselines/reference/awaitedTypeCrash.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitedTypeCrash.ts] //// + //// [awaitedTypeCrash.ts] // https://github.com/microsoft/TypeScript/issues/51984 async function* f>(): AsyncGenerator { } diff --git a/tests/baselines/reference/awaitedTypeCrash.symbols b/tests/baselines/reference/awaitedTypeCrash.symbols index 024b6d90efb25..d6d8a6aa0b57c 100644 --- a/tests/baselines/reference/awaitedTypeCrash.symbols +++ b/tests/baselines/reference/awaitedTypeCrash.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedTypeCrash.ts === +//// [tests/cases/compiler/awaitedTypeCrash.ts] //// + +=== awaitedTypeCrash.ts === // https://github.com/microsoft/TypeScript/issues/51984 async function* f>(): AsyncGenerator { } >f : Symbol(f, Decl(awaitedTypeCrash.ts, 0, 0)) diff --git a/tests/baselines/reference/awaitedTypeCrash.types b/tests/baselines/reference/awaitedTypeCrash.types index 010ac8795ec7c..056fd478629f2 100644 --- a/tests/baselines/reference/awaitedTypeCrash.types +++ b/tests/baselines/reference/awaitedTypeCrash.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedTypeCrash.ts === +//// [tests/cases/compiler/awaitedTypeCrash.ts] //// + +=== awaitedTypeCrash.ts === // https://github.com/microsoft/TypeScript/issues/51984 async function* f>(): AsyncGenerator { } >f : >() => AsyncGenerator diff --git a/tests/baselines/reference/awaitedTypeJQuery.js b/tests/baselines/reference/awaitedTypeJQuery.js index 5963a2d93804c..fa1b0ac2e6268 100644 --- a/tests/baselines/reference/awaitedTypeJQuery.js +++ b/tests/baselines/reference/awaitedTypeJQuery.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitedTypeJQuery.ts] //// + //// [awaitedTypeJQuery.ts] /// diff --git a/tests/baselines/reference/awaitedTypeJQuery.symbols b/tests/baselines/reference/awaitedTypeJQuery.symbols index ca774f76bdb26..b443c6e545946 100644 --- a/tests/baselines/reference/awaitedTypeJQuery.symbols +++ b/tests/baselines/reference/awaitedTypeJQuery.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedTypeJQuery.ts === +//// [tests/cases/compiler/awaitedTypeJQuery.ts] //// + +=== awaitedTypeJQuery.ts === /// interface Thenable extends PromiseLike { } diff --git a/tests/baselines/reference/awaitedTypeJQuery.types b/tests/baselines/reference/awaitedTypeJQuery.types index 7bad7301d2a75..359cfe4d7950f 100644 --- a/tests/baselines/reference/awaitedTypeJQuery.types +++ b/tests/baselines/reference/awaitedTypeJQuery.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedTypeJQuery.ts === +//// [tests/cases/compiler/awaitedTypeJQuery.ts] //// + +=== awaitedTypeJQuery.ts === /// interface Thenable extends PromiseLike { } diff --git a/tests/baselines/reference/awaitedTypeStrictNull.errors.txt b/tests/baselines/reference/awaitedTypeStrictNull.errors.txt index 95084256ea4d9..d3a78757ccfe9 100644 --- a/tests/baselines/reference/awaitedTypeStrictNull.errors.txt +++ b/tests/baselines/reference/awaitedTypeStrictNull.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/awaitedTypeStrictNull.ts(22,12): error TS2589: Type instantiation is excessively deep and possibly infinite. -tests/cases/compiler/awaitedTypeStrictNull.ts(26,12): error TS2589: Type instantiation is excessively deep and possibly infinite. +awaitedTypeStrictNull.ts(22,12): error TS2589: Type instantiation is excessively deep and possibly infinite. +awaitedTypeStrictNull.ts(26,12): error TS2589: Type instantiation is excessively deep and possibly infinite. -==== tests/cases/compiler/awaitedTypeStrictNull.ts (2 errors) ==== +==== awaitedTypeStrictNull.ts (2 errors) ==== type T1 = Awaited; type T2 = Awaited>; type T3 = Awaited>; diff --git a/tests/baselines/reference/awaitedTypeStrictNull.js b/tests/baselines/reference/awaitedTypeStrictNull.js index cb4c7cc40ba4a..09ca8d5b64302 100644 --- a/tests/baselines/reference/awaitedTypeStrictNull.js +++ b/tests/baselines/reference/awaitedTypeStrictNull.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/awaitedTypeStrictNull.ts] //// + //// [awaitedTypeStrictNull.ts] type T1 = Awaited; type T2 = Awaited>; diff --git a/tests/baselines/reference/awaitedTypeStrictNull.symbols b/tests/baselines/reference/awaitedTypeStrictNull.symbols index fdd9bd88cc20c..a8f1d4e58b5bd 100644 --- a/tests/baselines/reference/awaitedTypeStrictNull.symbols +++ b/tests/baselines/reference/awaitedTypeStrictNull.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedTypeStrictNull.ts === +//// [tests/cases/compiler/awaitedTypeStrictNull.ts] //// + +=== awaitedTypeStrictNull.ts === type T1 = Awaited; >T1 : Symbol(T1, Decl(awaitedTypeStrictNull.ts, 0, 0)) >Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/awaitedTypeStrictNull.types b/tests/baselines/reference/awaitedTypeStrictNull.types index c44cffacf0557..885abc995fc56 100644 --- a/tests/baselines/reference/awaitedTypeStrictNull.types +++ b/tests/baselines/reference/awaitedTypeStrictNull.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/awaitedTypeStrictNull.ts === +//// [tests/cases/compiler/awaitedTypeStrictNull.ts] //// + +=== awaitedTypeStrictNull.ts === type T1 = Awaited; >T1 : number diff --git a/tests/baselines/reference/badArrayIndex.errors.txt b/tests/baselines/reference/badArrayIndex.errors.txt index 893ac8ee1aaf5..5f5a2f12aa7e8 100644 --- a/tests/baselines/reference/badArrayIndex.errors.txt +++ b/tests/baselines/reference/badArrayIndex.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/badArrayIndex.ts(1,15): error TS2693: 'number' only refers to a type, but is being used as a value here. -tests/cases/compiler/badArrayIndex.ts(1,22): error TS1011: An element access expression should take an argument. +badArrayIndex.ts(1,15): error TS2693: 'number' only refers to a type, but is being used as a value here. +badArrayIndex.ts(1,22): error TS1011: An element access expression should take an argument. -==== tests/cases/compiler/badArrayIndex.ts (2 errors) ==== +==== badArrayIndex.ts (2 errors) ==== var results = number[]; ~~~~~~ !!! error TS2693: 'number' only refers to a type, but is being used as a value here. diff --git a/tests/baselines/reference/badArrayIndex.js b/tests/baselines/reference/badArrayIndex.js index 210dd6add8e69..0f525d088e1c0 100644 --- a/tests/baselines/reference/badArrayIndex.js +++ b/tests/baselines/reference/badArrayIndex.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/badArrayIndex.ts] //// + //// [badArrayIndex.ts] var results = number[]; diff --git a/tests/baselines/reference/badArrayIndex.symbols b/tests/baselines/reference/badArrayIndex.symbols index 3ea300fca508e..f3b2f47b105a6 100644 --- a/tests/baselines/reference/badArrayIndex.symbols +++ b/tests/baselines/reference/badArrayIndex.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badArrayIndex.ts === +//// [tests/cases/compiler/badArrayIndex.ts] //// + +=== badArrayIndex.ts === var results = number[]; >results : Symbol(results, Decl(badArrayIndex.ts, 0, 3)) diff --git a/tests/baselines/reference/badArrayIndex.types b/tests/baselines/reference/badArrayIndex.types index 05a52242290b9..3bdb031386933 100644 --- a/tests/baselines/reference/badArrayIndex.types +++ b/tests/baselines/reference/badArrayIndex.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badArrayIndex.ts === +//// [tests/cases/compiler/badArrayIndex.ts] //// + +=== badArrayIndex.ts === var results = number[]; >results : any >number[] : any diff --git a/tests/baselines/reference/badArraySyntax.errors.txt b/tests/baselines/reference/badArraySyntax.errors.txt index 428d67703b034..850c3d11edaf5 100644 --- a/tests/baselines/reference/badArraySyntax.errors.txt +++ b/tests/baselines/reference/badArraySyntax.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/badArraySyntax.ts(6,16): error TS1011: An element access expression should take an argument. -tests/cases/compiler/badArraySyntax.ts(7,16): error TS1011: An element access expression should take an argument. -tests/cases/compiler/badArraySyntax.ts(8,21): error TS1011: An element access expression should take an argument. -tests/cases/compiler/badArraySyntax.ts(9,21): error TS1011: An element access expression should take an argument. -tests/cases/compiler/badArraySyntax.ts(10,30): error TS1011: An element access expression should take an argument. -tests/cases/compiler/badArraySyntax.ts(10,41): error TS1011: An element access expression should take an argument. +badArraySyntax.ts(6,16): error TS1011: An element access expression should take an argument. +badArraySyntax.ts(7,16): error TS1011: An element access expression should take an argument. +badArraySyntax.ts(8,21): error TS1011: An element access expression should take an argument. +badArraySyntax.ts(9,21): error TS1011: An element access expression should take an argument. +badArraySyntax.ts(10,30): error TS1011: An element access expression should take an argument. +badArraySyntax.ts(10,41): error TS1011: An element access expression should take an argument. -==== tests/cases/compiler/badArraySyntax.ts (6 errors) ==== +==== badArraySyntax.ts (6 errors) ==== class Z { public x = ""; } diff --git a/tests/baselines/reference/badArraySyntax.js b/tests/baselines/reference/badArraySyntax.js index d9888e7a61be0..41fac3d3d40ef 100644 --- a/tests/baselines/reference/badArraySyntax.js +++ b/tests/baselines/reference/badArraySyntax.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/badArraySyntax.ts] //// + //// [badArraySyntax.ts] class Z { public x = ""; diff --git a/tests/baselines/reference/badArraySyntax.symbols b/tests/baselines/reference/badArraySyntax.symbols index 7b8f96124b015..87c6a5ecd537f 100644 --- a/tests/baselines/reference/badArraySyntax.symbols +++ b/tests/baselines/reference/badArraySyntax.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badArraySyntax.ts === +//// [tests/cases/compiler/badArraySyntax.ts] //// + +=== badArraySyntax.ts === class Z { >Z : Symbol(Z, Decl(badArraySyntax.ts, 0, 0)) diff --git a/tests/baselines/reference/badArraySyntax.types b/tests/baselines/reference/badArraySyntax.types index 053b4af944863..af984c521c383 100644 --- a/tests/baselines/reference/badArraySyntax.types +++ b/tests/baselines/reference/badArraySyntax.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badArraySyntax.ts === +//// [tests/cases/compiler/badArraySyntax.ts] //// + +=== badArraySyntax.ts === class Z { >Z : Z diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index 63e19311e0b08..ade3bfb43c0f7 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? +badExternalModuleReference.ts(1,21): error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== +==== badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ !!! error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? diff --git a/tests/baselines/reference/badExternalModuleReference.js b/tests/baselines/reference/badExternalModuleReference.js index c2375ed9c4cff..4f5d7e4cc2d8a 100644 --- a/tests/baselines/reference/badExternalModuleReference.js +++ b/tests/baselines/reference/badExternalModuleReference.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/badExternalModuleReference.ts] //// + //// [badExternalModuleReference.ts] import a1 = require("garbage"); export declare var a: { diff --git a/tests/baselines/reference/badExternalModuleReference.symbols b/tests/baselines/reference/badExternalModuleReference.symbols index f5719eee8c313..ab6bf5844288b 100644 --- a/tests/baselines/reference/badExternalModuleReference.symbols +++ b/tests/baselines/reference/badExternalModuleReference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badExternalModuleReference.ts === +//// [tests/cases/compiler/badExternalModuleReference.ts] //// + +=== badExternalModuleReference.ts === import a1 = require("garbage"); >a1 : Symbol(a1, Decl(badExternalModuleReference.ts, 0, 0)) diff --git a/tests/baselines/reference/badExternalModuleReference.types b/tests/baselines/reference/badExternalModuleReference.types index ec979f529c06c..54e647d16dbf7 100644 --- a/tests/baselines/reference/badExternalModuleReference.types +++ b/tests/baselines/reference/badExternalModuleReference.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badExternalModuleReference.ts === +//// [tests/cases/compiler/badExternalModuleReference.ts] //// + +=== badExternalModuleReference.ts === import a1 = require("garbage"); >a1 : any diff --git a/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.js b/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.js index a089d4eb93549..483914e932d5b 100644 --- a/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.js +++ b/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts] //// + //// [badInferenceLowerPriorityThanGoodInference.ts] // Repro from #13118 diff --git a/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.symbols b/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.symbols index 6eb97aef3ba9b..6286df5ce41a2 100644 --- a/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.symbols +++ b/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts === +//// [tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts] //// + +=== badInferenceLowerPriorityThanGoodInference.ts === // Repro from #13118 interface Foo { diff --git a/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.types b/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.types index 0847f9c29d84d..33024b7aa18fb 100644 --- a/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.types +++ b/tests/baselines/reference/badInferenceLowerPriorityThanGoodInference.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts === +//// [tests/cases/compiler/badInferenceLowerPriorityThanGoodInference.ts] //// + +=== badInferenceLowerPriorityThanGoodInference.ts === // Repro from #13118 interface Foo { diff --git a/tests/baselines/reference/badOverloadError.js b/tests/baselines/reference/badOverloadError.js index fe59c4bb6b947..d57523ab7ffe7 100644 --- a/tests/baselines/reference/badOverloadError.js +++ b/tests/baselines/reference/badOverloadError.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/badOverloadError.ts] //// + //// [badOverloadError.ts] function method() { var dictionary = <{ [index: string]: string; }>{}; diff --git a/tests/baselines/reference/badOverloadError.symbols b/tests/baselines/reference/badOverloadError.symbols index 86c0a332f8ff1..8b26800d0589c 100644 --- a/tests/baselines/reference/badOverloadError.symbols +++ b/tests/baselines/reference/badOverloadError.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badOverloadError.ts === +//// [tests/cases/compiler/badOverloadError.ts] //// + +=== badOverloadError.ts === function method() { >method : Symbol(method, Decl(badOverloadError.ts, 0, 0)) diff --git a/tests/baselines/reference/badOverloadError.types b/tests/baselines/reference/badOverloadError.types index 198582af2db9e..05dc5ee7bcd08 100644 --- a/tests/baselines/reference/badOverloadError.types +++ b/tests/baselines/reference/badOverloadError.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badOverloadError.ts === +//// [tests/cases/compiler/badOverloadError.ts] //// + +=== badOverloadError.ts === function method() { >method : () => void diff --git a/tests/baselines/reference/badThisBinding.js b/tests/baselines/reference/badThisBinding.js index d4ffc6731d148..1f7dcb83bf6a9 100644 --- a/tests/baselines/reference/badThisBinding.js +++ b/tests/baselines/reference/badThisBinding.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/badThisBinding.ts] //// + //// [badThisBinding.ts] declare function foo(a:any): any; declare function bar(a:any): any; diff --git a/tests/baselines/reference/badThisBinding.symbols b/tests/baselines/reference/badThisBinding.symbols index c1ca8d1f48137..f6c8d70297994 100644 --- a/tests/baselines/reference/badThisBinding.symbols +++ b/tests/baselines/reference/badThisBinding.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badThisBinding.ts === +//// [tests/cases/compiler/badThisBinding.ts] //// + +=== badThisBinding.ts === declare function foo(a:any): any; >foo : Symbol(foo, Decl(badThisBinding.ts, 0, 0)) >a : Symbol(a, Decl(badThisBinding.ts, 0, 21)) diff --git a/tests/baselines/reference/badThisBinding.types b/tests/baselines/reference/badThisBinding.types index 201f3e7028851..0897b7721bcf3 100644 --- a/tests/baselines/reference/badThisBinding.types +++ b/tests/baselines/reference/badThisBinding.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/badThisBinding.ts === +//// [tests/cases/compiler/badThisBinding.ts] //// + +=== badThisBinding.ts === declare function foo(a:any): any; >foo : (a: any) => any >a : any diff --git a/tests/baselines/reference/bangInModuleName.symbols b/tests/baselines/reference/bangInModuleName.symbols index fa1b84ba29687..0477ca0793e0c 100644 --- a/tests/baselines/reference/bangInModuleName.symbols +++ b/tests/baselines/reference/bangInModuleName.symbols @@ -1,10 +1,12 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/bangInModuleName.ts] //// + +=== a.ts === /// import * as http from 'intern/dojo/node!http'; >http : Symbol(http, Decl(a.ts, 2, 6)) -=== tests/cases/compiler/a.d.ts === +=== a.d.ts === declare module "http" { >"http" : Symbol("http", Decl(a.d.ts, 0, 0)) } diff --git a/tests/baselines/reference/bangInModuleName.types b/tests/baselines/reference/bangInModuleName.types index b475bdd903cd5..025c852ede7fc 100644 --- a/tests/baselines/reference/bangInModuleName.types +++ b/tests/baselines/reference/bangInModuleName.types @@ -1,10 +1,12 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/bangInModuleName.ts] //// + +=== a.ts === /// import * as http from 'intern/dojo/node!http'; >http : typeof http -=== tests/cases/compiler/a.d.ts === +=== a.d.ts === declare module "http" { >"http" : typeof import("http") } diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index f57dedd45a7e7..e3da66d472f4b 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/baseCheck.ts(9,18): error TS2552: Cannot find name 'loc'. Did you mean 'Lock'? -tests/cases/compiler/baseCheck.ts(17,53): error TS2554: Expected 2 arguments, but got 1. -tests/cases/compiler/baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/compiler/baseCheck.ts(19,68): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/baseCheck.ts(22,9): error TS2304: Cannot find name 'x'. -tests/cases/compiler/baseCheck.ts(23,7): error TS2304: Cannot find name 'x'. -tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. +baseCheck.ts(9,18): error TS2552: Cannot find name 'loc'. Did you mean 'Lock'? +baseCheck.ts(17,53): error TS2554: Expected 2 arguments, but got 1. +baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +baseCheck.ts(19,68): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +baseCheck.ts(22,9): error TS2304: Cannot find name 'x'. +baseCheck.ts(23,7): error TS2304: Cannot find name 'x'. +baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. -==== tests/cases/compiler/baseCheck.ts (9 errors) ==== +==== baseCheck.ts (9 errors) ==== class C { constructor(x: number, y: number) { } } class ELoc extends C { constructor(x: number) { @@ -21,7 +21,7 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. super(0, loc); ~~~ !!! error TS2552: Cannot find name 'loc'. Did you mean 'Lock'? -!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'Lock' is declared here. +!!! related TS2728 lib.dom.d.ts:--:--: 'Lock' is declared here. } m() { @@ -32,7 +32,7 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. class D extends C { constructor(public z: number) { super(this.z) } } // too few params ~~~~~~~~~~~~~ !!! error TS2554: Expected 2 arguments, but got 1. -!!! related TS6210 tests/cases/compiler/baseCheck.ts:1:34: An argument for 'y' was not provided. +!!! related TS6210 baseCheck.ts:1:34: An argument for 'y' was not provided. ~~~~ !!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. class E extends C { constructor(public z: number) { super(0, this.z) } } diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 9071dd0f11065..5299d685971d5 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseCheck.ts] //// + //// [baseCheck.ts] class C { constructor(x: number, y: number) { } } class ELoc extends C { diff --git a/tests/baselines/reference/baseCheck.symbols b/tests/baselines/reference/baseCheck.symbols index 3fe3616009c5a..47e408d7791ba 100644 --- a/tests/baselines/reference/baseCheck.symbols +++ b/tests/baselines/reference/baseCheck.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseCheck.ts === +//// [tests/cases/compiler/baseCheck.ts] //// + +=== baseCheck.ts === class C { constructor(x: number, y: number) { } } >C : Symbol(C, Decl(baseCheck.ts, 0, 0)) >x : Symbol(x, Decl(baseCheck.ts, 0, 22)) diff --git a/tests/baselines/reference/baseCheck.types b/tests/baselines/reference/baseCheck.types index a5e3976d0ea6a..73e99b8e8848b 100644 --- a/tests/baselines/reference/baseCheck.types +++ b/tests/baselines/reference/baseCheck.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseCheck.ts === +//// [tests/cases/compiler/baseCheck.ts] //// + +=== baseCheck.ts === class C { constructor(x: number, y: number) { } } >C : C >x : number diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt b/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt index 418c39eafd056..26929c844802c 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt @@ -1,28 +1,28 @@ -tests/cases/compiler/baseClassImprovedMismatchErrors.ts(8,5): error TS2416: Property 'n' in type 'Derived' is not assignable to the same property in base type 'Base'. +baseClassImprovedMismatchErrors.ts(8,5): error TS2416: Property 'n' in type 'Derived' is not assignable to the same property in base type 'Base'. Type 'string | Derived' is not assignable to type 'string | Base'. Type 'Derived' is not assignable to type 'string | Base'. Type 'Derived' is not assignable to type 'Base'. The types returned by 'fn()' are incompatible between these types. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/baseClassImprovedMismatchErrors.ts(9,5): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. +baseClassImprovedMismatchErrors.ts(9,5): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'. Type '() => string | number' is not assignable to type '() => number'. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/baseClassImprovedMismatchErrors.ts(14,5): error TS2416: Property 'n' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. +baseClassImprovedMismatchErrors.ts(14,5): error TS2416: Property 'n' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. Type 'string | DerivedInterface' is not assignable to type 'string | Base'. Type 'DerivedInterface' is not assignable to type 'string | Base'. Type 'DerivedInterface' is not assignable to type 'Base'. The types returned by 'fn()' are incompatible between these types. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. +baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'. Type '() => string | number' is not assignable to type '() => number'. Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/baseClassImprovedMismatchErrors.ts (4 errors) ==== +==== baseClassImprovedMismatchErrors.ts (4 errors) ==== class Base { n: Base | string; fn() { diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.js b/tests/baselines/reference/baseClassImprovedMismatchErrors.js index 150fe523894c9..6ce02320797a8 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.js +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseClassImprovedMismatchErrors.ts] //// + //// [baseClassImprovedMismatchErrors.ts] class Base { n: Base | string; diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.symbols b/tests/baselines/reference/baseClassImprovedMismatchErrors.symbols index 19ac124a2e0be..455d8a0098a71 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.symbols +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseClassImprovedMismatchErrors.ts === +//// [tests/cases/compiler/baseClassImprovedMismatchErrors.ts] //// + +=== baseClassImprovedMismatchErrors.ts === class Base { >Base : Symbol(Base, Decl(baseClassImprovedMismatchErrors.ts, 0, 0)) diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.types b/tests/baselines/reference/baseClassImprovedMismatchErrors.types index d1e79659d3e70..815fe4a8c2d73 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.types +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseClassImprovedMismatchErrors.ts === +//// [tests/cases/compiler/baseClassImprovedMismatchErrors.ts] //// + +=== baseClassImprovedMismatchErrors.ts === class Base { >Base : Base diff --git a/tests/baselines/reference/baseConstraintOfDecorator.errors.txt b/tests/baselines/reference/baseConstraintOfDecorator.errors.txt index 283eda475d85a..4fb2621b61dde 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.errors.txt +++ b/tests/baselines/reference/baseConstraintOfDecorator.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/baseConstraintOfDecorator.ts(2,5): error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'. +baseConstraintOfDecorator.ts(2,5): error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'. 'TFunction' could be instantiated with an arbitrary type which could be unrelated to 'typeof decoratorFunc'. -tests/cases/compiler/baseConstraintOfDecorator.ts(2,40): error TS2507: Type 'TFunction' is not a constructor function type. -tests/cases/compiler/baseConstraintOfDecorator.ts(12,18): error TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'. +baseConstraintOfDecorator.ts(2,40): error TS2507: Type 'TFunction' is not a constructor function type. +baseConstraintOfDecorator.ts(12,18): error TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'. -==== tests/cases/compiler/baseConstraintOfDecorator.ts (3 errors) ==== +==== baseConstraintOfDecorator.ts (3 errors) ==== export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { return class decoratorFunc extends superClass { ~~~~~~ @@ -12,7 +12,7 @@ tests/cases/compiler/baseConstraintOfDecorator.ts(12,18): error TS2545: A mixin !!! error TS2322: 'TFunction' could be instantiated with an arbitrary type which could be unrelated to 'typeof decoratorFunc'. ~~~~~~~~~~ !!! error TS2507: Type 'TFunction' is not a constructor function type. -!!! related TS2735 tests/cases/compiler/baseConstraintOfDecorator.ts:1:31: Did you mean for 'TFunction' to be constrained to type 'new (...args: any[]) => unknown'? +!!! related TS2735 baseConstraintOfDecorator.ts:1:31: Did you mean for 'TFunction' to be constrained to type 'new (...args: any[]) => unknown'? constructor(...args: any[]) { super(...args); _instanceModifier(this, args); diff --git a/tests/baselines/reference/baseConstraintOfDecorator.js b/tests/baselines/reference/baseConstraintOfDecorator.js index 2e55c8ea69298..0c8cd497d129b 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.js +++ b/tests/baselines/reference/baseConstraintOfDecorator.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseConstraintOfDecorator.ts] //// + //// [baseConstraintOfDecorator.ts] export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { return class decoratorFunc extends superClass { diff --git a/tests/baselines/reference/baseConstraintOfDecorator.symbols b/tests/baselines/reference/baseConstraintOfDecorator.symbols index 0a1dad239afc2..f228252d90282 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.symbols +++ b/tests/baselines/reference/baseConstraintOfDecorator.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseConstraintOfDecorator.ts === +//// [tests/cases/compiler/baseConstraintOfDecorator.ts] //// + +=== baseConstraintOfDecorator.ts === export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { >classExtender : Symbol(classExtender, Decl(baseConstraintOfDecorator.ts, 0, 0)) >TFunction : Symbol(TFunction, Decl(baseConstraintOfDecorator.ts, 0, 30)) diff --git a/tests/baselines/reference/baseConstraintOfDecorator.types b/tests/baselines/reference/baseConstraintOfDecorator.types index 78c77ee78a2ab..51b9301b79c47 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.types +++ b/tests/baselines/reference/baseConstraintOfDecorator.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseConstraintOfDecorator.ts === +//// [tests/cases/compiler/baseConstraintOfDecorator.ts] //// + +=== baseConstraintOfDecorator.ts === export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { >classExtender : (superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void) => TFunction >superClass : TFunction diff --git a/tests/baselines/reference/baseExpressionTypeParameters.errors.txt b/tests/baselines/reference/baseExpressionTypeParameters.errors.txt index cb259e49dd26e..11498607f99e2 100644 --- a/tests/baselines/reference/baseExpressionTypeParameters.errors.txt +++ b/tests/baselines/reference/baseExpressionTypeParameters.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/baseExpressionTypeParameters.ts(10,27): error TS2562: Base class expressions cannot reference class type parameters. +baseExpressionTypeParameters.ts(10,27): error TS2562: Base class expressions cannot reference class type parameters. -==== tests/cases/compiler/baseExpressionTypeParameters.ts (1 errors) ==== +==== baseExpressionTypeParameters.ts (1 errors) ==== // Repro from #17829 function base() { diff --git a/tests/baselines/reference/baseExpressionTypeParameters.js b/tests/baselines/reference/baseExpressionTypeParameters.js index 05a0a66ee0133..f8959445f1c2d 100644 --- a/tests/baselines/reference/baseExpressionTypeParameters.js +++ b/tests/baselines/reference/baseExpressionTypeParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseExpressionTypeParameters.ts] //// + //// [baseExpressionTypeParameters.ts] // Repro from #17829 diff --git a/tests/baselines/reference/baseExpressionTypeParameters.symbols b/tests/baselines/reference/baseExpressionTypeParameters.symbols index 037bef2da0a67..806dd12b4d5c1 100644 --- a/tests/baselines/reference/baseExpressionTypeParameters.symbols +++ b/tests/baselines/reference/baseExpressionTypeParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseExpressionTypeParameters.ts === +//// [tests/cases/compiler/baseExpressionTypeParameters.ts] //// + +=== baseExpressionTypeParameters.ts === // Repro from #17829 function base() { diff --git a/tests/baselines/reference/baseExpressionTypeParameters.types b/tests/baselines/reference/baseExpressionTypeParameters.types index 5c1b05077956b..d1e5d67f40d97 100644 --- a/tests/baselines/reference/baseExpressionTypeParameters.types +++ b/tests/baselines/reference/baseExpressionTypeParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseExpressionTypeParameters.ts === +//// [tests/cases/compiler/baseExpressionTypeParameters.ts] //// + +=== baseExpressionTypeParameters.ts === // Repro from #17829 function base() { diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index c84d8fbdd9dd7..a03ad13610d3a 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseIndexSignatureResolution.ts] //// + //// [baseIndexSignatureResolution.ts] class Base { private a: string; } class Derived extends Base { private b: string; } diff --git a/tests/baselines/reference/baseIndexSignatureResolution.symbols b/tests/baselines/reference/baseIndexSignatureResolution.symbols index a70ad99fc7b25..8720e27169f37 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.symbols +++ b/tests/baselines/reference/baseIndexSignatureResolution.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseIndexSignatureResolution.ts === +//// [tests/cases/compiler/baseIndexSignatureResolution.ts] //// + +=== baseIndexSignatureResolution.ts === class Base { private a: string; } >Base : Symbol(Base, Decl(baseIndexSignatureResolution.ts, 0, 0)) >a : Symbol(Base.a, Decl(baseIndexSignatureResolution.ts, 0, 12)) diff --git a/tests/baselines/reference/baseIndexSignatureResolution.types b/tests/baselines/reference/baseIndexSignatureResolution.types index 968fc0c9cc4a4..0950ee0f9e85e 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.types +++ b/tests/baselines/reference/baseIndexSignatureResolution.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseIndexSignatureResolution.ts === +//// [tests/cases/compiler/baseIndexSignatureResolution.ts] //// + +=== baseIndexSignatureResolution.ts === class Base { private a: string; } >Base : Base >a : string diff --git a/tests/baselines/reference/baseTypeAfterDerivedType.js b/tests/baselines/reference/baseTypeAfterDerivedType.js index c7cd84283c32e..133fd2596abf5 100644 --- a/tests/baselines/reference/baseTypeAfterDerivedType.js +++ b/tests/baselines/reference/baseTypeAfterDerivedType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseTypeAfterDerivedType.ts] //// + //// [baseTypeAfterDerivedType.ts] interface Derived extends Base { method(...args: any[]): void; diff --git a/tests/baselines/reference/baseTypeAfterDerivedType.symbols b/tests/baselines/reference/baseTypeAfterDerivedType.symbols index 89d35e21635dd..13ee2df9b1d0b 100644 --- a/tests/baselines/reference/baseTypeAfterDerivedType.symbols +++ b/tests/baselines/reference/baseTypeAfterDerivedType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypeAfterDerivedType.ts === +//// [tests/cases/compiler/baseTypeAfterDerivedType.ts] //// + +=== baseTypeAfterDerivedType.ts === interface Derived extends Base { >Derived : Symbol(Derived, Decl(baseTypeAfterDerivedType.ts, 0, 0)) >Base : Symbol(Base, Decl(baseTypeAfterDerivedType.ts, 2, 1)) diff --git a/tests/baselines/reference/baseTypeAfterDerivedType.types b/tests/baselines/reference/baseTypeAfterDerivedType.types index b4b182ad24c29..12302cf630fa3 100644 --- a/tests/baselines/reference/baseTypeAfterDerivedType.types +++ b/tests/baselines/reference/baseTypeAfterDerivedType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypeAfterDerivedType.ts === +//// [tests/cases/compiler/baseTypeAfterDerivedType.ts] //// + +=== baseTypeAfterDerivedType.ts === interface Derived extends Base { method(...args: any[]): void; >method : (...args: any[]) => void diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index bff2425c0e62e..00abe8514d64b 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseTypeOrderChecking.ts] //// + //// [baseTypeOrderChecking.ts] var someVariable: Class4; diff --git a/tests/baselines/reference/baseTypeOrderChecking.symbols b/tests/baselines/reference/baseTypeOrderChecking.symbols index 13a926fe27856..3d8209da16ad4 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.symbols +++ b/tests/baselines/reference/baseTypeOrderChecking.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypeOrderChecking.ts === +//// [tests/cases/compiler/baseTypeOrderChecking.ts] //// + +=== baseTypeOrderChecking.ts === var someVariable: Class4; >someVariable : Symbol(someVariable, Decl(baseTypeOrderChecking.ts, 0, 3)) >Class4 : Symbol(Class4, Decl(baseTypeOrderChecking.ts, 26, 1)) diff --git a/tests/baselines/reference/baseTypeOrderChecking.types b/tests/baselines/reference/baseTypeOrderChecking.types index 2664465d4de7d..b1245fd032a99 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.types +++ b/tests/baselines/reference/baseTypeOrderChecking.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypeOrderChecking.ts === +//// [tests/cases/compiler/baseTypeOrderChecking.ts] //// + +=== baseTypeOrderChecking.ts === var someVariable: Class4; >someVariable : Class4 diff --git a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt index 28e6684469651..c4252e8a8ec99 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt +++ b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'. +baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'. Named property 'm' of types 'X' and 'Y' are not identical. -==== tests/cases/compiler/baseTypePrivateMemberClash.ts (1 errors) ==== +==== baseTypePrivateMemberClash.ts (1 errors) ==== class X { private m: number; } diff --git a/tests/baselines/reference/baseTypePrivateMemberClash.js b/tests/baselines/reference/baseTypePrivateMemberClash.js index b40d1f8be176a..b2f1be7840f3b 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.js +++ b/tests/baselines/reference/baseTypePrivateMemberClash.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseTypePrivateMemberClash.ts] //// + //// [baseTypePrivateMemberClash.ts] class X { private m: number; diff --git a/tests/baselines/reference/baseTypePrivateMemberClash.symbols b/tests/baselines/reference/baseTypePrivateMemberClash.symbols index ede8869f96fab..14463ec4fe56c 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.symbols +++ b/tests/baselines/reference/baseTypePrivateMemberClash.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypePrivateMemberClash.ts === +//// [tests/cases/compiler/baseTypePrivateMemberClash.ts] //// + +=== baseTypePrivateMemberClash.ts === class X { >X : Symbol(X, Decl(baseTypePrivateMemberClash.ts, 0, 0)) diff --git a/tests/baselines/reference/baseTypePrivateMemberClash.types b/tests/baselines/reference/baseTypePrivateMemberClash.types index e3c80e6717b97..d63a65081e00d 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.types +++ b/tests/baselines/reference/baseTypePrivateMemberClash.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypePrivateMemberClash.ts === +//// [tests/cases/compiler/baseTypePrivateMemberClash.ts] //// + +=== baseTypePrivateMemberClash.ts === class X { >X : X diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 7ad2c839fb0b9..b891dadaa8dc5 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/baseTypeWrappingInstantiationChain.ts] //// + //// [baseTypeWrappingInstantiationChain.ts] class CBaseBase { constructor(x: Parameter) { } diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.symbols b/tests/baselines/reference/baseTypeWrappingInstantiationChain.symbols index 67550141758ab..2060a3ae30c96 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.symbols +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypeWrappingInstantiationChain.ts === +//// [tests/cases/compiler/baseTypeWrappingInstantiationChain.ts] //// + +=== baseTypeWrappingInstantiationChain.ts === class CBaseBase { >CBaseBase : Symbol(CBaseBase, Decl(baseTypeWrappingInstantiationChain.ts, 0, 0)) >T3 : Symbol(T3, Decl(baseTypeWrappingInstantiationChain.ts, 0, 16)) diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.types b/tests/baselines/reference/baseTypeWrappingInstantiationChain.types index 127241a26c78d..9b4c6659912ee 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.types +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/baseTypeWrappingInstantiationChain.ts === +//// [tests/cases/compiler/baseTypeWrappingInstantiationChain.ts] //// + +=== baseTypeWrappingInstantiationChain.ts === class CBaseBase { >CBaseBase : CBaseBase diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index fb63428b876b4..15fa22555f7a1 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'. -tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected. -tests/cases/compiler/bases.ts(7,17): error TS2693: 'any' only refers to a type, but is being used as a value here. -tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'. +bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'. +bases.ts(7,15): error TS1005: ';' expected. +bases.ts(7,17): error TS2693: 'any' only refers to a type, but is being used as a value here. +bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'x' is missing in type 'C' but required in type 'I'. -tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. -tests/cases/compiler/bases.ts(13,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'. -tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected. -tests/cases/compiler/bases.ts(13,17): error TS2693: 'any' only refers to a type, but is being used as a value here. -tests/cases/compiler/bases.ts(17,9): error TS2339: Property 'x' does not exist on type 'C'. -tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'. +bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. +bases.ts(13,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'. +bases.ts(13,15): error TS1005: ';' expected. +bases.ts(13,17): error TS2693: 'any' only refers to a type, but is being used as a value here. +bases.ts(17,9): error TS2339: Property 'x' does not exist on type 'C'. +bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'. -==== tests/cases/compiler/bases.ts (11 errors) ==== +==== bases.ts (11 errors) ==== interface I { x; } @@ -33,7 +33,7 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o ~ !!! error TS2420: Class 'C' incorrectly implements interface 'I'. !!! error TS2420: Property 'x' is missing in type 'C' but required in type 'I'. -!!! related TS2728 tests/cases/compiler/bases.ts:2:5: 'x' is declared here. +!!! related TS2728 bases.ts:2:5: 'x' is declared here. constructor() { ~~~~~~~~~~~~~~~ this.x: any; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 892e9ea51ccc6..96f8aaca36b55 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bases.ts] //// + //// [bases.ts] interface I { x; diff --git a/tests/baselines/reference/bases.symbols b/tests/baselines/reference/bases.symbols index 204205e20e851..b3456f42f720e 100644 --- a/tests/baselines/reference/bases.symbols +++ b/tests/baselines/reference/bases.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bases.ts === +//// [tests/cases/compiler/bases.ts] //// + +=== bases.ts === interface I { >I : Symbol(I, Decl(bases.ts, 0, 0)) diff --git a/tests/baselines/reference/bases.types b/tests/baselines/reference/bases.types index 60bc5b786fbbe..9ce2562aefc14 100644 --- a/tests/baselines/reference/bases.types +++ b/tests/baselines/reference/bases.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bases.ts === +//// [tests/cases/compiler/bases.ts] //// + +=== bases.ts === interface I { x; >x : any diff --git a/tests/baselines/reference/bestChoiceType.js b/tests/baselines/reference/bestChoiceType.js index edd36f77be96c..39ec75f58309b 100644 --- a/tests/baselines/reference/bestChoiceType.js +++ b/tests/baselines/reference/bestChoiceType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bestChoiceType.ts] //// + //// [bestChoiceType.ts] // Repro from #10041 diff --git a/tests/baselines/reference/bestChoiceType.symbols b/tests/baselines/reference/bestChoiceType.symbols index 0072356223368..5be12e3b2d026 100644 --- a/tests/baselines/reference/bestChoiceType.symbols +++ b/tests/baselines/reference/bestChoiceType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestChoiceType.ts === +//// [tests/cases/compiler/bestChoiceType.ts] //// + +=== bestChoiceType.ts === // Repro from #10041 (''.match(/ /) || []).map(s => s.toLowerCase()); diff --git a/tests/baselines/reference/bestChoiceType.types b/tests/baselines/reference/bestChoiceType.types index 05d77542f6cce..11acdb67bd9e8 100644 --- a/tests/baselines/reference/bestChoiceType.types +++ b/tests/baselines/reference/bestChoiceType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestChoiceType.ts === +//// [tests/cases/compiler/bestChoiceType.ts] //// + +=== bestChoiceType.ts === // Repro from #10041 (''.match(/ /) || []).map(s => s.toLowerCase()); diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index a02fe1b325c29..d62c0769bfb25 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts] //// + //// [bestCommonTypeOfConditionalExpressions.ts] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols index a700f8cf93235..67337916b63d9 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts] //// + +=== bestCommonTypeOfConditionalExpressions.ts === // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types index e94408dfb1e84..4ba9083e4f0b2 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions.ts] //// + +=== bestCommonTypeOfConditionalExpressions.ts === // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 920b58ebf5d05..f25d2bb5d6f2f 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts] //// + //// [bestCommonTypeOfConditionalExpressions2.ts] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.symbols b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.symbols index 11a3430a66861..95a78107d6432 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.symbols +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts] //// + +=== bestCommonTypeOfConditionalExpressions2.ts === // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types index f9488bedd3665..13cd1c99f9cb1 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfConditionalExpressions2.ts] //// + +=== bestCommonTypeOfConditionalExpressions2.ts === // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt b/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt index 0349ce1ebe451..4f90b477decb4 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(22,13): error TS2493: Tuple type '[(x: number) => string, (x: number) => number]' of length '2' has no element at index '2'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(23,13): error TS2493: Tuple type '[E1, E2]' of length '2' has no element at index '2'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(24,13): error TS2493: Tuple type '[number, any]' of length '2' has no element at index '2'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1, E2, number]' of length '3' has no element at index '3'. +bestCommonTypeOfTuple.ts(22,13): error TS2493: Tuple type '[(x: number) => string, (x: number) => number]' of length '2' has no element at index '2'. +bestCommonTypeOfTuple.ts(23,13): error TS2493: Tuple type '[E1, E2]' of length '2' has no element at index '2'. +bestCommonTypeOfTuple.ts(24,13): error TS2493: Tuple type '[number, any]' of length '2' has no element at index '2'. +bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1, E2, number]' of length '3' has no element at index '3'. -==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts (4 errors) ==== +==== bestCommonTypeOfTuple.ts (4 errors) ==== function f1(x: number): string { return "foo"; } function f2(x: number): number { return 10; } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.js b/tests/baselines/reference/bestCommonTypeOfTuple.js index 81cfa752f5de5..9a5db94da9f7e 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts] //// + //// [bestCommonTypeOfTuple.ts] function f1(x: number): string { return "foo"; } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.symbols b/tests/baselines/reference/bestCommonTypeOfTuple.symbols index 59549da0cac28..cacdb5169b6d2 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.symbols +++ b/tests/baselines/reference/bestCommonTypeOfTuple.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts] //// + +=== bestCommonTypeOfTuple.ts === function f1(x: number): string { return "foo"; } >f1 : Symbol(f1, Decl(bestCommonTypeOfTuple.ts, 0, 0)) >x : Symbol(x, Decl(bestCommonTypeOfTuple.ts, 0, 12)) diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.types b/tests/baselines/reference/bestCommonTypeOfTuple.types index adc1934498a94..a0e6d58600036 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts] //// + +=== bestCommonTypeOfTuple.ts === function f1(x: number): string { return "foo"; } >f1 : (x: number) => string >x : number diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt b/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt index 602e9fdeef212..2029d92d11f2f 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(17,14): error TS2493: Tuple type '[C, base]' of length '2' has no element at index '4'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(18,14): error TS2493: Tuple type '[C, D]' of length '2' has no element at index '4'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(19,14): error TS2493: Tuple type '[C1, D1]' of length '2' has no element at index '4'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(20,14): error TS2493: Tuple type '[base1, C1]' of length '2' has no element at index '2'. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(21,14): error TS2493: Tuple type '[C1, F]' of length '2' has no element at index '2'. +bestCommonTypeOfTuple2.ts(17,14): error TS2493: Tuple type '[C, base]' of length '2' has no element at index '4'. +bestCommonTypeOfTuple2.ts(18,14): error TS2493: Tuple type '[C, D]' of length '2' has no element at index '4'. +bestCommonTypeOfTuple2.ts(19,14): error TS2493: Tuple type '[C1, D1]' of length '2' has no element at index '4'. +bestCommonTypeOfTuple2.ts(20,14): error TS2493: Tuple type '[base1, C1]' of length '2' has no element at index '2'. +bestCommonTypeOfTuple2.ts(21,14): error TS2493: Tuple type '[C1, F]' of length '2' has no element at index '2'. -==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts (5 errors) ==== +==== bestCommonTypeOfTuple2.ts (5 errors) ==== interface base { } interface base1 { i } class C implements base { c } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 9dbd3996640fd..5d440c14c46f8 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts] //// + //// [bestCommonTypeOfTuple2.ts] interface base { } interface base1 { i } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.symbols b/tests/baselines/reference/bestCommonTypeOfTuple2.symbols index 1e17f253f8aab..a9ee96ecc1a61 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.symbols +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts] //// + +=== bestCommonTypeOfTuple2.ts === interface base { } >base : Symbol(base, Decl(bestCommonTypeOfTuple2.ts, 0, 0)) diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.types b/tests/baselines/reference/bestCommonTypeOfTuple2.types index 6b3e6a3789ccc..efd6886e381fa 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts === +//// [tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts] //// + +=== bestCommonTypeOfTuple2.ts === interface base { } interface base1 { i } >i : any diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.js b/tests/baselines/reference/bestCommonTypeReturnStatement.js index f4ab98ed1c68a..15d0a79925bfc 100644 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.js +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bestCommonTypeReturnStatement.ts] //// + //// [bestCommonTypeReturnStatement.ts] interface IPromise { then(successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any): IPromise; diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.symbols b/tests/baselines/reference/bestCommonTypeReturnStatement.symbols index 8031ffee06f43..ea3fb297a4022 100644 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.symbols +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestCommonTypeReturnStatement.ts === +//// [tests/cases/compiler/bestCommonTypeReturnStatement.ts] //// + +=== bestCommonTypeReturnStatement.ts === interface IPromise { >IPromise : Symbol(IPromise, Decl(bestCommonTypeReturnStatement.ts, 0, 0)) >T : Symbol(T, Decl(bestCommonTypeReturnStatement.ts, 0, 19)) diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.types b/tests/baselines/reference/bestCommonTypeReturnStatement.types index 1f48313e5d50e..c6d1cd4f30915 100644 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.types +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestCommonTypeReturnStatement.ts === +//// [tests/cases/compiler/bestCommonTypeReturnStatement.ts] //// + +=== bestCommonTypeReturnStatement.ts === interface IPromise { then(successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any): IPromise; >then : (successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any) => IPromise diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js index c45ae88458fd9..9374f8b1505b3 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bestCommonTypeWithContextualTyping.ts] //// + //// [bestCommonTypeWithContextualTyping.ts] interface Contextual { dummy; diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols b/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols index acaab09cb0ead..38a0a2cd903f2 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestCommonTypeWithContextualTyping.ts === +//// [tests/cases/compiler/bestCommonTypeWithContextualTyping.ts] //// + +=== bestCommonTypeWithContextualTyping.ts === interface Contextual { >Contextual : Symbol(Contextual, Decl(bestCommonTypeWithContextualTyping.ts, 0, 0)) diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.types b/tests/baselines/reference/bestCommonTypeWithContextualTyping.types index 4ec8b8f336eae..b0d7c0bee8d30 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.types +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestCommonTypeWithContextualTyping.ts === +//// [tests/cases/compiler/bestCommonTypeWithContextualTyping.ts] //// + +=== bestCommonTypeWithContextualTyping.ts === interface Contextual { dummy; >dummy : any diff --git a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js index 25622c3d4f37a..ad717910dc9e2 100644 --- a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js +++ b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts] //// + //// [bestCommonTypeWithOptionalProperties.ts] interface X { foo: string } interface Y extends X { bar?: number } diff --git a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.symbols b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.symbols index 5bb2dc8ecf9d7..d82cc134c5227 100644 --- a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.symbols +++ b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts === +//// [tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts] //// + +=== bestCommonTypeWithOptionalProperties.ts === interface X { foo: string } >X : Symbol(X, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 0)) >foo : Symbol(X.foo, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 13)) diff --git a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.types b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.types index 6d5d6cb8726ec..fe3a10d9aca00 100644 --- a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.types +++ b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts === +//// [tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts] //// + +=== bestCommonTypeWithOptionalProperties.ts === interface X { foo: string } >foo : string diff --git a/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt b/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt index 7575fa2ca7e9e..f5dd0414ebbb2 100644 --- a/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt +++ b/tests/baselines/reference/betterErrorForAccidentalCall.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/betterErrorForAccidentalCall.ts(3,1): error TS2349: This expression is not callable. +betterErrorForAccidentalCall.ts(3,1): error TS2349: This expression is not callable. Type 'String' has no call signatures. -tests/cases/compiler/betterErrorForAccidentalCall.ts(5,1): error TS2349: This expression is not callable. +betterErrorForAccidentalCall.ts(5,1): error TS2349: This expression is not callable. Type 'String' has no call signatures. -tests/cases/compiler/betterErrorForAccidentalCall.ts(7,1): error TS2349: This expression is not callable. +betterErrorForAccidentalCall.ts(7,1): error TS2349: This expression is not callable. Type 'String' has no call signatures. -tests/cases/compiler/betterErrorForAccidentalCall.ts(10,1): error TS2349: This expression is not callable. +betterErrorForAccidentalCall.ts(10,1): error TS2349: This expression is not callable. Type 'String' has no call signatures. -tests/cases/compiler/betterErrorForAccidentalCall.ts(13,1): error TS2349: This expression is not callable. +betterErrorForAccidentalCall.ts(13,1): error TS2349: This expression is not callable. Type 'String' has no call signatures. -==== tests/cases/compiler/betterErrorForAccidentalCall.ts (5 errors) ==== +==== betterErrorForAccidentalCall.ts (5 errors) ==== declare function foo(): string; foo()(1 as number).toString(); @@ -27,20 +27,20 @@ tests/cases/compiler/betterErrorForAccidentalCall.ts(13,1): error TS2349: This e ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'String' has no call signatures. -!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:7:1: Are you missing a semicolon? +!!! related TS2734 betterErrorForAccidentalCall.ts:7:1: Are you missing a semicolon? (1 as number).toString(); foo() ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'String' has no call signatures. -!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:10:1: Are you missing a semicolon? +!!! related TS2734 betterErrorForAccidentalCall.ts:10:1: Are you missing a semicolon? (1 + 2).toString(); foo() ~~~~~ !!! error TS2349: This expression is not callable. !!! error TS2349: Type 'String' has no call signatures. -!!! related TS2734 tests/cases/compiler/betterErrorForAccidentalCall.ts:13:1: Are you missing a semicolon? +!!! related TS2734 betterErrorForAccidentalCall.ts:13:1: Are you missing a semicolon? (1).toString(); \ No newline at end of file diff --git a/tests/baselines/reference/betterErrorForAccidentalCall.js b/tests/baselines/reference/betterErrorForAccidentalCall.js index deb2b22d2f608..e22336056f36d 100644 --- a/tests/baselines/reference/betterErrorForAccidentalCall.js +++ b/tests/baselines/reference/betterErrorForAccidentalCall.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/betterErrorForAccidentalCall.ts] //// + //// [betterErrorForAccidentalCall.ts] declare function foo(): string; diff --git a/tests/baselines/reference/betterErrorForAccidentalCall.symbols b/tests/baselines/reference/betterErrorForAccidentalCall.symbols index 9471b0bb06055..1da1e8c67f8ef 100644 --- a/tests/baselines/reference/betterErrorForAccidentalCall.symbols +++ b/tests/baselines/reference/betterErrorForAccidentalCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/betterErrorForAccidentalCall.ts === +//// [tests/cases/compiler/betterErrorForAccidentalCall.ts] //// + +=== betterErrorForAccidentalCall.ts === declare function foo(): string; >foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0)) diff --git a/tests/baselines/reference/betterErrorForAccidentalCall.types b/tests/baselines/reference/betterErrorForAccidentalCall.types index 1a3dfbd47f36c..8dfd9272bb83f 100644 --- a/tests/baselines/reference/betterErrorForAccidentalCall.types +++ b/tests/baselines/reference/betterErrorForAccidentalCall.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/betterErrorForAccidentalCall.ts === +//// [tests/cases/compiler/betterErrorForAccidentalCall.ts] //// + +=== betterErrorForAccidentalCall.ts === declare function foo(): string; >foo : () => string diff --git a/tests/baselines/reference/betterErrorForUnionCall.errors.txt b/tests/baselines/reference/betterErrorForUnionCall.errors.txt index 2f37fccb16850..3c9ae928f91bd 100644 --- a/tests/baselines/reference/betterErrorForUnionCall.errors.txt +++ b/tests/baselines/reference/betterErrorForUnionCall.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/betterErrorForUnionCall.ts(2,1): error TS2349: This expression is not callable. +betterErrorForUnionCall.ts(2,1): error TS2349: This expression is not callable. No constituent of type '{ a: string; } | { b: string; }' is callable. -tests/cases/compiler/betterErrorForUnionCall.ts(5,1): error TS2349: This expression is not callable. +betterErrorForUnionCall.ts(5,1): error TS2349: This expression is not callable. Not all constituents of type '{ a: string; } | ((a: string) => void)' are callable. Type '{ a: string; }' has no call signatures. -tests/cases/compiler/betterErrorForUnionCall.ts(8,1): error TS2349: This expression is not callable. +betterErrorForUnionCall.ts(8,1): error TS2349: This expression is not callable. Each member of the union type '((a: T) => void) | ((a: string) => void)' has signatures, but none of those signatures are compatible with each other. -==== tests/cases/compiler/betterErrorForUnionCall.ts (3 errors) ==== +==== betterErrorForUnionCall.ts (3 errors) ==== declare const union: { a: string } | { b: string } union(""); ~~~~~ diff --git a/tests/baselines/reference/betterErrorForUnionCall.js b/tests/baselines/reference/betterErrorForUnionCall.js index 5386599113602..18a0a18117a61 100644 --- a/tests/baselines/reference/betterErrorForUnionCall.js +++ b/tests/baselines/reference/betterErrorForUnionCall.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/betterErrorForUnionCall.ts] //// + //// [betterErrorForUnionCall.ts] declare const union: { a: string } | { b: string } union(""); diff --git a/tests/baselines/reference/betterErrorForUnionCall.symbols b/tests/baselines/reference/betterErrorForUnionCall.symbols index 1d28d3dae1305..f89ea3f178042 100644 --- a/tests/baselines/reference/betterErrorForUnionCall.symbols +++ b/tests/baselines/reference/betterErrorForUnionCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/betterErrorForUnionCall.ts === +//// [tests/cases/compiler/betterErrorForUnionCall.ts] //// + +=== betterErrorForUnionCall.ts === declare const union: { a: string } | { b: string } >union : Symbol(union, Decl(betterErrorForUnionCall.ts, 0, 13)) >a : Symbol(a, Decl(betterErrorForUnionCall.ts, 0, 22)) diff --git a/tests/baselines/reference/betterErrorForUnionCall.types b/tests/baselines/reference/betterErrorForUnionCall.types index 0022cf369c4db..e633fe36f69be 100644 --- a/tests/baselines/reference/betterErrorForUnionCall.types +++ b/tests/baselines/reference/betterErrorForUnionCall.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/betterErrorForUnionCall.ts === +//// [tests/cases/compiler/betterErrorForUnionCall.ts] //// + +=== betterErrorForUnionCall.ts === declare const union: { a: string } | { b: string } >union : { a: string; } | { b: string; } >a : string diff --git a/tests/baselines/reference/bigIntWithTargetES2016.js b/tests/baselines/reference/bigIntWithTargetES2016.js index 81ffd1058df6b..16de875074f1a 100644 --- a/tests/baselines/reference/bigIntWithTargetES2016.js +++ b/tests/baselines/reference/bigIntWithTargetES2016.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bigIntWithTargetES2016.ts] //// + //// [bigIntWithTargetES2016.ts] BigInt(1) ** BigInt(1); // should not error diff --git a/tests/baselines/reference/bigIntWithTargetES2016.symbols b/tests/baselines/reference/bigIntWithTargetES2016.symbols index c91cf1cca3b4f..e81d22a4d8a94 100644 --- a/tests/baselines/reference/bigIntWithTargetES2016.symbols +++ b/tests/baselines/reference/bigIntWithTargetES2016.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigIntWithTargetES2016.ts === +//// [tests/cases/compiler/bigIntWithTargetES2016.ts] //// + +=== bigIntWithTargetES2016.ts === BigInt(1) ** BigInt(1); // should not error >BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) >BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) diff --git a/tests/baselines/reference/bigIntWithTargetES2016.types b/tests/baselines/reference/bigIntWithTargetES2016.types index eba94dbe3a9db..77680894a8bd3 100644 --- a/tests/baselines/reference/bigIntWithTargetES2016.types +++ b/tests/baselines/reference/bigIntWithTargetES2016.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigIntWithTargetES2016.ts === +//// [tests/cases/compiler/bigIntWithTargetES2016.ts] //// + +=== bigIntWithTargetES2016.ts === BigInt(1) ** BigInt(1); // should not error >BigInt(1) ** BigInt(1) : bigint >BigInt(1) : bigint diff --git a/tests/baselines/reference/bigIntWithTargetES3.errors.txt b/tests/baselines/reference/bigIntWithTargetES3.errors.txt index 0c2b1793eb9ba..d810c7521ea19 100644 --- a/tests/baselines/reference/bigIntWithTargetES3.errors.txt +++ b/tests/baselines/reference/bigIntWithTargetES3.errors.txt @@ -1,12 +1,12 @@ error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -tests/cases/compiler/bigIntWithTargetES3.ts(5,22): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigIntWithTargetES3.ts(5,29): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigIntWithTargetES3.ts(5,39): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigIntWithTargetES3.ts(5,48): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigIntWithTargetES3.ts(5,22): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigIntWithTargetES3.ts(5,29): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigIntWithTargetES3.ts(5,39): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigIntWithTargetES3.ts(5,48): error TS2737: BigInt literals are not available when targeting lower than ES2020. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -==== tests/cases/compiler/bigIntWithTargetES3.ts (4 errors) ==== +==== bigIntWithTargetES3.ts (4 errors) ==== const normalNumber = 123; // should not error let bigintType: bigint; // should not error let bigintLiteralType: 123n; // should not error when used as type diff --git a/tests/baselines/reference/bigIntWithTargetES3.js b/tests/baselines/reference/bigIntWithTargetES3.js index ad6f25a767139..a67cae668ebe8 100644 --- a/tests/baselines/reference/bigIntWithTargetES3.js +++ b/tests/baselines/reference/bigIntWithTargetES3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bigIntWithTargetES3.ts] //// + //// [bigIntWithTargetES3.ts] const normalNumber = 123; // should not error let bigintType: bigint; // should not error diff --git a/tests/baselines/reference/bigIntWithTargetES3.symbols b/tests/baselines/reference/bigIntWithTargetES3.symbols index b4415dca87fd4..5058faaaf597a 100644 --- a/tests/baselines/reference/bigIntWithTargetES3.symbols +++ b/tests/baselines/reference/bigIntWithTargetES3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigIntWithTargetES3.ts === +//// [tests/cases/compiler/bigIntWithTargetES3.ts] //// + +=== bigIntWithTargetES3.ts === const normalNumber = 123; // should not error >normalNumber : Symbol(normalNumber, Decl(bigIntWithTargetES3.ts, 0, 5)) diff --git a/tests/baselines/reference/bigIntWithTargetES3.types b/tests/baselines/reference/bigIntWithTargetES3.types index ff9b8d80c3d34..2a9027933d780 100644 --- a/tests/baselines/reference/bigIntWithTargetES3.types +++ b/tests/baselines/reference/bigIntWithTargetES3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigIntWithTargetES3.ts === +//// [tests/cases/compiler/bigIntWithTargetES3.ts] //// + +=== bigIntWithTargetES3.ts === const normalNumber = 123; // should not error >normalNumber : 123 >123 : 123 diff --git a/tests/baselines/reference/bigIntWithTargetLessThanES2016.errors.txt b/tests/baselines/reference/bigIntWithTargetLessThanES2016.errors.txt index ea84f54122f6c..bcfec90df2fde 100644 --- a/tests/baselines/reference/bigIntWithTargetLessThanES2016.errors.txt +++ b/tests/baselines/reference/bigIntWithTargetLessThanES2016.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/bigIntWithTargetLessThanES2016.ts(1,1): error TS2791: Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later. -tests/cases/compiler/bigIntWithTargetLessThanES2016.ts(4,1): error TS2791: Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later. +bigIntWithTargetLessThanES2016.ts(1,1): error TS2791: Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later. +bigIntWithTargetLessThanES2016.ts(4,1): error TS2791: Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later. -==== tests/cases/compiler/bigIntWithTargetLessThanES2016.ts (2 errors) ==== +==== bigIntWithTargetLessThanES2016.ts (2 errors) ==== BigInt(1) ** BigInt(1); // should error ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2791: Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later. diff --git a/tests/baselines/reference/bigIntWithTargetLessThanES2016.js b/tests/baselines/reference/bigIntWithTargetLessThanES2016.js index 6f875d2d38779..f8266ae31f79c 100644 --- a/tests/baselines/reference/bigIntWithTargetLessThanES2016.js +++ b/tests/baselines/reference/bigIntWithTargetLessThanES2016.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bigIntWithTargetLessThanES2016.ts] //// + //// [bigIntWithTargetLessThanES2016.ts] BigInt(1) ** BigInt(1); // should error diff --git a/tests/baselines/reference/bigIntWithTargetLessThanES2016.symbols b/tests/baselines/reference/bigIntWithTargetLessThanES2016.symbols index 8c0433225826a..feb999d575006 100644 --- a/tests/baselines/reference/bigIntWithTargetLessThanES2016.symbols +++ b/tests/baselines/reference/bigIntWithTargetLessThanES2016.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigIntWithTargetLessThanES2016.ts === +//// [tests/cases/compiler/bigIntWithTargetLessThanES2016.ts] //// + +=== bigIntWithTargetLessThanES2016.ts === BigInt(1) ** BigInt(1); // should error >BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) >BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) diff --git a/tests/baselines/reference/bigIntWithTargetLessThanES2016.types b/tests/baselines/reference/bigIntWithTargetLessThanES2016.types index 9f81fea622036..be61b8ae89f9f 100644 --- a/tests/baselines/reference/bigIntWithTargetLessThanES2016.types +++ b/tests/baselines/reference/bigIntWithTargetLessThanES2016.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigIntWithTargetLessThanES2016.ts === +//// [tests/cases/compiler/bigIntWithTargetLessThanES2016.ts] //// + +=== bigIntWithTargetLessThanES2016.ts === BigInt(1) ** BigInt(1); // should error >BigInt(1) ** BigInt(1) : bigint >BigInt(1) : bigint diff --git a/tests/baselines/reference/bigint64ArraySubarray.js b/tests/baselines/reference/bigint64ArraySubarray.js index c68297b17bb5f..14b75c4cd9eaf 100644 --- a/tests/baselines/reference/bigint64ArraySubarray.js +++ b/tests/baselines/reference/bigint64ArraySubarray.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bigint64ArraySubarray.ts] //// + //// [bigint64ArraySubarray.ts] function bigInt64ArraySubarray() { var arr = new BigInt64Array(10); diff --git a/tests/baselines/reference/bigint64ArraySubarray.symbols b/tests/baselines/reference/bigint64ArraySubarray.symbols index 802bb544cfe2b..fded2b3097ac8 100644 --- a/tests/baselines/reference/bigint64ArraySubarray.symbols +++ b/tests/baselines/reference/bigint64ArraySubarray.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigint64ArraySubarray.ts === +//// [tests/cases/compiler/bigint64ArraySubarray.ts] //// + +=== bigint64ArraySubarray.ts === function bigInt64ArraySubarray() { >bigInt64ArraySubarray : Symbol(bigInt64ArraySubarray, Decl(bigint64ArraySubarray.ts, 0, 0)) diff --git a/tests/baselines/reference/bigint64ArraySubarray.types b/tests/baselines/reference/bigint64ArraySubarray.types index 12c92f2dd1407..e41f55747602e 100644 --- a/tests/baselines/reference/bigint64ArraySubarray.types +++ b/tests/baselines/reference/bigint64ArraySubarray.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigint64ArraySubarray.ts === +//// [tests/cases/compiler/bigint64ArraySubarray.ts] //// + +=== bigint64ArraySubarray.ts === function bigInt64ArraySubarray() { >bigInt64ArraySubarray : () => void diff --git a/tests/baselines/reference/bigintIndex.errors.txt b/tests/baselines/reference/bigintIndex.errors.txt index b2b1c197642cf..9b96f74377c49 100644 --- a/tests/baselines/reference/bigintIndex.errors.txt +++ b/tests/baselines/reference/bigintIndex.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -tests/cases/compiler/a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. -tests/cases/compiler/a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -tests/cases/compiler/a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. -tests/cases/compiler/b.ts(2,12): error TS1136: Property assignment expected. -tests/cases/compiler/b.ts(2,14): error TS1005: ';' expected. -tests/cases/compiler/b.ts(2,19): error TS1128: Declaration or statement expected. -tests/cases/compiler/b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -tests/cases/compiler/b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. +a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. +a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. +b.ts(2,12): error TS1136: Property assignment expected. +b.ts(2,14): error TS1005: ';' expected. +b.ts(2,19): error TS1128: Declaration or statement expected. +b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== tests/cases/compiler/a.ts (4 errors) ==== +==== a.ts (4 errors) ==== interface BigIntIndex { [index: bigint]: E; // should error ~~~~~ @@ -42,7 +42,7 @@ tests/cases/compiler/b.ts(4,12): error TS2464: A computed property name must be typedArray[2] = 0xCC; // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== tests/cases/compiler/b.ts (5 errors) ==== +==== b.ts (5 errors) ==== // BigInt cannot be used as an object literal property const a = {1n: 123}; ~~ diff --git a/tests/baselines/reference/bigintIndex.symbols b/tests/baselines/reference/bigintIndex.symbols index 4a72dcc42c9b8..edc521fc864fb 100644 --- a/tests/baselines/reference/bigintIndex.symbols +++ b/tests/baselines/reference/bigintIndex.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/bigintIndex.ts] //// + +=== a.ts === interface BigIntIndex { >BigIntIndex : Symbol(BigIntIndex, Decl(a.ts, 0, 0)) >E : Symbol(E, Decl(a.ts, 0, 22)) @@ -63,7 +65,7 @@ typedArray[2] = 0xCC; >typedArray : Symbol(typedArray, Decl(a.ts, 17, 5)) // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -=== tests/cases/compiler/b.ts === +=== b.ts === // BigInt cannot be used as an object literal property const a = {1n: 123}; >a : Symbol(a, Decl(b.ts, 1, 5)) diff --git a/tests/baselines/reference/bigintIndex.types b/tests/baselines/reference/bigintIndex.types index 1d80ce04fe707..af98c186d08cc 100644 --- a/tests/baselines/reference/bigintIndex.types +++ b/tests/baselines/reference/bigintIndex.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.ts === +//// [tests/cases/compiler/bigintIndex.ts] //// + +=== a.ts === interface BigIntIndex { [index: bigint]: E; // should error >index : bigint @@ -97,7 +99,7 @@ typedArray[2] = 0xCC; >0xCC : 204 // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -=== tests/cases/compiler/b.ts === +=== b.ts === // BigInt cannot be used as an object literal property const a = {1n: 123}; >a : {} diff --git a/tests/baselines/reference/bigintMissingES2019.js b/tests/baselines/reference/bigintMissingES2019.js index 85c82e8da6768..b8faa1b7a8df5 100644 --- a/tests/baselines/reference/bigintMissingES2019.js +++ b/tests/baselines/reference/bigintMissingES2019.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es2020/bigintMissingES2019.ts] //// + //// [bigintMissingES2019.ts] declare function test(): void; diff --git a/tests/baselines/reference/bigintMissingES2019.symbols b/tests/baselines/reference/bigintMissingES2019.symbols index d0f2102df04ef..52f85cbc2a270 100644 --- a/tests/baselines/reference/bigintMissingES2019.symbols +++ b/tests/baselines/reference/bigintMissingES2019.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es2020/bigintMissingES2019.ts === +//// [tests/cases/conformance/es2020/bigintMissingES2019.ts] //// + +=== bigintMissingES2019.ts === declare function test(): void; >test : Symbol(test, Decl(bigintMissingES2019.ts, 0, 0)) >A : Symbol(A, Decl(bigintMissingES2019.ts, 0, 22)) diff --git a/tests/baselines/reference/bigintMissingES2019.types b/tests/baselines/reference/bigintMissingES2019.types index a757652768d7a..574f343ada46c 100644 --- a/tests/baselines/reference/bigintMissingES2019.types +++ b/tests/baselines/reference/bigintMissingES2019.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es2020/bigintMissingES2019.ts === +//// [tests/cases/conformance/es2020/bigintMissingES2019.ts] //// + +=== bigintMissingES2019.ts === declare function test(): void; >test : () => void diff --git a/tests/baselines/reference/bigintMissingES2020.js b/tests/baselines/reference/bigintMissingES2020.js index 01e8c02089500..593123c9694d0 100644 --- a/tests/baselines/reference/bigintMissingES2020.js +++ b/tests/baselines/reference/bigintMissingES2020.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es2020/bigintMissingES2020.ts] //// + //// [bigintMissingES2020.ts] declare function test(): void; diff --git a/tests/baselines/reference/bigintMissingES2020.symbols b/tests/baselines/reference/bigintMissingES2020.symbols index 61438c691223f..355a4be059772 100644 --- a/tests/baselines/reference/bigintMissingES2020.symbols +++ b/tests/baselines/reference/bigintMissingES2020.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es2020/bigintMissingES2020.ts === +//// [tests/cases/conformance/es2020/bigintMissingES2020.ts] //// + +=== bigintMissingES2020.ts === declare function test(): void; >test : Symbol(test, Decl(bigintMissingES2020.ts, 0, 0)) >A : Symbol(A, Decl(bigintMissingES2020.ts, 0, 22)) diff --git a/tests/baselines/reference/bigintMissingES2020.types b/tests/baselines/reference/bigintMissingES2020.types index 1be5a9eb27c7c..c52ece4220ede 100644 --- a/tests/baselines/reference/bigintMissingES2020.types +++ b/tests/baselines/reference/bigintMissingES2020.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es2020/bigintMissingES2020.ts === +//// [tests/cases/conformance/es2020/bigintMissingES2020.ts] //// + +=== bigintMissingES2020.ts === declare function test(): void; >test : () => void diff --git a/tests/baselines/reference/bigintMissingESNext.js b/tests/baselines/reference/bigintMissingESNext.js index 300fbe5db5f4f..ee19515847b21 100644 --- a/tests/baselines/reference/bigintMissingESNext.js +++ b/tests/baselines/reference/bigintMissingESNext.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es2020/bigintMissingESNext.ts] //// + //// [bigintMissingESNext.ts] declare function test(): void; diff --git a/tests/baselines/reference/bigintMissingESNext.symbols b/tests/baselines/reference/bigintMissingESNext.symbols index a517f40d9717f..1fb6a4e2c2c7e 100644 --- a/tests/baselines/reference/bigintMissingESNext.symbols +++ b/tests/baselines/reference/bigintMissingESNext.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es2020/bigintMissingESNext.ts === +//// [tests/cases/conformance/es2020/bigintMissingESNext.ts] //// + +=== bigintMissingESNext.ts === declare function test(): void; >test : Symbol(test, Decl(bigintMissingESNext.ts, 0, 0)) >A : Symbol(A, Decl(bigintMissingESNext.ts, 0, 22)) diff --git a/tests/baselines/reference/bigintMissingESNext.types b/tests/baselines/reference/bigintMissingESNext.types index d34f9e5250e09..210b43ed54547 100644 --- a/tests/baselines/reference/bigintMissingESNext.types +++ b/tests/baselines/reference/bigintMissingESNext.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es2020/bigintMissingESNext.ts === +//// [tests/cases/conformance/es2020/bigintMissingESNext.ts] //// + +=== bigintMissingESNext.ts === declare function test(): void; >test : () => void diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index bfc87bff5d8dd..aa402ec0cba5c 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/bigintWithLib.ts(4,1): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/compiler/bigintWithLib.ts(19,33): error TS2769: No overload matches this call. +bigintWithLib.ts(4,1): error TS2350: Only a void function can be called with the 'new' keyword. +bigintWithLib.ts(19,33): error TS2769: No overload matches this call. Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. @@ -12,20 +12,20 @@ tests/cases/compiler/bigintWithLib.ts(19,33): error TS2769: No overload matches Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] -tests/cases/compiler/bigintWithLib.ts(24,13): error TS2540: Cannot assign to 'length' because it is a read-only property. -tests/cases/compiler/bigintWithLib.ts(31,35): error TS2769: No overload matches this call. +bigintWithLib.ts(24,13): error TS2540: Cannot assign to 'length' because it is a read-only property. +bigintWithLib.ts(31,35): error TS2769: No overload matches this call. Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. -tests/cases/compiler/bigintWithLib.ts(36,13): error TS2540: Cannot assign to 'length' because it is a read-only property. -tests/cases/compiler/bigintWithLib.ts(43,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'. -tests/cases/compiler/bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'. +bigintWithLib.ts(36,13): error TS2540: Cannot assign to 'length' because it is a read-only property. +bigintWithLib.ts(43,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'. +bigintWithLib.ts(46,26): error TS2345: Argument of type 'number' is not assignable to parameter of type 'bigint'. -==== tests/cases/compiler/bigintWithLib.ts (7 errors) ==== +==== bigintWithLib.ts (7 errors) ==== // Test BigInt functions let bigintVal: bigint = BigInt(123); bigintVal = BigInt("456"); diff --git a/tests/baselines/reference/bigintWithLib.js b/tests/baselines/reference/bigintWithLib.js index c76a0775725d1..f5d46d403786f 100644 --- a/tests/baselines/reference/bigintWithLib.js +++ b/tests/baselines/reference/bigintWithLib.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bigintWithLib.ts] //// + //// [bigintWithLib.ts] // Test BigInt functions let bigintVal: bigint = BigInt(123); diff --git a/tests/baselines/reference/bigintWithLib.symbols b/tests/baselines/reference/bigintWithLib.symbols index 19b6130c71f1a..7ba46ce7478c9 100644 --- a/tests/baselines/reference/bigintWithLib.symbols +++ b/tests/baselines/reference/bigintWithLib.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigintWithLib.ts === +//// [tests/cases/compiler/bigintWithLib.ts] //// + +=== bigintWithLib.ts === // Test BigInt functions let bigintVal: bigint = BigInt(123); >bigintVal : Symbol(bigintVal, Decl(bigintWithLib.ts, 1, 3)) diff --git a/tests/baselines/reference/bigintWithLib.types b/tests/baselines/reference/bigintWithLib.types index 6e4376a0e24a2..659ef454134f8 100644 --- a/tests/baselines/reference/bigintWithLib.types +++ b/tests/baselines/reference/bigintWithLib.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigintWithLib.ts === +//// [tests/cases/compiler/bigintWithLib.ts] //// + +=== bigintWithLib.ts === // Test BigInt functions let bigintVal: bigint = BigInt(123); >bigintVal : bigint diff --git a/tests/baselines/reference/bigintWithoutLib.errors.txt b/tests/baselines/reference/bigintWithoutLib.errors.txt index 4ff8527c2a485..ee7353bbd290a 100644 --- a/tests/baselines/reference/bigintWithoutLib.errors.txt +++ b/tests/baselines/reference/bigintWithoutLib.errors.txt @@ -1,57 +1,57 @@ -tests/cases/compiler/bigintWithoutLib.ts(4,25): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(5,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(6,5): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(7,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(7,30): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(8,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(8,31): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(9,1): error TS2322: Type 'Object' is not assignable to type 'bigint'. -tests/cases/compiler/bigintWithoutLib.ts(11,32): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/bigintWithoutLib.ts(13,38): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/bigintWithoutLib.ts(14,38): error TS2554: Expected 0 arguments, but got 2. -tests/cases/compiler/bigintWithoutLib.ts(15,38): error TS2554: Expected 0 arguments, but got 2. -tests/cases/compiler/bigintWithoutLib.ts(18,18): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(18,38): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(19,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(20,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(20,34): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(20,38): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(20,42): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(21,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(22,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(23,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(24,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(30,19): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(30,40): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(31,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(32,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(32,36): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(32,40): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(32,44): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(33,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(34,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(35,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(36,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(43,10): error TS2550: Property 'setBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(43,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(44,10): error TS2550: Property 'setBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(44,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(45,10): error TS2550: Property 'setBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(46,10): error TS2550: Property 'setBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(46,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(47,10): error TS2550: Property 'setBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(47,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(48,10): error TS2550: Property 'setBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(49,22): error TS2550: Property 'getBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(50,22): error TS2550: Property 'getBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(51,22): error TS2550: Property 'getBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(52,22): error TS2550: Property 'getBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. -tests/cases/compiler/bigintWithoutLib.ts(55,36): error TS2345: Argument of type 'bigint' is not assignable to parameter of type 'number'. -tests/cases/compiler/bigintWithoutLib.ts(55,36): error TS2737: BigInt literals are not available when targeting lower than ES2020. -tests/cases/compiler/bigintWithoutLib.ts(56,36): error TS2345: Argument of type 'bigint' is not assignable to parameter of type 'number'. +bigintWithoutLib.ts(4,25): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(5,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(6,5): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(7,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(7,30): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(8,13): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(8,31): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(9,1): error TS2322: Type 'Object' is not assignable to type 'bigint'. +bigintWithoutLib.ts(11,32): error TS2554: Expected 0 arguments, but got 1. +bigintWithoutLib.ts(13,38): error TS2554: Expected 0 arguments, but got 1. +bigintWithoutLib.ts(14,38): error TS2554: Expected 0 arguments, but got 2. +bigintWithoutLib.ts(15,38): error TS2554: Expected 0 arguments, but got 2. +bigintWithoutLib.ts(18,18): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(18,38): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(19,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(20,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(20,34): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(20,38): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(20,42): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(21,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(22,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(23,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(24,19): error TS2583: Cannot find name 'BigInt64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(30,19): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(30,40): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(31,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(32,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(32,36): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(32,40): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(32,44): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(33,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(34,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(35,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(36,20): error TS2583: Cannot find name 'BigUint64Array'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(43,10): error TS2550: Property 'setBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(43,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(44,10): error TS2550: Property 'setBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(44,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(45,10): error TS2550: Property 'setBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(46,10): error TS2550: Property 'setBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(46,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(47,10): error TS2550: Property 'setBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(47,26): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(48,10): error TS2550: Property 'setBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(49,22): error TS2550: Property 'getBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(50,22): error TS2550: Property 'getBigInt64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(51,22): error TS2550: Property 'getBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(52,22): error TS2550: Property 'getBigUint64' does not exist on type 'DataView'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later. +bigintWithoutLib.ts(55,36): error TS2345: Argument of type 'bigint' is not assignable to parameter of type 'number'. +bigintWithoutLib.ts(55,36): error TS2737: BigInt literals are not available when targeting lower than ES2020. +bigintWithoutLib.ts(56,36): error TS2345: Argument of type 'bigint' is not assignable to parameter of type 'number'. -==== tests/cases/compiler/bigintWithoutLib.ts (51 errors) ==== +==== bigintWithoutLib.ts (51 errors) ==== // Every line should error because these builtins are not declared // Test BigInt functions diff --git a/tests/baselines/reference/bigintWithoutLib.js b/tests/baselines/reference/bigintWithoutLib.js index 2dd67284e033d..de6a8f3d2e38d 100644 --- a/tests/baselines/reference/bigintWithoutLib.js +++ b/tests/baselines/reference/bigintWithoutLib.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bigintWithoutLib.ts] //// + //// [bigintWithoutLib.ts] // Every line should error because these builtins are not declared diff --git a/tests/baselines/reference/bigintWithoutLib.symbols b/tests/baselines/reference/bigintWithoutLib.symbols index ae7620f922a40..a0f7963ca1810 100644 --- a/tests/baselines/reference/bigintWithoutLib.symbols +++ b/tests/baselines/reference/bigintWithoutLib.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigintWithoutLib.ts === +//// [tests/cases/compiler/bigintWithoutLib.ts] //// + +=== bigintWithoutLib.ts === // Every line should error because these builtins are not declared // Test BigInt functions diff --git a/tests/baselines/reference/bigintWithoutLib.types b/tests/baselines/reference/bigintWithoutLib.types index f0e50102edef3..8935093c1338b 100644 --- a/tests/baselines/reference/bigintWithoutLib.types +++ b/tests/baselines/reference/bigintWithoutLib.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bigintWithoutLib.ts === +//// [tests/cases/compiler/bigintWithoutLib.ts] //// + +=== bigintWithoutLib.ts === // Every line should error because these builtins are not declared // Test BigInt functions diff --git a/tests/baselines/reference/binaryArithmatic1.errors.txt b/tests/baselines/reference/binaryArithmatic1.errors.txt index 2455e16533cfc..ced1a28fa4b84 100644 --- a/tests/baselines/reference/binaryArithmatic1.errors.txt +++ b/tests/baselines/reference/binaryArithmatic1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/binaryArithmatic1.ts(1,13): error TS18050: The value 'null' cannot be used here. +binaryArithmatic1.ts(1,13): error TS18050: The value 'null' cannot be used here. -==== tests/cases/compiler/binaryArithmatic1.ts (1 errors) ==== +==== binaryArithmatic1.ts (1 errors) ==== var v = 4 | null; ~~~~ !!! error TS18050: The value 'null' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic1.js b/tests/baselines/reference/binaryArithmatic1.js index fc347d719a59b..7cfaa3d3f3be1 100644 --- a/tests/baselines/reference/binaryArithmatic1.js +++ b/tests/baselines/reference/binaryArithmatic1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binaryArithmatic1.ts] //// + //// [binaryArithmatic1.ts] var v = 4 | null; diff --git a/tests/baselines/reference/binaryArithmatic1.symbols b/tests/baselines/reference/binaryArithmatic1.symbols index 380a2ce95c19c..b7cf958e17114 100644 --- a/tests/baselines/reference/binaryArithmatic1.symbols +++ b/tests/baselines/reference/binaryArithmatic1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic1.ts === +//// [tests/cases/compiler/binaryArithmatic1.ts] //// + +=== binaryArithmatic1.ts === var v = 4 | null; >v : Symbol(v, Decl(binaryArithmatic1.ts, 0, 3)) diff --git a/tests/baselines/reference/binaryArithmatic1.types b/tests/baselines/reference/binaryArithmatic1.types index f2039eeba6732..516261922e8b9 100644 --- a/tests/baselines/reference/binaryArithmatic1.types +++ b/tests/baselines/reference/binaryArithmatic1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic1.ts === +//// [tests/cases/compiler/binaryArithmatic1.ts] //// + +=== binaryArithmatic1.ts === var v = 4 | null; >v : number >4 | null : number diff --git a/tests/baselines/reference/binaryArithmatic2.errors.txt b/tests/baselines/reference/binaryArithmatic2.errors.txt index 8347beea8bae6..fd86a7e3c5505 100644 --- a/tests/baselines/reference/binaryArithmatic2.errors.txt +++ b/tests/baselines/reference/binaryArithmatic2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/binaryArithmatic2.ts(1,13): error TS18050: The value 'undefined' cannot be used here. +binaryArithmatic2.ts(1,13): error TS18050: The value 'undefined' cannot be used here. -==== tests/cases/compiler/binaryArithmatic2.ts (1 errors) ==== +==== binaryArithmatic2.ts (1 errors) ==== var v = 4 | undefined; ~~~~~~~~~ !!! error TS18050: The value 'undefined' cannot be used here. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic2.js b/tests/baselines/reference/binaryArithmatic2.js index 58e247ed2e72a..244fc6f91142b 100644 --- a/tests/baselines/reference/binaryArithmatic2.js +++ b/tests/baselines/reference/binaryArithmatic2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binaryArithmatic2.ts] //// + //// [binaryArithmatic2.ts] var v = 4 | undefined; diff --git a/tests/baselines/reference/binaryArithmatic2.symbols b/tests/baselines/reference/binaryArithmatic2.symbols index 7c2756f30f696..f626de12becdd 100644 --- a/tests/baselines/reference/binaryArithmatic2.symbols +++ b/tests/baselines/reference/binaryArithmatic2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic2.ts === +//// [tests/cases/compiler/binaryArithmatic2.ts] //// + +=== binaryArithmatic2.ts === var v = 4 | undefined; >v : Symbol(v, Decl(binaryArithmatic2.ts, 0, 3)) >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/binaryArithmatic2.types b/tests/baselines/reference/binaryArithmatic2.types index 1ce8776384c48..571ecd56e8d1a 100644 --- a/tests/baselines/reference/binaryArithmatic2.types +++ b/tests/baselines/reference/binaryArithmatic2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic2.ts === +//// [tests/cases/compiler/binaryArithmatic2.ts] //// + +=== binaryArithmatic2.ts === var v = 4 | undefined; >v : number >4 | undefined : number diff --git a/tests/baselines/reference/binaryArithmatic3.errors.txt b/tests/baselines/reference/binaryArithmatic3.errors.txt index 3dcc023338be3..b715db816360e 100644 --- a/tests/baselines/reference/binaryArithmatic3.errors.txt +++ b/tests/baselines/reference/binaryArithmatic3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/binaryArithmatic3.ts(1,9): error TS18050: The value 'undefined' cannot be used here. -tests/cases/compiler/binaryArithmatic3.ts(1,21): error TS18050: The value 'undefined' cannot be used here. +binaryArithmatic3.ts(1,9): error TS18050: The value 'undefined' cannot be used here. +binaryArithmatic3.ts(1,21): error TS18050: The value 'undefined' cannot be used here. -==== tests/cases/compiler/binaryArithmatic3.ts (2 errors) ==== +==== binaryArithmatic3.ts (2 errors) ==== var v = undefined | undefined; ~~~~~~~~~ !!! error TS18050: The value 'undefined' cannot be used here. diff --git a/tests/baselines/reference/binaryArithmatic3.js b/tests/baselines/reference/binaryArithmatic3.js index 09a34671ed188..e2349b569f1f7 100644 --- a/tests/baselines/reference/binaryArithmatic3.js +++ b/tests/baselines/reference/binaryArithmatic3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binaryArithmatic3.ts] //// + //// [binaryArithmatic3.ts] var v = undefined | undefined; diff --git a/tests/baselines/reference/binaryArithmatic3.symbols b/tests/baselines/reference/binaryArithmatic3.symbols index 66ca1a70b758b..c8fa121c73100 100644 --- a/tests/baselines/reference/binaryArithmatic3.symbols +++ b/tests/baselines/reference/binaryArithmatic3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic3.ts === +//// [tests/cases/compiler/binaryArithmatic3.ts] //// + +=== binaryArithmatic3.ts === var v = undefined | undefined; >v : Symbol(v, Decl(binaryArithmatic3.ts, 0, 3)) >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/binaryArithmatic3.types b/tests/baselines/reference/binaryArithmatic3.types index 2cb7161fd143b..da2adcfdb5e3f 100644 --- a/tests/baselines/reference/binaryArithmatic3.types +++ b/tests/baselines/reference/binaryArithmatic3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic3.ts === +//// [tests/cases/compiler/binaryArithmatic3.ts] //// + +=== binaryArithmatic3.ts === var v = undefined | undefined; >v : number >undefined | undefined : number diff --git a/tests/baselines/reference/binaryArithmatic4.errors.txt b/tests/baselines/reference/binaryArithmatic4.errors.txt index 1ffada088e66d..95524a20b9f2e 100644 --- a/tests/baselines/reference/binaryArithmatic4.errors.txt +++ b/tests/baselines/reference/binaryArithmatic4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/binaryArithmatic4.ts(1,9): error TS18050: The value 'null' cannot be used here. -tests/cases/compiler/binaryArithmatic4.ts(1,16): error TS18050: The value 'null' cannot be used here. +binaryArithmatic4.ts(1,9): error TS18050: The value 'null' cannot be used here. +binaryArithmatic4.ts(1,16): error TS18050: The value 'null' cannot be used here. -==== tests/cases/compiler/binaryArithmatic4.ts (2 errors) ==== +==== binaryArithmatic4.ts (2 errors) ==== var v = null | null; ~~~~ !!! error TS18050: The value 'null' cannot be used here. diff --git a/tests/baselines/reference/binaryArithmatic4.js b/tests/baselines/reference/binaryArithmatic4.js index 1b00d6c9a3c21..1bf696ddef33f 100644 --- a/tests/baselines/reference/binaryArithmatic4.js +++ b/tests/baselines/reference/binaryArithmatic4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binaryArithmatic4.ts] //// + //// [binaryArithmatic4.ts] var v = null | null; diff --git a/tests/baselines/reference/binaryArithmatic4.symbols b/tests/baselines/reference/binaryArithmatic4.symbols index 4dab72c58d140..a761e47aca302 100644 --- a/tests/baselines/reference/binaryArithmatic4.symbols +++ b/tests/baselines/reference/binaryArithmatic4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic4.ts === +//// [tests/cases/compiler/binaryArithmatic4.ts] //// + +=== binaryArithmatic4.ts === var v = null | null; >v : Symbol(v, Decl(binaryArithmatic4.ts, 0, 3)) diff --git a/tests/baselines/reference/binaryArithmatic4.types b/tests/baselines/reference/binaryArithmatic4.types index cb7d24b6863cc..066ca9779eb5c 100644 --- a/tests/baselines/reference/binaryArithmatic4.types +++ b/tests/baselines/reference/binaryArithmatic4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmatic4.ts === +//// [tests/cases/compiler/binaryArithmatic4.ts] //// + +=== binaryArithmatic4.ts === var v = null | null; >v : number >null | null : number diff --git a/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.js b/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.js index ab5cd46e5996c..4a56b0a264f1b 100644 --- a/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.js +++ b/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binaryArithmeticControlFlowGraphNotTooLarge.ts] //// + //// [binaryArithmeticControlFlowGraphNotTooLarge.ts] // Repro from #29926 (expanded 10x for good measure) diff --git a/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.symbols b/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.symbols index 66da14318d614..3f78363aee94c 100644 --- a/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.symbols +++ b/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmeticControlFlowGraphNotTooLarge.ts === +//// [tests/cases/compiler/binaryArithmeticControlFlowGraphNotTooLarge.ts] //// + +=== binaryArithmeticControlFlowGraphNotTooLarge.ts === // Repro from #29926 (expanded 10x for good measure) const foo = function (this: any) { diff --git a/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.types b/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.types index 73618259b5bb6..a10e57760e0c4 100644 --- a/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.types +++ b/tests/baselines/reference/binaryArithmeticControlFlowGraphNotTooLarge.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binaryArithmeticControlFlowGraphNotTooLarge.ts === +//// [tests/cases/compiler/binaryArithmeticControlFlowGraphNotTooLarge.ts] //// + +=== binaryArithmeticControlFlowGraphNotTooLarge.ts === // Repro from #29926 (expanded 10x for good measure) const foo = function (this: any) { diff --git a/tests/baselines/reference/binaryIntegerLiteral.js b/tests/baselines/reference/binaryIntegerLiteral.js index 6f4270cf2b826..da55042b1a984 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.js +++ b/tests/baselines/reference/binaryIntegerLiteral.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts] //// + //// [binaryIntegerLiteral.ts] var bin1 = 0b11010; var bin2 = 0B11010; diff --git a/tests/baselines/reference/binaryIntegerLiteral.symbols b/tests/baselines/reference/binaryIntegerLiteral.symbols index fb15a8b6e6ca0..9fdb1885439d6 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.symbols +++ b/tests/baselines/reference/binaryIntegerLiteral.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts === +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts] //// + +=== binaryIntegerLiteral.ts === var bin1 = 0b11010; >bin1 : Symbol(bin1, Decl(binaryIntegerLiteral.ts, 0, 3)) diff --git a/tests/baselines/reference/binaryIntegerLiteral.types b/tests/baselines/reference/binaryIntegerLiteral.types index ff959a587831a..2c81595c0c8b4 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.types +++ b/tests/baselines/reference/binaryIntegerLiteral.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts === +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts] //// + +=== binaryIntegerLiteral.ts === var bin1 = 0b11010; >bin1 : number >0b11010 : 26 diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.js b/tests/baselines/reference/binaryIntegerLiteralES6.js index bfb85a241d354..f5f939072bc37 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.js +++ b/tests/baselines/reference/binaryIntegerLiteralES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts] //// + //// [binaryIntegerLiteralES6.ts] var bin1 = 0b11010; var bin2 = 0B11010; diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.symbols b/tests/baselines/reference/binaryIntegerLiteralES6.symbols index 15c8c633019e3..e50578ce602b9 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.symbols +++ b/tests/baselines/reference/binaryIntegerLiteralES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts === +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts] //// + +=== binaryIntegerLiteralES6.ts === var bin1 = 0b11010; >bin1 : Symbol(bin1, Decl(binaryIntegerLiteralES6.ts, 0, 3)) diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.types b/tests/baselines/reference/binaryIntegerLiteralES6.types index a2c0a6ca224d6..2abc7ca72ca22 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.types +++ b/tests/baselines/reference/binaryIntegerLiteralES6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts === +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts] //// + +=== binaryIntegerLiteralES6.ts === var bin1 = 0b11010; >bin1 : number >0b11010 : 26 diff --git a/tests/baselines/reference/binaryIntegerLiteralError.errors.txt b/tests/baselines/reference/binaryIntegerLiteralError.errors.txt index df4eafbddc375..d344e38f7cdb6 100644 --- a/tests/baselines/reference/binaryIntegerLiteralError.errors.txt +++ b/tests/baselines/reference/binaryIntegerLiteralError.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts(2,17): error TS1005: ',' expected. -tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts(3,17): error TS1005: ',' expected. +binaryIntegerLiteralError.ts(2,17): error TS1005: ',' expected. +binaryIntegerLiteralError.ts(3,17): error TS1005: ',' expected. -==== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts (2 errors) ==== +==== binaryIntegerLiteralError.ts (2 errors) ==== // error var bin1 = 0B1102110; ~~~~ diff --git a/tests/baselines/reference/binaryIntegerLiteralError.js b/tests/baselines/reference/binaryIntegerLiteralError.js index 1b4cbc22ccebc..b46f6a1216748 100644 --- a/tests/baselines/reference/binaryIntegerLiteralError.js +++ b/tests/baselines/reference/binaryIntegerLiteralError.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts] //// + //// [binaryIntegerLiteralError.ts] // error var bin1 = 0B1102110; diff --git a/tests/baselines/reference/binaryIntegerLiteralError.symbols b/tests/baselines/reference/binaryIntegerLiteralError.symbols index dca3aa3d9ffa0..645df8b0e34fb 100644 --- a/tests/baselines/reference/binaryIntegerLiteralError.symbols +++ b/tests/baselines/reference/binaryIntegerLiteralError.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts === +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts] //// + +=== binaryIntegerLiteralError.ts === // error var bin1 = 0B1102110; >bin1 : Symbol(bin1, Decl(binaryIntegerLiteralError.ts, 1, 3), Decl(binaryIntegerLiteralError.ts, 2, 3)) diff --git a/tests/baselines/reference/binaryIntegerLiteralError.types b/tests/baselines/reference/binaryIntegerLiteralError.types index ca92f4f17a706..082cc47fd5cb2 100644 --- a/tests/baselines/reference/binaryIntegerLiteralError.types +++ b/tests/baselines/reference/binaryIntegerLiteralError.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts === +//// [tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts] //// + +=== binaryIntegerLiteralError.ts === // error var bin1 = 0B1102110; >bin1 : number diff --git a/tests/baselines/reference/bind1.errors.txt b/tests/baselines/reference/bind1.errors.txt index 3d50d18b1bcca..a324676ec837d 100644 --- a/tests/baselines/reference/bind1.errors.txt +++ b/tests/baselines/reference/bind1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/bind1.ts(2,31): error TS2304: Cannot find name 'I'. +bind1.ts(2,31): error TS2304: Cannot find name 'I'. -==== tests/cases/compiler/bind1.ts (1 errors) ==== +==== bind1.ts (1 errors) ==== module M { export class C implements I {} // this should be an unresolved symbol I error ~ diff --git a/tests/baselines/reference/bind1.js b/tests/baselines/reference/bind1.js index de83d56ab8ef8..94f30ed8b7547 100644 --- a/tests/baselines/reference/bind1.js +++ b/tests/baselines/reference/bind1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bind1.ts] //// + //// [bind1.ts] module M { export class C implements I {} // this should be an unresolved symbol I error diff --git a/tests/baselines/reference/bind1.symbols b/tests/baselines/reference/bind1.symbols index c985a283932dc..7d039976d2fcc 100644 --- a/tests/baselines/reference/bind1.symbols +++ b/tests/baselines/reference/bind1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bind1.ts === +//// [tests/cases/compiler/bind1.ts] //// + +=== bind1.ts === module M { >M : Symbol(M, Decl(bind1.ts, 0, 0)) diff --git a/tests/baselines/reference/bind1.types b/tests/baselines/reference/bind1.types index 111def9c7f06e..62ebde3a117cc 100644 --- a/tests/baselines/reference/bind1.types +++ b/tests/baselines/reference/bind1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bind1.ts === +//// [tests/cases/compiler/bind1.ts] //// + +=== bind1.ts === module M { >M : typeof M diff --git a/tests/baselines/reference/bind2.js b/tests/baselines/reference/bind2.js index 51d8178319fd2..f249ef1ea1850 100644 --- a/tests/baselines/reference/bind2.js +++ b/tests/baselines/reference/bind2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bind2.ts] //// + //// [bind2.ts] diff --git a/tests/baselines/reference/bind2.symbols b/tests/baselines/reference/bind2.symbols index 9e3cf7d21d479..b98d05b62dc07 100644 --- a/tests/baselines/reference/bind2.symbols +++ b/tests/baselines/reference/bind2.symbols @@ -1,2 +1,4 @@ -=== tests/cases/compiler/bind2.ts === +//// [tests/cases/compiler/bind2.ts] //// + +=== bind2.ts === diff --git a/tests/baselines/reference/bind2.types b/tests/baselines/reference/bind2.types index 9e3cf7d21d479..b98d05b62dc07 100644 --- a/tests/baselines/reference/bind2.types +++ b/tests/baselines/reference/bind2.types @@ -1,2 +1,4 @@ -=== tests/cases/compiler/bind2.ts === +//// [tests/cases/compiler/bind2.ts] //// + +=== bind2.ts === diff --git a/tests/baselines/reference/binderBinaryExpressionStress.js b/tests/baselines/reference/binderBinaryExpressionStress.js index 7f903e39cf05a..de9f50ecedfae 100644 --- a/tests/baselines/reference/binderBinaryExpressionStress.js +++ b/tests/baselines/reference/binderBinaryExpressionStress.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binderBinaryExpressionStress.ts] //// + //// [binderBinaryExpressionStress.ts] // regression test for https://github.com/microsoft/TypeScript/issues/35633 // If we need to emit comments or subsitutions for a node, we have to skip the trampoline diff --git a/tests/baselines/reference/binderUninitializedModuleExportsAssignment.symbols b/tests/baselines/reference/binderUninitializedModuleExportsAssignment.symbols index 0e501f14c8500..4aabb8616f687 100644 --- a/tests/baselines/reference/binderUninitializedModuleExportsAssignment.symbols +++ b/tests/baselines/reference/binderUninitializedModuleExportsAssignment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/salsa/loop.js === +//// [tests/cases/conformance/salsa/binderUninitializedModuleExportsAssignment.ts] //// + +=== loop.js === var loop1 = loop2; >loop1 : Symbol(loop1, Decl(loop.js, 0, 3)) >loop2 : Symbol(loop2, Decl(loop.js, 1, 3)) diff --git a/tests/baselines/reference/binderUninitializedModuleExportsAssignment.types b/tests/baselines/reference/binderUninitializedModuleExportsAssignment.types index 7a6fee6cddfef..e505b3f68544c 100644 --- a/tests/baselines/reference/binderUninitializedModuleExportsAssignment.types +++ b/tests/baselines/reference/binderUninitializedModuleExportsAssignment.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/salsa/loop.js === +//// [tests/cases/conformance/salsa/binderUninitializedModuleExportsAssignment.ts] //// + +=== loop.js === var loop1 = loop2; >loop1 : any >loop2 : any diff --git a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.errors.txt b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.errors.txt index 200c56f7689a1..b4237742ac51d 100644 --- a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.errors.txt +++ b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts(2,7): error TS2571: Object is of type 'unknown'. -tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts(3,9): error TS2339: Property 'p1' does not exist on type 'unknown'. -tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts(4,7): error TS2461: Type 'unknown' is not an array type. -tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts(4,7): error TS2571: Object is of type 'unknown'. -tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts(5,7): error TS2461: Type 'unknown' is not an array type. +bindingPatternCannotBeOnlyInferenceSource.ts(2,7): error TS2571: Object is of type 'unknown'. +bindingPatternCannotBeOnlyInferenceSource.ts(3,9): error TS2339: Property 'p1' does not exist on type 'unknown'. +bindingPatternCannotBeOnlyInferenceSource.ts(4,7): error TS2461: Type 'unknown' is not an array type. +bindingPatternCannotBeOnlyInferenceSource.ts(4,7): error TS2571: Object is of type 'unknown'. +bindingPatternCannotBeOnlyInferenceSource.ts(5,7): error TS2461: Type 'unknown' is not an array type. -==== tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts (5 errors) ==== +==== bindingPatternCannotBeOnlyInferenceSource.ts (5 errors) ==== declare function f(): T; const {} = f(); // error (only in strictNullChecks) ~~ diff --git a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.js b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.js index 40274a72f00f1..d188000eb4f7d 100644 --- a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.js +++ b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts] //// + //// [bindingPatternCannotBeOnlyInferenceSource.ts] declare function f(): T; const {} = f(); // error (only in strictNullChecks) diff --git a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.symbols b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.symbols index 031d39e3abd8b..ee5c7bb2ecf64 100644 --- a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.symbols +++ b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts === +//// [tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts] //// + +=== bindingPatternCannotBeOnlyInferenceSource.ts === declare function f(): T; >f : Symbol(f, Decl(bindingPatternCannotBeOnlyInferenceSource.ts, 0, 0)) >T : Symbol(T, Decl(bindingPatternCannotBeOnlyInferenceSource.ts, 0, 19)) diff --git a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.types b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.types index 1c81cf4f8db5b..75ba9594342ed 100644 --- a/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.types +++ b/tests/baselines/reference/bindingPatternCannotBeOnlyInferenceSource.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts === +//// [tests/cases/compiler/bindingPatternCannotBeOnlyInferenceSource.ts] //// + +=== bindingPatternCannotBeOnlyInferenceSource.ts === declare function f(): T; >f : () => T diff --git a/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.js b/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.js index fa74aadf41e43..8ae5cb7067453 100644 --- a/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.js +++ b/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bindingPatternContextualTypeDoesNotCauseWidening.ts] //// + //// [bindingPatternContextualTypeDoesNotCauseWidening.ts] declare function pick(keys: T[], obj?: O): Pick; const _ = pick(['b'], { a: 'a', b: 'b' }); // T: "b" diff --git a/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.symbols b/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.symbols index bce99caf157b4..b19da02779efb 100644 --- a/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.symbols +++ b/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternContextualTypeDoesNotCauseWidening.ts === +//// [tests/cases/compiler/bindingPatternContextualTypeDoesNotCauseWidening.ts] //// + +=== bindingPatternContextualTypeDoesNotCauseWidening.ts === declare function pick(keys: T[], obj?: O): Pick; >pick : Symbol(pick, Decl(bindingPatternContextualTypeDoesNotCauseWidening.ts, 0, 0)) >O : Symbol(O, Decl(bindingPatternContextualTypeDoesNotCauseWidening.ts, 0, 22)) diff --git a/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.types b/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.types index 2aa44d96f6a97..d70d2910442b1 100644 --- a/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.types +++ b/tests/baselines/reference/bindingPatternContextualTypeDoesNotCauseWidening.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternContextualTypeDoesNotCauseWidening.ts === +//// [tests/cases/compiler/bindingPatternContextualTypeDoesNotCauseWidening.ts] //// + +=== bindingPatternContextualTypeDoesNotCauseWidening.ts === declare function pick(keys: T[], obj?: O): Pick; >pick : (keys: T[], obj?: O) => Pick >keys : T[] diff --git a/tests/baselines/reference/bindingPatternInParameter01.js b/tests/baselines/reference/bindingPatternInParameter01.js index 27b3a59e81ed7..5143313b5a720 100644 --- a/tests/baselines/reference/bindingPatternInParameter01.js +++ b/tests/baselines/reference/bindingPatternInParameter01.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bindingPatternInParameter01.ts] //// + //// [bindingPatternInParameter01.ts] const nestedArray = [[[1, 2]], [[3, 4]]]; diff --git a/tests/baselines/reference/bindingPatternInParameter01.symbols b/tests/baselines/reference/bindingPatternInParameter01.symbols index 321837773c04c..dfb79a6a47ad2 100644 --- a/tests/baselines/reference/bindingPatternInParameter01.symbols +++ b/tests/baselines/reference/bindingPatternInParameter01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternInParameter01.ts === +//// [tests/cases/compiler/bindingPatternInParameter01.ts] //// + +=== bindingPatternInParameter01.ts === const nestedArray = [[[1, 2]], [[3, 4]]]; >nestedArray : Symbol(nestedArray, Decl(bindingPatternInParameter01.ts, 0, 5)) diff --git a/tests/baselines/reference/bindingPatternInParameter01.types b/tests/baselines/reference/bindingPatternInParameter01.types index d931cfe4f391a..91b4357f532d8 100644 --- a/tests/baselines/reference/bindingPatternInParameter01.types +++ b/tests/baselines/reference/bindingPatternInParameter01.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternInParameter01.ts === +//// [tests/cases/compiler/bindingPatternInParameter01.ts] //// + +=== bindingPatternInParameter01.ts === const nestedArray = [[[1, 2]], [[3, 4]]]; >nestedArray : number[][][] >[[[1, 2]], [[3, 4]]] : number[][][] diff --git a/tests/baselines/reference/bindingPatternOmittedExpressionNesting.js b/tests/baselines/reference/bindingPatternOmittedExpressionNesting.js index 71b84b3fc9b85..51e38bc699815 100644 --- a/tests/baselines/reference/bindingPatternOmittedExpressionNesting.js +++ b/tests/baselines/reference/bindingPatternOmittedExpressionNesting.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bindingPatternOmittedExpressionNesting.ts] //// + //// [bindingPatternOmittedExpressionNesting.ts] export let [,,[,[],,[],]] = undefined as any; diff --git a/tests/baselines/reference/bindingPatternOmittedExpressionNesting.symbols b/tests/baselines/reference/bindingPatternOmittedExpressionNesting.symbols index 25db0dd62719e..85120091ef750 100644 --- a/tests/baselines/reference/bindingPatternOmittedExpressionNesting.symbols +++ b/tests/baselines/reference/bindingPatternOmittedExpressionNesting.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternOmittedExpressionNesting.ts === +//// [tests/cases/compiler/bindingPatternOmittedExpressionNesting.ts] //// + +=== bindingPatternOmittedExpressionNesting.ts === export let [,,[,[],,[],]] = undefined as any; >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/bindingPatternOmittedExpressionNesting.types b/tests/baselines/reference/bindingPatternOmittedExpressionNesting.types index 2c5211c9d9d68..af03048c6ff87 100644 --- a/tests/baselines/reference/bindingPatternOmittedExpressionNesting.types +++ b/tests/baselines/reference/bindingPatternOmittedExpressionNesting.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bindingPatternOmittedExpressionNesting.ts === +//// [tests/cases/compiler/bindingPatternOmittedExpressionNesting.ts] //// + +=== bindingPatternOmittedExpressionNesting.ts === export let [,,[,[],,[],]] = undefined as any; > : undefined > : undefined diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.js b/tests/baselines/reference/binopAssignmentShouldHaveType.js index c5a0357c7eed1..f13aec821a786 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.js +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/binopAssignmentShouldHaveType.ts] //// + //// [binopAssignmentShouldHaveType.ts] declare var console; "use strict"; diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.symbols b/tests/baselines/reference/binopAssignmentShouldHaveType.symbols index 70c594628bf6b..805b0530b4577 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.symbols +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binopAssignmentShouldHaveType.ts === +//// [tests/cases/compiler/binopAssignmentShouldHaveType.ts] //// + +=== binopAssignmentShouldHaveType.ts === declare var console; >console : Symbol(console, Decl(binopAssignmentShouldHaveType.ts, 0, 11)) diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.types b/tests/baselines/reference/binopAssignmentShouldHaveType.types index 98969f2c1d3fd..e97c04a8151e8 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.types +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/binopAssignmentShouldHaveType.ts === +//// [tests/cases/compiler/binopAssignmentShouldHaveType.ts] //// + +=== binopAssignmentShouldHaveType.ts === declare var console; >console : any diff --git a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.errors.txt b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.errors.txt index 221ac478cd6ba..00607252dbfa7 100644 --- a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.errors.txt +++ b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(3,1): error TS2447: The '^=' operator is not allowed for boolean types. Consider using '!==' instead. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(9,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(14,1): error TS2447: The '&=' operator is not allowed for boolean types. Consider using '&&' instead. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(20,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(24,1): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. -tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +bitwiseCompoundAssignmentOperators.ts(3,1): error TS2447: The '^=' operator is not allowed for boolean types. Consider using '!==' instead. +bitwiseCompoundAssignmentOperators.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +bitwiseCompoundAssignmentOperators.ts(9,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +bitwiseCompoundAssignmentOperators.ts(14,1): error TS2447: The '&=' operator is not allowed for boolean types. Consider using '&&' instead. +bitwiseCompoundAssignmentOperators.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +bitwiseCompoundAssignmentOperators.ts(20,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +bitwiseCompoundAssignmentOperators.ts(24,1): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. +bitwiseCompoundAssignmentOperators.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -==== tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts (8 errors) ==== +==== bitwiseCompoundAssignmentOperators.ts (8 errors) ==== var a = true; var b = 1; a ^= a; diff --git a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.js b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.js index c148fc0142cb1..e71d8be72ebc3 100644 --- a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.js +++ b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts] //// + //// [bitwiseCompoundAssignmentOperators.ts] var a = true; var b = 1; diff --git a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.symbols b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.symbols index 87a24424787d2..b5d07419451f3 100644 --- a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.symbols +++ b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts === +//// [tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts] //// + +=== bitwiseCompoundAssignmentOperators.ts === var a = true; >a : Symbol(a, Decl(bitwiseCompoundAssignmentOperators.ts, 0, 3)) diff --git a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.types b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.types index dd71bb1e6c2a4..a5586995ab1ed 100644 --- a/tests/baselines/reference/bitwiseCompoundAssignmentOperators.types +++ b/tests/baselines/reference/bitwiseCompoundAssignmentOperators.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts === +//// [tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts] //// + +=== bitwiseCompoundAssignmentOperators.ts === var a = true; >a : boolean >true : true diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt index d730ef41fd8c7..38980dbb0d46f 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(5,10): error TS1005: ',' expected. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(5,11): error TS1109: Expression expected. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(8,27): error TS1134: Variable declaration expected. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts(11,9): error TS1109: Expression expected. +bitwiseNotOperatorInvalidOperations.ts(5,10): error TS1005: ',' expected. +bitwiseNotOperatorInvalidOperations.ts(5,11): error TS1109: Expression expected. +bitwiseNotOperatorInvalidOperations.ts(8,27): error TS1134: Variable declaration expected. +bitwiseNotOperatorInvalidOperations.ts(11,9): error TS1109: Expression expected. -==== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts (4 errors) ==== +==== bitwiseNotOperatorInvalidOperations.ts (4 errors) ==== // Unary operator ~ var q; diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js index 1b64091c048f5..fd67d38e58e57 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts] //// + //// [bitwiseNotOperatorInvalidOperations.ts] // Unary operator ~ var q; diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.symbols b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.symbols index 69965f071cac5..3452036b57852 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts] //// + +=== bitwiseNotOperatorInvalidOperations.ts === // Unary operator ~ var q; >q : Symbol(q, Decl(bitwiseNotOperatorInvalidOperations.ts, 1, 3)) diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.types b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.types index 01a51be84e974..30eabca6ea8de 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.types +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorInvalidOperations.ts] //// + +=== bitwiseNotOperatorInvalidOperations.ts === // Unary operator ~ var q; >q : any diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt index 1584bb06fe503..3f827e0f4e93e 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(34,24): error TS18050: The value 'undefined' cannot be used here. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(35,24): error TS18050: The value 'null' cannot be used here. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(46,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(47,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. -tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. +bitwiseNotOperatorWithAnyOtherType.ts(34,24): error TS18050: The value 'undefined' cannot be used here. +bitwiseNotOperatorWithAnyOtherType.ts(35,24): error TS18050: The value 'null' cannot be used here. +bitwiseNotOperatorWithAnyOtherType.ts(46,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'. +bitwiseNotOperatorWithAnyOtherType.ts(47,26): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. +bitwiseNotOperatorWithAnyOtherType.ts(48,26): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. -==== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts (5 errors) ==== +==== bitwiseNotOperatorWithAnyOtherType.ts (5 errors) ==== // ~ operator on any type var ANY: any; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js index 8827aa2d57fa1..e9366ce705d47 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts] //// + //// [bitwiseNotOperatorWithAnyOtherType.ts] // ~ operator on any type diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols index c4ca5a5252b14..9f7a2cf4369ce 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts] //// + +=== bitwiseNotOperatorWithAnyOtherType.ts === // ~ operator on any type var ANY: any; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types index 7f0739881730e..109e408411c00 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts] //// + +=== bitwiseNotOperatorWithAnyOtherType.ts === // ~ operator on any type var ANY: any; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js index 00766ee43033d..e8ee07455d579 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts] //// + //// [bitwiseNotOperatorWithBooleanType.ts] // ~ operator on boolean type var BOOLEAN: boolean; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.symbols index d52e73ba60086..7ac632e66a12a 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts] //// + +=== bitwiseNotOperatorWithBooleanType.ts === // ~ operator on boolean type var BOOLEAN: boolean; >BOOLEAN : Symbol(BOOLEAN, Decl(bitwiseNotOperatorWithBooleanType.ts, 1, 3)) diff --git a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types index 2875a46355c71..036add1b80209 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts] //// + +=== bitwiseNotOperatorWithBooleanType.ts === // ~ operator on boolean type var BOOLEAN: boolean; >BOOLEAN : boolean diff --git a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.js b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.js index 0bcf2fa39569b..214c3b343a596 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithEnumType.ts] //// + //// [bitwiseNotOperatorWithEnumType.ts] // ~ operator on enum type diff --git a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols index e734966c59419..3326e76c06ba6 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithEnumType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithEnumType.ts] //// + +=== bitwiseNotOperatorWithEnumType.ts === // ~ operator on enum type enum ENUM1 { A, B, "" }; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types index 3ecc4a705a29e..50c0edecf41fc 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithEnumType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithEnumType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithEnumType.ts] //// + +=== bitwiseNotOperatorWithEnumType.ts === // ~ operator on enum type enum ENUM1 { A, B, "" }; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js index d446532caf88c..2373b8140dc62 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts] //// + //// [bitwiseNotOperatorWithNumberType.ts] // ~ operator on number type var NUMBER: number; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.symbols index f7dd03d78c3e9..760c6d64b875e 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts] //// + +=== bitwiseNotOperatorWithNumberType.ts === // ~ operator on number type var NUMBER: number; >NUMBER : Symbol(NUMBER, Decl(bitwiseNotOperatorWithNumberType.ts, 1, 3)) diff --git a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types index 8dc3c31867fc3..3c41bbd478ff7 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts] //// + +=== bitwiseNotOperatorWithNumberType.ts === // ~ operator on number type var NUMBER: number; >NUMBER : number diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.js b/tests/baselines/reference/bitwiseNotOperatorWithStringType.js index 481e75e3378a2..9e39e5a83b024 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts] //// + //// [bitwiseNotOperatorWithStringType.ts] // ~ operator on string type var STRING: string; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols index 66681fd88ed84..f96b907d3fedb 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts] //// + +=== bitwiseNotOperatorWithStringType.ts === // ~ operator on string type var STRING: string; >STRING : Symbol(STRING, Decl(bitwiseNotOperatorWithStringType.ts, 1, 3)) diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.types b/tests/baselines/reference/bitwiseNotOperatorWithStringType.types index 130b52c84717d..7ee85dab71183 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.types +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts === +//// [tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts] //// + +=== bitwiseNotOperatorWithStringType.ts === // ~ operator on string type var STRING: string; >STRING : string diff --git a/tests/baselines/reference/bivariantInferences.js b/tests/baselines/reference/bivariantInferences.js index a910ca15e93bb..efc3bdb6d0613 100644 --- a/tests/baselines/reference/bivariantInferences.js +++ b/tests/baselines/reference/bivariantInferences.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts] //// + //// [bivariantInferences.ts] // Repro from #27337 diff --git a/tests/baselines/reference/bivariantInferences.symbols b/tests/baselines/reference/bivariantInferences.symbols index 0697c171c54e8..dc815a49485ab 100644 --- a/tests/baselines/reference/bivariantInferences.symbols +++ b/tests/baselines/reference/bivariantInferences.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts === +//// [tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts] //// + +=== bivariantInferences.ts === // Repro from #27337 interface Array { diff --git a/tests/baselines/reference/bivariantInferences.types b/tests/baselines/reference/bivariantInferences.types index 44e90b0c761ab..98440b3e6b160 100644 --- a/tests/baselines/reference/bivariantInferences.types +++ b/tests/baselines/reference/bivariantInferences.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts === +//// [tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts] //// + +=== bivariantInferences.ts === // Repro from #27337 interface Array { diff --git a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js index 27568fd51ec36..fe81e6e7e09b0 100644 --- a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js +++ b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingCaptureThisInFunction.ts] //// + //// [blockScopedBindingCaptureThisInFunction.ts] // https://github.com/Microsoft/TypeScript/issues/11038 () => function () { diff --git a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.symbols b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.symbols index e19b805dc5cee..2f1b3faac335b 100644 --- a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.symbols +++ b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingCaptureThisInFunction.ts === +//// [tests/cases/compiler/blockScopedBindingCaptureThisInFunction.ts] //// + +=== blockScopedBindingCaptureThisInFunction.ts === // https://github.com/Microsoft/TypeScript/issues/11038 () => function () { for (let someKey in {}) { diff --git a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.types b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.types index 34d1dae9a947c..f15a2ff02330a 100644 --- a/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.types +++ b/tests/baselines/reference/blockScopedBindingCaptureThisInFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingCaptureThisInFunction.ts === +//// [tests/cases/compiler/blockScopedBindingCaptureThisInFunction.ts] //// + +=== blockScopedBindingCaptureThisInFunction.ts === // https://github.com/Microsoft/TypeScript/issues/11038 () => function () { >() => function () { for (let someKey in {}) { this.helloWorld(); () => someKey; }} : () => () => void diff --git a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.errors.txt b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.errors.txt index 4f04f2babc5d5..4eb1fec342c35 100644 --- a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.errors.txt +++ b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(2,12): error TS2448: Block-scoped variable 'a' used before its declaration. -tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(2,12): error TS2538: Type 'any' cannot be used as an index type. -tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(5,12): error TS2448: Block-scoped variable 'a' used before its declaration. -tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(5,12): error TS2538: Type 'any' cannot be used as an index type. -tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(8,7): error TS2448: Block-scoped variable 'b' used before its declaration. -tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type 'any' cannot be used as an index type. +blockScopedBindingUsedBeforeDef.ts(2,12): error TS2448: Block-scoped variable 'a' used before its declaration. +blockScopedBindingUsedBeforeDef.ts(2,12): error TS2538: Type 'any' cannot be used as an index type. +blockScopedBindingUsedBeforeDef.ts(5,12): error TS2448: Block-scoped variable 'a' used before its declaration. +blockScopedBindingUsedBeforeDef.ts(5,12): error TS2538: Type 'any' cannot be used as an index type. +blockScopedBindingUsedBeforeDef.ts(8,7): error TS2448: Block-scoped variable 'b' used before its declaration. +blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type 'any' cannot be used as an index type. -==== tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts (6 errors) ==== +==== blockScopedBindingUsedBeforeDef.ts (6 errors) ==== // 1: for (let {[a]: a} of [{ }]) continue; ~ !!! error TS2448: Block-scoped variable 'a' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts:2:16: 'a' is declared here. +!!! related TS2728 blockScopedBindingUsedBeforeDef.ts:2:16: 'a' is declared here. ~ !!! error TS2538: Type 'any' cannot be used as an index type. @@ -19,7 +19,7 @@ tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type for (let {[a]: a} = { }; false; ) continue; ~ !!! error TS2448: Block-scoped variable 'a' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts:5:16: 'a' is declared here. +!!! related TS2728 blockScopedBindingUsedBeforeDef.ts:5:16: 'a' is declared here. ~ !!! error TS2538: Type 'any' cannot be used as an index type. @@ -27,6 +27,6 @@ tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type let {[b]: b} = { }; ~ !!! error TS2448: Block-scoped variable 'b' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts:8:11: 'b' is declared here. +!!! related TS2728 blockScopedBindingUsedBeforeDef.ts:8:11: 'b' is declared here. ~ !!! error TS2538: Type 'any' cannot be used as an index type. \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js index adbba8ee8ae6a..07650b4e9b4aa 100644 --- a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js +++ b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts] //// + //// [blockScopedBindingUsedBeforeDef.ts] // 1: for (let {[a]: a} of [{ }]) continue; diff --git a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.symbols b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.symbols index 26c07aee53139..615d53deb9dd9 100644 --- a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.symbols +++ b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts === +//// [tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts] //// + +=== blockScopedBindingUsedBeforeDef.ts === // 1: for (let {[a]: a} of [{ }]) continue; >a : Symbol(a, Decl(blockScopedBindingUsedBeforeDef.ts, 1, 10)) diff --git a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.types b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.types index 9548aa7735dd6..f630e0362a416 100644 --- a/tests/baselines/reference/blockScopedBindingUsedBeforeDef.types +++ b/tests/baselines/reference/blockScopedBindingUsedBeforeDef.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts === +//// [tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts] //// + +=== blockScopedBindingUsedBeforeDef.ts === // 1: for (let {[a]: a} of [{ }]) continue; >a : any diff --git a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js index 5298d7c054be0..fa6167ff384bf 100644 --- a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js +++ b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsInDownlevelGenerator.ts] //// + //// [blockScopedBindingsInDownlevelGenerator.ts] function* a() { for (const i of [1,2,3]) { diff --git a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.symbols b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.symbols index 8caaed47a64ec..8b906350c4f2f 100644 --- a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.symbols +++ b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsInDownlevelGenerator.ts === +//// [tests/cases/compiler/blockScopedBindingsInDownlevelGenerator.ts] //// + +=== blockScopedBindingsInDownlevelGenerator.ts === function* a() { >a : Symbol(a, Decl(blockScopedBindingsInDownlevelGenerator.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.types b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.types index 5f9692654bafb..4a4f5ee57e315 100644 --- a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.types +++ b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsInDownlevelGenerator.ts === +//// [tests/cases/compiler/blockScopedBindingsInDownlevelGenerator.ts] //// + +=== blockScopedBindingsInDownlevelGenerator.ts === function* a() { >a : () => Generator diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.js b/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.js index 34c3fcc1961e2..c7176a5e729b3 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.js +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop1.ts] //// + //// [blockScopedBindingsReassignedInLoop1.ts] declare function use(n: number): void; (function () { diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.symbols b/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.symbols index 8024124b04e15..36daaed660c3d 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.symbols +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop1.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop1.ts] //// + +=== blockScopedBindingsReassignedInLoop1.ts === declare function use(n: number): void; >use : Symbol(use, Decl(blockScopedBindingsReassignedInLoop1.ts, 0, 0)) >n : Symbol(n, Decl(blockScopedBindingsReassignedInLoop1.ts, 0, 21)) diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.types b/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.types index 4824b6418410d..b3faa1b50772f 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.types +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop1.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop1.ts] //// + +=== blockScopedBindingsReassignedInLoop1.ts === declare function use(n: number): void; >use : (n: number) => void >n : number diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.js b/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.js index 08b869a4f99fb..06e143d98c62f 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.js +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop2.ts] //// + //// [blockScopedBindingsReassignedInLoop2.ts] for (let x = 1, y = 2; x < y; ++x, --y) { let a = () => x++ + y++; diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.symbols b/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.symbols index fcaea39564f79..aa9ce64a52611 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.symbols +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop2.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop2.ts] //// + +=== blockScopedBindingsReassignedInLoop2.ts === for (let x = 1, y = 2; x < y; ++x, --y) { >x : Symbol(x, Decl(blockScopedBindingsReassignedInLoop2.ts, 0, 8)) >y : Symbol(y, Decl(blockScopedBindingsReassignedInLoop2.ts, 0, 15)) diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.types b/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.types index d1ae4ee20f4f7..938a57f06e648 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.types +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop2.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop2.ts] //// + +=== blockScopedBindingsReassignedInLoop2.ts === for (let x = 1, y = 2; x < y; ++x, --y) { >x : number >1 : 1 diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.js b/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.js index bcc16e499a207..047f6b23382ff 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.js +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop3.ts] //// + //// [blockScopedBindingsReassignedInLoop3.ts] for (let x = 1, y = 2; x < y; ++x, --y) { let a = () => x++ + y++; diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.symbols b/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.symbols index 71e251f2dc353..d7e2f924e6292 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.symbols +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop3.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop3.ts] //// + +=== blockScopedBindingsReassignedInLoop3.ts === for (let x = 1, y = 2; x < y; ++x, --y) { >x : Symbol(x, Decl(blockScopedBindingsReassignedInLoop3.ts, 0, 8)) >y : Symbol(y, Decl(blockScopedBindingsReassignedInLoop3.ts, 0, 15)) diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.types b/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.types index a61137b3e3aba..ce17d3da8443d 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.types +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop3.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop3.ts] //// + +=== blockScopedBindingsReassignedInLoop3.ts === for (let x = 1, y = 2; x < y; ++x, --y) { >x : number >1 : 1 diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.js b/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.js index e3b99991904bf..d120cfd020c34 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.js +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts] //// + //// [blockScopedBindingsReassignedInLoop4.ts] function f1() { for (let x = 1, y = 2; x < y; ++x, --y) { diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.symbols b/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.symbols index 90c63914b9fe4..64951d691a278 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.symbols +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts] //// + +=== blockScopedBindingsReassignedInLoop4.ts === function f1() { >f1 : Symbol(f1, Decl(blockScopedBindingsReassignedInLoop4.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.types b/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.types index fb0367e878266..18fb3511eb690 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.types +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts] //// + +=== blockScopedBindingsReassignedInLoop4.ts === function f1() { >f1 : () => number diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.js b/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.js index 1ea3f23897ad3..997ae3518c087 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.js +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop5.ts] //// + //// [blockScopedBindingsReassignedInLoop5.ts] for (let x = 1, y = 2; x < y; ++x, --y) { let a = () => x++ + y++; diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.symbols b/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.symbols index 0edc6abe34dcd..1e2aa1d45e443 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.symbols +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop5.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop5.ts] //// + +=== blockScopedBindingsReassignedInLoop5.ts === for (let x = 1, y = 2; x < y; ++x, --y) { >x : Symbol(x, Decl(blockScopedBindingsReassignedInLoop5.ts, 0, 8)) >y : Symbol(y, Decl(blockScopedBindingsReassignedInLoop5.ts, 0, 15)) diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.types b/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.types index 73d13e76afd88..72a7f92f12082 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.types +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop5.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop5.ts] //// + +=== blockScopedBindingsReassignedInLoop5.ts === for (let x = 1, y = 2; x < y; ++x, --y) { >x : number >1 : 1 diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.js b/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.js index 584d8b21100fa..fbf0fda7da598 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.js +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop6.ts] //// + //// [blockScopedBindingsReassignedInLoop6.ts] function f1() { for (let [x, y] = [1, 2]; x < y; ++x, --y) { diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.symbols b/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.symbols index 8dda6eedd4773..211c12e0d7800 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.symbols +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop6.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop6.ts] //// + +=== blockScopedBindingsReassignedInLoop6.ts === function f1() { >f1 : Symbol(f1, Decl(blockScopedBindingsReassignedInLoop6.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.types b/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.types index 8936ded623929..1b4ed6d46a657 100644 --- a/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.types +++ b/tests/baselines/reference/blockScopedBindingsReassignedInLoop6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedBindingsReassignedInLoop6.ts === +//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop6.ts] //// + +=== blockScopedBindingsReassignedInLoop6.ts === function f1() { >f1 : () => void diff --git a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols index c5c6e40da2078..4fa4569b62ce1 100644 --- a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols +++ b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols @@ -1,9 +1,11 @@ -=== tests/cases/compiler/c.ts === +//// [tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts] //// + +=== c.ts === let foo: typeof C; >foo : Symbol(foo, Decl(c.ts, 0, 3)) >C : Symbol(C, Decl(b.ts, 0, 0)) -=== tests/cases/compiler/b.ts === +=== b.ts === class C { } >C : Symbol(C, Decl(b.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types index 5bc8862b2aaad..1da2a72801623 100644 --- a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types +++ b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types @@ -1,9 +1,11 @@ -=== tests/cases/compiler/c.ts === +//// [tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts] //// + +=== c.ts === let foo: typeof C; >foo : typeof C >C : typeof C -=== tests/cases/compiler/b.ts === +=== b.ts === class C { } >C : C diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.errors.txt b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.errors.txt index 5927caba434d6..fdad5cd8e54fe 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.errors.txt +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts(2,12): error TS2450: Enum 'E' used before its declaration. +blockScopedEnumVariablesUseBeforeDef.ts(2,12): error TS2450: Enum 'E' used before its declaration. -==== tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts (1 errors) ==== +==== blockScopedEnumVariablesUseBeforeDef.ts (1 errors) ==== function foo1() { return E.A ~ !!! error TS2450: Enum 'E' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts:3:10: 'E' is declared here. +!!! related TS2728 blockScopedEnumVariablesUseBeforeDef.ts:3:10: 'E' is declared here. enum E { A } } diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.js index f436b05456575..c0b64a5506133 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts] //// + //// [blockScopedEnumVariablesUseBeforeDef.ts] function foo1() { return E.A diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.symbols b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.symbols index 73f8419c8c1a2..178c0cae366e2 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.symbols +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts === +//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts] //// + +=== blockScopedEnumVariablesUseBeforeDef.ts === function foo1() { >foo1 : Symbol(foo1, Decl(blockScopedEnumVariablesUseBeforeDef.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.types b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.types index 8b8aef0f91185..aad25bfe2fcd6 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.types +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts === +//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef.ts] //// + +=== blockScopedEnumVariablesUseBeforeDef.ts === function foo1() { >foo1 : () => E diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.errors.txt b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.errors.txt index f4156d3cdc208..f5d55337e5395 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.errors.txt +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts(2,12): error TS2450: Enum 'E' used before its declaration. +blockScopedEnumVariablesUseBeforeDef_preserve.ts(2,12): error TS2450: Enum 'E' used before its declaration. -==== tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts (1 errors) ==== +==== blockScopedEnumVariablesUseBeforeDef_preserve.ts (1 errors) ==== function foo1() { return E.A ~ !!! error TS2450: Enum 'E' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts:3:10: 'E' is declared here. +!!! related TS2728 blockScopedEnumVariablesUseBeforeDef_preserve.ts:3:10: 'E' is declared here. enum E { A } } diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.js b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.js index b18e58d84a62b..1729f1624959d 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.js +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts] //// + //// [blockScopedEnumVariablesUseBeforeDef_preserve.ts] function foo1() { return E.A diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.symbols b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.symbols index 2191942357266..d90149cf7b8a0 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.symbols +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts === +//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts] //// + +=== blockScopedEnumVariablesUseBeforeDef_preserve.ts === function foo1() { >foo1 : Symbol(foo1, Decl(blockScopedEnumVariablesUseBeforeDef_preserve.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.types b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.types index 1eb9e1697f8f5..4ea9a2749d645 100644 --- a/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.types +++ b/tests/baselines/reference/blockScopedEnumVariablesUseBeforeDef_preserve.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts === +//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.ts] //// + +=== blockScopedEnumVariablesUseBeforeDef_preserve.ts === function foo1() { >foo1 : () => E diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES5.js b/tests/baselines/reference/blockScopedFunctionDeclarationES5.js index 066dd07351c58..4c0498586ae03 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationES5.js +++ b/tests/baselines/reference/blockScopedFunctionDeclarationES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedFunctionDeclarationES5.ts] //// + //// [blockScopedFunctionDeclarationES5.ts] if (true) { function foo() { } diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES5.symbols b/tests/baselines/reference/blockScopedFunctionDeclarationES5.symbols index 5c8f82cf0ff1e..7a4653165a1e3 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationES5.symbols +++ b/tests/baselines/reference/blockScopedFunctionDeclarationES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationES5.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationES5.ts] //// + +=== blockScopedFunctionDeclarationES5.ts === if (true) { function foo() { } >foo : Symbol(foo, Decl(blockScopedFunctionDeclarationES5.ts, 0, 11)) diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES5.types b/tests/baselines/reference/blockScopedFunctionDeclarationES5.types index 8dfdd11da4338..c4057907d6fbd 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationES5.types +++ b/tests/baselines/reference/blockScopedFunctionDeclarationES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationES5.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationES5.ts] //// + +=== blockScopedFunctionDeclarationES5.ts === if (true) { >true : true diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES6.js b/tests/baselines/reference/blockScopedFunctionDeclarationES6.js index 32450cd66f135..65aec79d5505a 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationES6.js +++ b/tests/baselines/reference/blockScopedFunctionDeclarationES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedFunctionDeclarationES6.ts] //// + //// [blockScopedFunctionDeclarationES6.ts] if (true) { function foo() { } diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES6.symbols b/tests/baselines/reference/blockScopedFunctionDeclarationES6.symbols index 65fb133b446a9..f19c147b66749 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationES6.symbols +++ b/tests/baselines/reference/blockScopedFunctionDeclarationES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationES6.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationES6.ts] //// + +=== blockScopedFunctionDeclarationES6.ts === if (true) { function foo() { } >foo : Symbol(foo, Decl(blockScopedFunctionDeclarationES6.ts, 0, 11)) diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationES6.types b/tests/baselines/reference/blockScopedFunctionDeclarationES6.types index 8f87507a5ac05..736fae8cb7dfb 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationES6.types +++ b/tests/baselines/reference/blockScopedFunctionDeclarationES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationES6.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationES6.ts] //// + +=== blockScopedFunctionDeclarationES6.ts === if (true) { >true : true diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.errors.txt index efedfd097a693..ab7a3d1713a8c 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.errors.txt +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts(4,22): error TS1251: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode. -tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts(7,9): error TS2304: Cannot find name 'foo'. +blockScopedFunctionDeclarationInStrictClass.ts(4,22): error TS1251: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode. +blockScopedFunctionDeclarationInStrictClass.ts(7,9): error TS2304: Cannot find name 'foo'. -==== tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts (2 errors) ==== +==== blockScopedFunctionDeclarationInStrictClass.ts (2 errors) ==== class c { method() { if (true) { diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.js b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.js index e3a46770fd0e8..1c4d022022918 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.js +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts] //// + //// [blockScopedFunctionDeclarationInStrictClass.ts] class c { method() { diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.symbols b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.symbols index f4358dc158a4d..efec13245ab81 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.symbols +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts] //// + +=== blockScopedFunctionDeclarationInStrictClass.ts === class c { >c : Symbol(c, Decl(blockScopedFunctionDeclarationInStrictClass.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.types b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.types index 4d16941aff09a..3c81edaaa6203 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.types +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictClass.ts] //// + +=== blockScopedFunctionDeclarationInStrictClass.ts === class c { >c : c diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt index 3f53ef24b584a..13ac50759d5eb 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts(2,14): error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode. -tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts(6,10): error TS2304: Cannot find name 'foo'. +blockScopedFunctionDeclarationInStrictModule.ts(2,14): error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode. +blockScopedFunctionDeclarationInStrictModule.ts(6,10): error TS2304: Cannot find name 'foo'. -==== tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts (2 errors) ==== +==== blockScopedFunctionDeclarationInStrictModule.ts (2 errors) ==== if (true) { function foo() { } ~~~ diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js index d1a8091871c2e..512bc5d032753 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts] //// + //// [blockScopedFunctionDeclarationInStrictModule.ts] if (true) { function foo() { } diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.symbols b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.symbols index 95f22f59563dd..b21eec9de5b67 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.symbols +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts] //// + +=== blockScopedFunctionDeclarationInStrictModule.ts === if (true) { function foo() { } >foo : Symbol(foo, Decl(blockScopedFunctionDeclarationInStrictModule.ts, 0, 11)) diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.types b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.types index 67785432c1d92..8adbd079157da 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.types +++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationInStrictModule.ts] //// + +=== blockScopedFunctionDeclarationInStrictModule.ts === if (true) { >true : true diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.errors.txt index f945d0eacbf3e..69bc6cd4af043 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.errors.txt +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts(3,14): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. -tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts(6,1): error TS2304: Cannot find name 'foo'. +blockScopedFunctionDeclarationStrictES5.ts(3,14): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. +blockScopedFunctionDeclarationStrictES5.ts(6,1): error TS2304: Cannot find name 'foo'. -==== tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts (2 errors) ==== +==== blockScopedFunctionDeclarationStrictES5.ts (2 errors) ==== "use strict"; if (true) { function foo() { } // Error to declare function in block scope diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.js b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.js index f0926cadf3961..c36a70c019bde 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.js +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts] //// + //// [blockScopedFunctionDeclarationStrictES5.ts] "use strict"; if (true) { diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.symbols b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.symbols index f72d7b2b5b855..9522429650b43 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.symbols +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts] //// + +=== blockScopedFunctionDeclarationStrictES5.ts === "use strict"; if (true) { function foo() { } // Error to declare function in block scope diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.types b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.types index 1c87ccf9227e6..84691a7795a01 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.types +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES5.ts] //// + +=== blockScopedFunctionDeclarationStrictES5.ts === "use strict"; >"use strict" : "use strict" diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.errors.txt index 6772a29926b17..ec39dc303afe1 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.errors.txt +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts(6,1): error TS2304: Cannot find name 'foo'. +blockScopedFunctionDeclarationStrictES6.ts(6,1): error TS2304: Cannot find name 'foo'. -==== tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts (1 errors) ==== +==== blockScopedFunctionDeclarationStrictES6.ts (1 errors) ==== "use strict"; if (true) { function foo() { } // Allowed to declare block scope function diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.js b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.js index 0a1b263875bfe..3e225d4eff714 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.js +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts] //// + //// [blockScopedFunctionDeclarationStrictES6.ts] "use strict"; if (true) { diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.symbols b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.symbols index fc8693231af5f..343dbef2d771e 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.symbols +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts] //// + +=== blockScopedFunctionDeclarationStrictES6.ts === "use strict"; if (true) { function foo() { } // Allowed to declare block scope function diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.types b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.types index 174644fd6101b..00215ed3f0211 100644 --- a/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.types +++ b/tests/baselines/reference/blockScopedFunctionDeclarationStrictES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts === +//// [tests/cases/compiler/blockScopedFunctionDeclarationStrictES6.ts] //// + +=== blockScopedFunctionDeclarationStrictES6.ts === "use strict"; >"use strict" : "use strict" diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols b/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols index b7192d0e12b83..72113d5210908 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/test.ts === +//// [tests/cases/compiler/blockScopedNamespaceDifferentFile.ts] //// + +=== test.ts === // #15734 failed when test.ts comes before typings.d.ts namespace C { >C : Symbol(C, Decl(test.ts, 0, 0)) @@ -27,7 +29,7 @@ namespace C { } } -=== tests/cases/compiler/typings.d.ts === +=== typings.d.ts === declare namespace A { >A : Symbol(A, Decl(typings.d.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.types b/tests/baselines/reference/blockScopedNamespaceDifferentFile.types index c03d51d2bc45a..d05abf1138aad 100644 --- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.types +++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/test.ts === +//// [tests/cases/compiler/blockScopedNamespaceDifferentFile.ts] //// + +=== test.ts === // #15734 failed when test.ts comes before typings.d.ts namespace C { >C : typeof C @@ -28,7 +30,7 @@ namespace C { } } -=== tests/cases/compiler/typings.d.ts === +=== typings.d.ts === declare namespace A { >A : typeof A diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.errors.txt b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.errors.txt index 407c1c22a3734..520ce2bb735b1 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.errors.txt +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(3,18): error TS2393: Duplicate function implementation. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(5,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(8,18): error TS2393: Duplicate function implementation. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(10,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(12,9): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(16,1): error TS2554: Expected 1 arguments, but got 0. +blockScopedSameNameFunctionDeclarationES5.ts(3,18): error TS2393: Duplicate function implementation. +blockScopedSameNameFunctionDeclarationES5.ts(5,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationES5.ts(8,18): error TS2393: Duplicate function implementation. +blockScopedSameNameFunctionDeclarationES5.ts(10,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationES5.ts(12,9): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationES5.ts(16,1): error TS2554: Expected 1 arguments, but got 0. -==== tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts (6 errors) ==== +==== blockScopedSameNameFunctionDeclarationES5.ts (6 errors) ==== function foo(a: number) { if (a === 1) { function foo() { } // duplicate function @@ -35,4 +35,4 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts(16,1): error T foo(); // not ok - needs number ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts:1:14: An argument for 'a' was not provided. \ No newline at end of file +!!! related TS6210 blockScopedSameNameFunctionDeclarationES5.ts:1:14: An argument for 'a' was not provided. \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.js b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.js index 4c7721f9b4314..00efc973004c0 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.js +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts] //// + //// [blockScopedSameNameFunctionDeclarationES5.ts] function foo(a: number) { if (a === 1) { diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.symbols b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.symbols index 23df33b8ba489..9059c98982ce8 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.symbols +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts] //// + +=== blockScopedSameNameFunctionDeclarationES5.ts === function foo(a: number) { >foo : Symbol(foo, Decl(blockScopedSameNameFunctionDeclarationES5.ts, 0, 0)) >a : Symbol(a, Decl(blockScopedSameNameFunctionDeclarationES5.ts, 0, 13)) diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types index 28a718cb328be..e0327c7d2849a 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationES5.ts] //// + +=== blockScopedSameNameFunctionDeclarationES5.ts === function foo(a: number) { >foo : (a: number) => void >a : number diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.errors.txt b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.errors.txt index 0a6109ee05f3d..45ccd8b400b29 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.errors.txt +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(3,18): error TS2393: Duplicate function implementation. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(5,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(8,18): error TS2393: Duplicate function implementation. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(10,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(12,9): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(16,1): error TS2554: Expected 1 arguments, but got 0. +blockScopedSameNameFunctionDeclarationES6.ts(3,18): error TS2393: Duplicate function implementation. +blockScopedSameNameFunctionDeclarationES6.ts(5,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationES6.ts(8,18): error TS2393: Duplicate function implementation. +blockScopedSameNameFunctionDeclarationES6.ts(10,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationES6.ts(12,9): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationES6.ts(16,1): error TS2554: Expected 1 arguments, but got 0. -==== tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts (6 errors) ==== +==== blockScopedSameNameFunctionDeclarationES6.ts (6 errors) ==== function foo(a: number) { if (a === 10) { function foo() { } // duplicate @@ -35,4 +35,4 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts(16,1): error T foo(); // not ok - needs number ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts:1:14: An argument for 'a' was not provided. \ No newline at end of file +!!! related TS6210 blockScopedSameNameFunctionDeclarationES6.ts:1:14: An argument for 'a' was not provided. \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.js b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.js index c793b74c60a37..24ca3a82bf71a 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.js +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts] //// + //// [blockScopedSameNameFunctionDeclarationES6.ts] function foo(a: number) { if (a === 10) { diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.symbols b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.symbols index 551d5dd413ac8..125116a09b49e 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.symbols +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts] //// + +=== blockScopedSameNameFunctionDeclarationES6.ts === function foo(a: number) { >foo : Symbol(foo, Decl(blockScopedSameNameFunctionDeclarationES6.ts, 0, 0)) >a : Symbol(a, Decl(blockScopedSameNameFunctionDeclarationES6.ts, 0, 13)) diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types index 967ec902a16e4..9b3359e83ee9c 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationES6.ts] //// + +=== blockScopedSameNameFunctionDeclarationES6.ts === function foo(a: number) { >foo : (a: number) => void >a : number diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.errors.txt b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.errors.txt index b6c4ac4c6a588..b510cc0b9b4bc 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.errors.txt +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(4,18): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(6,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(9,18): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(11,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(14,5): error TS2554: Expected 1 arguments, but got 0. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(17,1): error TS2554: Expected 1 arguments, but got 0. +blockScopedSameNameFunctionDeclarationStrictES5.ts(4,18): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. +blockScopedSameNameFunctionDeclarationStrictES5.ts(6,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationStrictES5.ts(9,18): error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. +blockScopedSameNameFunctionDeclarationStrictES5.ts(11,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationStrictES5.ts(14,5): error TS2554: Expected 1 arguments, but got 0. +blockScopedSameNameFunctionDeclarationStrictES5.ts(17,1): error TS2554: Expected 1 arguments, but got 0. -==== tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts (6 errors) ==== +==== blockScopedSameNameFunctionDeclarationStrictES5.ts (6 errors) ==== "use strict"; function foo(a: number) { if (a === 1) { @@ -31,10 +31,10 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts(17,1): e foo(); // not ok - needs number ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts:2:14: An argument for 'a' was not provided. +!!! related TS6210 blockScopedSameNameFunctionDeclarationStrictES5.ts:2:14: An argument for 'a' was not provided. } foo(10); foo(); // not ok - needs number ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts:2:14: An argument for 'a' was not provided. \ No newline at end of file +!!! related TS6210 blockScopedSameNameFunctionDeclarationStrictES5.ts:2:14: An argument for 'a' was not provided. \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.js b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.js index b51be0493cd88..dbc8dec17b573 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.js +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts] //// + //// [blockScopedSameNameFunctionDeclarationStrictES5.ts] "use strict"; function foo(a: number) { diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.symbols b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.symbols index b7603713a412a..985f629b1fa70 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.symbols +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts] //// + +=== blockScopedSameNameFunctionDeclarationStrictES5.ts === "use strict"; function foo(a: number) { >foo : Symbol(foo, Decl(blockScopedSameNameFunctionDeclarationStrictES5.ts, 0, 13)) diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.types b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.types index d3f4ff88f6e30..c1f382a6aa515 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.types +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES5.ts] //// + +=== blockScopedSameNameFunctionDeclarationStrictES5.ts === "use strict"; >"use strict" : "use strict" diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.errors.txt b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.errors.txt index d9b81d2686f20..4086b95bd5936 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.errors.txt +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts(6,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts(11,13): error TS2554: Expected 0 arguments, but got 1. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts(14,5): error TS2554: Expected 1 arguments, but got 0. -tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts(17,1): error TS2554: Expected 1 arguments, but got 0. +blockScopedSameNameFunctionDeclarationStrictES6.ts(6,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationStrictES6.ts(11,13): error TS2554: Expected 0 arguments, but got 1. +blockScopedSameNameFunctionDeclarationStrictES6.ts(14,5): error TS2554: Expected 1 arguments, but got 0. +blockScopedSameNameFunctionDeclarationStrictES6.ts(17,1): error TS2554: Expected 1 arguments, but got 0. -==== tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts (4 errors) ==== +==== blockScopedSameNameFunctionDeclarationStrictES6.ts (4 errors) ==== "use strict"; function foo(a: number) { if (a === 10) { @@ -25,10 +25,10 @@ tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts(17,1): e foo(); // not ok ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts:2:14: An argument for 'a' was not provided. +!!! related TS6210 blockScopedSameNameFunctionDeclarationStrictES6.ts:2:14: An argument for 'a' was not provided. } foo(10); foo(); // not ok - needs number ~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts:2:14: An argument for 'a' was not provided. \ No newline at end of file +!!! related TS6210 blockScopedSameNameFunctionDeclarationStrictES6.ts:2:14: An argument for 'a' was not provided. \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.js b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.js index 863df86c03133..cab75f6256d6b 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.js +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts] //// + //// [blockScopedSameNameFunctionDeclarationStrictES6.ts] "use strict"; function foo(a: number) { diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.symbols b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.symbols index 65adc9fcb1fdf..7a1ce73d450bf 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.symbols +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts] //// + +=== blockScopedSameNameFunctionDeclarationStrictES6.ts === "use strict"; function foo(a: number) { >foo : Symbol(foo, Decl(blockScopedSameNameFunctionDeclarationStrictES6.ts, 0, 13)) diff --git a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.types b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.types index c80d4d1372a32..4c11a2d890645 100644 --- a/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.types +++ b/tests/baselines/reference/blockScopedSameNameFunctionDeclarationStrictES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts === +//// [tests/cases/compiler/blockScopedSameNameFunctionDeclarationStrictES6.ts] //// + +=== blockScopedSameNameFunctionDeclarationStrictES6.ts === "use strict"; >"use strict" : "use strict" diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt index e8a8a322903a0..771b237e28a22 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(2,13): error TS2448: Block-scoped variable 'x' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(58,20): error TS2448: Block-scoped variable 'x' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(65,20): error TS2448: Block-scoped variable 'x' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448: Block-scoped variable 'x' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(111,28): error TS2448: Block-scoped variable 'a' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(112,21): error TS2448: Block-scoped variable 'a' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: Block-scoped variable 'a' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(2,13): error TS2448: Block-scoped variable 'x' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(58,20): error TS2448: Block-scoped variable 'x' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(65,20): error TS2448: Block-scoped variable 'x' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448: Block-scoped variable 'x' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(111,28): error TS2448: Block-scoped variable 'a' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(112,21): error TS2448: Block-scoped variable 'a' used before its declaration. +blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: Block-scoped variable 'a' used before its declaration. -==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (7 errors) ==== +==== blockScopedVariablesUseBeforeDef.ts (7 errors) ==== function foo0() { let a = x; ~ !!! error TS2448: Block-scoped variable 'x' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:3:9: 'x' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:3:9: 'x' is declared here. let x; } @@ -71,7 +71,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: static a = x; ~ !!! error TS2448: Block-scoped variable 'x' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:60:9: 'x' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:60:9: 'x' is declared here. } let x; } @@ -81,7 +81,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: static a = x; ~ !!! error TS2448: Block-scoped variable 'x' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:67:9: 'x' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:67:9: 'x' is declared here. } let x; } @@ -119,7 +119,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: a: x ~ !!! error TS2448: Block-scoped variable 'x' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:102:9: 'x' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:102:9: 'x' is declared here. } let x } @@ -133,11 +133,11 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: (() => console.log(a))(); // should error ~ !!! error TS2448: Block-scoped variable 'a' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:108:9: 'a' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:108:9: 'a' is declared here. console.log(a); // should error ~ !!! error TS2448: Block-scoped variable 'a' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:108:9: 'a' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:108:9: 'a' is declared here. const b = () => a; // should be ok return [ 0, @@ -150,7 +150,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(122,22): error TS2448: let [a] = (() => a)(); ~ !!! error TS2448: Block-scoped variable 'a' used before its declaration. -!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:122:10: 'a' is declared here. +!!! related TS2728 blockScopedVariablesUseBeforeDef.ts:122:10: 'a' is declared here. } function foo17() { diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js index 0190553561270..04274491f5a9f 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts] //// + //// [blockScopedVariablesUseBeforeDef.ts] function foo0() { let a = x; diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols index 6c25bd7ad1ad2..a64201efe26d1 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts === +//// [tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts] //// + +=== blockScopedVariablesUseBeforeDef.ts === function foo0() { >foo0 : Symbol(foo0, Decl(blockScopedVariablesUseBeforeDef.ts, 0, 0)) diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types index 985688a4001ce..2bfda8a687b05 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts === +//// [tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts] //// + +=== blockScopedVariablesUseBeforeDef.ts === function foo0() { >foo0 : () => void diff --git a/tests/baselines/reference/bluebirdStaticThis.errors.txt b/tests/baselines/reference/bluebirdStaticThis.errors.txt index 257cc1bb82339..0c1f2baf595e5 100644 --- a/tests/baselines/reference/bluebirdStaticThis.errors.txt +++ b/tests/baselines/reference/bluebirdStaticThis.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/bluebirdStaticThis.ts(5,22): error TS2420: Class 'Promise' incorrectly implements interface 'Thenable'. +bluebirdStaticThis.ts(5,22): error TS2420: Class 'Promise' incorrectly implements interface 'Thenable'. Property 'then' is missing in type 'Promise' but required in type 'Thenable'. -tests/cases/compiler/bluebirdStaticThis.ts(22,51): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Resolver'. -tests/cases/compiler/bluebirdStaticThis.ts(57,109): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. -tests/cases/compiler/bluebirdStaticThis.ts(58,91): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. -tests/cases/compiler/bluebirdStaticThis.ts(59,91): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. -tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. +bluebirdStaticThis.ts(22,51): error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Resolver'. +bluebirdStaticThis.ts(57,109): error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. +bluebirdStaticThis.ts(58,91): error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. +bluebirdStaticThis.ts(59,91): error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. +bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. -==== tests/cases/compiler/bluebirdStaticThis.ts (6 errors) ==== +==== bluebirdStaticThis.ts (6 errors) ==== // This version is reduced from the full d.ts by removing almost all the tests // and all the comments. // Then it adds explicit `this` arguments to the static members. @@ -16,7 +16,7 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"tes ~~~~~~~ !!! error TS2420: Class 'Promise' incorrectly implements interface 'Thenable'. !!! error TS2420: Property 'then' is missing in type 'Promise' but required in type 'Thenable'. -!!! related TS2728 tests/cases/compiler/bluebirdStaticThis.ts:113:3: 'then' is declared here. +!!! related TS2728 bluebirdStaticThis.ts:113:3: 'then' is declared here. constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable) => void, reject: (error: any) => void) => void); static try(dit: typeof Promise, fn: () => Promise.Thenable, args?: any[], ctx?: any): Promise; static try(dit: typeof Promise, fn: () => R, args?: any[], ctx?: any): Promise; @@ -35,7 +35,7 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"tes static defer(dit: typeof Promise): Promise.Resolver; ~~~~~~~~ -!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Resolver'. +!!! error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Resolver'. static cast(dit: typeof Promise, value: Promise.Thenable): Promise; static cast(dit: typeof Promise, value: R): Promise; @@ -72,16 +72,16 @@ tests/cases/compiler/bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"tes static settle(dit: typeof Promise, values: Promise.Thenable[]>): Promise[]>; ~~~~~~~~~~ -!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. +!!! error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. static settle(dit: typeof Promise, values: Promise.Thenable): Promise[]>; ~~~~~~~~~~ -!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. +!!! error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. static settle(dit: typeof Promise, values: Promise.Thenable[]): Promise[]>; ~~~~~~~~~~ -!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. +!!! error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. static settle(dit: typeof Promise, values: R[]): Promise[]>; ~~~~~~~~~~ -!!! error TS2694: Namespace '"tests/cases/compiler/bluebirdStaticThis".Promise' has no exported member 'Inspection'. +!!! error TS2694: Namespace '"bluebirdStaticThis".Promise' has no exported member 'Inspection'. static any(dit: typeof Promise, values: Promise.Thenable[]>): Promise; static any(dit: typeof Promise, values: Promise.Thenable): Promise; diff --git a/tests/baselines/reference/bluebirdStaticThis.js b/tests/baselines/reference/bluebirdStaticThis.js index 65dc2ece9788e..3f6c6d0d40e72 100644 --- a/tests/baselines/reference/bluebirdStaticThis.js +++ b/tests/baselines/reference/bluebirdStaticThis.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bluebirdStaticThis.ts] //// + //// [bluebirdStaticThis.ts] // This version is reduced from the full d.ts by removing almost all the tests // and all the comments. diff --git a/tests/baselines/reference/bluebirdStaticThis.symbols b/tests/baselines/reference/bluebirdStaticThis.symbols index 4933c2b95786e..c4acc5445d134 100644 --- a/tests/baselines/reference/bluebirdStaticThis.symbols +++ b/tests/baselines/reference/bluebirdStaticThis.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bluebirdStaticThis.ts === +//// [tests/cases/compiler/bluebirdStaticThis.ts] //// + +=== bluebirdStaticThis.ts === // This version is reduced from the full d.ts by removing almost all the tests // and all the comments. // Then it adds explicit `this` arguments to the static members. diff --git a/tests/baselines/reference/bluebirdStaticThis.types b/tests/baselines/reference/bluebirdStaticThis.types index c4836bd89c6c9..07f420eba6f63 100644 --- a/tests/baselines/reference/bluebirdStaticThis.types +++ b/tests/baselines/reference/bluebirdStaticThis.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bluebirdStaticThis.ts === +//// [tests/cases/compiler/bluebirdStaticThis.ts] //// + +=== bluebirdStaticThis.ts === // This version is reduced from the full d.ts by removing almost all the tests // and all the comments. // Then it adds explicit `this` arguments to the static members. diff --git a/tests/baselines/reference/bom-utf16be.js b/tests/baselines/reference/bom-utf16be.js index e2bab0613e300..e96c00c946bc6 100644 --- a/tests/baselines/reference/bom-utf16be.js +++ b/tests/baselines/reference/bom-utf16be.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bom-utf16be.ts] //// + //// [bom-utf16be.ts] var x=10; diff --git a/tests/baselines/reference/bom-utf16be.symbols b/tests/baselines/reference/bom-utf16be.symbols index e2a1f4c4c76e2..364cd5adccdae 100644 --- a/tests/baselines/reference/bom-utf16be.symbols +++ b/tests/baselines/reference/bom-utf16be.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bom-utf16be.ts === +//// [tests/cases/compiler/bom-utf16be.ts] //// + +=== bom-utf16be.ts === var x=10; >x : Symbol(x, Decl(bom-utf16be.ts, 0, 3)) diff --git a/tests/baselines/reference/bom-utf16be.types b/tests/baselines/reference/bom-utf16be.types index e13c45ede2ff2..362d0af544c53 100644 --- a/tests/baselines/reference/bom-utf16be.types +++ b/tests/baselines/reference/bom-utf16be.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bom-utf16be.ts === +//// [tests/cases/compiler/bom-utf16be.ts] //// + +=== bom-utf16be.ts === var x=10; >x : number >10 : 10 diff --git a/tests/baselines/reference/bom-utf16le.js b/tests/baselines/reference/bom-utf16le.js index 215b9f0207261..6dd21a102b28f 100644 --- a/tests/baselines/reference/bom-utf16le.js +++ b/tests/baselines/reference/bom-utf16le.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bom-utf16le.ts] //// + //// [bom-utf16le.ts] var x=10; diff --git a/tests/baselines/reference/bom-utf16le.symbols b/tests/baselines/reference/bom-utf16le.symbols index 396e7ec0d5cec..6ae4af9364e09 100644 --- a/tests/baselines/reference/bom-utf16le.symbols +++ b/tests/baselines/reference/bom-utf16le.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bom-utf16le.ts === +//// [tests/cases/compiler/bom-utf16le.ts] //// + +=== bom-utf16le.ts === var x=10; >x : Symbol(x, Decl(bom-utf16le.ts, 0, 3)) diff --git a/tests/baselines/reference/bom-utf16le.types b/tests/baselines/reference/bom-utf16le.types index bb2038bb23d45..60f641f067c1b 100644 --- a/tests/baselines/reference/bom-utf16le.types +++ b/tests/baselines/reference/bom-utf16le.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bom-utf16le.ts === +//// [tests/cases/compiler/bom-utf16le.ts] //// + +=== bom-utf16le.ts === var x=10; >x : number >10 : 10 diff --git a/tests/baselines/reference/bom-utf8.js b/tests/baselines/reference/bom-utf8.js index 5ca8c824b6a65..2c2e7b3e6c06f 100644 --- a/tests/baselines/reference/bom-utf8.js +++ b/tests/baselines/reference/bom-utf8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/bom-utf8.ts] //// + //// [bom-utf8.ts] var x=10; diff --git a/tests/baselines/reference/bom-utf8.symbols b/tests/baselines/reference/bom-utf8.symbols index e13277c895365..5ab886a8ad88b 100644 --- a/tests/baselines/reference/bom-utf8.symbols +++ b/tests/baselines/reference/bom-utf8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bom-utf8.ts === +//// [tests/cases/compiler/bom-utf8.ts] //// + +=== bom-utf8.ts === var x=10; >x : Symbol(x, Decl(bom-utf8.ts, 0, 3)) diff --git a/tests/baselines/reference/bom-utf8.types b/tests/baselines/reference/bom-utf8.types index 0f2b45b8ea9a1..442e8500cf98f 100644 --- a/tests/baselines/reference/bom-utf8.types +++ b/tests/baselines/reference/bom-utf8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bom-utf8.ts === +//// [tests/cases/compiler/bom-utf8.ts] //// + +=== bom-utf8.ts === var x=10; >x : number >10 : 10 diff --git a/tests/baselines/reference/boolInsteadOfBoolean.errors.txt b/tests/baselines/reference/boolInsteadOfBoolean.errors.txt index 13141b6235b5b..8bdd59bdf1625 100644 --- a/tests/baselines/reference/boolInsteadOfBoolean.errors.txt +++ b/tests/baselines/reference/boolInsteadOfBoolean.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts(1,8): error TS2304: Cannot find name 'bool'. +boolInsteadOfBoolean.ts(1,8): error TS2304: Cannot find name 'bool'. -==== tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts (1 errors) ==== +==== boolInsteadOfBoolean.ts (1 errors) ==== var x: bool; ~~~~ !!! error TS2304: Cannot find name 'bool'. diff --git a/tests/baselines/reference/boolInsteadOfBoolean.js b/tests/baselines/reference/boolInsteadOfBoolean.js index 6cf0c4492fdd1..b02fb15028a9b 100644 --- a/tests/baselines/reference/boolInsteadOfBoolean.js +++ b/tests/baselines/reference/boolInsteadOfBoolean.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts] //// + //// [boolInsteadOfBoolean.ts] var x: bool; var a: boolean = x; diff --git a/tests/baselines/reference/boolInsteadOfBoolean.symbols b/tests/baselines/reference/boolInsteadOfBoolean.symbols index 8c39e29d938db..c8b9838c3fcd4 100644 --- a/tests/baselines/reference/boolInsteadOfBoolean.symbols +++ b/tests/baselines/reference/boolInsteadOfBoolean.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts === +//// [tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts] //// + +=== boolInsteadOfBoolean.ts === var x: bool; >x : Symbol(x, Decl(boolInsteadOfBoolean.ts, 0, 3)) >bool : Symbol(bool) diff --git a/tests/baselines/reference/boolInsteadOfBoolean.types b/tests/baselines/reference/boolInsteadOfBoolean.types index 3061fb33c032d..d9894895cc486 100644 --- a/tests/baselines/reference/boolInsteadOfBoolean.types +++ b/tests/baselines/reference/boolInsteadOfBoolean.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts === +//// [tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts] //// + +=== boolInsteadOfBoolean.ts === var x: bool; >x : bool diff --git a/tests/baselines/reference/booleanAssignment.errors.txt b/tests/baselines/reference/booleanAssignment.errors.txt index 429b9843598c6..a24110e7364ea 100644 --- a/tests/baselines/reference/booleanAssignment.errors.txt +++ b/tests/baselines/reference/booleanAssignment.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/booleanAssignment.ts(2,1): error TS2322: Type 'number' is not assignable to type 'Boolean'. -tests/cases/compiler/booleanAssignment.ts(3,1): error TS2322: Type 'string' is not assignable to type 'Boolean'. -tests/cases/compiler/booleanAssignment.ts(4,1): error TS2322: Type '{}' is not assignable to type 'Boolean'. +booleanAssignment.ts(2,1): error TS2322: Type 'number' is not assignable to type 'Boolean'. +booleanAssignment.ts(3,1): error TS2322: Type 'string' is not assignable to type 'Boolean'. +booleanAssignment.ts(4,1): error TS2322: Type '{}' is not assignable to type 'Boolean'. The types returned by 'valueOf()' are incompatible between these types. Type 'Object' is not assignable to type 'boolean'. -==== tests/cases/compiler/booleanAssignment.ts (3 errors) ==== +==== booleanAssignment.ts (3 errors) ==== var b = new Boolean(); b = 1; // Error ~ diff --git a/tests/baselines/reference/booleanAssignment.js b/tests/baselines/reference/booleanAssignment.js index 573367a429357..4f2b0917b0777 100644 --- a/tests/baselines/reference/booleanAssignment.js +++ b/tests/baselines/reference/booleanAssignment.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/booleanAssignment.ts] //// + //// [booleanAssignment.ts] var b = new Boolean(); b = 1; // Error diff --git a/tests/baselines/reference/booleanAssignment.symbols b/tests/baselines/reference/booleanAssignment.symbols index 44a60c2f1fbea..4dbdc3df0fbd4 100644 --- a/tests/baselines/reference/booleanAssignment.symbols +++ b/tests/baselines/reference/booleanAssignment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/booleanAssignment.ts === +//// [tests/cases/compiler/booleanAssignment.ts] //// + +=== booleanAssignment.ts === var b = new Boolean(); >b : Symbol(b, Decl(booleanAssignment.ts, 0, 3)) >Boolean : Symbol(Boolean, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/booleanAssignment.types b/tests/baselines/reference/booleanAssignment.types index 8af64f59bb336..e9537b1df4a61 100644 --- a/tests/baselines/reference/booleanAssignment.types +++ b/tests/baselines/reference/booleanAssignment.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/booleanAssignment.ts === +//// [tests/cases/compiler/booleanAssignment.ts] //// + +=== booleanAssignment.ts === var b = new Boolean(); >b : Boolean >new Boolean() : Boolean diff --git a/tests/baselines/reference/booleanFilterAnyArray.js b/tests/baselines/reference/booleanFilterAnyArray.js index 2cd319ca440ad..40c2cc5e91c70 100644 --- a/tests/baselines/reference/booleanFilterAnyArray.js +++ b/tests/baselines/reference/booleanFilterAnyArray.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// + //// [booleanFilterAnyArray.ts] interface Bullean { } interface BulleanConstructor { diff --git a/tests/baselines/reference/booleanFilterAnyArray.symbols b/tests/baselines/reference/booleanFilterAnyArray.symbols index 1e0207fdf8049..cebda515d0c75 100644 --- a/tests/baselines/reference/booleanFilterAnyArray.symbols +++ b/tests/baselines/reference/booleanFilterAnyArray.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/booleanFilterAnyArray.ts === +//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// + +=== booleanFilterAnyArray.ts === interface Bullean { } >Bullean : Symbol(Bullean, Decl(booleanFilterAnyArray.ts, 0, 0), Decl(booleanFilterAnyArray.ts, 10, 11)) diff --git a/tests/baselines/reference/booleanFilterAnyArray.types b/tests/baselines/reference/booleanFilterAnyArray.types index cca8a039a4d45..c35c1bb352864 100644 --- a/tests/baselines/reference/booleanFilterAnyArray.types +++ b/tests/baselines/reference/booleanFilterAnyArray.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/booleanFilterAnyArray.ts === +//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// + +=== booleanFilterAnyArray.ts === interface Bullean { } interface BulleanConstructor { new(v1?: any): Bullean; diff --git a/tests/baselines/reference/booleanLiteralTypes1.js b/tests/baselines/reference/booleanLiteralTypes1.js index 6fb0244ac687d..3d97fc78772ca 100644 --- a/tests/baselines/reference/booleanLiteralTypes1.js +++ b/tests/baselines/reference/booleanLiteralTypes1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/literal/booleanLiteralTypes1.ts] //// + //// [booleanLiteralTypes1.ts] type A1 = true | false; type A2 = false | true; diff --git a/tests/baselines/reference/booleanLiteralTypes1.symbols b/tests/baselines/reference/booleanLiteralTypes1.symbols index 995851bf5f6fb..3083659b5ea86 100644 --- a/tests/baselines/reference/booleanLiteralTypes1.symbols +++ b/tests/baselines/reference/booleanLiteralTypes1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/literal/booleanLiteralTypes1.ts === +//// [tests/cases/conformance/types/literal/booleanLiteralTypes1.ts] //// + +=== booleanLiteralTypes1.ts === type A1 = true | false; >A1 : Symbol(A1, Decl(booleanLiteralTypes1.ts, 0, 0)) diff --git a/tests/baselines/reference/booleanLiteralTypes1.types b/tests/baselines/reference/booleanLiteralTypes1.types index 4de330f57ae6d..6c030aa76ab16 100644 --- a/tests/baselines/reference/booleanLiteralTypes1.types +++ b/tests/baselines/reference/booleanLiteralTypes1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/literal/booleanLiteralTypes1.ts === +//// [tests/cases/conformance/types/literal/booleanLiteralTypes1.ts] //// + +=== booleanLiteralTypes1.ts === type A1 = true | false; >A1 : boolean >true : true diff --git a/tests/baselines/reference/booleanLiteralTypes2.js b/tests/baselines/reference/booleanLiteralTypes2.js index 19bac7c362c5b..ac208a664af45 100644 --- a/tests/baselines/reference/booleanLiteralTypes2.js +++ b/tests/baselines/reference/booleanLiteralTypes2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/literal/booleanLiteralTypes2.ts] //// + //// [booleanLiteralTypes2.ts] type A1 = true | false; type A2 = false | true; diff --git a/tests/baselines/reference/booleanLiteralTypes2.symbols b/tests/baselines/reference/booleanLiteralTypes2.symbols index caae8aea5fb91..f1015e357753e 100644 --- a/tests/baselines/reference/booleanLiteralTypes2.symbols +++ b/tests/baselines/reference/booleanLiteralTypes2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/literal/booleanLiteralTypes2.ts === +//// [tests/cases/conformance/types/literal/booleanLiteralTypes2.ts] //// + +=== booleanLiteralTypes2.ts === type A1 = true | false; >A1 : Symbol(A1, Decl(booleanLiteralTypes2.ts, 0, 0)) diff --git a/tests/baselines/reference/booleanLiteralTypes2.types b/tests/baselines/reference/booleanLiteralTypes2.types index 484d83fefd889..ed18364e06054 100644 --- a/tests/baselines/reference/booleanLiteralTypes2.types +++ b/tests/baselines/reference/booleanLiteralTypes2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/literal/booleanLiteralTypes2.ts === +//// [tests/cases/conformance/types/literal/booleanLiteralTypes2.ts] //// + +=== booleanLiteralTypes2.ts === type A1 = true | false; >A1 : boolean >true : true diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt index 5b8fb9b0ea85d..f9f1b935f00d1 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt @@ -4,7 +4,7 @@ error TS2318: Cannot find global type 'NewableFunction'. !!! error TS2318: Cannot find global type 'CallableFunction'. !!! error TS2318: Cannot find global type 'NewableFunction'. -==== tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx (0 errors) ==== +==== booleanLiteralsContextuallyTypedFromUnion.tsx (0 errors) ==== interface A { isIt: true; text: string; } interface B { isIt: false; value: number; } type C = A | B; diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js index cf590eeaaaf62..45a77912690ed 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] //// + //// [booleanLiteralsContextuallyTypedFromUnion.tsx] interface A { isIt: true; text: string; } interface B { isIt: false; value: number; } diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols index 73d3006951f07..983d9e36d496c 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx === +//// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] //// + +=== booleanLiteralsContextuallyTypedFromUnion.tsx === interface A { isIt: true; text: string; } >A : Symbol(A, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 0)) >isIt : Symbol(A.isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 0, 13)) diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types index 77b32edaf0acd..ab114338130a5 100644 --- a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx === +//// [tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx] //// + +=== booleanLiteralsContextuallyTypedFromUnion.tsx === interface A { isIt: true; text: string; } >isIt : true >true : true diff --git a/tests/baselines/reference/booleanPropertyAccess.js b/tests/baselines/reference/booleanPropertyAccess.js index 5d816253c37eb..267317d267eb6 100644 --- a/tests/baselines/reference/booleanPropertyAccess.js +++ b/tests/baselines/reference/booleanPropertyAccess.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/primitives/boolean/booleanPropertyAccess.ts] //// + //// [booleanPropertyAccess.ts] var x = true; diff --git a/tests/baselines/reference/booleanPropertyAccess.symbols b/tests/baselines/reference/booleanPropertyAccess.symbols index 4b2bfbb9d68d5..c0546aeb44983 100644 --- a/tests/baselines/reference/booleanPropertyAccess.symbols +++ b/tests/baselines/reference/booleanPropertyAccess.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/booleanPropertyAccess.ts === +//// [tests/cases/conformance/types/primitives/boolean/booleanPropertyAccess.ts] //// + +=== booleanPropertyAccess.ts === var x = true; >x : Symbol(x, Decl(booleanPropertyAccess.ts, 0, 3)) diff --git a/tests/baselines/reference/booleanPropertyAccess.types b/tests/baselines/reference/booleanPropertyAccess.types index a0b800b5574c8..d06b3747464e4 100644 --- a/tests/baselines/reference/booleanPropertyAccess.types +++ b/tests/baselines/reference/booleanPropertyAccess.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/primitives/boolean/booleanPropertyAccess.ts === +//// [tests/cases/conformance/types/primitives/boolean/booleanPropertyAccess.ts] //// + +=== booleanPropertyAccess.ts === var x = true; >x : boolean >true : true diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement1.js b/tests/baselines/reference/breakInIterationOrSwitchStatement1.js index 0a3de64c675ff..ae5c636656517 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement1.js +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakInIterationOrSwitchStatement1.ts] //// + //// [breakInIterationOrSwitchStatement1.ts] while (true) { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement1.symbols b/tests/baselines/reference/breakInIterationOrSwitchStatement1.symbols index e84431fd42681..34ff183ed60dd 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement1.symbols +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement1.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement1.ts] //// + +=== breakInIterationOrSwitchStatement1.ts === while (true) { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement1.types b/tests/baselines/reference/breakInIterationOrSwitchStatement1.types index fad31ae3c9214..69ab7ddc6d69a 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement1.types +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement1.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement1.ts] //// + +=== breakInIterationOrSwitchStatement1.ts === while (true) { >true : true diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement2.js b/tests/baselines/reference/breakInIterationOrSwitchStatement2.js index 903bed733db13..12c33887f6f88 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement2.js +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakInIterationOrSwitchStatement2.ts] //// + //// [breakInIterationOrSwitchStatement2.ts] do { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement2.symbols b/tests/baselines/reference/breakInIterationOrSwitchStatement2.symbols index b96d749f813a3..67856fd368170 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement2.symbols +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement2.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement2.ts] //// + +=== breakInIterationOrSwitchStatement2.ts === do { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement2.types b/tests/baselines/reference/breakInIterationOrSwitchStatement2.types index e954d459f7386..3d7582e5b287b 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement2.types +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement2.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement2.ts] //// + +=== breakInIterationOrSwitchStatement2.ts === do { break; } diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement3.js b/tests/baselines/reference/breakInIterationOrSwitchStatement3.js index dfadaf031823e..1bbe738aa55b1 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement3.js +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakInIterationOrSwitchStatement3.ts] //// + //// [breakInIterationOrSwitchStatement3.ts] for (;;) { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement3.symbols b/tests/baselines/reference/breakInIterationOrSwitchStatement3.symbols index 471cacd257a8b..2044274f3cc60 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement3.symbols +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement3.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement3.ts] //// + +=== breakInIterationOrSwitchStatement3.ts === for (;;) { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement3.types b/tests/baselines/reference/breakInIterationOrSwitchStatement3.types index 471cacd257a8b..2044274f3cc60 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement3.types +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement3.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement3.ts] //// + +=== breakInIterationOrSwitchStatement3.ts === for (;;) { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt b/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt index c331ff09c2ca7..4628cb834dd35 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/breakInIterationOrSwitchStatement4.ts(1,15): error TS2304: Cannot find name 'something'. +breakInIterationOrSwitchStatement4.ts(1,15): error TS2304: Cannot find name 'something'. -==== tests/cases/compiler/breakInIterationOrSwitchStatement4.ts (1 errors) ==== +==== breakInIterationOrSwitchStatement4.ts (1 errors) ==== for (var i in something) { ~~~~~~~~~ !!! error TS2304: Cannot find name 'something'. diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement4.js b/tests/baselines/reference/breakInIterationOrSwitchStatement4.js index ef1978666e28a..e93ffe7661626 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement4.js +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakInIterationOrSwitchStatement4.ts] //// + //// [breakInIterationOrSwitchStatement4.ts] for (var i in something) { break; diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement4.symbols b/tests/baselines/reference/breakInIterationOrSwitchStatement4.symbols index f7d0661c16324..27b31d2d87636 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement4.symbols +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement4.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement4.ts] //// + +=== breakInIterationOrSwitchStatement4.ts === for (var i in something) { >i : Symbol(i, Decl(breakInIterationOrSwitchStatement4.ts, 0, 8)) diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement4.types b/tests/baselines/reference/breakInIterationOrSwitchStatement4.types index e38a44a3abbd6..4ebb0546cc5a3 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement4.types +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakInIterationOrSwitchStatement4.ts === +//// [tests/cases/compiler/breakInIterationOrSwitchStatement4.ts] //// + +=== breakInIterationOrSwitchStatement4.ts === for (var i in something) { >i : string >something : any diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt index 28a762f3d0958..b257343053c29 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts(1,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +breakNotInIterationOrSwitchStatement1.ts(1,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. -==== tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts (1 errors) ==== +==== breakNotInIterationOrSwitchStatement1.ts (1 errors) ==== break; ~~~~~~ !!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js index 21ca5d4cce45f..29f70a69abb18 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts] //// + //// [breakNotInIterationOrSwitchStatement1.ts] break; diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.symbols b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.symbols index ece7e82bfc032..15be0c46db869 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.symbols +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.symbols @@ -1,3 +1,5 @@ -=== tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts === +//// [tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts] //// + +=== breakNotInIterationOrSwitchStatement1.ts === break; diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.types b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.types index ece7e82bfc032..15be0c46db869 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.types +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.types @@ -1,3 +1,5 @@ -=== tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts === +//// [tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts] //// + +=== breakNotInIterationOrSwitchStatement1.ts === break; diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt index d77fb4bc05b04..9b82de8363447 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts(3,5): error TS1107: Jump target cannot cross function boundary. +breakNotInIterationOrSwitchStatement2.ts(3,5): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts (1 errors) ==== +==== breakNotInIterationOrSwitchStatement2.ts (1 errors) ==== while (true) { function f() { break; diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js index 531e5b5e5b6bf..e4141dd0e481f 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts] //// + //// [breakNotInIterationOrSwitchStatement2.ts] while (true) { function f() { diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.symbols b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.symbols index 2c9d766ee4600..c25e86c0ef3f7 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.symbols +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts === +//// [tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts] //// + +=== breakNotInIterationOrSwitchStatement2.ts === while (true) { function f() { >f : Symbol(f, Decl(breakNotInIterationOrSwitchStatement2.ts, 0, 14)) diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.types b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.types index 3b47127188419..ec0b95d0a0605 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.types +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts === +//// [tests/cases/compiler/breakNotInIterationOrSwitchStatement2.ts] //// + +=== breakNotInIterationOrSwitchStatement2.ts === while (true) { >true : true diff --git a/tests/baselines/reference/breakTarget1.js b/tests/baselines/reference/breakTarget1.js index 5283dfe191189..63ae8453566cd 100644 --- a/tests/baselines/reference/breakTarget1.js +++ b/tests/baselines/reference/breakTarget1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakTarget1.ts] //// + //// [breakTarget1.ts] target: break target; diff --git a/tests/baselines/reference/breakTarget1.symbols b/tests/baselines/reference/breakTarget1.symbols index dcb8860c5b7c7..927f7b2a7d4e9 100644 --- a/tests/baselines/reference/breakTarget1.symbols +++ b/tests/baselines/reference/breakTarget1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget1.ts === +//// [tests/cases/compiler/breakTarget1.ts] //// + +=== breakTarget1.ts === target: break target; diff --git a/tests/baselines/reference/breakTarget1.types b/tests/baselines/reference/breakTarget1.types index 85efb331e10dd..d0c63e2c121a6 100644 --- a/tests/baselines/reference/breakTarget1.types +++ b/tests/baselines/reference/breakTarget1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget1.ts === +//// [tests/cases/compiler/breakTarget1.ts] //// + +=== breakTarget1.ts === target: >target : any diff --git a/tests/baselines/reference/breakTarget2.js b/tests/baselines/reference/breakTarget2.js index 9ca050c18e515..b5d0fb650fe58 100644 --- a/tests/baselines/reference/breakTarget2.js +++ b/tests/baselines/reference/breakTarget2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakTarget2.ts] //// + //// [breakTarget2.ts] target: while (true) { diff --git a/tests/baselines/reference/breakTarget2.symbols b/tests/baselines/reference/breakTarget2.symbols index 4738e1530ebef..39d61afc39f24 100644 --- a/tests/baselines/reference/breakTarget2.symbols +++ b/tests/baselines/reference/breakTarget2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget2.ts === +//// [tests/cases/compiler/breakTarget2.ts] //// + +=== breakTarget2.ts === target: while (true) { diff --git a/tests/baselines/reference/breakTarget2.types b/tests/baselines/reference/breakTarget2.types index bf465eb568d18..b265da66a0f2f 100644 --- a/tests/baselines/reference/breakTarget2.types +++ b/tests/baselines/reference/breakTarget2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget2.ts === +//// [tests/cases/compiler/breakTarget2.ts] //// + +=== breakTarget2.ts === target: >target : any diff --git a/tests/baselines/reference/breakTarget3.js b/tests/baselines/reference/breakTarget3.js index 0fa6cd2d2988a..3bdc743b0c80a 100644 --- a/tests/baselines/reference/breakTarget3.js +++ b/tests/baselines/reference/breakTarget3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakTarget3.ts] //// + //// [breakTarget3.ts] target1: target2: diff --git a/tests/baselines/reference/breakTarget3.symbols b/tests/baselines/reference/breakTarget3.symbols index b00f075c1192b..9a6d16314a481 100644 --- a/tests/baselines/reference/breakTarget3.symbols +++ b/tests/baselines/reference/breakTarget3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget3.ts === +//// [tests/cases/compiler/breakTarget3.ts] //// + +=== breakTarget3.ts === target1: target2: diff --git a/tests/baselines/reference/breakTarget3.types b/tests/baselines/reference/breakTarget3.types index 83065c8929b0f..5c859b59914f8 100644 --- a/tests/baselines/reference/breakTarget3.types +++ b/tests/baselines/reference/breakTarget3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget3.ts === +//// [tests/cases/compiler/breakTarget3.ts] //// + +=== breakTarget3.ts === target1: >target1 : any diff --git a/tests/baselines/reference/breakTarget4.js b/tests/baselines/reference/breakTarget4.js index 4586301d71b7c..38dd0fd994b48 100644 --- a/tests/baselines/reference/breakTarget4.js +++ b/tests/baselines/reference/breakTarget4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakTarget4.ts] //// + //// [breakTarget4.ts] target1: target2: diff --git a/tests/baselines/reference/breakTarget4.symbols b/tests/baselines/reference/breakTarget4.symbols index 32aaf357e3d33..e21ad2d4c40ce 100644 --- a/tests/baselines/reference/breakTarget4.symbols +++ b/tests/baselines/reference/breakTarget4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget4.ts === +//// [tests/cases/compiler/breakTarget4.ts] //// + +=== breakTarget4.ts === target1: target2: diff --git a/tests/baselines/reference/breakTarget4.types b/tests/baselines/reference/breakTarget4.types index d183879a47b58..4328b05736b49 100644 --- a/tests/baselines/reference/breakTarget4.types +++ b/tests/baselines/reference/breakTarget4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget4.ts === +//// [tests/cases/compiler/breakTarget4.ts] //// + +=== breakTarget4.ts === target1: >target1 : any diff --git a/tests/baselines/reference/breakTarget5.errors.txt b/tests/baselines/reference/breakTarget5.errors.txt index a54a415b9907b..b842116ccca78 100644 --- a/tests/baselines/reference/breakTarget5.errors.txt +++ b/tests/baselines/reference/breakTarget5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/breakTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. +breakTarget5.ts(5,7): error TS1107: Jump target cannot cross function boundary. -==== tests/cases/compiler/breakTarget5.ts (1 errors) ==== +==== breakTarget5.ts (1 errors) ==== target: while (true) { function f() { diff --git a/tests/baselines/reference/breakTarget5.js b/tests/baselines/reference/breakTarget5.js index 197e4e147bd7e..51deeda7c3ba4 100644 --- a/tests/baselines/reference/breakTarget5.js +++ b/tests/baselines/reference/breakTarget5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakTarget5.ts] //// + //// [breakTarget5.ts] target: while (true) { diff --git a/tests/baselines/reference/breakTarget5.symbols b/tests/baselines/reference/breakTarget5.symbols index ffdfc87eff157..ff943c7347c97 100644 --- a/tests/baselines/reference/breakTarget5.symbols +++ b/tests/baselines/reference/breakTarget5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget5.ts === +//// [tests/cases/compiler/breakTarget5.ts] //// + +=== breakTarget5.ts === target: while (true) { function f() { diff --git a/tests/baselines/reference/breakTarget5.types b/tests/baselines/reference/breakTarget5.types index efb5703e0eeba..c46ecbccba010 100644 --- a/tests/baselines/reference/breakTarget5.types +++ b/tests/baselines/reference/breakTarget5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget5.ts === +//// [tests/cases/compiler/breakTarget5.ts] //// + +=== breakTarget5.ts === target: >target : any diff --git a/tests/baselines/reference/breakTarget6.errors.txt b/tests/baselines/reference/breakTarget6.errors.txt index 82d823c986d41..fa4049765d5cd 100644 --- a/tests/baselines/reference/breakTarget6.errors.txt +++ b/tests/baselines/reference/breakTarget6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/breakTarget6.ts(2,3): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. +breakTarget6.ts(2,3): error TS1116: A 'break' statement can only jump to a label of an enclosing statement. -==== tests/cases/compiler/breakTarget6.ts (1 errors) ==== +==== breakTarget6.ts (1 errors) ==== while (true) { break target; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/breakTarget6.js b/tests/baselines/reference/breakTarget6.js index 9c5bcc3ded192..11ffb11504fee 100644 --- a/tests/baselines/reference/breakTarget6.js +++ b/tests/baselines/reference/breakTarget6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/breakTarget6.ts] //// + //// [breakTarget6.ts] while (true) { break target; diff --git a/tests/baselines/reference/breakTarget6.symbols b/tests/baselines/reference/breakTarget6.symbols index 77dc493eba355..18f27704ce808 100644 --- a/tests/baselines/reference/breakTarget6.symbols +++ b/tests/baselines/reference/breakTarget6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget6.ts === +//// [tests/cases/compiler/breakTarget6.ts] //// + +=== breakTarget6.ts === while (true) { break target; diff --git a/tests/baselines/reference/breakTarget6.types b/tests/baselines/reference/breakTarget6.types index afc1e917acd65..6d9699af18550 100644 --- a/tests/baselines/reference/breakTarget6.types +++ b/tests/baselines/reference/breakTarget6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/breakTarget6.ts === +//// [tests/cases/compiler/breakTarget6.ts] //// + +=== breakTarget6.ts === while (true) { >true : true diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.js b/tests/baselines/reference/bundledDtsLateExportRenaming.js index c2a8d6867a2bd..4e7483a20d845 100644 --- a/tests/baselines/reference/bundledDtsLateExportRenaming.js +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.js @@ -57,7 +57,7 @@ declare module "index" { dist/out.d.ts(10,33): error TS2307: Cannot find module 'nested' or its corresponding type declarations. -==== ./dist/out.d.ts (1 errors) ==== +==== dist/out.d.ts (1 errors) ==== declare module "nested/shared" { export class B { } diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.symbols b/tests/baselines/reference/bundledDtsLateExportRenaming.symbols index cb3a43c999987..be9a646ce5f37 100644 --- a/tests/baselines/reference/bundledDtsLateExportRenaming.symbols +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.symbols @@ -1,8 +1,10 @@ -=== tests/cases/compiler/index.ts === +//// [tests/cases/compiler/bundledDtsLateExportRenaming.ts] //// + +=== index.ts === export * from "./nested"; -=== tests/cases/compiler/nested/base.ts === +=== nested/base.ts === import { B } from "./shared"; >B : Symbol(B, Decl(base.ts, 0, 8)) @@ -13,7 +15,7 @@ export function f() { >B : Symbol(B, Decl(base.ts, 0, 8)) } -=== tests/cases/compiler/nested/derived.ts === +=== nested/derived.ts === import { f } from "./base"; >f : Symbol(f, Decl(derived.ts, 0, 8)) @@ -24,14 +26,14 @@ export function g() { >f : Symbol(f, Decl(derived.ts, 0, 8)) } -=== tests/cases/compiler/nested/index.ts === +=== nested/index.ts === export * from "./base"; export * from "./derived"; export * from "./shared"; -=== tests/cases/compiler/nested/shared.ts === +=== 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 index d9aee2d895627..b9593cea1a0f0 100644 --- a/tests/baselines/reference/bundledDtsLateExportRenaming.types +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.types @@ -1,8 +1,10 @@ -=== tests/cases/compiler/index.ts === +//// [tests/cases/compiler/bundledDtsLateExportRenaming.ts] //// + +=== index.ts === export * from "./nested"; -=== tests/cases/compiler/nested/base.ts === +=== nested/base.ts === import { B } from "./shared"; >B : typeof B @@ -14,26 +16,26 @@ export function f() { >B : typeof B } -=== tests/cases/compiler/nested/derived.ts === +=== nested/derived.ts === import { f } from "./base"; ->f : () => import("tests/cases/compiler/index").B +>f : () => import("index").B export function g() { ->g : () => import("tests/cases/compiler/index").B +>g : () => import("index").B return f(); ->f() : import("tests/cases/compiler/index").B ->f : () => import("tests/cases/compiler/index").B +>f() : import("index").B +>f : () => import("index").B } -=== tests/cases/compiler/nested/index.ts === +=== nested/index.ts === export * from "./base"; export * from "./derived"; export * from "./shared"; -=== tests/cases/compiler/nested/shared.ts === +=== nested/shared.ts === export class B {} >B : B diff --git a/tests/baselines/reference/bundlerConditionsExcludesNode.symbols b/tests/baselines/reference/bundlerConditionsExcludesNode.symbols index 53060cf30c368..4d4c9b1d57da4 100644 --- a/tests/baselines/reference/bundlerConditionsExcludesNode.symbols +++ b/tests/baselines/reference/bundlerConditionsExcludesNode.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerConditionsExcludesNode.ts] //// + === /node_modules/conditions/index.node.d.ts === export const node: number; >node : Symbol(node, Decl(index.node.d.ts, 0, 12)) diff --git a/tests/baselines/reference/bundlerConditionsExcludesNode.trace.json b/tests/baselines/reference/bundlerConditionsExcludesNode.trace.json index 2285df0907657..0e5cd2eb567dc 100644 --- a/tests/baselines/reference/bundlerConditionsExcludesNode.trace.json +++ b/tests/baselines/reference/bundlerConditionsExcludesNode.trace.json @@ -4,6 +4,7 @@ "Resolving in CJS mode with conditions 'import', 'types'.", "File '/package.json' does not exist.", "Loading module 'conditions' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/conditions/package.json'.", "Entering conditional exports.", "Saw non-matching condition 'node'.", @@ -17,64 +18,76 @@ "Exiting conditional exports.", "Resolving real path for '/node_modules/conditions/index.web.d.ts', result '/node_modules/conditions/index.web.d.ts'.", "======== Module name 'conditions' was successfully resolved to '/node_modules/conditions/index.web.d.ts' with Package ID 'conditions/index.web.d.ts@1.0.0'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerConditionsExcludesNode.types b/tests/baselines/reference/bundlerConditionsExcludesNode.types index a907f0c67ae9f..78f74b5c5367e 100644 --- a/tests/baselines/reference/bundlerConditionsExcludesNode.types +++ b/tests/baselines/reference/bundlerConditionsExcludesNode.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerConditionsExcludesNode.ts] //// + === /node_modules/conditions/index.node.d.ts === export const node: number; >node : number diff --git a/tests/baselines/reference/bundlerImportESM.symbols b/tests/baselines/reference/bundlerImportESM.symbols index de03eed56fdc2..d143f99424c05 100644 --- a/tests/baselines/reference/bundlerImportESM.symbols +++ b/tests/baselines/reference/bundlerImportESM.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportESM.ts] //// + === /esm.mts === export const esm = 0; >esm : Symbol(esm, Decl(esm.mts, 0, 12)) diff --git a/tests/baselines/reference/bundlerImportESM.types b/tests/baselines/reference/bundlerImportESM.types index 3ffcb432c7bff..5f0da560436b4 100644 --- a/tests/baselines/reference/bundlerImportESM.types +++ b/tests/baselines/reference/bundlerImportESM.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportESM.ts] //// + === /esm.mts === export const esm = 0; >esm : 0 diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).symbols b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).symbols index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).symbols +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).trace.json b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).trace.json index 1a650c9e78ae8..3ae9198b3782d 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).trace.json +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).trace.json @@ -109,70 +109,82 @@ "File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.", "File '/project/a.ts' exists - use it as a name resolution result.", "======== Module name './a.d.ts' was successfully resolved to '/project/a.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).types b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).types index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).types +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=false).types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).symbols b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).symbols index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).symbols +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).trace.json b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).trace.json index 1a650c9e78ae8..3ae9198b3782d 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).trace.json +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).trace.json @@ -109,70 +109,82 @@ "File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.", "File '/project/a.ts' exists - use it as a name resolution result.", "======== Module name './a.d.ts' was successfully resolved to '/project/a.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).types b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).types index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).types +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=false,noemit=true).types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).symbols b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).symbols index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).symbols +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).trace.json b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).trace.json index 1a650c9e78ae8..3ae9198b3782d 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).trace.json +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).trace.json @@ -109,70 +109,82 @@ "File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.", "File '/project/a.ts' exists - use it as a name resolution result.", "======== Module name './a.d.ts' was successfully resolved to '/project/a.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).types b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).types index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).types +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=false).types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).symbols b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).symbols index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).symbols +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).trace.json b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).trace.json index 1a650c9e78ae8..3ae9198b3782d 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).trace.json +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).trace.json @@ -109,70 +109,82 @@ "File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.", "File '/project/a.ts' exists - use it as a name resolution result.", "======== Module name './a.d.ts' was successfully resolved to '/project/a.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).types b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).types index 3c1dc17c50c28..9305b4dcfb533 100644 --- a/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).types +++ b/tests/baselines/reference/bundlerImportTsExtensions(allowimportingtsextensions=true,noemit=true).types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerImportTsExtensions.ts] //// + === /project/a.ts === export {}; diff --git a/tests/baselines/reference/bundlerNodeModules1.symbols b/tests/baselines/reference/bundlerNodeModules1.symbols index d19c2e18f2c4d..04471bcc93196 100644 --- a/tests/baselines/reference/bundlerNodeModules1.symbols +++ b/tests/baselines/reference/bundlerNodeModules1.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerNodeModules1.ts] //// + === /node_modules/dual/index.d.ts === export const esm: number; >esm : Symbol(esm, Decl(index.d.ts, 0, 12)) diff --git a/tests/baselines/reference/bundlerNodeModules1.trace.json b/tests/baselines/reference/bundlerNodeModules1.trace.json index 1037efb7cdd26..b6d35e104cdf6 100644 --- a/tests/baselines/reference/bundlerNodeModules1.trace.json +++ b/tests/baselines/reference/bundlerNodeModules1.trace.json @@ -4,6 +4,7 @@ "Resolving in CJS mode with conditions 'import', 'types'.", "File '/package.json' does not exist.", "Loading module 'dual' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Found 'package.json' at '/node_modules/dual/package.json'.", "Entering conditional exports.", "Matched 'exports' condition 'import'.", @@ -22,64 +23,76 @@ "======== Resolving module 'dual' from '/main.cts'. ========", "Resolution for module 'dual' was found in cache from location '/'.", "======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.ts' with Package ID 'dual/index.d.ts@1.0.0'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules/@types' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerNodeModules1.types b/tests/baselines/reference/bundlerNodeModules1.types index 038aac71d8928..4fd828baaa40b 100644 --- a/tests/baselines/reference/bundlerNodeModules1.types +++ b/tests/baselines/reference/bundlerNodeModules1.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerNodeModules1.ts] //// + === /node_modules/dual/index.d.ts === export const esm: number; >esm : number diff --git a/tests/baselines/reference/bundlerRelative1.symbols b/tests/baselines/reference/bundlerRelative1.symbols index 4bbdf732a77c6..41db8dac77e9c 100644 --- a/tests/baselines/reference/bundlerRelative1.symbols +++ b/tests/baselines/reference/bundlerRelative1.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerRelative1.ts] //// + === /dir/index.ts === export const x = 0; >x : Symbol(x, Decl(index.ts, 0, 12)) diff --git a/tests/baselines/reference/bundlerRelative1.trace.json b/tests/baselines/reference/bundlerRelative1.trace.json index 6f5e726ded490..c90d2d5fcf7b5 100644 --- a/tests/baselines/reference/bundlerRelative1.trace.json +++ b/tests/baselines/reference/bundlerRelative1.trace.json @@ -81,70 +81,82 @@ "File '/types/cjs.tsx' does not exist.", "File '/types/cjs.d.ts' exists - use it as a name resolution result.", "======== Module name './types/cjs' was successfully resolved to '/types/cjs.d.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/bundlerRelative1.types b/tests/baselines/reference/bundlerRelative1.types index 7e1e3e5e865c7..50663cfe46ead 100644 --- a/tests/baselines/reference/bundlerRelative1.types +++ b/tests/baselines/reference/bundlerRelative1.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerRelative1.ts] //// + === /dir/index.ts === export const x = 0; >x : 0 diff --git a/tests/baselines/reference/bundlerSyntaxRestrictions.symbols b/tests/baselines/reference/bundlerSyntaxRestrictions.symbols index c5f88dea74bee..84ff7ff94494e 100644 --- a/tests/baselines/reference/bundlerSyntaxRestrictions.symbols +++ b/tests/baselines/reference/bundlerSyntaxRestrictions.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerSyntaxRestrictions.ts] //// + === /node_modules/@types/node/index.d.ts === declare var require: (...args: any[]) => any; >require : Symbol(require, Decl(index.d.ts, 0, 11)) diff --git a/tests/baselines/reference/bundlerSyntaxRestrictions.types b/tests/baselines/reference/bundlerSyntaxRestrictions.types index 1fa678daddf06..7f0b80dac1ded 100644 --- a/tests/baselines/reference/bundlerSyntaxRestrictions.types +++ b/tests/baselines/reference/bundlerSyntaxRestrictions.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/moduleResolution/bundler/bundlerSyntaxRestrictions.ts] //// + === /node_modules/@types/node/index.d.ts === declare var require: (...args: any[]) => any; >require : (...args: any[]) => any diff --git a/tests/baselines/reference/cacheResolutions.symbols b/tests/baselines/reference/cacheResolutions.symbols index 4b40798149b2d..8bdcae6654ceb 100644 --- a/tests/baselines/reference/cacheResolutions.symbols +++ b/tests/baselines/reference/cacheResolutions.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cacheResolutions.ts] //// + === /a/b/c/app.ts === export let x = 1; >x : Symbol(x, Decl(app.ts, 0, 10)) diff --git a/tests/baselines/reference/cacheResolutions.trace.json b/tests/baselines/reference/cacheResolutions.trace.json index 97970e5e2d689..3223d232e2b3f 100644 --- a/tests/baselines/reference/cacheResolutions.trace.json +++ b/tests/baselines/reference/cacheResolutions.trace.json @@ -13,6 +13,7 @@ "File '/tslib.ts' does not exist.", "File '/tslib.tsx' does not exist.", "File '/tslib.d.ts' does not exist.", + "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", @@ -32,70 +33,82 @@ "======== Resolving module 'tslib' from '/a/b/c/lib2.ts'. ========", "Resolution for module 'tslib' was found in cache from location '/a/b/c'.", "======== Module name 'tslib' was not resolved. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cacheResolutions.types b/tests/baselines/reference/cacheResolutions.types index 59d208b5d22ab..af9a4d6388a8b 100644 --- a/tests/baselines/reference/cacheResolutions.types +++ b/tests/baselines/reference/cacheResolutions.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cacheResolutions.ts] //// + === /a/b/c/app.ts === export let x = 1; >x : number diff --git a/tests/baselines/reference/cachedContextualTypes.js b/tests/baselines/reference/cachedContextualTypes.js index c3f9d06d57dba..760a82a1fad93 100644 --- a/tests/baselines/reference/cachedContextualTypes.js +++ b/tests/baselines/reference/cachedContextualTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedContextualTypes.ts] //// + //// [cachedContextualTypes.ts] // Repro from #52198 diff --git a/tests/baselines/reference/cachedContextualTypes.symbols b/tests/baselines/reference/cachedContextualTypes.symbols index c4e8ad9739498..f2a84a9d47af9 100644 --- a/tests/baselines/reference/cachedContextualTypes.symbols +++ b/tests/baselines/reference/cachedContextualTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cachedContextualTypes.ts === +//// [tests/cases/compiler/cachedContextualTypes.ts] //// + +=== cachedContextualTypes.ts === // Repro from #52198 declare function createInstance any, R extends InstanceType>(ctor: Ctor, ...args: ConstructorParameters): R; diff --git a/tests/baselines/reference/cachedContextualTypes.types b/tests/baselines/reference/cachedContextualTypes.types index c91f9c7720c16..2d896e060e8ca 100644 --- a/tests/baselines/reference/cachedContextualTypes.types +++ b/tests/baselines/reference/cachedContextualTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cachedContextualTypes.ts === +//// [tests/cases/compiler/cachedContextualTypes.ts] //// + +=== cachedContextualTypes.ts === // Repro from #52198 declare function createInstance any, R extends InstanceType>(ctor: Ctor, ...args: ConstructorParameters): R; diff --git a/tests/baselines/reference/cachedModuleResolution1.js b/tests/baselines/reference/cachedModuleResolution1.js index 2a8211b1e600f..14081ac41923a 100644 --- a/tests/baselines/reference/cachedModuleResolution1.js +++ b/tests/baselines/reference/cachedModuleResolution1.js @@ -7,7 +7,8 @@ export declare let x: number import {x} from "foo"; //// [lib.ts] -import {x} from "foo"; +import {x} from "foo"; + //// [app.js] "use strict"; diff --git a/tests/baselines/reference/cachedModuleResolution1.symbols b/tests/baselines/reference/cachedModuleResolution1.symbols index 87685f4f14739..3968a8f9d2e76 100644 --- a/tests/baselines/reference/cachedModuleResolution1.symbols +++ b/tests/baselines/reference/cachedModuleResolution1.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution1.ts] //// + === /a/b/node_modules/foo.d.ts === export declare let x: number >x : Symbol(x, Decl(foo.d.ts, 0, 18)) diff --git a/tests/baselines/reference/cachedModuleResolution1.trace.json b/tests/baselines/reference/cachedModuleResolution1.trace.json index 74071874f0df2..e0abb568e03c2 100644 --- a/tests/baselines/reference/cachedModuleResolution1.trace.json +++ b/tests/baselines/reference/cachedModuleResolution1.trace.json @@ -2,6 +2,7 @@ "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", @@ -13,72 +14,85 @@ "======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution1.types b/tests/baselines/reference/cachedModuleResolution1.types index ccc9e1311c83b..1593bf4db2251 100644 --- a/tests/baselines/reference/cachedModuleResolution1.types +++ b/tests/baselines/reference/cachedModuleResolution1.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution1.ts] //// + === /a/b/node_modules/foo.d.ts === export declare let x: number >x : number diff --git a/tests/baselines/reference/cachedModuleResolution2.symbols b/tests/baselines/reference/cachedModuleResolution2.symbols index b9080b03cbfa2..aa5a40f1eb7d5 100644 --- a/tests/baselines/reference/cachedModuleResolution2.symbols +++ b/tests/baselines/reference/cachedModuleResolution2.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution2.ts] //// + === /a/b/node_modules/foo.d.ts === export declare let x: number >x : Symbol(x, Decl(foo.d.ts, 0, 18)) diff --git a/tests/baselines/reference/cachedModuleResolution2.trace.json b/tests/baselines/reference/cachedModuleResolution2.trace.json index fa4bc5c0686a8..af31f721e8747 100644 --- a/tests/baselines/reference/cachedModuleResolution2.trace.json +++ b/tests/baselines/reference/cachedModuleResolution2.trace.json @@ -2,6 +2,7 @@ "======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", "File '/a/b/node_modules/foo.ts' does not exist.", "File '/a/b/node_modules/foo.tsx' does not exist.", @@ -11,74 +12,87 @@ "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution2.types b/tests/baselines/reference/cachedModuleResolution2.types index 4c34d48b3a9ed..319288cda6f71 100644 --- a/tests/baselines/reference/cachedModuleResolution2.types +++ b/tests/baselines/reference/cachedModuleResolution2.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution2.ts] //// + === /a/b/node_modules/foo.d.ts === export declare let x: number >x : number diff --git a/tests/baselines/reference/cachedModuleResolution3.symbols b/tests/baselines/reference/cachedModuleResolution3.symbols index 3c5e12431c04c..cce7b24eb24e3 100644 --- a/tests/baselines/reference/cachedModuleResolution3.symbols +++ b/tests/baselines/reference/cachedModuleResolution3.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution3.ts] //// + === /a/b/foo.d.ts === export declare let x: number >x : Symbol(x, Decl(foo.d.ts, 0, 18)) diff --git a/tests/baselines/reference/cachedModuleResolution3.trace.json b/tests/baselines/reference/cachedModuleResolution3.trace.json index 5de085a7eaf89..2d47c539debd3 100644 --- a/tests/baselines/reference/cachedModuleResolution3.trace.json +++ b/tests/baselines/reference/cachedModuleResolution3.trace.json @@ -18,70 +18,82 @@ "Explicitly specified module resolution kind: 'Classic'.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was successfully resolved to '/a/b/foo.d.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution3.types b/tests/baselines/reference/cachedModuleResolution3.types index 412ef2ae1d5c0..7986688836270 100644 --- a/tests/baselines/reference/cachedModuleResolution3.types +++ b/tests/baselines/reference/cachedModuleResolution3.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution3.ts] //// + === /a/b/foo.d.ts === export declare let x: number >x : number diff --git a/tests/baselines/reference/cachedModuleResolution4.symbols b/tests/baselines/reference/cachedModuleResolution4.symbols index a145a1820365e..a377de8c86da8 100644 --- a/tests/baselines/reference/cachedModuleResolution4.symbols +++ b/tests/baselines/reference/cachedModuleResolution4.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution4.ts] //// + === /a/b/foo.d.ts === export declare let x: number >x : Symbol(x, Decl(foo.d.ts, 0, 18)) diff --git a/tests/baselines/reference/cachedModuleResolution4.trace.json b/tests/baselines/reference/cachedModuleResolution4.trace.json index 0954e526b0430..6880a4175b515 100644 --- a/tests/baselines/reference/cachedModuleResolution4.trace.json +++ b/tests/baselines/reference/cachedModuleResolution4.trace.json @@ -18,70 +18,82 @@ "File '/a/b/c/d/foo.d.ts' does not exist.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was successfully resolved to '/a/b/foo.d.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution4.types b/tests/baselines/reference/cachedModuleResolution4.types index ca4050e655de1..d2723172da137 100644 --- a/tests/baselines/reference/cachedModuleResolution4.types +++ b/tests/baselines/reference/cachedModuleResolution4.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution4.ts] //// + === /a/b/foo.d.ts === export declare let x: number >x : number diff --git a/tests/baselines/reference/cachedModuleResolution5.js b/tests/baselines/reference/cachedModuleResolution5.js index dee5a46122c61..dfabec484bd12 100644 --- a/tests/baselines/reference/cachedModuleResolution5.js +++ b/tests/baselines/reference/cachedModuleResolution5.js @@ -7,7 +7,8 @@ export declare let x: number import {x} from "foo"; //// [lib.ts] -import {x} from "foo"; +import {x} from "foo"; + //// [app.js] "use strict"; diff --git a/tests/baselines/reference/cachedModuleResolution5.symbols b/tests/baselines/reference/cachedModuleResolution5.symbols index 6c18677efcfed..8ad5772cea668 100644 --- a/tests/baselines/reference/cachedModuleResolution5.symbols +++ b/tests/baselines/reference/cachedModuleResolution5.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution5.ts] //// + === /a/b/node_modules/foo.d.ts === export declare let x: number >x : Symbol(x, Decl(foo.d.ts, 0, 18)) diff --git a/tests/baselines/reference/cachedModuleResolution5.trace.json b/tests/baselines/reference/cachedModuleResolution5.trace.json index 79b1126ca4697..897fc3aa4c3ad 100644 --- a/tests/baselines/reference/cachedModuleResolution5.trace.json +++ b/tests/baselines/reference/cachedModuleResolution5.trace.json @@ -2,6 +2,7 @@ "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", @@ -13,72 +14,85 @@ "======== Resolving module 'foo' from '/a/b/lib.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Resolution for module 'foo' was found in cache from location '/a/b'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution5.types b/tests/baselines/reference/cachedModuleResolution5.types index e827caaf9228d..07fb06b91a557 100644 --- a/tests/baselines/reference/cachedModuleResolution5.types +++ b/tests/baselines/reference/cachedModuleResolution5.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution5.ts] //// + === /a/b/node_modules/foo.d.ts === export declare let x: number >x : number diff --git a/tests/baselines/reference/cachedModuleResolution6.symbols b/tests/baselines/reference/cachedModuleResolution6.symbols index 87948f86b0b49..9fee3e463281f 100644 --- a/tests/baselines/reference/cachedModuleResolution6.symbols +++ b/tests/baselines/reference/cachedModuleResolution6.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution6.ts] //// + === /a/b/c/d/e/app.ts === import {x} from "foo"; >x : Symbol(x, Decl(app.ts, 0, 8)) diff --git a/tests/baselines/reference/cachedModuleResolution6.trace.json b/tests/baselines/reference/cachedModuleResolution6.trace.json index 852de964c0d88..4c07ac4bd05b1 100644 --- a/tests/baselines/reference/cachedModuleResolution6.trace.json +++ b/tests/baselines/reference/cachedModuleResolution6.trace.json @@ -2,6 +2,7 @@ "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", @@ -9,6 +10,7 @@ "Directory '/a/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Loading module 'foo' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", @@ -19,72 +21,85 @@ "======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was not resolved. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution6.types b/tests/baselines/reference/cachedModuleResolution6.types index 638d2aefb6911..fcfa4b21cec31 100644 --- a/tests/baselines/reference/cachedModuleResolution6.types +++ b/tests/baselines/reference/cachedModuleResolution6.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution6.ts] //// + === /a/b/c/d/e/app.ts === import {x} from "foo"; >x : any diff --git a/tests/baselines/reference/cachedModuleResolution7.symbols b/tests/baselines/reference/cachedModuleResolution7.symbols index b6a0ad02ff5f1..8c6f052d1de86 100644 --- a/tests/baselines/reference/cachedModuleResolution7.symbols +++ b/tests/baselines/reference/cachedModuleResolution7.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution7.ts] //// + === /a/b/c/lib.ts === import {x} from "foo"; >x : Symbol(x, Decl(lib.ts, 0, 8)) diff --git a/tests/baselines/reference/cachedModuleResolution7.trace.json b/tests/baselines/reference/cachedModuleResolution7.trace.json index 1c7568d7fef16..f116d34c6905a 100644 --- a/tests/baselines/reference/cachedModuleResolution7.trace.json +++ b/tests/baselines/reference/cachedModuleResolution7.trace.json @@ -2,11 +2,13 @@ "======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Loading module 'foo' from 'node_modules' folder, target file types: JavaScript.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", @@ -15,74 +17,87 @@ "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was not resolved. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution7.types b/tests/baselines/reference/cachedModuleResolution7.types index 3ed9aea685671..42fb860f395a3 100644 --- a/tests/baselines/reference/cachedModuleResolution7.types +++ b/tests/baselines/reference/cachedModuleResolution7.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution7.ts] //// + === /a/b/c/lib.ts === import {x} from "foo"; >x : any diff --git a/tests/baselines/reference/cachedModuleResolution8.symbols b/tests/baselines/reference/cachedModuleResolution8.symbols index 87948f86b0b49..73d8ce998fc2f 100644 --- a/tests/baselines/reference/cachedModuleResolution8.symbols +++ b/tests/baselines/reference/cachedModuleResolution8.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution8.ts] //// + === /a/b/c/d/e/app.ts === import {x} from "foo"; >x : Symbol(x, Decl(app.ts, 0, 8)) diff --git a/tests/baselines/reference/cachedModuleResolution8.trace.json b/tests/baselines/reference/cachedModuleResolution8.trace.json index b41ac01f31e0d..b74e44890d3ee 100644 --- a/tests/baselines/reference/cachedModuleResolution8.trace.json +++ b/tests/baselines/reference/cachedModuleResolution8.trace.json @@ -19,6 +19,7 @@ "File '/foo.ts' does not exist.", "File '/foo.tsx' does not exist.", "File '/foo.d.ts' does not exist.", + "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", @@ -42,70 +43,82 @@ "Explicitly specified module resolution kind: 'Classic'.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was not resolved. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution8.types b/tests/baselines/reference/cachedModuleResolution8.types index 638d2aefb6911..8ccd2f6024a34 100644 --- a/tests/baselines/reference/cachedModuleResolution8.types +++ b/tests/baselines/reference/cachedModuleResolution8.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution8.ts] //// + === /a/b/c/d/e/app.ts === import {x} from "foo"; >x : any diff --git a/tests/baselines/reference/cachedModuleResolution9.symbols b/tests/baselines/reference/cachedModuleResolution9.symbols index acf7ef51142e0..266ca70eafe3b 100644 --- a/tests/baselines/reference/cachedModuleResolution9.symbols +++ b/tests/baselines/reference/cachedModuleResolution9.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution9.ts] //// + === /a/b/c/lib.ts === import {x} from "foo"; >x : Symbol(x, Decl(lib.ts, 0, 8)) diff --git a/tests/baselines/reference/cachedModuleResolution9.trace.json b/tests/baselines/reference/cachedModuleResolution9.trace.json index da9b28842af2e..b0daccb405fe1 100644 --- a/tests/baselines/reference/cachedModuleResolution9.trace.json +++ b/tests/baselines/reference/cachedModuleResolution9.trace.json @@ -13,6 +13,7 @@ "File '/foo.ts' does not exist.", "File '/foo.tsx' does not exist.", "File '/foo.d.ts' does not exist.", + "Searching all ancestor node_modules directories for preferred extensions: Declaration.", "Directory '/a/b/c/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/node_modules' does not exist, skipping all lookups in it.", @@ -36,70 +37,82 @@ "File '/a/b/c/d/foo.d.ts' does not exist.", "Resolution for module 'foo' was found in cache from location '/a/b/c'.", "======== Module name 'foo' was not resolved. ========", - "======== Resolving module '@typescript/lib-es5' from '__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-es5'", "Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-es5' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators' from '__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators'", "Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators' was not resolved. ========", - "======== Resolving module '@typescript/lib-decorators/legacy' from '__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-decorators/legacy'", "Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========", - "======== Resolving module '@typescript/lib-dom' from '__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-dom'", "Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-dom' was not resolved. ========", - "======== Resolving module '@typescript/lib-webworker/importscripts' from '__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-webworker/importscripts'", "Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========", - "======== Resolving module '@typescript/lib-scripthost' from '__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", + "======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========", "Explicitly specified module resolution kind: 'Node10'.", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Directory '/node_modules' does not exist, skipping all lookups in it.", "Scoped package detected, looking in 'typescript__lib-scripthost'", "Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.", - "Directory 'node_modules' does not exist, skipping all lookups in it.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript.", + "Directory '/.src/node_modules' does not exist, skipping all lookups in it.", "Directory '/node_modules' does not exist, skipping all lookups in it.", "======== Module name '@typescript/lib-scripthost' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution9.types b/tests/baselines/reference/cachedModuleResolution9.types index 8a14f19e1b11c..e448995d1a2a6 100644 --- a/tests/baselines/reference/cachedModuleResolution9.types +++ b/tests/baselines/reference/cachedModuleResolution9.types @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cachedModuleResolution9.ts] //// + === /a/b/c/lib.ts === import {x} from "foo"; >x : any diff --git a/tests/baselines/reference/callChain.2.js b/tests/baselines/reference/callChain.2.js index 89070f410033e..1e5985f585401 100644 --- a/tests/baselines/reference/callChain.2.js +++ b/tests/baselines/reference/callChain.2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.2.ts] //// + //// [callChain.2.ts] declare const o1: undefined | (() => number); o1?.(); diff --git a/tests/baselines/reference/callChain.2.symbols b/tests/baselines/reference/callChain.2.symbols index 26c8859940e74..9a39b9a778128 100644 --- a/tests/baselines/reference/callChain.2.symbols +++ b/tests/baselines/reference/callChain.2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.2.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.2.ts] //// + +=== callChain.2.ts === declare const o1: undefined | (() => number); >o1 : Symbol(o1, Decl(callChain.2.ts, 0, 13)) diff --git a/tests/baselines/reference/callChain.2.types b/tests/baselines/reference/callChain.2.types index a0a4973799f3d..845e3dfea5848 100644 --- a/tests/baselines/reference/callChain.2.types +++ b/tests/baselines/reference/callChain.2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.2.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.2.ts] //// + +=== callChain.2.ts === declare const o1: undefined | (() => number); >o1 : () => number diff --git a/tests/baselines/reference/callChain.3.errors.txt b/tests/baselines/reference/callChain.3.errors.txt index 6deb1db1b4bef..0da76f5e68bc7 100644 --- a/tests/baselines/reference/callChain.3.errors.txt +++ b/tests/baselines/reference/callChain.3.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts(3,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'. +callChain.3.ts(3,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. -tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts(4,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'. +callChain.3.ts(4,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. -==== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts (2 errors) ==== +==== callChain.3.ts (2 errors) ==== declare function absorb(): T; declare const a: { m?(obj: {x: T}): T } | undefined; const n1: number = a?.m?.({x: 12 }); // should be an error (`undefined` is not assignable to `number`) diff --git a/tests/baselines/reference/callChain.3.js b/tests/baselines/reference/callChain.3.js index b34458a26e755..38f02912a2dfe 100644 --- a/tests/baselines/reference/callChain.3.js +++ b/tests/baselines/reference/callChain.3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts] //// + //// [callChain.3.ts] declare function absorb(): T; declare const a: { m?(obj: {x: T}): T } | undefined; diff --git a/tests/baselines/reference/callChain.3.symbols b/tests/baselines/reference/callChain.3.symbols index eb5a6ae9df2f0..5541a8e9a84fb 100644 --- a/tests/baselines/reference/callChain.3.symbols +++ b/tests/baselines/reference/callChain.3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts] //// + +=== callChain.3.ts === declare function absorb(): T; >absorb : Symbol(absorb, Decl(callChain.3.ts, 0, 0)) >T : Symbol(T, Decl(callChain.3.ts, 0, 24)) diff --git a/tests/baselines/reference/callChain.3.types b/tests/baselines/reference/callChain.3.types index c4afc572abf59..04b3c2d02032d 100644 --- a/tests/baselines/reference/callChain.3.types +++ b/tests/baselines/reference/callChain.3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.3.ts] //// + +=== callChain.3.ts === declare function absorb(): T; >absorb : () => T diff --git a/tests/baselines/reference/callChain.js b/tests/baselines/reference/callChain.js index b229f97d5a01c..1fca98bc97818 100644 --- a/tests/baselines/reference/callChain.js +++ b/tests/baselines/reference/callChain.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.ts] //// + //// [callChain.ts] declare const o1: undefined | ((...args: any[]) => number); o1?.(); diff --git a/tests/baselines/reference/callChain.symbols b/tests/baselines/reference/callChain.symbols index f92688645d426..b6da5180b4d82 100644 --- a/tests/baselines/reference/callChain.symbols +++ b/tests/baselines/reference/callChain.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.ts] //// + +=== callChain.ts === declare const o1: undefined | ((...args: any[]) => number); >o1 : Symbol(o1, Decl(callChain.ts, 0, 13)) >args : Symbol(args, Decl(callChain.ts, 0, 32)) diff --git a/tests/baselines/reference/callChain.types b/tests/baselines/reference/callChain.types index 9fc1bc8cd5265..aafdc88d22f5d 100644 --- a/tests/baselines/reference/callChain.types +++ b/tests/baselines/reference/callChain.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChain.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChain.ts] //// + +=== callChain.ts === declare const o1: undefined | ((...args: any[]) => number); >o1 : ((...args: any[]) => number) | undefined >args : any[] @@ -16,7 +18,7 @@ o1?.(...[1, 2]); >o1?.(...[1, 2]) : number | undefined >o1 : ((...args: any[]) => number) | undefined >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 @@ -25,7 +27,7 @@ o1?.(1, ...[2, 3], 4); >o1 : ((...args: any[]) => number) | undefined >1 : 1 >...[2, 3] : number ->[2, 3] : readonly [number, number] +>[2, 3] : [number, number] >2 : 2 >3 : 3 >4 : 4 @@ -54,7 +56,7 @@ o2?.b(...[1, 2]); >o2 : { b: (...args: any[]) => number; } | undefined >b : ((...args: any[]) => number) | undefined >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 @@ -65,7 +67,7 @@ o2?.b(1, ...[2, 3], 4); >b : ((...args: any[]) => number) | undefined >1 : 1 >...[2, 3] : number ->[2, 3] : readonly [number, number] +>[2, 3] : [number, number] >2 : 2 >3 : 3 >4 : 4 @@ -89,7 +91,7 @@ o2?.["b"](...[1, 2]); >o2 : { b: (...args: any[]) => number; } | undefined >"b" : "b" >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 @@ -100,7 +102,7 @@ o2?.["b"](1, ...[2, 3], 4); >"b" : "b" >1 : 1 >...[2, 3] : number ->[2, 3] : readonly [number, number] +>[2, 3] : [number, number] >2 : 2 >3 : 3 >4 : 4 @@ -135,7 +137,7 @@ o3.b?.(...[1, 2]).c; >o3 : { b: ((...args: any[]) => { c: string; }) | undefined; } >b : ((...args: any[]) => { c: string; }) | undefined >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 >c : string | undefined @@ -148,7 +150,7 @@ o3.b?.(1, ...[2, 3], 4).c; >b : ((...args: any[]) => { c: string; }) | undefined >1 : 1 >...[2, 3] : number ->[2, 3] : readonly [number, number] +>[2, 3] : [number, number] >2 : 2 >3 : 3 >4 : 4 @@ -178,7 +180,7 @@ o3.b?.(...[1, 2])["c"]; >o3 : { b: ((...args: any[]) => { c: string; }) | undefined; } >b : ((...args: any[]) => { c: string; }) | undefined >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 >"c" : "c" @@ -191,7 +193,7 @@ o3.b?.(1, ...[2, 3], 4)["c"]; >b : ((...args: any[]) => { c: string; }) | undefined >1 : 1 >...[2, 3] : number ->[2, 3] : readonly [number, number] +>[2, 3] : [number, number] >2 : 2 >3 : 3 >4 : 4 @@ -221,7 +223,7 @@ o3["b"]?.(...[1, 2]).c; >o3 : { b: ((...args: any[]) => { c: string; }) | undefined; } >"b" : "b" >...[1, 2] : number ->[1, 2] : readonly [number, number] +>[1, 2] : [number, number] >1 : 1 >2 : 2 >c : string | undefined @@ -234,7 +236,7 @@ o3["b"]?.(1, ...[2, 3], 4).c; >"b" : "b" >1 : 1 >...[2, 3] : number ->[2, 3] : readonly [number, number] +>[2, 3] : [number, number] >2 : 2 >3 : 3 >4 : 4 diff --git a/tests/baselines/reference/callChainInference.js b/tests/baselines/reference/callChainInference.js index f5a77972b27fe..38e535d5ec98f 100644 --- a/tests/baselines/reference/callChainInference.js +++ b/tests/baselines/reference/callChainInference.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainInference.ts] //// + //// [callChainInference.ts] // Repro from #42404 diff --git a/tests/baselines/reference/callChainInference.symbols b/tests/baselines/reference/callChainInference.symbols index b1fab1a8d8b93..5dc4658b52c7f 100644 --- a/tests/baselines/reference/callChainInference.symbols +++ b/tests/baselines/reference/callChainInference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChainInference.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainInference.ts] //// + +=== callChainInference.ts === // Repro from #42404 interface Y { diff --git a/tests/baselines/reference/callChainInference.types b/tests/baselines/reference/callChainInference.types index 4ed4f5acf6e90..14ce0c63ef78d 100644 --- a/tests/baselines/reference/callChainInference.types +++ b/tests/baselines/reference/callChainInference.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/optionalChaining/callChain/callChainInference.ts === +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainInference.ts] //// + +=== callChainInference.ts === // Repro from #42404 interface Y { diff --git a/tests/baselines/reference/callChainWithSuper(target=es2016).js b/tests/baselines/reference/callChainWithSuper(target=es2016).js index fcfbb5db553f4..cc2dd200550eb 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2016).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2016).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2017).js b/tests/baselines/reference/callChainWithSuper(target=es2017).js index fcfbb5db553f4..cc2dd200550eb 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2017).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2017).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2018).js b/tests/baselines/reference/callChainWithSuper(target=es2018).js index fcfbb5db553f4..cc2dd200550eb 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2018).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2018).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2019).js b/tests/baselines/reference/callChainWithSuper(target=es2019).js index fcfbb5db553f4..cc2dd200550eb 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2019).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2019).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2020).js b/tests/baselines/reference/callChainWithSuper(target=es2020).js index 30e1ad3886dc5..96be01245bfa7 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2020).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2020).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2021).js b/tests/baselines/reference/callChainWithSuper(target=es2021).js index 30e1ad3886dc5..96be01245bfa7 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2021).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2021).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es2022).js b/tests/baselines/reference/callChainWithSuper(target=es2022).js index 30e1ad3886dc5..96be01245bfa7 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es2022).js +++ b/tests/baselines/reference/callChainWithSuper(target=es2022).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es5).js b/tests/baselines/reference/callChainWithSuper(target=es5).js index e609c2a5258a4..e3e759261c665 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es5).js +++ b/tests/baselines/reference/callChainWithSuper(target=es5).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=es6).js b/tests/baselines/reference/callChainWithSuper(target=es6).js index fcfbb5db553f4..cc2dd200550eb 100644 --- a/tests/baselines/reference/callChainWithSuper(target=es6).js +++ b/tests/baselines/reference/callChainWithSuper(target=es6).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callChainWithSuper(target=esnext).js b/tests/baselines/reference/callChainWithSuper(target=esnext).js index 30e1ad3886dc5..96be01245bfa7 100644 --- a/tests/baselines/reference/callChainWithSuper(target=esnext).js +++ b/tests/baselines/reference/callChainWithSuper(target=esnext).js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/optionalChaining/callChain/callChainWithSuper.ts] //// + //// [callChainWithSuper.ts] // GH#34952 class Base { method?() {} } diff --git a/tests/baselines/reference/callConstructAssignment.errors.txt b/tests/baselines/reference/callConstructAssignment.errors.txt index 904d4947a3460..b978e24c258ca 100644 --- a/tests/baselines/reference/callConstructAssignment.errors.txt +++ b/tests/baselines/reference/callConstructAssignment.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/callConstructAssignment.ts(5,1): error TS2322: Type 'new () => any' is not assignable to type '() => void'. +callConstructAssignment.ts(5,1): error TS2322: Type 'new () => any' is not assignable to type '() => void'. Type 'new () => any' provides no match for the signature '(): void'. -tests/cases/compiler/callConstructAssignment.ts(6,1): error TS2322: Type '() => void' is not assignable to type 'new () => any'. +callConstructAssignment.ts(6,1): error TS2322: Type '() => void' is not assignable to type 'new () => any'. Type '() => void' provides no match for the signature 'new (): any'. -==== tests/cases/compiler/callConstructAssignment.ts (2 errors) ==== +==== callConstructAssignment.ts (2 errors) ==== var foo:{ ( ):void; } var bar:{ new ( ):any; } diff --git a/tests/baselines/reference/callConstructAssignment.js b/tests/baselines/reference/callConstructAssignment.js index 3266df5314b6b..1ecd7e794f085 100644 --- a/tests/baselines/reference/callConstructAssignment.js +++ b/tests/baselines/reference/callConstructAssignment.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callConstructAssignment.ts] //// + //// [callConstructAssignment.ts] var foo:{ ( ):void; } diff --git a/tests/baselines/reference/callConstructAssignment.symbols b/tests/baselines/reference/callConstructAssignment.symbols index 8780e6466aff2..8a851cde75d1c 100644 --- a/tests/baselines/reference/callConstructAssignment.symbols +++ b/tests/baselines/reference/callConstructAssignment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callConstructAssignment.ts === +//// [tests/cases/compiler/callConstructAssignment.ts] //// + +=== callConstructAssignment.ts === var foo:{ ( ):void; } >foo : Symbol(foo, Decl(callConstructAssignment.ts, 0, 3)) diff --git a/tests/baselines/reference/callConstructAssignment.types b/tests/baselines/reference/callConstructAssignment.types index c0708ed33ccb5..1cf93c29bdf7f 100644 --- a/tests/baselines/reference/callConstructAssignment.types +++ b/tests/baselines/reference/callConstructAssignment.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callConstructAssignment.ts === +//// [tests/cases/compiler/callConstructAssignment.ts] //// + +=== callConstructAssignment.ts === var foo:{ ( ):void; } >foo : () => void diff --git a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt index 9ac8c650e00ff..f0144592ec250 100644 --- a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt +++ b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts(1,1): error TS2304: Cannot find name 'Foo'. -tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts(1,5): error TS2304: Cannot find name 'a'. -tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts(1,7): error TS1110: Type expected. -tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts(1,8): error TS2304: Cannot find name 'b'. +callExpressionWithMissingTypeArgument1.ts(1,1): error TS2304: Cannot find name 'Foo'. +callExpressionWithMissingTypeArgument1.ts(1,5): error TS2304: Cannot find name 'a'. +callExpressionWithMissingTypeArgument1.ts(1,7): error TS1110: Type expected. +callExpressionWithMissingTypeArgument1.ts(1,8): error TS2304: Cannot find name 'b'. -==== tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts (4 errors) ==== +==== callExpressionWithMissingTypeArgument1.ts (4 errors) ==== Foo(); ~~~ !!! error TS2304: Cannot find name 'Foo'. diff --git a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.js b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.js index e073758e428b8..514cc6a77e7ff 100644 --- a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.js +++ b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts] //// + //// [callExpressionWithMissingTypeArgument1.ts] Foo(); diff --git a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.symbols b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.symbols index 42ab7aabf4adb..bf2b9303a9b14 100644 --- a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.symbols +++ b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts === +//// [tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts] //// + +=== callExpressionWithMissingTypeArgument1.ts === Foo(); >a : Symbol(a) > : Symbol(unknown) diff --git a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.types b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.types index 2cce81d445488..41c71670e096d 100644 --- a/tests/baselines/reference/callExpressionWithMissingTypeArgument1.types +++ b/tests/baselines/reference/callExpressionWithMissingTypeArgument1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts === +//// [tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts] //// + +=== callExpressionWithMissingTypeArgument1.ts === Foo(); >Foo() : any >Foo : any diff --git a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.js b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.js index dba18d969636e..8bb5b9aaae827 100644 --- a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.js +++ b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts] //// + //// [callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts] interface I { (u: U): U; diff --git a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.symbols b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.symbols index f1e724f38db88..cb9c41f1821a8 100644 --- a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.symbols +++ b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts === +//// [tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts] //// + +=== callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts === interface I { >I : Symbol(I, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 0)) >T : Symbol(T, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 12)) diff --git a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types index 14eb3a52ed509..6ccdf95ba29e2 100644 --- a/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types +++ b/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts === +//// [tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts] //// + +=== callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts === interface I { (u: U): U; >u : U diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt index d5809d677e4ec..19ef7aa63ac19 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(5,12): error TS2558: Expected 2 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(6,13): error TS2558: Expected 2 type arguments, but got 3. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(9,13): error TS2558: Expected 2 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(10,14): error TS2558: Expected 2 type arguments, but got 3. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(13,13): error TS2558: Expected 2 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(14,14): error TS2558: Expected 2 type arguments, but got 3. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(21,22): error TS2558: Expected 2 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(22,23): error TS2558: Expected 2 type arguments, but got 3. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(28,14): error TS2558: Expected 2 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(29,15): error TS2558: Expected 2 type arguments, but got 3. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(36,23): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(37,24): error TS2558: Expected 0 type arguments, but got 3. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(43,15): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(44,16): error TS2558: Expected 0 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(5,12): error TS2558: Expected 2 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(6,13): error TS2558: Expected 2 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(9,13): error TS2558: Expected 2 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(10,14): error TS2558: Expected 2 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(13,13): error TS2558: Expected 2 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(14,14): error TS2558: Expected 2 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(21,22): error TS2558: Expected 2 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(22,23): error TS2558: Expected 2 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(28,14): error TS2558: Expected 2 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(29,15): error TS2558: Expected 2 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(36,23): error TS2558: Expected 0 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(37,24): error TS2558: Expected 0 type arguments, but got 3. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(43,15): error TS2558: Expected 0 type arguments, but got 1. +callGenericFunctionWithIncorrectNumberOfTypeArguments.ts(44,16): error TS2558: Expected 0 type arguments, but got 3. -==== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts (14 errors) ==== +==== callGenericFunctionWithIncorrectNumberOfTypeArguments.ts (14 errors) ==== // type parameter lists must exactly match type argument lists // all of these invocations are errors diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js index 3f5fb14b1a953..686a578a9298e 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts] //// + //// [callGenericFunctionWithIncorrectNumberOfTypeArguments.ts] // type parameter lists must exactly match type argument lists // all of these invocations are errors diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols index 9eb87881f4445..7eec1bcb37164 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts === +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts] //// + +=== callGenericFunctionWithIncorrectNumberOfTypeArguments.ts === // type parameter lists must exactly match type argument lists // all of these invocations are errors diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types index 8677cd2f3368e..14351476d3a57 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts === +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithIncorrectNumberOfTypeArguments.ts] //// + +=== callGenericFunctionWithIncorrectNumberOfTypeArguments.ts === // type parameter lists must exactly match type argument lists // all of these invocations are errors diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js index fd46b841a0284..5bcb94f0d1860 100644 --- a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts] //// + //// [callGenericFunctionWithZeroTypeArguments.ts] // valid invocations of generic functions with no explicit type arguments provided diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.symbols b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.symbols index 83f18f2d41dbc..a3a677a9867ab 100644 --- a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.symbols +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts === +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts] //// + +=== callGenericFunctionWithZeroTypeArguments.ts === // valid invocations of generic functions with no explicit type arguments provided function f(x: T): T { return null; } diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types index 8bef6694ac47f..6c2310703cb55 100644 --- a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts === +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callGenericFunctionWithZeroTypeArguments.ts] //// + +=== callGenericFunctionWithZeroTypeArguments.ts === // valid invocations of generic functions with no explicit type arguments provided function f(x: T): T { return null; } diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt index 6bfb0c1113ea7..478826f64c788 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(5,11): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(8,13): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(11,13): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(18,22): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(24,14): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(31,23): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(37,15): error TS2558: Expected 0 type arguments, but got 1. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(40,10): error TS2347: Untyped function calls may not accept type arguments. -tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts(43,10): error TS2347: Untyped function calls may not accept type arguments. +callNonGenericFunctionWithTypeArguments.ts(5,11): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(8,13): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(11,13): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(18,22): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(24,14): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(31,23): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(37,15): error TS2558: Expected 0 type arguments, but got 1. +callNonGenericFunctionWithTypeArguments.ts(40,10): error TS2347: Untyped function calls may not accept type arguments. +callNonGenericFunctionWithTypeArguments.ts(43,10): error TS2347: Untyped function calls may not accept type arguments. -==== tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts (9 errors) ==== +==== callNonGenericFunctionWithTypeArguments.ts (9 errors) ==== // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js index b94a3208c5c86..8bd2c373030cb 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts] //// + //// [callNonGenericFunctionWithTypeArguments.ts] // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols index 4bfa365584170..41d2d82216945 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts === +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts] //// + +=== callNonGenericFunctionWithTypeArguments.ts === // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types index 3f7c592e0e5cd..c133568135e8a 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts === +//// [tests/cases/conformance/types/typeParameters/typeArgumentLists/callNonGenericFunctionWithTypeArguments.ts] //// + +=== callNonGenericFunctionWithTypeArguments.ts === // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal diff --git a/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.js b/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.js index b0ac8cb9bdecc..22dde43604091 100644 --- a/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.js +++ b/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOfConditionalTypeWithConcreteBranches.ts] //// + //// [callOfConditionalTypeWithConcreteBranches.ts] type Q = number extends T ? (n: number) => void : never; function fn(arg: Q) { diff --git a/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.symbols b/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.symbols index c80fd32a03af1..f184d5fe7d8d1 100644 --- a/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.symbols +++ b/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOfConditionalTypeWithConcreteBranches.ts === +//// [tests/cases/compiler/callOfConditionalTypeWithConcreteBranches.ts] //// + +=== callOfConditionalTypeWithConcreteBranches.ts === type Q = number extends T ? (n: number) => void : never; >Q : Symbol(Q, Decl(callOfConditionalTypeWithConcreteBranches.ts, 0, 0)) >T : Symbol(T, Decl(callOfConditionalTypeWithConcreteBranches.ts, 0, 7)) diff --git a/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.types b/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.types index 412986f9e27e0..ac94cbdc0d789 100644 --- a/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.types +++ b/tests/baselines/reference/callOfConditionalTypeWithConcreteBranches.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOfConditionalTypeWithConcreteBranches.ts === +//// [tests/cases/compiler/callOfConditionalTypeWithConcreteBranches.ts] //// + +=== callOfConditionalTypeWithConcreteBranches.ts === type Q = number extends T ? (n: number) => void : never; >Q : Q >n : number diff --git a/tests/baselines/reference/callOfPropertylessConstructorFunction.errors.txt b/tests/baselines/reference/callOfPropertylessConstructorFunction.errors.txt index 0abc6cf8d0c36..6052db0e9177d 100644 --- a/tests/baselines/reference/callOfPropertylessConstructorFunction.errors.txt +++ b/tests/baselines/reference/callOfPropertylessConstructorFunction.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/callOfPropertylessConstructorFunction.js(7,1): error TS2348: Value of type 'typeof Dependency' is not callable. Did you mean to include 'new'? +callOfPropertylessConstructorFunction.js(7,1): error TS2348: Value of type 'typeof Dependency' is not callable. Did you mean to include 'new'? -==== tests/cases/conformance/jsdoc/callOfPropertylessConstructorFunction.js (1 errors) ==== +==== callOfPropertylessConstructorFunction.js (1 errors) ==== /** * @constructor */ diff --git a/tests/baselines/reference/callOfPropertylessConstructorFunction.symbols b/tests/baselines/reference/callOfPropertylessConstructorFunction.symbols index 94ebfa6cef275..05558c6c5a2e5 100644 --- a/tests/baselines/reference/callOfPropertylessConstructorFunction.symbols +++ b/tests/baselines/reference/callOfPropertylessConstructorFunction.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/callOfPropertylessConstructorFunction.js === +//// [tests/cases/conformance/jsdoc/callOfPropertylessConstructorFunction.ts] //// + +=== callOfPropertylessConstructorFunction.js === /** * @constructor */ diff --git a/tests/baselines/reference/callOfPropertylessConstructorFunction.types b/tests/baselines/reference/callOfPropertylessConstructorFunction.types index 1294e4164c4f5..15bde0e1b826d 100644 --- a/tests/baselines/reference/callOfPropertylessConstructorFunction.types +++ b/tests/baselines/reference/callOfPropertylessConstructorFunction.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/callOfPropertylessConstructorFunction.js === +//// [tests/cases/conformance/jsdoc/callOfPropertylessConstructorFunction.ts] //// + +=== callOfPropertylessConstructorFunction.js === /** * @constructor */ diff --git a/tests/baselines/reference/callOnClass.errors.txt b/tests/baselines/reference/callOnClass.errors.txt index 83e4472dd4f50..d977031613010 100644 --- a/tests/baselines/reference/callOnClass.errors.txt +++ b/tests/baselines/reference/callOnClass.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/callOnClass.ts(2,9): error TS2348: Value of type 'typeof C' is not callable. Did you mean to include 'new'? +callOnClass.ts(2,9): error TS2348: Value of type 'typeof C' is not callable. Did you mean to include 'new'? -==== tests/cases/compiler/callOnClass.ts (1 errors) ==== +==== callOnClass.ts (1 errors) ==== class C { } var c = C(); ~~~ diff --git a/tests/baselines/reference/callOnClass.js b/tests/baselines/reference/callOnClass.js index 1a6333945b759..f2695596d1dbe 100644 --- a/tests/baselines/reference/callOnClass.js +++ b/tests/baselines/reference/callOnClass.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOnClass.ts] //// + //// [callOnClass.ts] class C { } var c = C(); diff --git a/tests/baselines/reference/callOnClass.symbols b/tests/baselines/reference/callOnClass.symbols index 49fdbc4059251..01aaa4456b693 100644 --- a/tests/baselines/reference/callOnClass.symbols +++ b/tests/baselines/reference/callOnClass.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOnClass.ts === +//// [tests/cases/compiler/callOnClass.ts] //// + +=== callOnClass.ts === class C { } >C : Symbol(C, Decl(callOnClass.ts, 0, 0)) diff --git a/tests/baselines/reference/callOnClass.types b/tests/baselines/reference/callOnClass.types index 8b57fdb764e43..3806fccf8a4fc 100644 --- a/tests/baselines/reference/callOnClass.types +++ b/tests/baselines/reference/callOnClass.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOnClass.ts === +//// [tests/cases/compiler/callOnClass.ts] //// + +=== callOnClass.ts === class C { } >C : C diff --git a/tests/baselines/reference/callOnInstance.errors.txt b/tests/baselines/reference/callOnInstance.errors.txt index 15a03546e21b8..3f86ea81bfff3 100644 --- a/tests/baselines/reference/callOnInstance.errors.txt +++ b/tests/baselines/reference/callOnInstance.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/callOnInstance.ts(7,18): error TS2349: This expression is not callable. +callOnInstance.ts(7,18): error TS2349: This expression is not callable. Type 'D' has no call signatures. -tests/cases/compiler/callOnInstance.ts(10,1): error TS2349: This expression is not callable. +callOnInstance.ts(10,1): error TS2349: This expression is not callable. Type 'C' has no call signatures. -==== tests/cases/compiler/callOnInstance.ts (2 errors) ==== +==== callOnInstance.ts (2 errors) ==== declare function D(): string; // error declare class D { constructor (value: number); } // error diff --git a/tests/baselines/reference/callOnInstance.js b/tests/baselines/reference/callOnInstance.js index 3b07d0affc8e9..b8f4ac6adfc49 100644 --- a/tests/baselines/reference/callOnInstance.js +++ b/tests/baselines/reference/callOnInstance.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOnInstance.ts] //// + //// [callOnInstance.ts] declare function D(): string; // error diff --git a/tests/baselines/reference/callOnInstance.symbols b/tests/baselines/reference/callOnInstance.symbols index 060436d81b5bb..bdd52e2aed4f8 100644 --- a/tests/baselines/reference/callOnInstance.symbols +++ b/tests/baselines/reference/callOnInstance.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOnInstance.ts === +//// [tests/cases/compiler/callOnInstance.ts] //// + +=== callOnInstance.ts === declare function D(): string; // error >D : Symbol(D, Decl(callOnInstance.ts, 0, 0), Decl(callOnInstance.ts, 0, 29)) diff --git a/tests/baselines/reference/callOnInstance.types b/tests/baselines/reference/callOnInstance.types index 5e49fe970c0a0..a7eaa2fde4d3e 100644 --- a/tests/baselines/reference/callOnInstance.types +++ b/tests/baselines/reference/callOnInstance.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOnInstance.ts === +//// [tests/cases/compiler/callOnInstance.ts] //// + +=== callOnInstance.ts === declare function D(): string; // error >D : typeof D diff --git a/tests/baselines/reference/callOverload.errors.txt b/tests/baselines/reference/callOverload.errors.txt index c5b171aca492f..f19a0b8af456d 100644 --- a/tests/baselines/reference/callOverload.errors.txt +++ b/tests/baselines/reference/callOverload.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/expressions/functionCalls/callOverload.ts(7,7): error TS2554: Expected 1 arguments, but got 4. -tests/cases/conformance/expressions/functionCalls/callOverload.ts(8,15): error TS2554: Expected 2 arguments, but got 4. -tests/cases/conformance/expressions/functionCalls/callOverload.ts(10,1): error TS2555: Expected at least 1 arguments, but got 0. -tests/cases/conformance/expressions/functionCalls/callOverload.ts(11,10): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callOverload.ts(7,7): error TS2554: Expected 1 arguments, but got 4. +callOverload.ts(8,15): error TS2554: Expected 2 arguments, but got 4. +callOverload.ts(10,1): error TS2555: Expected at least 1 arguments, but got 0. +callOverload.ts(11,10): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -==== tests/cases/conformance/expressions/functionCalls/callOverload.ts (4 errors) ==== +==== callOverload.ts (4 errors) ==== declare function fn(x: any): void; declare function takeTwo(x: any, y: any): void; declare function withRest(a: any, ...args: Array): void; @@ -21,7 +21,7 @@ tests/cases/conformance/expressions/functionCalls/callOverload.ts(11,10): error withRest(); ~~~~~~~~~~ !!! error TS2555: Expected at least 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callOverload.ts:3:27: An argument for 'a' was not provided. +!!! related TS6210 callOverload.ts:3:27: An argument for 'a' was not provided. withRest(...n); ~~~~ !!! error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. \ No newline at end of file diff --git a/tests/baselines/reference/callOverload.js b/tests/baselines/reference/callOverload.js index cd87a8dc76f42..a5cb85289d81b 100644 --- a/tests/baselines/reference/callOverload.js +++ b/tests/baselines/reference/callOverload.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callOverload.ts] //// + //// [callOverload.ts] declare function fn(x: any): void; declare function takeTwo(x: any, y: any): void; diff --git a/tests/baselines/reference/callOverload.symbols b/tests/baselines/reference/callOverload.symbols index 521ea515ee6e4..5988ca6b13b8d 100644 --- a/tests/baselines/reference/callOverload.symbols +++ b/tests/baselines/reference/callOverload.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callOverload.ts === +//// [tests/cases/conformance/expressions/functionCalls/callOverload.ts] //// + +=== callOverload.ts === declare function fn(x: any): void; >fn : Symbol(fn, Decl(callOverload.ts, 0, 0)) >x : Symbol(x, Decl(callOverload.ts, 0, 20)) diff --git a/tests/baselines/reference/callOverload.types b/tests/baselines/reference/callOverload.types index 534fde289561c..98f94390e28de 100644 --- a/tests/baselines/reference/callOverload.types +++ b/tests/baselines/reference/callOverload.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callOverload.ts === +//// [tests/cases/conformance/expressions/functionCalls/callOverload.ts] //// + +=== callOverload.ts === declare function fn(x: any): void; >fn : (x: any) => void >x : any diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt index cc8599ca91f7b..b0304cf0f67e4 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/callOverloadViaElementAccessExpression.ts(10,5): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/compiler/callOverloadViaElementAccessExpression.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'. +callOverloadViaElementAccessExpression.ts(10,5): error TS2322: Type 'number' is not assignable to type 'string'. +callOverloadViaElementAccessExpression.ts(11,5): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/callOverloadViaElementAccessExpression.ts (2 errors) ==== +==== callOverloadViaElementAccessExpression.ts (2 errors) ==== class C { foo(x: number): number; foo(x: string): string; diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.js b/tests/baselines/reference/callOverloadViaElementAccessExpression.js index 9dc2065678638..4d00a18a4e900 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.js +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOverloadViaElementAccessExpression.ts] //// + //// [callOverloadViaElementAccessExpression.ts] class C { foo(x: number): number; diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.symbols b/tests/baselines/reference/callOverloadViaElementAccessExpression.symbols index bad58e91cdd4b..694053b7ebfb8 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.symbols +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloadViaElementAccessExpression.ts === +//// [tests/cases/compiler/callOverloadViaElementAccessExpression.ts] //// + +=== callOverloadViaElementAccessExpression.ts === class C { >C : Symbol(C, Decl(callOverloadViaElementAccessExpression.ts, 0, 0)) diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.types b/tests/baselines/reference/callOverloadViaElementAccessExpression.types index 28f83887d3cb4..6a4d632a7c46a 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.types +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloadViaElementAccessExpression.ts === +//// [tests/cases/compiler/callOverloadViaElementAccessExpression.ts] //// + +=== callOverloadViaElementAccessExpression.ts === class C { >C : C diff --git a/tests/baselines/reference/callOverloads1.errors.txt b/tests/baselines/reference/callOverloads1.errors.txt index 2442c7a587e05..123b75ab2d04c 100644 --- a/tests/baselines/reference/callOverloads1.errors.txt +++ b/tests/baselines/reference/callOverloads1.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/callOverloads1.ts(1,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. -tests/cases/compiler/callOverloads1.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/callOverloads1.ts(9,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads1.ts(1,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. +callOverloads1.ts(9,10): error TS2391: Function implementation is missing or not immediately following the declaration. +callOverloads1.ts(9,10): error TS2814: Function with bodies can only merge with classes that are ambient. -==== tests/cases/compiler/callOverloads1.ts (3 errors) ==== +==== callOverloads1.ts (3 errors) ==== class Foo { // error ~~~ !!! error TS2813: Class declaration cannot implement overload list for 'Foo'. -!!! related TS6506 tests/cases/compiler/callOverloads1.ts:1:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads1.ts:1:7: Consider adding a 'declare' modifier to this class. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { @@ -20,7 +20,7 @@ tests/cases/compiler/callOverloads1.ts(9,10): error TS2814: Function with bodies !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads1.ts:1:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads1.ts:1:7: Consider adding a 'declare' modifier to this class. function F1(s:string); function F1(a:any) { return a;} diff --git a/tests/baselines/reference/callOverloads1.js b/tests/baselines/reference/callOverloads1.js index ac5a15d953c9d..1a24c858e1f3b 100644 --- a/tests/baselines/reference/callOverloads1.js +++ b/tests/baselines/reference/callOverloads1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOverloads1.ts] //// + //// [callOverloads1.ts] class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } diff --git a/tests/baselines/reference/callOverloads1.symbols b/tests/baselines/reference/callOverloads1.symbols index d5f6149dac1a7..95e5fb4cb657f 100644 --- a/tests/baselines/reference/callOverloads1.symbols +++ b/tests/baselines/reference/callOverloads1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads1.ts === +//// [tests/cases/compiler/callOverloads1.ts] //// + +=== callOverloads1.ts === class Foo { // error >Foo : Symbol(Foo, Decl(callOverloads1.ts, 6, 1), Decl(callOverloads1.ts, 0, 0)) diff --git a/tests/baselines/reference/callOverloads1.types b/tests/baselines/reference/callOverloads1.types index 34fc1ca20d433..b2522e5f75edd 100644 --- a/tests/baselines/reference/callOverloads1.types +++ b/tests/baselines/reference/callOverloads1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads1.ts === +//// [tests/cases/compiler/callOverloads1.ts] //// + +=== callOverloads1.ts === class Foo { // error >Foo : Foo diff --git a/tests/baselines/reference/callOverloads2.errors.txt b/tests/baselines/reference/callOverloads2.errors.txt index fce0ef4ecae28..0fc880942ddad 100644 --- a/tests/baselines/reference/callOverloads2.errors.txt +++ b/tests/baselines/reference/callOverloads2.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/callOverloads2.ts(1,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. -tests/cases/compiler/callOverloads2.ts(9,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads2.ts(11,10): error TS2389: Function implementation name must be 'Foo'. -tests/cases/compiler/callOverloads2.ts(11,10): error TS2393: Duplicate function implementation. -tests/cases/compiler/callOverloads2.ts(12,10): error TS2393: Duplicate function implementation. -tests/cases/compiler/callOverloads2.ts(14,10): error TS2391: Function implementation is missing or not immediately following the declaration. +callOverloads2.ts(1,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. +callOverloads2.ts(9,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads2.ts(11,10): error TS2389: Function implementation name must be 'Foo'. +callOverloads2.ts(11,10): error TS2393: Duplicate function implementation. +callOverloads2.ts(12,10): error TS2393: Duplicate function implementation. +callOverloads2.ts(14,10): error TS2391: Function implementation is missing or not immediately following the declaration. -==== tests/cases/compiler/callOverloads2.ts (6 errors) ==== +==== callOverloads2.ts (6 errors) ==== class Foo { // error ~~~ !!! error TS2813: Class declaration cannot implement overload list for 'Foo'. -!!! related TS6506 tests/cases/compiler/callOverloads2.ts:1:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads2.ts:1:7: Consider adding a 'declare' modifier to this class. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { @@ -21,7 +21,7 @@ tests/cases/compiler/callOverloads2.ts(14,10): error TS2391: Function implementa function Foo(); // error ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads2.ts:1:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads2.ts:1:7: Consider adding a 'declare' modifier to this class. function F1(s:string) {return s;} // error ~~ diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index ee1300ee5dedb..366a42fa82197 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOverloads2.ts] //// + //// [callOverloads2.ts] class Foo { // error bar1() { /*WScript.Echo("bar1");*/ } diff --git a/tests/baselines/reference/callOverloads2.symbols b/tests/baselines/reference/callOverloads2.symbols index 96b5533f7c336..e4e9da45fe062 100644 --- a/tests/baselines/reference/callOverloads2.symbols +++ b/tests/baselines/reference/callOverloads2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads2.ts === +//// [tests/cases/compiler/callOverloads2.ts] //// + +=== callOverloads2.ts === class Foo { // error >Foo : Symbol(Foo, Decl(callOverloads2.ts, 6, 1), Decl(callOverloads2.ts, 0, 0)) diff --git a/tests/baselines/reference/callOverloads2.types b/tests/baselines/reference/callOverloads2.types index f473ce23358dc..5fcb8339498a1 100644 --- a/tests/baselines/reference/callOverloads2.types +++ b/tests/baselines/reference/callOverloads2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads2.ts === +//// [tests/cases/compiler/callOverloads2.ts] //// + +=== callOverloads2.ts === class Foo { // error >Foo : Foo diff --git a/tests/baselines/reference/callOverloads3.errors.txt b/tests/baselines/reference/callOverloads3.errors.txt index 5e6d678569c45..d4cee3c42f9c9 100644 --- a/tests/baselines/reference/callOverloads3.errors.txt +++ b/tests/baselines/reference/callOverloads3.errors.txt @@ -1,24 +1,24 @@ -tests/cases/compiler/callOverloads3.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads3.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/callOverloads3.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads3.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. +callOverloads3.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads3.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. +callOverloads3.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads3.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. -==== tests/cases/compiler/callOverloads3.ts (4 errors) ==== +==== callOverloads3.ts (4 errors) ==== function Foo():Foo; // error ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class. function Foo(s:string):Foo; // error ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class. class Foo { // error ~~~ !!! error TS2813: Class declaration cannot implement overload list for 'Foo'. -!!! related TS6506 tests/cases/compiler/callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads3.ts:3:7: Consider adding a 'declare' modifier to this class. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { // WScript.Echo("Constructor function has executed"); diff --git a/tests/baselines/reference/callOverloads3.js b/tests/baselines/reference/callOverloads3.js index f2f3498c83189..51bb69f48fbd5 100644 --- a/tests/baselines/reference/callOverloads3.js +++ b/tests/baselines/reference/callOverloads3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOverloads3.ts] //// + //// [callOverloads3.ts] function Foo():Foo; // error function Foo(s:string):Foo; // error diff --git a/tests/baselines/reference/callOverloads3.symbols b/tests/baselines/reference/callOverloads3.symbols index d0d5c3ef35b23..43662949c0b95 100644 --- a/tests/baselines/reference/callOverloads3.symbols +++ b/tests/baselines/reference/callOverloads3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads3.ts === +//// [tests/cases/compiler/callOverloads3.ts] //// + +=== callOverloads3.ts === function Foo():Foo; // error >Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27)) >Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27)) diff --git a/tests/baselines/reference/callOverloads3.types b/tests/baselines/reference/callOverloads3.types index 3b1c7166b4bd4..704b37cda4899 100644 --- a/tests/baselines/reference/callOverloads3.types +++ b/tests/baselines/reference/callOverloads3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads3.ts === +//// [tests/cases/compiler/callOverloads3.ts] //// + +=== callOverloads3.ts === function Foo():Foo; // error >Foo : typeof Foo diff --git a/tests/baselines/reference/callOverloads4.errors.txt b/tests/baselines/reference/callOverloads4.errors.txt index 099a3069a470d..888df76a195ae 100644 --- a/tests/baselines/reference/callOverloads4.errors.txt +++ b/tests/baselines/reference/callOverloads4.errors.txt @@ -1,24 +1,24 @@ -tests/cases/compiler/callOverloads4.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads4.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/callOverloads4.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads4.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. +callOverloads4.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads4.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. +callOverloads4.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads4.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. -==== tests/cases/compiler/callOverloads4.ts (4 errors) ==== +==== callOverloads4.ts (4 errors) ==== function Foo():Foo; // error ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads4.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads4.ts:3:7: Consider adding a 'declare' modifier to this class. function Foo(s:string):Foo; // error ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads4.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads4.ts:3:7: Consider adding a 'declare' modifier to this class. class Foo { // error ~~~ !!! error TS2813: Class declaration cannot implement overload list for 'Foo'. -!!! related TS6506 tests/cases/compiler/callOverloads4.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads4.ts:3:7: Consider adding a 'declare' modifier to this class. bar1() { /*WScript.Echo("bar1");*/ } constructor(s: string); constructor(x: any) { diff --git a/tests/baselines/reference/callOverloads4.js b/tests/baselines/reference/callOverloads4.js index 60757da34bd78..96d8662c1027d 100644 --- a/tests/baselines/reference/callOverloads4.js +++ b/tests/baselines/reference/callOverloads4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOverloads4.ts] //// + //// [callOverloads4.ts] function Foo():Foo; // error function Foo(s:string):Foo; // error diff --git a/tests/baselines/reference/callOverloads4.symbols b/tests/baselines/reference/callOverloads4.symbols index 99e49b775bd03..f1ad381fa4ae5 100644 --- a/tests/baselines/reference/callOverloads4.symbols +++ b/tests/baselines/reference/callOverloads4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads4.ts === +//// [tests/cases/compiler/callOverloads4.ts] //// + +=== callOverloads4.ts === function Foo():Foo; // error >Foo : Symbol(Foo, Decl(callOverloads4.ts, 0, 0), Decl(callOverloads4.ts, 0, 19), Decl(callOverloads4.ts, 1, 27)) >Foo : Symbol(Foo, Decl(callOverloads4.ts, 0, 0), Decl(callOverloads4.ts, 0, 19), Decl(callOverloads4.ts, 1, 27)) diff --git a/tests/baselines/reference/callOverloads4.types b/tests/baselines/reference/callOverloads4.types index 3b72dfd6b749e..8fa5c87ae120d 100644 --- a/tests/baselines/reference/callOverloads4.types +++ b/tests/baselines/reference/callOverloads4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads4.ts === +//// [tests/cases/compiler/callOverloads4.ts] //// + +=== callOverloads4.ts === function Foo():Foo; // error >Foo : typeof Foo diff --git a/tests/baselines/reference/callOverloads5.errors.txt b/tests/baselines/reference/callOverloads5.errors.txt index 118007d26012f..bd5d28850f819 100644 --- a/tests/baselines/reference/callOverloads5.errors.txt +++ b/tests/baselines/reference/callOverloads5.errors.txt @@ -1,24 +1,24 @@ -tests/cases/compiler/callOverloads5.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads5.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/callOverloads5.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient. -tests/cases/compiler/callOverloads5.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. +callOverloads5.ts(1,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads5.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration. +callOverloads5.ts(2,10): error TS2814: Function with bodies can only merge with classes that are ambient. +callOverloads5.ts(3,7): error TS2813: Class declaration cannot implement overload list for 'Foo'. -==== tests/cases/compiler/callOverloads5.ts (4 errors) ==== +==== callOverloads5.ts (4 errors) ==== function Foo():Foo; // error ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads5.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads5.ts:3:7: Consider adding a 'declare' modifier to this class. function Foo(s:string):Foo; // error ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. -!!! related TS6506 tests/cases/compiler/callOverloads5.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads5.ts:3:7: Consider adding a 'declare' modifier to this class. class Foo { // error ~~~ !!! error TS2813: Class declaration cannot implement overload list for 'Foo'. -!!! related TS6506 tests/cases/compiler/callOverloads5.ts:3:7: Consider adding a 'declare' modifier to this class. +!!! related TS6506 callOverloads5.ts:3:7: Consider adding a 'declare' modifier to this class. bar1(s:string); bar1(n:number); bar1(a:any) { /*WScript.Echo(a);*/ } diff --git a/tests/baselines/reference/callOverloads5.js b/tests/baselines/reference/callOverloads5.js index 4ccc1f5ea2699..9fd1462f0ffaa 100644 --- a/tests/baselines/reference/callOverloads5.js +++ b/tests/baselines/reference/callOverloads5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callOverloads5.ts] //// + //// [callOverloads5.ts] function Foo():Foo; // error function Foo(s:string):Foo; // error diff --git a/tests/baselines/reference/callOverloads5.symbols b/tests/baselines/reference/callOverloads5.symbols index 649233ce14379..c5e0cfe0a1e49 100644 --- a/tests/baselines/reference/callOverloads5.symbols +++ b/tests/baselines/reference/callOverloads5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads5.ts === +//// [tests/cases/compiler/callOverloads5.ts] //// + +=== callOverloads5.ts === function Foo():Foo; // error >Foo : Symbol(Foo, Decl(callOverloads5.ts, 0, 0), Decl(callOverloads5.ts, 0, 19), Decl(callOverloads5.ts, 1, 27)) >Foo : Symbol(Foo, Decl(callOverloads5.ts, 0, 0), Decl(callOverloads5.ts, 0, 19), Decl(callOverloads5.ts, 1, 27)) diff --git a/tests/baselines/reference/callOverloads5.types b/tests/baselines/reference/callOverloads5.types index 400d20b772f21..6eab7042c0cf5 100644 --- a/tests/baselines/reference/callOverloads5.types +++ b/tests/baselines/reference/callOverloads5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callOverloads5.ts === +//// [tests/cases/compiler/callOverloads5.ts] //// + +=== callOverloads5.ts === function Foo():Foo; // error >Foo : typeof Foo diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt index c96797b086027..70c88dd904350 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(57,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. +callSignatureAssignabilityInInheritance.ts(57,15): error TS2430: Interface 'I2' incorrectly extends interface 'Base2'. The types returned by 'a(...)' are incompatible between these types. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts(63,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. +callSignatureAssignabilityInInheritance.ts(63,15): error TS2430: Interface 'I3' incorrectly extends interface 'Base2'. The types returned by 'a2(...)' are incompatible between these types. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts (2 errors) ==== +==== callSignatureAssignabilityInInheritance.ts (2 errors) ==== module CallSignature { interface Base { // T // M's diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance.js index 3b540397d556a..a47659955d25b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts] //// + //// [callSignatureAssignabilityInInheritance.ts] module CallSignature { interface Base { // T diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance.symbols index 00c48ef82e7c1..2bb87ef7e9b5b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts] //// + +=== callSignatureAssignabilityInInheritance.ts === module CallSignature { >CallSignature : Symbol(CallSignature, Decl(callSignatureAssignabilityInInheritance.ts, 0, 0)) diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance.types index a48c2616d0498..89471a5bf2d50 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts] //// + +=== callSignatureAssignabilityInInheritance.ts === module CallSignature { interface Base { // T // M's diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 9b34bf876d9aa..dbd499c336ce0 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts] //// + //// [callSignatureAssignabilityInInheritance2.ts] // checking subtype relations for function types as it relates to contextual signature instantiation diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols index 14e25b4e9d911..102d87df3ebe8 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts] //// + +=== callSignatureAssignabilityInInheritance2.ts === // checking subtype relations for function types as it relates to contextual signature instantiation class Base { foo: string; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types index c961027b1d4ed..e663dd090d028 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.ts] //// + +=== callSignatureAssignabilityInInheritance2.ts === // checking subtype relations for function types as it relates to contextual signature instantiation class Base { foo: string; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 553dfe0af9428..9f6a5043893e0 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(51,19): error TS2430: Interface 'I2' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance3.ts(51,19): error TS2430: Interface 'I2' incorrectly extends interface 'A'. Types of property 'a2' are incompatible. Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(60,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance3.ts(60,19): error TS2430: Interface 'I4' incorrectly extends interface 'A'. Types of property 'a8' are incompatible. Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'. Types of parameters 'y' and 'y' are incompatible. @@ -12,32 +12,32 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign Type '{ foo: number; }' is not assignable to type 'Base'. Types of property 'foo' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(76,19): error TS2430: Interface 'I6' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance3.ts(76,19): error TS2430: Interface 'I6' incorrectly extends interface 'A'. Types of property 'a15' are incompatible. Type '(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'. Types of property 'b' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(80,19): error TS2430: Interface 'I7' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance3.ts(80,19): error TS2430: Interface 'I7' incorrectly extends interface 'A'. Types of property 'a15' are incompatible. Type '(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'. Types of parameters 'x' and 'x' are incompatible. Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'. Types of property 'a' are incompatible. Type 'string' is not assignable to type 'Base'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(100,19): error TS2430: Interface 'I6' incorrectly extends interface 'B'. +callSignatureAssignabilityInInheritance3.ts(100,19): error TS2430: Interface 'I6' incorrectly extends interface 'B'. The types returned by 'a2(...)' are incompatible between these types. Type 'string[]' is not assignable to type 'T[]'. Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts(109,19): error TS2430: Interface 'I7' incorrectly extends interface 'C'. +callSignatureAssignabilityInInheritance3.ts(109,19): error TS2430: Interface 'I7' incorrectly extends interface 'C'. The types returned by 'a2(...)' are incompatible between these types. Type 'T[]' is not assignable to type 'string[]'. Type 'T' is not assignable to type 'string'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts (6 errors) ==== +==== callSignatureAssignabilityInInheritance3.ts (6 errors) ==== // checking subtype relations for function types as it relates to contextual signature instantiation // error cases @@ -190,7 +190,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: The types returned by 'a2(...)' are incompatible between these types. !!! error TS2430: Type 'T[]' is not assignable to type 'string[]'. !!! error TS2430: Type 'T' is not assignable to type 'string'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts:106:18: This type parameter might need an `extends string` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance3.ts:106:18: This type parameter might need an `extends string` constraint. a2: (x: T) => T[]; // error } } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 5f2236525ca8e..9fb5afc4a6b22 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts] //// + //// [callSignatureAssignabilityInInheritance3.ts] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.symbols index e8a879bf816fb..4cb5172b40988 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts] //// + +=== callSignatureAssignabilityInInheritance3.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // error cases diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types index a78f95021843e..b07e8757cddbf 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts] //// + +=== callSignatureAssignabilityInInheritance3.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // error cases diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 7623aecc041b5..b805ebb772785 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts] //// + //// [callSignatureAssignabilityInInheritance4.ts] // checking subtype relations for function types as it relates to contextual signature instantiation diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.symbols index 4261483f4518b..89b31032857f0 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts] //// + +=== callSignatureAssignabilityInInheritance4.ts === // checking subtype relations for function types as it relates to contextual signature instantiation class Base { foo: string; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types index 1638c45d3b6b6..55191a346a4a8 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.ts] //// + +=== callSignatureAssignabilityInInheritance4.ts === // checking subtype relations for function types as it relates to contextual signature instantiation class Base { foo: string; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 91bea2770900a..c26f4527fb190 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts] //// + //// [callSignatureAssignabilityInInheritance5.ts] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols index de3bdf742d091..201231db14d73 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts] //// + +=== callSignatureAssignabilityInInheritance5.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types index 3cb20bb250665..1051543595877 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.ts] //// + +=== callSignatureAssignabilityInInheritance5.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt index ea8ce65119890..e4812b4b85da5 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.errors.txt @@ -1,35 +1,35 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(24,11): error TS2430: Interface 'I' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(24,11): error TS2430: Interface 'I' incorrectly extends interface 'A'. Types of property 'a' are incompatible. Type '(x: T) => T[]' is not assignable to type '(x: T) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(28,11): error TS2430: Interface 'I2' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(28,11): error TS2430: Interface 'I2' incorrectly extends interface 'A'. Types of property 'a2' are incompatible. Type '(x: T) => string[]' is not assignable to type '(x: T) => string[]'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(32,11): error TS2430: Interface 'I3' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(32,11): error TS2430: Interface 'I3' incorrectly extends interface 'A'. Types of property 'a3' are incompatible. Type '(x: T) => T' is not assignable to type '(x: T) => void'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(36,11): error TS2430: Interface 'I4' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(36,11): error TS2430: Interface 'I4' incorrectly extends interface 'A'. Types of property 'a4' are incompatible. Type '(x: T, y: U) => string' is not assignable to type '(x: T, y: U) => string'. Types of parameters 'x' and 'x' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(40,11): error TS2430: Interface 'I5' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(40,11): error TS2430: Interface 'I5' incorrectly extends interface 'A'. Types of property 'a5' are incompatible. Type '(x: (arg: T) => U) => T' is not assignable to type '(x: (arg: T) => U) => T'. Types of parameters 'x' and 'x' are incompatible. Types of parameters 'arg' and 'arg' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(44,11): error TS2430: Interface 'I7' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(44,11): error TS2430: Interface 'I7' incorrectly extends interface 'A'. Types of property 'a11' are incompatible. Type '(x: { foo: T; }, y: { foo: U; bar: U; }) => Base' is not assignable to type '(x: { foo: T; }, y: { foo: T; bar: T; }) => Base'. Types of parameters 'x' and 'x' are incompatible. @@ -37,7 +37,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign Types of property 'foo' are incompatible. Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts(48,11): error TS2430: Interface 'I9' incorrectly extends interface 'A'. +callSignatureAssignabilityInInheritance6.ts(48,11): error TS2430: Interface 'I9' incorrectly extends interface 'A'. Types of property 'a16' are incompatible. Type '(x: { a: T; b: T; }) => T[]' is not assignable to type '(x: { a: T; b: T; }) => T[]'. Types of parameters 'x' and 'x' are incompatible. @@ -47,7 +47,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts (7 errors) ==== +==== callSignatureAssignabilityInInheritance6.ts (7 errors) ==== // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors @@ -79,7 +79,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2430: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:12:9: This type parameter might need an `extends T` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance6.ts:12:9: This type parameter might need an `extends T` constraint. a: (x: T) => T[]; } @@ -91,7 +91,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2430: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:13:10: This type parameter might need an `extends T` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance6.ts:13:10: This type parameter might need an `extends T` constraint. a2: (x: T) => string[]; } @@ -103,7 +103,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2430: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:14:10: This type parameter might need an `extends T` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance6.ts:14:10: This type parameter might need an `extends T` constraint. a3: (x: T) => T; } @@ -115,7 +115,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Types of parameters 'x' and 'x' are incompatible. !!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2430: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:15:10: This type parameter might need an `extends T` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance6.ts:15:10: This type parameter might need an `extends T` constraint. a4: (x: T, y: U) => string; } @@ -128,7 +128,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Types of parameters 'arg' and 'arg' are incompatible. !!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2430: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:40:14: This type parameter might need an `extends T` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance6.ts:40:14: This type parameter might need an `extends T` constraint. a5: (x: (arg: T) => U) => T; } @@ -142,7 +142,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSign !!! error TS2430: Types of property 'foo' are incompatible. !!! error TS2430: Type 'T' is not assignable to type 'T'. Two different types with this name exist, but they are unrelated. !!! error TS2430: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts:18:11: This type parameter might need an `extends T` constraint. +!!! related TS2208 callSignatureAssignabilityInInheritance6.ts:18:11: This type parameter might need an `extends T` constraint. a11: (x: { foo: T }, y: { foo: U; bar: U }) => Base; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index 3cff80c2eaf64..2f57fcebd5396 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts] //// + //// [callSignatureAssignabilityInInheritance6.ts] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.symbols index 56c7098d40874..6c57dee489755 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts] //// + +=== callSignatureAssignabilityInInheritance6.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types index 20558c30ecfa2..1e09a35b27e2d 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts === +//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance6.ts] //// + +=== callSignatureAssignabilityInInheritance6.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors diff --git a/tests/baselines/reference/callSignatureFunctionOverload.js b/tests/baselines/reference/callSignatureFunctionOverload.js index 6da28693bced3..d1bf5643567c1 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.js +++ b/tests/baselines/reference/callSignatureFunctionOverload.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callSignatureFunctionOverload.ts] //// + //// [callSignatureFunctionOverload.ts] var foo: { (name: string): string; diff --git a/tests/baselines/reference/callSignatureFunctionOverload.symbols b/tests/baselines/reference/callSignatureFunctionOverload.symbols index f0318f1a77d25..ee0781d57d0fe 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.symbols +++ b/tests/baselines/reference/callSignatureFunctionOverload.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callSignatureFunctionOverload.ts === +//// [tests/cases/compiler/callSignatureFunctionOverload.ts] //// + +=== callSignatureFunctionOverload.ts === var foo: { >foo : Symbol(foo, Decl(callSignatureFunctionOverload.ts, 0, 3)) diff --git a/tests/baselines/reference/callSignatureFunctionOverload.types b/tests/baselines/reference/callSignatureFunctionOverload.types index 43ab4eb49312d..81c83add8a621 100644 --- a/tests/baselines/reference/callSignatureFunctionOverload.types +++ b/tests/baselines/reference/callSignatureFunctionOverload.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callSignatureFunctionOverload.ts === +//// [tests/cases/compiler/callSignatureFunctionOverload.ts] //// + +=== callSignatureFunctionOverload.ts === var foo: { >foo : { (name: string): string; (name: 'order'): string; (name: 'content'): string; (name: 'done'): string; } diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt index 63a63309c31f6..8b318bfd1d482 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(3,14): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(4,22): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(5,22): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(15,9): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(23,6): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(23,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(44,9): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts(46,9): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(3,14): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(4,22): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(5,22): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(15,9): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(23,6): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(23,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(24,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(34,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(35,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignatureWithOptionalParameterAndInitializer.ts(44,9): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS1015: Parameter cannot have question mark and initializer. +callSignatureWithOptionalParameterAndInitializer.ts(45,32): error TS2322: Type 'string' is not assignable to type 'number'. +callSignatureWithOptionalParameterAndInitializer.ts(46,9): error TS1015: Parameter cannot have question mark and initializer. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts (16 errors) ==== +==== callSignatureWithOptionalParameterAndInitializer.ts (16 errors) ==== // Optional parameters cannot also have initializer expressions, these are all errors function foo(x?: number = 1) { } diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js index 4ff809379193b..25cd2f5f1460c 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts] //// + //// [callSignatureWithOptionalParameterAndInitializer.ts] // Optional parameters cannot also have initializer expressions, these are all errors diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols index 1d562856d07d0..eb1cbf79525a0 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts] //// + +=== callSignatureWithOptionalParameterAndInitializer.ts === // Optional parameters cannot also have initializer expressions, these are all errors function foo(x?: number = 1) { } diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types index 3b8031c436e91..be0b5f47805f9 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithOptionalParameterAndInitializer.ts] //// + +=== callSignatureWithOptionalParameterAndInitializer.ts === // Optional parameters cannot also have initializer expressions, these are all errors function foo(x?: number = 1) { } diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js index 24c71c985057c..4cd7b156b0d30 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutAnnotationsOrBody.ts] //// + //// [callSignatureWithoutAnnotationsOrBody.ts] // Call signatures without a return type annotation and function body return 'any' diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.symbols b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.symbols index d8a43948fac53..f89b958d7e60e 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.symbols +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutAnnotationsOrBody.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutAnnotationsOrBody.ts] //// + +=== callSignatureWithoutAnnotationsOrBody.ts === // Call signatures without a return type annotation and function body return 'any' function foo(x) { } diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types index 927d50a1ee1a9..ead889c1e421e 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutAnnotationsOrBody.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutAnnotationsOrBody.ts] //// + +=== callSignatureWithoutAnnotationsOrBody.ts === // Call signatures without a return type annotation and function body return 'any' function foo(x) { } diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js index 9ecceb3ff4fa1..fb1eba4569b12 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts] //// + //// [callSignatureWithoutReturnTypeAnnotationInference.ts] // Call signatures without a return type should infer one from the function body (if present) diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols index cf2aef2b70246..5ffc189de5f12 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts] //// + +=== callSignatureWithoutReturnTypeAnnotationInference.ts === // Call signatures without a return type should infer one from the function body (if present) // Simple types diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types index cff38b11b2591..1ef533055b3d9 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts] //// + +=== callSignatureWithoutReturnTypeAnnotationInference.ts === // Call signatures without a return type should infer one from the function body (if present) // Simple types diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt index 1c558910a8c0a..f4ecb661941a8 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts(9,10): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. +callSignaturesShouldBeResolvedBeforeSpecialization.ts(9,10): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. -==== tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts (1 errors) ==== +==== callSignaturesShouldBeResolvedBeforeSpecialization.ts (1 errors) ==== interface I1 { (value: T): void; field1: I1; diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js index b2cf7d5f5c517..8171e03e1d044 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts] //// + //// [callSignaturesShouldBeResolvedBeforeSpecialization.ts] interface I1 { (value: T): void; diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols index 1d0d3c3b6bd9f..197ab73a63171 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts === +//// [tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts] //// + +=== callSignaturesShouldBeResolvedBeforeSpecialization.ts === interface I1 { >I1 : Symbol(I1, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 0)) >T : Symbol(T, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 13)) diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types index f0d875055337c..a694460190b29 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts === +//// [tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts] //// + +=== callSignaturesShouldBeResolvedBeforeSpecialization.ts === interface I1 { (value: T): void; >value : T diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js index 8d5b59f84d125..53ae65599d92b 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType.ts] //// + //// [callSignaturesThatDifferOnlyByReturnType.ts] // Each pair of signatures in these types has a signature that should cause an error. // Overloads, generic or not, that differ only by return type are an error. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols index c439d1aae896d..663a81ff981fb 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType.ts] //// + +=== callSignaturesThatDifferOnlyByReturnType.ts === // Each pair of signatures in these types has a signature that should cause an error. // Overloads, generic or not, that differ only by return type are an error. interface I { diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types index 675c8fc6ac048..cd3c5d006bc4d 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType.ts] //// + +=== callSignaturesThatDifferOnlyByReturnType.ts === // Each pair of signatures in these types has a signature that should cause an error. // Overloads, generic or not, that differ only by return type are an error. interface I { diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt index 4ff65843eba64..9031c99a4af12 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I'. +callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I'. Named property 'foo' of types 'I' and 'I' are not identical. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts (2 errors) ==== +==== callSignaturesThatDifferOnlyByReturnType2.ts (2 errors) ==== // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js index ae6f4db7e38ba..28a60d2e658fb 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts] //// + //// [callSignaturesThatDifferOnlyByReturnType2.ts] // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols index 7d72abdcb49e1..7d838fd71bb83 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts] //// + +=== callSignaturesThatDifferOnlyByReturnType2.ts === // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types index 0ff597c7b0da7..53143c5696eb4 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts] //// + +=== callSignaturesThatDifferOnlyByReturnType2.ts === // Normally it is an error to have multiple overloads which differ only by return type in a single type declaration. // Here the multiple overloads come from multiple bases. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js index b67b619d7390b..d9ba902f71e74 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts] //// + //// [callSignaturesThatDifferOnlyByReturnType3.ts] // Normally it is an error to have multiple overloads with identical signatures in a single type declaration. // Here the multiple overloads come from multiple merged declarations. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.symbols b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.symbols index dab2717aa0a31..7329ab3e752cd 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.symbols +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts] //// + +=== callSignaturesThatDifferOnlyByReturnType3.ts === // Normally it is an error to have multiple overloads with identical signatures in a single type declaration. // Here the multiple overloads come from multiple merged declarations. diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.types b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.types index e7ba417d1cb2e..a241b85096388 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.types +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType3.ts] //// + +=== callSignaturesThatDifferOnlyByReturnType3.ts === // Normally it is an error to have multiple overloads with identical signatures in a single type declaration. // Here the multiple overloads come from multiple merged declarations. diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt index c5a30ad21ade3..8f87f9f8e1901 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt @@ -1,46 +1,46 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(3,24): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(4,22): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(4,32): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(5,20): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(5,30): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(6,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(7,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(9,15): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(9,34): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(10,23): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(10,42): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(11,20): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(11,39): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(12,11): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(12,30): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(13,14): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(13,28): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(16,9): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(16,19): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(17,10): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(17,28): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(18,13): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(18,26): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(22,6): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(22,17): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(23,6): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(23,25): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(24,9): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(24,20): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(25,9): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(26,19): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(30,9): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(30,19): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(31,10): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(31,29): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(35,9): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(36,32): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(37,12): error TS2369: A parameter property is only allowed in a constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts(37,25): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(3,14): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(3,24): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(4,22): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(4,32): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(5,20): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(5,30): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(6,14): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(7,14): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(9,15): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(9,34): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(10,23): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(10,42): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(11,20): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(11,39): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(12,11): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(12,30): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(13,14): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(13,28): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(16,9): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(16,19): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(17,10): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(17,28): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(18,13): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(18,26): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(22,6): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(22,17): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(23,6): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(23,25): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(24,9): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(24,20): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(25,9): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(26,19): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(30,9): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(30,19): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(31,10): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(31,29): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(35,9): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(36,32): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(37,12): error TS2369: A parameter property is only allowed in a constructor implementation. +callSignaturesWithAccessibilityModifiersOnParameters.ts(37,25): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts (40 errors) ==== +==== callSignaturesWithAccessibilityModifiersOnParameters.ts (40 errors) ==== // Call signature parameters do not allow accessibility modifiers function foo(public x, private y) { } diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js index e2a3599f0daa7..19a4182705ccc 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts] //// + //// [callSignaturesWithAccessibilityModifiersOnParameters.ts] // Call signature parameters do not allow accessibility modifiers diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.symbols b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.symbols index 66f11181314a9..d06687baecf98 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.symbols +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts] //// + +=== callSignaturesWithAccessibilityModifiersOnParameters.ts === // Call signature parameters do not allow accessibility modifiers function foo(public x, private y) { } diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.types b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.types index 78da366842bc8..278090de02d4a 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.types +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithAccessibilityModifiersOnParameters.ts] //// + +=== callSignaturesWithAccessibilityModifiersOnParameters.ts === // Call signature parameters do not allow accessibility modifiers function foo(public x, private y) { } diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt index 034aa4039cf3e..66d908795ae9d 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt @@ -1,50 +1,50 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,14): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,17): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,22): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,25): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,20): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,23): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,11): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,14): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,14): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,20): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,15): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,26): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,23): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,34): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,20): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,31): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,11): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,22): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,12): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,10): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,21): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,13): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,19): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,6): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,6): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,17): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,12): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,20): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,13): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,19): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,12): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,10): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,21): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,12): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,21): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,32): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,12): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,18): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(3,14): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(3,17): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(4,22): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(4,25): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(5,20): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(5,23): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(6,11): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(6,14): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(7,14): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(7,20): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(9,15): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(9,26): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(10,23): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(10,34): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(11,20): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(11,31): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(12,11): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(12,22): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(16,9): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(16,12): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(17,10): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(17,21): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(18,13): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(18,19): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(22,6): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(22,9): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(23,6): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(23,17): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(24,9): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(24,12): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(25,9): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(25,20): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(26,13): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(26,19): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(30,9): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(30,12): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(31,10): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(31,21): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(35,9): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(35,12): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(36,21): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(36,32): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(37,12): error TS2300: Duplicate identifier 'x'. +callSignaturesWithDuplicateParameters.ts(37,18): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts (44 errors) ==== +==== callSignaturesWithDuplicateParameters.ts (44 errors) ==== // Duplicate parameter names are always an error function foo(x, x) { } diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js index ed9d2cb3e3573..dcbb509d3eedc 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts] //// + //// [callSignaturesWithDuplicateParameters.ts] // Duplicate parameter names are always an error diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.symbols b/tests/baselines/reference/callSignaturesWithDuplicateParameters.symbols index 9adebf1a4195f..48b72933cb1a2 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.symbols +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts] //// + +=== callSignaturesWithDuplicateParameters.ts === // Duplicate parameter names are always an error function foo(x, x) { } diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.types b/tests/baselines/reference/callSignaturesWithDuplicateParameters.types index d70e7a399e117..229f4da4fdf11 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.types +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts] //// + +=== callSignaturesWithDuplicateParameters.ts === // Duplicate parameter names are always an error function foo(x, x) { } diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.js b/tests/baselines/reference/callSignaturesWithOptionalParameters.js index 1a5aad8c0e19e..33702b35d8e5d 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts] //// + //// [callSignaturesWithOptionalParameters.ts] // Optional parameters should be valid in all the below casts diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.symbols b/tests/baselines/reference/callSignaturesWithOptionalParameters.symbols index c86adcff927a5..b93f9d0271b75 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.symbols +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts] //// + +=== callSignaturesWithOptionalParameters.ts === // Optional parameters should be valid in all the below casts function foo(x?: number) { } diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.types b/tests/baselines/reference/callSignaturesWithOptionalParameters.types index 8333172bdc531..191e179c0c94b 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.types +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters.ts] //// + +=== callSignaturesWithOptionalParameters.ts === // Optional parameters should be valid in all the below casts function foo(x?: number) { } diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js index dbd8ad1f424e1..fa6b9432e0c5b 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts] //// + //// [callSignaturesWithOptionalParameters2.ts] // Optional parameters should be valid in all the below casts diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.symbols b/tests/baselines/reference/callSignaturesWithOptionalParameters2.symbols index 7900b86bcb2b9..26569c3dbc395 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.symbols +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts] //// + +=== callSignaturesWithOptionalParameters2.ts === // Optional parameters should be valid in all the below casts function foo(x?: number); diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.types b/tests/baselines/reference/callSignaturesWithOptionalParameters2.types index f273147abfb34..2178b7294ad2e 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.types +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithOptionalParameters2.ts] //// + +=== callSignaturesWithOptionalParameters2.ts === // Optional parameters should be valid in all the below casts function foo(x?: number); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt index ffff3886375ec..a14b0cf78e4a7 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(24,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(25,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(36,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts(37,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers.ts(24,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers.ts(25,20): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers.ts(36,6): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers.ts(37,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts (4 errors) ==== +==== callSignaturesWithParameterInitializers.ts (4 errors) ==== // Optional parameters allow initializers only in implementation signatures function foo(x = 1) { } diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.js b/tests/baselines/reference/callSignaturesWithParameterInitializers.js index 528b2a3d00e3d..cfc9337ee7b5b 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts] //// + //// [callSignaturesWithParameterInitializers.ts] // Optional parameters allow initializers only in implementation signatures diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols b/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols index 270d5562a042e..c806062aac81d 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts] //// + +=== callSignaturesWithParameterInitializers.ts === // Optional parameters allow initializers only in implementation signatures function foo(x = 1) { } diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.types b/tests/baselines/reference/callSignaturesWithParameterInitializers.types index f105b95f47c51..642dc2b456fc6 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.types +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers.ts] //// + +=== callSignaturesWithParameterInitializers.ts === // Optional parameters allow initializers only in implementation signatures function foo(x = 1) { } diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt index 6329b0c5403c8..445717bf478c4 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(4,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(11,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(20,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts(20,15): error TS1005: '{' expected. +callSignaturesWithParameterInitializers2.ts(4,14): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers2.ts(11,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers2.ts(20,9): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +callSignaturesWithParameterInitializers2.ts(20,15): error TS1005: '{' expected. -==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts (4 errors) ==== +==== callSignaturesWithParameterInitializers2.ts (4 errors) ==== // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js index c50e8ccfa06e3..d3fe83f04afae 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts] //// + //// [callSignaturesWithParameterInitializers2.ts] // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols b/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols index 12f4aeb5ed310..019382c597f42 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts] //// + +=== callSignaturesWithParameterInitializers2.ts === // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.types b/tests/baselines/reference/callSignaturesWithParameterInitializers2.types index f339e01c00334..8965070c909cc 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.types +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts === +//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithParameterInitializers2.ts] //// + +=== callSignaturesWithParameterInitializers2.ts === // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors diff --git a/tests/baselines/reference/callWithMissingVoid.errors.txt b/tests/baselines/reference/callWithMissingVoid.errors.txt index dcce7a005e201..7de86855ba240 100644 --- a/tests/baselines/reference/callWithMissingVoid.errors.txt +++ b/tests/baselines/reference/callWithMissingVoid.errors.txt @@ -1,17 +1,17 @@ -tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(16,6): error TS2554: Expected 1 arguments, but got 0. -tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(19,10): error TS2554: Expected 1 arguments, but got 0. -tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(22,8): error TS2554: Expected 1 arguments, but got 0. -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 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. -tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): error TS2554: Expected 3 arguments, but got 1. +callWithMissingVoid.ts(16,6): error TS2554: Expected 1 arguments, but got 0. +callWithMissingVoid.ts(19,10): error TS2554: Expected 1 arguments, but got 0. +callWithMissingVoid.ts(22,8): error TS2554: Expected 1 arguments, but got 0. +callWithMissingVoid.ts(35,31): error TS2554: Expected 1 arguments, but got 0. +callWithMissingVoid.ts(36,35): error TS2554: Expected 1 arguments, but got 0. +callWithMissingVoid.ts(37,33): error TS2554: Expected 1 arguments, but got 0. +callWithMissingVoid.ts(48,1): error TS2554: Expected 2-3 arguments, but got 1. +callWithMissingVoid.ts(55,1): error TS2554: Expected 4 arguments, but got 2. +callWithMissingVoid.ts(56,1): error TS2554: Expected 4 arguments, but got 3. +callWithMissingVoid.ts(57,1): error TS2554: Expected 4 arguments, but got 1. +callWithMissingVoid.ts(75,1): error TS2554: Expected 3 arguments, but got 1. -==== tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts (11 errors) ==== +==== callWithMissingVoid.ts (11 errors) ==== // From #4260 class X { f(t: T) { @@ -30,19 +30,19 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): xAny.f() // error, any still expects an argument ~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:3:7: An argument for 't' was not provided. +!!! related TS6210 callWithMissingVoid.ts:3:7: An argument for 't' was not provided. declare const xUnknown: X; xUnknown.f() // error, unknown still expects an argument ~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:3:7: An argument for 't' was not provided. +!!! related TS6210 callWithMissingVoid.ts:3:7: An argument for 't' was not provided. declare const xNever: X; xNever.f() // error, never still expects an argument ~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:3:7: An argument for 't' was not provided. +!!! related TS6210 callWithMissingVoid.ts:3:7: An argument for 't' was not provided. // Promise has previously been updated to work without arguments, but to show this fixes the issue too. @@ -58,15 +58,15 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): new MyPromise(resolve => resolve()); // error, `any` arguments cannot be omitted ~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:28:38: An argument for 'value' was not provided. +!!! related TS6210 callWithMissingVoid.ts:28:38: An argument for 'value' was not provided. new MyPromise(resolve => resolve()); // error, `unknown` arguments cannot be omitted ~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:28:38: An argument for 'value' was not provided. +!!! related TS6210 callWithMissingVoid.ts:28:38: An argument for 'value' was not provided. new MyPromise(resolve => resolve()); // error, `never` arguments cannot be omitted ~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:28:38: An argument for 'value' was not provided. +!!! related TS6210 callWithMissingVoid.ts:28:38: An argument for 'value' was not provided. // Multiple parameters @@ -80,7 +80,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): a(4); // not ok ~~~~ !!! 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. +!!! related TS6210 callWithMissingVoid.ts:42:23: An argument for 'y' was not provided. function b(x: number, y: string, z: void, what: number): void { @@ -90,15 +90,15 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): b(4, "hello"); // not ok ~~~~~~~~~~~~~ !!! error TS2554: Expected 4 arguments, but got 2. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:50:34: An argument for 'z' was not provided. +!!! related TS6210 callWithMissingVoid.ts:50:34: An argument for 'z' was not provided. b(4, "hello", void 0); // not ok ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2554: Expected 4 arguments, but got 3. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:50:43: An argument for 'what' was not provided. +!!! related TS6210 callWithMissingVoid.ts:50:43: An argument for 'what' was not provided. b(4); // not ok ~~~~ !!! error TS2554: Expected 4 arguments, but got 1. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:50:23: An argument for 'y' was not provided. +!!! related TS6210 callWithMissingVoid.ts:50:23: An argument for 'y' was not provided. function c(x: number | void, y: void, z: void | string | 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 TS6236 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:73:5: Arguments for the rest parameter 'args' were not provided. +!!! related TS6236 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/callWithMissingVoid.js b/tests/baselines/reference/callWithMissingVoid.js index 50282931fa68f..72a0bca07b59b 100644 --- a/tests/baselines/reference/callWithMissingVoid.js +++ b/tests/baselines/reference/callWithMissingVoid.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts] //// + //// [callWithMissingVoid.ts] // From #4260 class X { diff --git a/tests/baselines/reference/callWithMissingVoid.symbols b/tests/baselines/reference/callWithMissingVoid.symbols index 22a198b743366..48d1777adb3a8 100644 --- a/tests/baselines/reference/callWithMissingVoid.symbols +++ b/tests/baselines/reference/callWithMissingVoid.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts] //// + +=== callWithMissingVoid.ts === // From #4260 class X { >X : Symbol(X, Decl(callWithMissingVoid.ts, 0, 0)) diff --git a/tests/baselines/reference/callWithMissingVoid.types b/tests/baselines/reference/callWithMissingVoid.types index 64c3977b14f21..4ae6c5fa9067e 100644 --- a/tests/baselines/reference/callWithMissingVoid.types +++ b/tests/baselines/reference/callWithMissingVoid.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts] //// + +=== callWithMissingVoid.ts === // From #4260 class X { >X : X diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt index 6b9f6d3a7ba58..1e07ccaa1a3cd 100644 --- a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt @@ -1,12 +1,12 @@ -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. +tsfile.ts(6,1): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(7,1): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(8,1): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(10,4): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(11,4): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(12,4): error TS2554: Expected 1 arguments, but got 0. -==== tests/cases/conformance/expressions/functionCalls/defs.d.ts (0 errors) ==== +==== defs.d.ts (0 errors) ==== declare function f1(p: void): void; declare function f2(p: undefined): void; declare function f3(p: unknown): void; @@ -18,7 +18,7 @@ tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: declare const o3: I; declare const o4: I; -==== tests/cases/conformance/expressions/functionCalls/jsfile.js (0 errors) ==== +==== jsfile.js (0 errors) ==== // current behavior: treat trailing `void` as optional f1(); o1.m(); @@ -32,7 +32,7 @@ tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: o3.m(); o4.m(); -==== tests/cases/conformance/expressions/functionCalls/tsfile.ts (6 errors) ==== +==== tsfile.ts (6 errors) ==== // current behavior: treat trailing `void` as optional f1(); o1.m(); @@ -41,26 +41,26 @@ tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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 index 26d6106e28eff..1abda566428ab 100644 --- a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).symbols +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoidUndefinedUnknownAnyInJs.ts] //// + +=== 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)) @@ -38,7 +40,7 @@ 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 === +=== jsfile.js === // current behavior: treat trailing `void` as optional f1(); >f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) @@ -73,7 +75,7 @@ o4.m(); >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 === +=== tsfile.ts === // current behavior: treat trailing `void` as optional f1(); >f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types index a32cfb6a123c6..44250402785fd 100644 --- a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoidUndefinedUnknownAnyInJs.ts] //// + +=== defs.d.ts === declare function f1(p: void): void; >f1 : (p: void) => void >p : void @@ -31,7 +33,7 @@ declare const o3: I; declare const o4: I; >o4 : I -=== tests/cases/conformance/expressions/functionCalls/jsfile.js === +=== jsfile.js === // current behavior: treat trailing `void` as optional f1(); >f1() : void @@ -74,7 +76,7 @@ o4.m(); >o4 : I >m : (p: any) => void -=== tests/cases/conformance/expressions/functionCalls/tsfile.ts === +=== tsfile.ts === // current behavior: treat trailing `void` as optional f1(); >f1() : void diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt index 4dfba4afe5ec6..560b38ad42c5f 100644 --- a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt @@ -1,18 +1,18 @@ -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. +jsfile.js(6,1): error TS2554: Expected 1 arguments, but got 0. +jsfile.js(7,1): error TS2554: Expected 1 arguments, but got 0. +jsfile.js(8,1): error TS2554: Expected 1 arguments, but got 0. +jsfile.js(10,4): error TS2554: Expected 1 arguments, but got 0. +jsfile.js(11,4): error TS2554: Expected 1 arguments, but got 0. +jsfile.js(12,4): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(6,1): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(7,1): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(8,1): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(10,4): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(11,4): error TS2554: Expected 1 arguments, but got 0. +tsfile.ts(12,4): error TS2554: Expected 1 arguments, but got 0. -==== tests/cases/conformance/expressions/functionCalls/defs.d.ts (0 errors) ==== +==== defs.d.ts (0 errors) ==== declare function f1(p: void): void; declare function f2(p: undefined): void; declare function f3(p: unknown): void; @@ -24,7 +24,7 @@ tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: declare const o3: I; declare const o4: I; -==== tests/cases/conformance/expressions/functionCalls/jsfile.js (6 errors) ==== +==== jsfile.js (6 errors) ==== // current behavior: treat trailing `void` as optional f1(); o1.m(); @@ -33,30 +33,30 @@ tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 defs.d.ts:6:20: An argument for 'p' was not provided. -==== tests/cases/conformance/expressions/functionCalls/tsfile.ts (6 errors) ==== +==== tsfile.ts (6 errors) ==== // current behavior: treat trailing `void` as optional f1(); o1.m(); @@ -65,26 +65,26 @@ tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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. +!!! related TS6210 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 index 26d6106e28eff..1abda566428ab 100644 --- a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).symbols +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoidUndefinedUnknownAnyInJs.ts] //// + +=== 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)) @@ -38,7 +40,7 @@ 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 === +=== jsfile.js === // current behavior: treat trailing `void` as optional f1(); >f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) @@ -73,7 +75,7 @@ o4.m(); >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 === +=== tsfile.ts === // current behavior: treat trailing `void` as optional f1(); >f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types index a32cfb6a123c6..44250402785fd 100644 --- a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithMissingVoidUndefinedUnknownAnyInJs.ts] //// + +=== defs.d.ts === declare function f1(p: void): void; >f1 : (p: void) => void >p : void @@ -31,7 +33,7 @@ declare const o3: I; declare const o4: I; >o4 : I -=== tests/cases/conformance/expressions/functionCalls/jsfile.js === +=== jsfile.js === // current behavior: treat trailing `void` as optional f1(); >f1() : void @@ -74,7 +76,7 @@ o4.m(); >o4 : I >m : (p: any) => void -=== tests/cases/conformance/expressions/functionCalls/tsfile.ts === +=== tsfile.ts === // current behavior: treat trailing `void` as optional f1(); >f1() : void diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 1c0cac1675463..02e5799197780 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread.ts] //// + //// [callWithSpread.ts] interface X { foo(x: number, y: number, ...z: string[]): X; diff --git a/tests/baselines/reference/callWithSpread.symbols b/tests/baselines/reference/callWithSpread.symbols index 7b711cce14a04..72135145be436 100644 --- a/tests/baselines/reference/callWithSpread.symbols +++ b/tests/baselines/reference/callWithSpread.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread.ts] //// + +=== callWithSpread.ts === interface X { >X : Symbol(X, Decl(callWithSpread.ts, 0, 0)) diff --git a/tests/baselines/reference/callWithSpread.types b/tests/baselines/reference/callWithSpread.types index 165cdde8a7020..ede396364f044 100644 --- a/tests/baselines/reference/callWithSpread.types +++ b/tests/baselines/reference/callWithSpread.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread.ts] //// + +=== callWithSpread.ts === interface X { foo(x: number, y: number, ...z: string[]): X; >foo : (x: number, y: number, ...z: string[]) => X @@ -267,7 +269,7 @@ xa[1].foo(1, 2, ...a, "abc"); >1 : 1 >foo : (x: number, y: number, ...z: string[]) => X >...[1, 2, "abc"] : string | number ->[1, 2, "abc"] : readonly [number, number, string] +>[1, 2, "abc"] : [number, number, string] >1 : 1 >2 : 2 >"abc" : "abc" diff --git a/tests/baselines/reference/callWithSpread2.errors.txt b/tests/baselines/reference/callWithSpread2.errors.txt index 0361c2aef336d..495fc3eddfc94 100644 --- a/tests/baselines/reference/callWithSpread2.errors.txt +++ b/tests/baselines/reference/callWithSpread2.errors.txt @@ -1,21 +1,21 @@ -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(23,13): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(24,7): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(27,5): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. +callWithSpread2.ts(23,13): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread2.ts(24,7): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread2.ts(27,5): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(28,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(29,13): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. +callWithSpread2.ts(28,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +callWithSpread2.ts(29,13): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(30,13): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(31,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. +callWithSpread2.ts(30,13): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +callWithSpread2.ts(31,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(32,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(33,8): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(34,8): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(35,8): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,14): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread2.ts(32,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +callWithSpread2.ts(33,8): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread2.ts(34,8): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread2.ts(35,8): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +callWithSpread2.ts(36,14): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (12 errors) ==== +==== callWithSpread2.ts (12 errors) ==== declare function all(a?: number, b?: number): void; declare function weird(a?: number | string, b?: number | string): void; declare function prefix(s: string, a?: number, b?: number): void; diff --git a/tests/baselines/reference/callWithSpread2.js b/tests/baselines/reference/callWithSpread2.js index a19412a6dcf96..ca7a2346c1fed 100644 --- a/tests/baselines/reference/callWithSpread2.js +++ b/tests/baselines/reference/callWithSpread2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts] //// + //// [callWithSpread2.ts] declare function all(a?: number, b?: number): void; declare function weird(a?: number | string, b?: number | string): void; diff --git a/tests/baselines/reference/callWithSpread2.symbols b/tests/baselines/reference/callWithSpread2.symbols index a275a1d66bade..9d23b990692ec 100644 --- a/tests/baselines/reference/callWithSpread2.symbols +++ b/tests/baselines/reference/callWithSpread2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts] //// + +=== callWithSpread2.ts === declare function all(a?: number, b?: number): void; >all : Symbol(all, Decl(callWithSpread2.ts, 0, 0)) >a : Symbol(a, Decl(callWithSpread2.ts, 0, 21)) diff --git a/tests/baselines/reference/callWithSpread2.types b/tests/baselines/reference/callWithSpread2.types index 7933a3f6da454..0e8a869d2b034 100644 --- a/tests/baselines/reference/callWithSpread2.types +++ b/tests/baselines/reference/callWithSpread2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts] //// + +=== callWithSpread2.ts === declare function all(a?: number, b?: number): void; >all : (a?: number, b?: number) => void >a : number diff --git a/tests/baselines/reference/callWithSpread3.errors.txt b/tests/baselines/reference/callWithSpread3.errors.txt index 34e0112003ee7..2baa6772425a3 100644 --- a/tests/baselines/reference/callWithSpread3.errors.txt +++ b/tests/baselines/reference/callWithSpread3.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(14,10): error TS2554: Expected 2 arguments, but got 3. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(15,15): error TS2554: Expected 2 arguments, but got 5. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(16,15): error TS2554: Expected 2 arguments, but got 5. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(17,15): error TS2554: Expected 2 arguments, but got 6. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(18,12): error TS2554: Expected 2 arguments, but got 3. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(19,5): error TS2554: Expected 2 arguments, but got 3. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(20,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(21,6): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(22,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(23,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(25,7): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts(31,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread3.ts(14,10): error TS2554: Expected 2 arguments, but got 3. +callWithSpread3.ts(15,15): error TS2554: Expected 2 arguments, but got 5. +callWithSpread3.ts(16,15): error TS2554: Expected 2 arguments, but got 5. +callWithSpread3.ts(17,15): error TS2554: Expected 2 arguments, but got 6. +callWithSpread3.ts(18,12): error TS2554: Expected 2 arguments, but got 3. +callWithSpread3.ts(19,5): error TS2554: Expected 2 arguments, but got 3. +callWithSpread3.ts(20,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread3.ts(21,6): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +callWithSpread3.ts(22,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread3.ts(23,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread3.ts(25,7): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +callWithSpread3.ts(31,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -==== tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts (12 errors) ==== +==== callWithSpread3.ts (12 errors) ==== declare const s2: [string, string]; declare const s3: [string, string, string]; declare const s2_: [string, string, ...string[]]; diff --git a/tests/baselines/reference/callWithSpread3.js b/tests/baselines/reference/callWithSpread3.js index 247c3decef3c8..5d725cf67926b 100644 --- a/tests/baselines/reference/callWithSpread3.js +++ b/tests/baselines/reference/callWithSpread3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts] //// + //// [callWithSpread3.ts] declare const s2: [string, string]; declare const s3: [string, string, string]; diff --git a/tests/baselines/reference/callWithSpread3.symbols b/tests/baselines/reference/callWithSpread3.symbols index 076c10a178d31..ff268eda9e07f 100644 --- a/tests/baselines/reference/callWithSpread3.symbols +++ b/tests/baselines/reference/callWithSpread3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts] //// + +=== callWithSpread3.ts === declare const s2: [string, string]; >s2 : Symbol(s2, Decl(callWithSpread3.ts, 0, 13)) diff --git a/tests/baselines/reference/callWithSpread3.types b/tests/baselines/reference/callWithSpread3.types index 3ddc98c66c824..b50b8f918b91d 100644 --- a/tests/baselines/reference/callWithSpread3.types +++ b/tests/baselines/reference/callWithSpread3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread3.ts] //// + +=== callWithSpread3.ts === declare const s2: [string, string]; >s2 : [string, string] diff --git a/tests/baselines/reference/callWithSpread4.errors.txt b/tests/baselines/reference/callWithSpread4.errors.txt index d4d67faf14a23..c520278e55894 100644 --- a/tests/baselines/reference/callWithSpread4.errors.txt +++ b/tests/baselines/reference/callWithSpread4.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts(18,5): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts(27,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread4.ts(18,5): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread4.ts(27,6): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -==== tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts (2 errors) ==== +==== callWithSpread4.ts (2 errors) ==== type R = { a: number } type W = { b: number } type RW = { a: number, b: number } diff --git a/tests/baselines/reference/callWithSpread4.js b/tests/baselines/reference/callWithSpread4.js index 0db1129c0bb11..03de9b2382d06 100644 --- a/tests/baselines/reference/callWithSpread4.js +++ b/tests/baselines/reference/callWithSpread4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts] //// + //// [callWithSpread4.ts] type R = { a: number } type W = { b: number } diff --git a/tests/baselines/reference/callWithSpread4.symbols b/tests/baselines/reference/callWithSpread4.symbols index 21b309c5b0053..1de6a352dfb4c 100644 --- a/tests/baselines/reference/callWithSpread4.symbols +++ b/tests/baselines/reference/callWithSpread4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts] //// + +=== callWithSpread4.ts === type R = { a: number } >R : Symbol(R, Decl(callWithSpread4.ts, 0, 0)) >a : Symbol(a, Decl(callWithSpread4.ts, 0, 10)) diff --git a/tests/baselines/reference/callWithSpread4.types b/tests/baselines/reference/callWithSpread4.types index 5d1a4a4de3065..7e73db1eeb87e 100644 --- a/tests/baselines/reference/callWithSpread4.types +++ b/tests/baselines/reference/callWithSpread4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread4.ts] //// + +=== callWithSpread4.ts === type R = { a: number } >R : { a: number; } >a : number diff --git a/tests/baselines/reference/callWithSpread5.errors.txt b/tests/baselines/reference/callWithSpread5.errors.txt index 28640ea5a3c99..2ccf2765e4750 100644 --- a/tests/baselines/reference/callWithSpread5.errors.txt +++ b/tests/baselines/reference/callWithSpread5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts(7,4): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. +callWithSpread5.ts(7,4): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. -==== tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts (1 errors) ==== +==== callWithSpread5.ts (1 errors) ==== declare const x: number declare const nnnu: [number, number, number?] declare const nntnnnt: [number, number] | [number, number, number] diff --git a/tests/baselines/reference/callWithSpread5.js b/tests/baselines/reference/callWithSpread5.js index 2c98eefa82f5d..5938fe6e25d3f 100644 --- a/tests/baselines/reference/callWithSpread5.js +++ b/tests/baselines/reference/callWithSpread5.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts] //// + //// [callWithSpread5.ts] declare const x: number declare const nnnu: [number, number, number?] diff --git a/tests/baselines/reference/callWithSpread5.symbols b/tests/baselines/reference/callWithSpread5.symbols index b3452ff611551..84c8db94400fa 100644 --- a/tests/baselines/reference/callWithSpread5.symbols +++ b/tests/baselines/reference/callWithSpread5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts] //// + +=== callWithSpread5.ts === declare const x: number >x : Symbol(x, Decl(callWithSpread5.ts, 0, 13)) diff --git a/tests/baselines/reference/callWithSpread5.types b/tests/baselines/reference/callWithSpread5.types index b3bd35312d6bf..e739a0134158f 100644 --- a/tests/baselines/reference/callWithSpread5.types +++ b/tests/baselines/reference/callWithSpread5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts] //// + +=== callWithSpread5.ts === declare const x: number >x : number diff --git a/tests/baselines/reference/callWithSpreadES6.js b/tests/baselines/reference/callWithSpreadES6.js index 9e7f244d41a5e..f322034c5fa79 100644 --- a/tests/baselines/reference/callWithSpreadES6.js +++ b/tests/baselines/reference/callWithSpreadES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts] //// + //// [callWithSpreadES6.ts] interface X { foo(x: number, y: number, ...z: string[]); diff --git a/tests/baselines/reference/callWithSpreadES6.symbols b/tests/baselines/reference/callWithSpreadES6.symbols index 9da935b0e515e..4654e552a474b 100644 --- a/tests/baselines/reference/callWithSpreadES6.symbols +++ b/tests/baselines/reference/callWithSpreadES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts] //// + +=== callWithSpreadES6.ts === interface X { >X : Symbol(X, Decl(callWithSpreadES6.ts, 0, 0)) diff --git a/tests/baselines/reference/callWithSpreadES6.types b/tests/baselines/reference/callWithSpreadES6.types index 5830720eed883..4849bc5d95d1d 100644 --- a/tests/baselines/reference/callWithSpreadES6.types +++ b/tests/baselines/reference/callWithSpreadES6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts === +//// [tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts] //// + +=== callWithSpreadES6.ts === interface X { foo(x: number, y: number, ...z: string[]); >foo : (x: number, y: number, ...z: string[]) => any @@ -159,7 +161,7 @@ xa[1].foo(1, 2, ...a, "abc"); >1 : 1 >foo : (x: number, y: number, ...z: string[]) => any >...[1, 2, "abc"] : string | number ->[1, 2, "abc"] : readonly [number, number, string] +>[1, 2, "abc"] : [number, number, string] >1 : 1 >2 : 2 >"abc" : "abc" diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt index c8553e8fc0d0b..4229965bbbd93 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts(3,3): error TS2558: Expected 2 type arguments, but got 1. -tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts(5,3): error TS2558: Expected 2 type arguments, but got 3. +callWithWrongNumberOfTypeArguments.ts(3,3): error TS2558: Expected 2 type arguments, but got 1. +callWithWrongNumberOfTypeArguments.ts(5,3): error TS2558: Expected 2 type arguments, but got 3. -==== tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts (2 errors) ==== +==== callWithWrongNumberOfTypeArguments.ts (2 errors) ==== function f() { } f(); diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js index 74ea401ae3bce..21d3df12cbbe1 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts] //// + //// [callWithWrongNumberOfTypeArguments.ts] function f() { } diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.symbols b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.symbols index ad721c454b99a..2adcea104764b 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.symbols +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts === +//// [tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts] //// + +=== callWithWrongNumberOfTypeArguments.ts === function f() { } >f : Symbol(f, Decl(callWithWrongNumberOfTypeArguments.ts, 0, 0)) >T : Symbol(T, Decl(callWithWrongNumberOfTypeArguments.ts, 0, 11)) diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types index 557c48e49e30b..868b91f2a01dc 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts === +//// [tests/cases/compiler/callWithWrongNumberOfTypeArguments.ts] //// + +=== callWithWrongNumberOfTypeArguments.ts === function f() { } >f : () => void diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt index 5ec083a685a0d..8cc3fced8ee59 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/callbackArgsDifferByOptionality.ts(4,5): error TS2304: Cannot find name 'cb'. +callbackArgsDifferByOptionality.ts(4,5): error TS2304: Cannot find name 'cb'. -==== tests/cases/compiler/callbackArgsDifferByOptionality.ts (1 errors) ==== +==== callbackArgsDifferByOptionality.ts (1 errors) ==== function x3(callback: (x?: 'hi') => number); function x3(callback: (x: string) => number); function x3(callback: (x: any) => number) { diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.js b/tests/baselines/reference/callbackArgsDifferByOptionality.js index da827c0ea2e88..a9baa81b477a8 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.js +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callbackArgsDifferByOptionality.ts] //// + //// [callbackArgsDifferByOptionality.ts] function x3(callback: (x?: 'hi') => number); function x3(callback: (x: string) => number); diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.symbols b/tests/baselines/reference/callbackArgsDifferByOptionality.symbols index 283d414b61b4d..b1f37f38d9d1a 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.symbols +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callbackArgsDifferByOptionality.ts === +//// [tests/cases/compiler/callbackArgsDifferByOptionality.ts] //// + +=== callbackArgsDifferByOptionality.ts === function x3(callback: (x?: 'hi') => number); >x3 : Symbol(x3, Decl(callbackArgsDifferByOptionality.ts, 0, 0), Decl(callbackArgsDifferByOptionality.ts, 0, 44), Decl(callbackArgsDifferByOptionality.ts, 1, 45)) >callback : Symbol(callback, Decl(callbackArgsDifferByOptionality.ts, 0, 12)) diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.types b/tests/baselines/reference/callbackArgsDifferByOptionality.types index 095cb67cded18..804ebbf7e61b5 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.types +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callbackArgsDifferByOptionality.ts === +//// [tests/cases/compiler/callbackArgsDifferByOptionality.ts] //// + +=== callbackArgsDifferByOptionality.ts === function x3(callback: (x?: 'hi') => number); >x3 : { (callback: (x?: 'hi') => number): any; (callback: (x: string) => number): any; } >callback : (x?: 'hi') => number diff --git a/tests/baselines/reference/callbackCrossModule.symbols b/tests/baselines/reference/callbackCrossModule.symbols index 80a5a9451b012..b0192926cf7f3 100644 --- a/tests/baselines/reference/callbackCrossModule.symbols +++ b/tests/baselines/reference/callbackCrossModule.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/mod1.js === +//// [tests/cases/conformance/jsdoc/callbackCrossModule.ts] //// + +=== mod1.js === /** @callback Con - some kind of continuation * @param {object | undefined} error * @return {any} I don't even know what this should return @@ -18,7 +20,7 @@ function C() { >p : Symbol(C.p, Decl(mod1.js, 5, 14)) } -=== tests/cases/conformance/jsdoc/use.js === +=== use.js === /** @param {import('./mod1').Con} k */ function f(k) { >f : Symbol(f, Decl(use.js, 0, 0)) diff --git a/tests/baselines/reference/callbackCrossModule.types b/tests/baselines/reference/callbackCrossModule.types index c3d88c890acb7..fdc1004e3d53e 100644 --- a/tests/baselines/reference/callbackCrossModule.types +++ b/tests/baselines/reference/callbackCrossModule.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/mod1.js === +//// [tests/cases/conformance/jsdoc/callbackCrossModule.ts] //// + +=== mod1.js === /** @callback Con - some kind of continuation * @param {object | undefined} error * @return {any} I don't even know what this should return @@ -21,11 +23,11 @@ function C() { >1 : 1 } -=== tests/cases/conformance/jsdoc/use.js === +=== use.js === /** @param {import('./mod1').Con} k */ function f(k) { >f : (k: import('./mod1').Con) => any ->k : import("tests/cases/conformance/jsdoc/mod1").Con +>k : import("mod1").Con if (1 === 2 - 1) { >1 === 2 - 1 : boolean @@ -38,7 +40,7 @@ function f(k) { } return k({ ok: true}) >k({ ok: true}) : any ->k : import("tests/cases/conformance/jsdoc/mod1").Con +>k : import("mod1").Con >{ ok: true} : { ok: boolean; } >ok : boolean >true : true diff --git a/tests/baselines/reference/callbackOnConstructor.js b/tests/baselines/reference/callbackOnConstructor.js index 9f411596a993c..ff7779e0476fd 100644 --- a/tests/baselines/reference/callbackOnConstructor.js +++ b/tests/baselines/reference/callbackOnConstructor.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/callbackOnConstructor.ts] //// + //// [callbackOnConstructor.js] export class Preferences { assignability = "no" diff --git a/tests/baselines/reference/callbackOnConstructor.symbols b/tests/baselines/reference/callbackOnConstructor.symbols index 688ef5911fd38..d5559f79e0e9e 100644 --- a/tests/baselines/reference/callbackOnConstructor.symbols +++ b/tests/baselines/reference/callbackOnConstructor.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/callbackOnConstructor.js === +//// [tests/cases/conformance/jsdoc/callbackOnConstructor.ts] //// + +=== callbackOnConstructor.js === export class Preferences { >Preferences : Symbol(Preferences, Decl(callbackOnConstructor.js, 0, 0)) diff --git a/tests/baselines/reference/callbackOnConstructor.types b/tests/baselines/reference/callbackOnConstructor.types index b3538e741c752..814399ac3757c 100644 --- a/tests/baselines/reference/callbackOnConstructor.types +++ b/tests/baselines/reference/callbackOnConstructor.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/callbackOnConstructor.js === +//// [tests/cases/conformance/jsdoc/callbackOnConstructor.ts] //// + +=== callbackOnConstructor.js === export class Preferences { >Preferences : Preferences diff --git a/tests/baselines/reference/callbackTag1.symbols b/tests/baselines/reference/callbackTag1.symbols index b52ac8f92c8ab..26dba85654314 100644 --- a/tests/baselines/reference/callbackTag1.symbols +++ b/tests/baselines/reference/callbackTag1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/cb.js === +//// [tests/cases/conformance/jsdoc/callbackTag1.ts] //// + +=== cb.js === /** @callback Sid * @param {string} s * @returns {string} What were you expecting diff --git a/tests/baselines/reference/callbackTag1.types b/tests/baselines/reference/callbackTag1.types index 8438da1a6aded..460061c867b0a 100644 --- a/tests/baselines/reference/callbackTag1.types +++ b/tests/baselines/reference/callbackTag1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/cb.js === +//// [tests/cases/conformance/jsdoc/callbackTag1.ts] //// + +=== cb.js === /** @callback Sid * @param {string} s * @returns {string} What were you expecting diff --git a/tests/baselines/reference/callbackTag2.errors.txt b/tests/baselines/reference/callbackTag2.errors.txt index 8be9e90102046..fdd74d75f96e7 100644 --- a/tests/baselines/reference/callbackTag2.errors.txt +++ b/tests/baselines/reference/callbackTag2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/cb.js(18,29): error TS2304: Cannot find name 'S'. +cb.js(18,29): error TS2304: Cannot find name 'S'. -==== tests/cases/conformance/jsdoc/cb.js (1 errors) ==== +==== cb.js (1 errors) ==== /** @template T * @callback Id * @param {T} t diff --git a/tests/baselines/reference/callbackTag2.symbols b/tests/baselines/reference/callbackTag2.symbols index 36b810de46566..2ee5299b474f2 100644 --- a/tests/baselines/reference/callbackTag2.symbols +++ b/tests/baselines/reference/callbackTag2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/cb.js === +//// [tests/cases/conformance/jsdoc/callbackTag2.ts] //// + +=== cb.js === /** @template T * @callback Id * @param {T} t diff --git a/tests/baselines/reference/callbackTag2.types b/tests/baselines/reference/callbackTag2.types index 670298bb56b1f..3ee1fb13bdcbb 100644 --- a/tests/baselines/reference/callbackTag2.types +++ b/tests/baselines/reference/callbackTag2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/cb.js === +//// [tests/cases/conformance/jsdoc/callbackTag2.ts] //// + +=== cb.js === /** @template T * @callback Id * @param {T} t diff --git a/tests/baselines/reference/callbackTag3.symbols b/tests/baselines/reference/callbackTag3.symbols index 88b53a4cdaa2f..1769713724f58 100644 --- a/tests/baselines/reference/callbackTag3.symbols +++ b/tests/baselines/reference/callbackTag3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/cb.js === +//// [tests/cases/conformance/jsdoc/callbackTag3.ts] //// + +=== cb.js === /** @callback Miracle * @returns {string} What were you expecting */ diff --git a/tests/baselines/reference/callbackTag3.types b/tests/baselines/reference/callbackTag3.types index 836897d0f308d..044d7149938ea 100644 --- a/tests/baselines/reference/callbackTag3.types +++ b/tests/baselines/reference/callbackTag3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/cb.js === +//// [tests/cases/conformance/jsdoc/callbackTag3.ts] //// + +=== cb.js === /** @callback Miracle * @returns {string} What were you expecting */ diff --git a/tests/baselines/reference/callbackTagNamespace.symbols b/tests/baselines/reference/callbackTagNamespace.symbols index 1723fab71c322..70943905d9a79 100644 --- a/tests/baselines/reference/callbackTagNamespace.symbols +++ b/tests/baselines/reference/callbackTagNamespace.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/namespaced.js === +//// [tests/cases/conformance/jsdoc/callbackTagNamespace.ts] //// + +=== namespaced.js === /** * @callback NS.Nested.Inner * @param {Object} space - spaaaaaaaaace diff --git a/tests/baselines/reference/callbackTagNamespace.types b/tests/baselines/reference/callbackTagNamespace.types index 11d4fa5f7e682..9e6cb334f8354 100644 --- a/tests/baselines/reference/callbackTagNamespace.types +++ b/tests/baselines/reference/callbackTagNamespace.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/namespaced.js === +//// [tests/cases/conformance/jsdoc/callbackTagNamespace.ts] //// + +=== namespaced.js === /** * @callback NS.Nested.Inner * @param {Object} space - spaaaaaaaaace diff --git a/tests/baselines/reference/callbackTagNestedParameter.js b/tests/baselines/reference/callbackTagNestedParameter.js new file mode 100644 index 0000000000000..7bd2fbaa734d3 --- /dev/null +++ b/tests/baselines/reference/callbackTagNestedParameter.js @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/jsdoc/callbackTagNestedParameter.ts] //// + +//// [cb_nested.js] +/** + * @callback WorksWithPeopleCallback + * @param {Object} person + * @param {string} person.name + * @param {number} [person.age] + * @returns {void} + */ + +/** + * For each person, calls your callback. + * @param {WorksWithPeopleCallback} callback + * @returns {void} + */ +function eachPerson(callback) { + callback({ name: "Empty" }); +} + + + + +//// [cb_nested.d.ts] +/** + * @callback WorksWithPeopleCallback + * @param {Object} person + * @param {string} person.name + * @param {number} [person.age] + * @returns {void} + */ +/** + * For each person, calls your callback. + * @param {WorksWithPeopleCallback} callback + * @returns {void} + */ +declare function eachPerson(callback: WorksWithPeopleCallback): void; +type WorksWithPeopleCallback = (person: { + name: string; + age?: number; +}) => void; diff --git a/tests/baselines/reference/callbackTagNestedParameter.symbols b/tests/baselines/reference/callbackTagNestedParameter.symbols new file mode 100644 index 0000000000000..41a072d8a0ee0 --- /dev/null +++ b/tests/baselines/reference/callbackTagNestedParameter.symbols @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/jsdoc/callbackTagNestedParameter.ts] //// + +=== cb_nested.js === +/** + * @callback WorksWithPeopleCallback + * @param {Object} person + * @param {string} person.name + * @param {number} [person.age] + * @returns {void} + */ + +/** + * For each person, calls your callback. + * @param {WorksWithPeopleCallback} callback + * @returns {void} + */ +function eachPerson(callback) { +>eachPerson : Symbol(eachPerson, Decl(cb_nested.js, 0, 0)) +>callback : Symbol(callback, Decl(cb_nested.js, 13, 20)) + + callback({ name: "Empty" }); +>callback : Symbol(callback, Decl(cb_nested.js, 13, 20)) +>name : Symbol(name, Decl(cb_nested.js, 14, 14)) +} + diff --git a/tests/baselines/reference/callbackTagNestedParameter.types b/tests/baselines/reference/callbackTagNestedParameter.types new file mode 100644 index 0000000000000..1ab84666b791b --- /dev/null +++ b/tests/baselines/reference/callbackTagNestedParameter.types @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/jsdoc/callbackTagNestedParameter.ts] //// + +=== cb_nested.js === +/** + * @callback WorksWithPeopleCallback + * @param {Object} person + * @param {string} person.name + * @param {number} [person.age] + * @returns {void} + */ + +/** + * For each person, calls your callback. + * @param {WorksWithPeopleCallback} callback + * @returns {void} + */ +function eachPerson(callback) { +>eachPerson : (callback: WorksWithPeopleCallback) => void +>callback : WorksWithPeopleCallback + + callback({ name: "Empty" }); +>callback({ name: "Empty" }) : void +>callback : WorksWithPeopleCallback +>{ name: "Empty" } : { name: string; } +>name : string +>"Empty" : "Empty" +} + diff --git a/tests/baselines/reference/callbackTagVariadicType.js b/tests/baselines/reference/callbackTagVariadicType.js index 95cfae17f8e36..da31a9e954549 100644 --- a/tests/baselines/reference/callbackTagVariadicType.js +++ b/tests/baselines/reference/callbackTagVariadicType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/callbackTagVariadicType.ts] //// + //// [callbackTagVariadicType.js] /** * @callback Foo diff --git a/tests/baselines/reference/callbackTagVariadicType.symbols b/tests/baselines/reference/callbackTagVariadicType.symbols index 7c5767ded4a9b..012fc7ee7c294 100644 --- a/tests/baselines/reference/callbackTagVariadicType.symbols +++ b/tests/baselines/reference/callbackTagVariadicType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/callbackTagVariadicType.js === +//// [tests/cases/conformance/jsdoc/callbackTagVariadicType.ts] //// + +=== callbackTagVariadicType.js === /** * @callback Foo * @param {...string} args diff --git a/tests/baselines/reference/callbackTagVariadicType.types b/tests/baselines/reference/callbackTagVariadicType.types index 5858ab1642203..a19532cb4f572 100644 --- a/tests/baselines/reference/callbackTagVariadicType.types +++ b/tests/baselines/reference/callbackTagVariadicType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/callbackTagVariadicType.js === +//// [tests/cases/conformance/jsdoc/callbackTagVariadicType.ts] //// + +=== callbackTagVariadicType.js === /** * @callback Foo * @param {...string} args diff --git a/tests/baselines/reference/callbacksDontShareTypes.js b/tests/baselines/reference/callbacksDontShareTypes.js index e6483638058ea..7816d509af389 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.js +++ b/tests/baselines/reference/callbacksDontShareTypes.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callbacksDontShareTypes.ts] //// + //// [callbacksDontShareTypes.ts] interface Collection { length: number; diff --git a/tests/baselines/reference/callbacksDontShareTypes.symbols b/tests/baselines/reference/callbacksDontShareTypes.symbols index e3fa3b115d161..23c03684d9c1c 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.symbols +++ b/tests/baselines/reference/callbacksDontShareTypes.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callbacksDontShareTypes.ts === +//// [tests/cases/compiler/callbacksDontShareTypes.ts] //// + +=== callbacksDontShareTypes.ts === interface Collection { >Collection : Symbol(Collection, Decl(callbacksDontShareTypes.ts, 0, 0)) >T : Symbol(T, Decl(callbacksDontShareTypes.ts, 0, 21)) diff --git a/tests/baselines/reference/callbacksDontShareTypes.types b/tests/baselines/reference/callbacksDontShareTypes.types index 55422c4df7c16..addab08945042 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.types +++ b/tests/baselines/reference/callbacksDontShareTypes.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callbacksDontShareTypes.ts === +//// [tests/cases/compiler/callbacksDontShareTypes.ts] //// + +=== callbacksDontShareTypes.ts === interface Collection { length: number; >length : number diff --git a/tests/baselines/reference/callsOnComplexSignatures.js b/tests/baselines/reference/callsOnComplexSignatures.js index e058859d1c5d3..4c40a8bfcccb5 100644 --- a/tests/baselines/reference/callsOnComplexSignatures.js +++ b/tests/baselines/reference/callsOnComplexSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/callsOnComplexSignatures.tsx] //// + //// [callsOnComplexSignatures.tsx] /// import React from "react"; diff --git a/tests/baselines/reference/callsOnComplexSignatures.symbols b/tests/baselines/reference/callsOnComplexSignatures.symbols index 4ce0b1292e673..8a4e3f4488e6a 100644 --- a/tests/baselines/reference/callsOnComplexSignatures.symbols +++ b/tests/baselines/reference/callsOnComplexSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callsOnComplexSignatures.tsx === +//// [tests/cases/compiler/callsOnComplexSignatures.tsx] //// + +=== callsOnComplexSignatures.tsx === /// import React from "react"; >React : Symbol(React, Decl(callsOnComplexSignatures.tsx, 1, 6)) diff --git a/tests/baselines/reference/callsOnComplexSignatures.types b/tests/baselines/reference/callsOnComplexSignatures.types index 4860ae9bcb6ac..3a49fd91878ea 100644 --- a/tests/baselines/reference/callsOnComplexSignatures.types +++ b/tests/baselines/reference/callsOnComplexSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/callsOnComplexSignatures.tsx === +//// [tests/cases/compiler/callsOnComplexSignatures.tsx] //// + +=== callsOnComplexSignatures.tsx === /// import React from "react"; >React : typeof React diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt index 87e0266818208..11b3093de6a53 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,15): error TS2339: Property 'ClassA' does not exist on type 'typeof M'. -tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,22): error TS1011: An element access expression should take an argument. +cannotInvokeNewOnErrorExpression.ts(5,15): error TS2339: Property 'ClassA' does not exist on type 'typeof M'. +cannotInvokeNewOnErrorExpression.ts(5,22): error TS1011: An element access expression should take an argument. -==== tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts (2 errors) ==== +==== cannotInvokeNewOnErrorExpression.ts (2 errors) ==== module M { class ClassA {} diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.js b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.js index 129b17acdc64d..548c413fa674c 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.js +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts] //// + //// [cannotInvokeNewOnErrorExpression.ts] module M { diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.symbols b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.symbols index fb87705371b95..995b68c4cda61 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.symbols +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts === +//// [tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts] //// + +=== cannotInvokeNewOnErrorExpression.ts === module M >M : Symbol(M, Decl(cannotInvokeNewOnErrorExpression.ts, 0, 0)) { diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.types b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.types index 2b5360feefd5e..d0fa730f44993 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.types +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts === +//// [tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts] //// + +=== cannotInvokeNewOnErrorExpression.ts === module M >M : typeof M { diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt index dbd10d775d98e..04d0bfd20b942 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts(1,23): error TS2693: 'any' only refers to a type, but is being used as a value here. +cannotInvokeNewOnIndexExpression.ts(1,23): error TS2693: 'any' only refers to a type, but is being used as a value here. -==== tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts (1 errors) ==== +==== cannotInvokeNewOnIndexExpression.ts (1 errors) ==== var test: any[] = new any[1]; ~~~ !!! error TS2693: 'any' only refers to a type, but is being used as a value here. \ No newline at end of file diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.js b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.js index 86442dbf443f2..ed93b9d635e25 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.js +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts] //// + //// [cannotInvokeNewOnIndexExpression.ts] var test: any[] = new any[1]; diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.symbols b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.symbols index 7ac266b272887..bf0accc12e967 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.symbols +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts === +//// [tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts] //// + +=== cannotInvokeNewOnIndexExpression.ts === var test: any[] = new any[1]; >test : Symbol(test, Decl(cannotInvokeNewOnIndexExpression.ts, 0, 3)) diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.types b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.types index ec1a2b6dda18f..42f3d1a4c8e61 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.types +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts === +//// [tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts] //// + +=== cannotInvokeNewOnIndexExpression.ts === var test: any[] = new any[1]; >test : any[] >new any[1] : any diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js index d6769feee3bc7..36ec9c63d53a0 100644 --- a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts] //// + //// [captureSuperPropertyAccessInSuperCall01.ts] class A { constructor(f: () => string) { diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.symbols b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.symbols index a2cad82ec4eba..fce8086738d4f 100644 --- a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.symbols +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts === +//// [tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts] //// + +=== captureSuperPropertyAccessInSuperCall01.ts === class A { >A : Symbol(A, Decl(captureSuperPropertyAccessInSuperCall01.ts, 0, 0)) diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.types b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.types index 154d018eb425a..b9b70c4a72bfa 100644 --- a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.types +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts === +//// [tests/cases/compiler/captureSuperPropertyAccessInSuperCall01.ts] //// + +=== captureSuperPropertyAccessInSuperCall01.ts === class A { >A : A diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 0a9219eeb0de3..7846e9e93a6e6 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/captureThisInSuperCall.ts] //// + //// [captureThisInSuperCall.ts] class A { constructor(p:any) {} diff --git a/tests/baselines/reference/captureThisInSuperCall.symbols b/tests/baselines/reference/captureThisInSuperCall.symbols index 84d92c292a9b8..3479517b6cbdb 100644 --- a/tests/baselines/reference/captureThisInSuperCall.symbols +++ b/tests/baselines/reference/captureThisInSuperCall.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/captureThisInSuperCall.ts === +//// [tests/cases/compiler/captureThisInSuperCall.ts] //// + +=== captureThisInSuperCall.ts === class A { >A : Symbol(A, Decl(captureThisInSuperCall.ts, 0, 0)) diff --git a/tests/baselines/reference/captureThisInSuperCall.types b/tests/baselines/reference/captureThisInSuperCall.types index 4a0902e9f1e7b..848084a4ada6a 100644 --- a/tests/baselines/reference/captureThisInSuperCall.types +++ b/tests/baselines/reference/captureThisInSuperCall.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/captureThisInSuperCall.ts === +//// [tests/cases/compiler/captureThisInSuperCall.ts] //// + +=== captureThisInSuperCall.ts === class A { >A : A diff --git a/tests/baselines/reference/capturedLetConstInLoop1.js b/tests/baselines/reference/capturedLetConstInLoop1.js index 61d853491f4d4..9927c7a787ce0 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.js +++ b/tests/baselines/reference/capturedLetConstInLoop1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop1.ts] //// + //// [capturedLetConstInLoop1.ts] declare function use(x: any): any; diff --git a/tests/baselines/reference/capturedLetConstInLoop1.symbols b/tests/baselines/reference/capturedLetConstInLoop1.symbols index 43f263bd73ac7..2e2f0e4ad259d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop1.ts === +//// [tests/cases/compiler/capturedLetConstInLoop1.ts] //// + +=== capturedLetConstInLoop1.ts === declare function use(x: any): any; >use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) >x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 0, 21)) diff --git a/tests/baselines/reference/capturedLetConstInLoop1.types b/tests/baselines/reference/capturedLetConstInLoop1.types index a7d3094268c07..5a8b517069864 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.types +++ b/tests/baselines/reference/capturedLetConstInLoop1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop1.ts === +//// [tests/cases/compiler/capturedLetConstInLoop1.ts] //// + +=== capturedLetConstInLoop1.ts === declare function use(x: any): any; >use : (x: any) => any >x : any diff --git a/tests/baselines/reference/capturedLetConstInLoop10.js b/tests/baselines/reference/capturedLetConstInLoop10.js index d59d32f7d14f3..18b3a118a440b 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10.js +++ b/tests/baselines/reference/capturedLetConstInLoop10.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop10.ts] //// + //// [capturedLetConstInLoop10.ts] class A { foo() { diff --git a/tests/baselines/reference/capturedLetConstInLoop10.symbols b/tests/baselines/reference/capturedLetConstInLoop10.symbols index 3ad860b92ae0e..aafd652f11ceb 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop10.ts === +//// [tests/cases/compiler/capturedLetConstInLoop10.ts] //// + +=== capturedLetConstInLoop10.ts === class A { >A : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop10.types b/tests/baselines/reference/capturedLetConstInLoop10.types index 19f328f72bd8a..19bb6e6b2b151 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10.types +++ b/tests/baselines/reference/capturedLetConstInLoop10.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop10.ts === +//// [tests/cases/compiler/capturedLetConstInLoop10.ts] //// + +=== capturedLetConstInLoop10.ts === class A { >A : A diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.js b/tests/baselines/reference/capturedLetConstInLoop10_ES6.js index 705a5e6ba9f63..aa1935f3f31fd 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop10_ES6.ts] //// + //// [capturedLetConstInLoop10_ES6.ts] class A { foo() { diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols index 8ca14c806a306..23af2eabb872c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop10_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop10_ES6.ts] //// + +=== capturedLetConstInLoop10_ES6.ts === class A { >A : Symbol(A, Decl(capturedLetConstInLoop10_ES6.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop10_ES6.types b/tests/baselines/reference/capturedLetConstInLoop10_ES6.types index 9807d60a1cd8b..6983343cf15da 100644 --- a/tests/baselines/reference/capturedLetConstInLoop10_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop10_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop10_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop10_ES6.ts] //// + +=== capturedLetConstInLoop10_ES6.ts === class A { >A : A diff --git a/tests/baselines/reference/capturedLetConstInLoop11.js b/tests/baselines/reference/capturedLetConstInLoop11.js index 8e9ca71580e6c..067e4575cabd1 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11.js +++ b/tests/baselines/reference/capturedLetConstInLoop11.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop11.ts] //// + //// [capturedLetConstInLoop11.ts] for (;;) { let x = 1; diff --git a/tests/baselines/reference/capturedLetConstInLoop11.symbols b/tests/baselines/reference/capturedLetConstInLoop11.symbols index 2e242906b731c..17d7fa4dc1dc6 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop11.ts === +//// [tests/cases/compiler/capturedLetConstInLoop11.ts] //// + +=== capturedLetConstInLoop11.ts === for (;;) { let x = 1; >x : Symbol(x, Decl(capturedLetConstInLoop11.ts, 1, 7)) diff --git a/tests/baselines/reference/capturedLetConstInLoop11.types b/tests/baselines/reference/capturedLetConstInLoop11.types index e150744627d2f..4595b77082e90 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11.types +++ b/tests/baselines/reference/capturedLetConstInLoop11.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop11.ts === +//// [tests/cases/compiler/capturedLetConstInLoop11.ts] //// + +=== capturedLetConstInLoop11.ts === for (;;) { let x = 1; >x : number diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.js b/tests/baselines/reference/capturedLetConstInLoop11_ES6.js index df288953f1e94..22beaa2b8ccc1 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop11_ES6.ts] //// + //// [capturedLetConstInLoop11_ES6.ts] for (;;) { let x = 1; diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols index 6079bf490a35e..3f5ed8869b07e 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop11_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop11_ES6.ts] //// + +=== capturedLetConstInLoop11_ES6.ts === for (;;) { let x = 1; >x : Symbol(x, Decl(capturedLetConstInLoop11_ES6.ts, 1, 7)) diff --git a/tests/baselines/reference/capturedLetConstInLoop11_ES6.types b/tests/baselines/reference/capturedLetConstInLoop11_ES6.types index 883be74b66d72..d249e5e0890fd 100644 --- a/tests/baselines/reference/capturedLetConstInLoop11_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop11_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop11_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop11_ES6.ts] //// + +=== capturedLetConstInLoop11_ES6.ts === for (;;) { let x = 1; >x : number diff --git a/tests/baselines/reference/capturedLetConstInLoop12.js b/tests/baselines/reference/capturedLetConstInLoop12.js index 3625556c89a90..1fbc3fdb6cab8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop12.js +++ b/tests/baselines/reference/capturedLetConstInLoop12.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop12.ts] //// + //// [capturedLetConstInLoop12.ts] (function() { "use strict"; diff --git a/tests/baselines/reference/capturedLetConstInLoop12.symbols b/tests/baselines/reference/capturedLetConstInLoop12.symbols index 8c0338ea84ea6..af1603f2a4372 100644 --- a/tests/baselines/reference/capturedLetConstInLoop12.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop12.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop12.ts === +//// [tests/cases/compiler/capturedLetConstInLoop12.ts] //// + +=== capturedLetConstInLoop12.ts === (function() { "use strict"; diff --git a/tests/baselines/reference/capturedLetConstInLoop12.types b/tests/baselines/reference/capturedLetConstInLoop12.types index 1e8877fe53ad0..3e7706e16eeca 100644 --- a/tests/baselines/reference/capturedLetConstInLoop12.types +++ b/tests/baselines/reference/capturedLetConstInLoop12.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop12.ts === +//// [tests/cases/compiler/capturedLetConstInLoop12.ts] //// + +=== capturedLetConstInLoop12.ts === (function() { >(function() { "use strict"; for (let i = 0; i < 4; i++) { (() => [i] = [i + 1])(); }})() : void >(function() { "use strict"; for (let i = 0; i < 4; i++) { (() => [i] = [i + 1])(); }}) : () => void diff --git a/tests/baselines/reference/capturedLetConstInLoop13.js b/tests/baselines/reference/capturedLetConstInLoop13.js index d0723c1f0f908..791cf1448763a 100644 --- a/tests/baselines/reference/capturedLetConstInLoop13.js +++ b/tests/baselines/reference/capturedLetConstInLoop13.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop13.ts] //// + //// [capturedLetConstInLoop13.ts] class Main { diff --git a/tests/baselines/reference/capturedLetConstInLoop13.symbols b/tests/baselines/reference/capturedLetConstInLoop13.symbols index 3f94bb855be02..c9bcfacffe92c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop13.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop13.ts === +//// [tests/cases/compiler/capturedLetConstInLoop13.ts] //// + +=== capturedLetConstInLoop13.ts === class Main { >Main : Symbol(Main, Decl(capturedLetConstInLoop13.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop13.types b/tests/baselines/reference/capturedLetConstInLoop13.types index 68348e469fe96..71e4ee861f63d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop13.types +++ b/tests/baselines/reference/capturedLetConstInLoop13.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop13.ts === +//// [tests/cases/compiler/capturedLetConstInLoop13.ts] //// + +=== capturedLetConstInLoop13.ts === class Main { >Main : Main diff --git a/tests/baselines/reference/capturedLetConstInLoop1_ES6.js b/tests/baselines/reference/capturedLetConstInLoop1_ES6.js index 0a68f8e1cf63b..18727ee67a0b2 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop1_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop1_ES6.ts] //// + //// [capturedLetConstInLoop1_ES6.ts] //==== let for (let x in {}) { diff --git a/tests/baselines/reference/capturedLetConstInLoop1_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop1_ES6.symbols index f275ad26db214..3c9281662aa7c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop1_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop1_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop1_ES6.ts] //// + +=== capturedLetConstInLoop1_ES6.ts === //==== let for (let x in {}) { >x : Symbol(x, Decl(capturedLetConstInLoop1_ES6.ts, 1, 8)) diff --git a/tests/baselines/reference/capturedLetConstInLoop1_ES6.types b/tests/baselines/reference/capturedLetConstInLoop1_ES6.types index 5e803b3586309..96f6b8aaf93f8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop1_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop1_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop1_ES6.ts] //// + +=== capturedLetConstInLoop1_ES6.ts === //==== let for (let x in {}) { >x : string diff --git a/tests/baselines/reference/capturedLetConstInLoop2.js b/tests/baselines/reference/capturedLetConstInLoop2.js index 94bc8669cf593..a5c5e21a5127d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2.js +++ b/tests/baselines/reference/capturedLetConstInLoop2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop2.ts] //// + //// [capturedLetConstInLoop2.ts] // ========let function foo0(x) { diff --git a/tests/baselines/reference/capturedLetConstInLoop2.symbols b/tests/baselines/reference/capturedLetConstInLoop2.symbols index f9aaae97dd822..cff70e8748ac4 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop2.ts === +//// [tests/cases/compiler/capturedLetConstInLoop2.ts] //// + +=== capturedLetConstInLoop2.ts === // ========let function foo0(x) { >foo0 : Symbol(foo0, Decl(capturedLetConstInLoop2.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop2.types b/tests/baselines/reference/capturedLetConstInLoop2.types index be90b52b334da..1b2e3a3df1bac 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2.types +++ b/tests/baselines/reference/capturedLetConstInLoop2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop2.ts === +//// [tests/cases/compiler/capturedLetConstInLoop2.ts] //// + +=== capturedLetConstInLoop2.ts === // ========let function foo0(x) { >foo0 : (x: any) => void diff --git a/tests/baselines/reference/capturedLetConstInLoop2_ES6.js b/tests/baselines/reference/capturedLetConstInLoop2_ES6.js index 59bd81b5a4de7..745bd874e2341 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop2_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop2_ES6.ts] //// + //// [capturedLetConstInLoop2_ES6.ts] // ========let function foo0(x) { diff --git a/tests/baselines/reference/capturedLetConstInLoop2_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop2_ES6.symbols index ff1054c2b213a..ba2ea96135fca 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop2_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop2_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop2_ES6.ts] //// + +=== capturedLetConstInLoop2_ES6.ts === // ========let function foo0(x) { >foo0 : Symbol(foo0, Decl(capturedLetConstInLoop2_ES6.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop2_ES6.types b/tests/baselines/reference/capturedLetConstInLoop2_ES6.types index fb1779237ef63..5d43dfa5c50d4 100644 --- a/tests/baselines/reference/capturedLetConstInLoop2_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop2_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop2_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop2_ES6.ts] //// + +=== capturedLetConstInLoop2_ES6.ts === // ========let function foo0(x) { >foo0 : (x: any) => void diff --git a/tests/baselines/reference/capturedLetConstInLoop3.js b/tests/baselines/reference/capturedLetConstInLoop3.js index f3bae712c5b2c..be6a01db29d7c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3.js +++ b/tests/baselines/reference/capturedLetConstInLoop3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop3.ts] //// + //// [capturedLetConstInLoop3.ts] ///=========let declare function use(a: any); diff --git a/tests/baselines/reference/capturedLetConstInLoop3.symbols b/tests/baselines/reference/capturedLetConstInLoop3.symbols index f80992139a11b..86dfe6c54f93d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop3.ts === +//// [tests/cases/compiler/capturedLetConstInLoop3.ts] //// + +=== capturedLetConstInLoop3.ts === ///=========let declare function use(a: any); >use : Symbol(use, Decl(capturedLetConstInLoop3.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop3.types b/tests/baselines/reference/capturedLetConstInLoop3.types index 8ce40ab5f1b5e..48e7f8a8f72d3 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3.types +++ b/tests/baselines/reference/capturedLetConstInLoop3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop3.ts === +//// [tests/cases/compiler/capturedLetConstInLoop3.ts] //// + +=== capturedLetConstInLoop3.ts === ///=========let declare function use(a: any); >use : (a: any) => any diff --git a/tests/baselines/reference/capturedLetConstInLoop3_ES6.js b/tests/baselines/reference/capturedLetConstInLoop3_ES6.js index 367db066edd43..63d6c521b68db 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop3_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop3_ES6.ts] //// + //// [capturedLetConstInLoop3_ES6.ts] ///=========let declare function use(a: any); diff --git a/tests/baselines/reference/capturedLetConstInLoop3_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop3_ES6.symbols index 7ec20d74e6d10..4cd812eb8ad53 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop3_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop3_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop3_ES6.ts] //// + +=== capturedLetConstInLoop3_ES6.ts === ///=========let declare function use(a: any); >use : Symbol(use, Decl(capturedLetConstInLoop3_ES6.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop3_ES6.types b/tests/baselines/reference/capturedLetConstInLoop3_ES6.types index 5a8d77c252cd5..136fbed7dff81 100644 --- a/tests/baselines/reference/capturedLetConstInLoop3_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop3_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop3_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop3_ES6.ts] //// + +=== capturedLetConstInLoop3_ES6.ts === ///=========let declare function use(a: any); >use : (a: any) => any diff --git a/tests/baselines/reference/capturedLetConstInLoop4.js b/tests/baselines/reference/capturedLetConstInLoop4.js index ff6d32563a932..3cb952e524f65 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.js +++ b/tests/baselines/reference/capturedLetConstInLoop4.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop4.ts] //// + //// [capturedLetConstInLoop4.ts] //======let export function exportedFoo() { diff --git a/tests/baselines/reference/capturedLetConstInLoop4.symbols b/tests/baselines/reference/capturedLetConstInLoop4.symbols index 6554a5a9686b4..865887bf7eefc 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop4.ts === +//// [tests/cases/compiler/capturedLetConstInLoop4.ts] //// + +=== capturedLetConstInLoop4.ts === //======let export function exportedFoo() { >exportedFoo : Symbol(exportedFoo, Decl(capturedLetConstInLoop4.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop4.types b/tests/baselines/reference/capturedLetConstInLoop4.types index 2fcff7625a179..3d4e748b40de3 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.types +++ b/tests/baselines/reference/capturedLetConstInLoop4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop4.ts === +//// [tests/cases/compiler/capturedLetConstInLoop4.ts] //// + +=== capturedLetConstInLoop4.ts === //======let export function exportedFoo() { >exportedFoo : () => string diff --git a/tests/baselines/reference/capturedLetConstInLoop4_ES6.js b/tests/baselines/reference/capturedLetConstInLoop4_ES6.js index e7a16aa01c67d..e98e447af37fb 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop4_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop4_ES6.ts] //// + //// [capturedLetConstInLoop4_ES6.ts] //======let export function exportedFoo() { diff --git a/tests/baselines/reference/capturedLetConstInLoop4_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop4_ES6.symbols index df72686e7bee4..294861932f449 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop4_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop4_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop4_ES6.ts] //// + +=== capturedLetConstInLoop4_ES6.ts === //======let export function exportedFoo() { >exportedFoo : Symbol(exportedFoo, Decl(capturedLetConstInLoop4_ES6.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop4_ES6.types b/tests/baselines/reference/capturedLetConstInLoop4_ES6.types index 546cdd93b4365..4c40122214dec 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop4_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop4_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop4_ES6.ts] //// + +=== capturedLetConstInLoop4_ES6.ts === //======let export function exportedFoo() { >exportedFoo : () => string diff --git a/tests/baselines/reference/capturedLetConstInLoop5.errors.txt b/tests/baselines/reference/capturedLetConstInLoop5.errors.txt index 4ac498dee1889..8d5719ba911b8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop5.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/capturedLetConstInLoop5.ts(174,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop5.ts(229,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop5.ts(174,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop5.ts(229,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop5.ts (2 errors) ==== +==== capturedLetConstInLoop5.ts (2 errors) ==== declare function use(a: any); //====let diff --git a/tests/baselines/reference/capturedLetConstInLoop5.js b/tests/baselines/reference/capturedLetConstInLoop5.js index 4ea4c85c0d74a..3310e159ca77d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.js +++ b/tests/baselines/reference/capturedLetConstInLoop5.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop5.ts] //// + //// [capturedLetConstInLoop5.ts] declare function use(a: any); diff --git a/tests/baselines/reference/capturedLetConstInLoop5.symbols b/tests/baselines/reference/capturedLetConstInLoop5.symbols index 965379d3a1123..c0ed83bd0c4c4 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop5.ts === +//// [tests/cases/compiler/capturedLetConstInLoop5.ts] //// + +=== capturedLetConstInLoop5.ts === declare function use(a: any); >use : Symbol(use, Decl(capturedLetConstInLoop5.ts, 0, 0)) >a : Symbol(a, Decl(capturedLetConstInLoop5.ts, 0, 21)) diff --git a/tests/baselines/reference/capturedLetConstInLoop5.types b/tests/baselines/reference/capturedLetConstInLoop5.types index 3ec96ca37daf4..a224920cc8d25 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5.types +++ b/tests/baselines/reference/capturedLetConstInLoop5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop5.ts === +//// [tests/cases/compiler/capturedLetConstInLoop5.ts] //// + +=== capturedLetConstInLoop5.ts === declare function use(a: any); >use : (a: any) => any >a : any diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt index f6df20dfa303c..c17de5619385a 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(174,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop5_ES6.ts(229,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop5_ES6.ts(174,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop5_ES6.ts(229,13): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop5_ES6.ts (2 errors) ==== +==== capturedLetConstInLoop5_ES6.ts (2 errors) ==== declare function use(a: any); //====let diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.js b/tests/baselines/reference/capturedLetConstInLoop5_ES6.js index da48929c959e8..2b53c3c5b2d0b 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop5_ES6.ts] //// + //// [capturedLetConstInLoop5_ES6.ts] declare function use(a: any); diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop5_ES6.symbols index 7e3d9a07422b3..76ab61e6a5a8c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop5_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop5_ES6.ts] //// + +=== capturedLetConstInLoop5_ES6.ts === declare function use(a: any); >use : Symbol(use, Decl(capturedLetConstInLoop5_ES6.ts, 0, 0)) >a : Symbol(a, Decl(capturedLetConstInLoop5_ES6.ts, 0, 21)) diff --git a/tests/baselines/reference/capturedLetConstInLoop5_ES6.types b/tests/baselines/reference/capturedLetConstInLoop5_ES6.types index 0a59687ebb308..c79cf1f1e5376 100644 --- a/tests/baselines/reference/capturedLetConstInLoop5_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop5_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop5_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop5_ES6.ts] //// + +=== capturedLetConstInLoop5_ES6.ts === declare function use(a: any); >use : (a: any) => any >a : any diff --git a/tests/baselines/reference/capturedLetConstInLoop6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop6.errors.txt index 20d3f61eec43e..6aa3ac9450472 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/capturedLetConstInLoop6.ts(147,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6.ts(150,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6.ts(194,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6.ts(197,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop6.ts(147,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop6.ts(150,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop6.ts(194,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop6.ts(197,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop6.ts (4 errors) ==== +==== capturedLetConstInLoop6.ts (4 errors) ==== // ====let for (let x of []) { (function() { return x}); diff --git a/tests/baselines/reference/capturedLetConstInLoop6.js b/tests/baselines/reference/capturedLetConstInLoop6.js index cf813da44e14e..a336075d031ec 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.js +++ b/tests/baselines/reference/capturedLetConstInLoop6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop6.ts] //// + //// [capturedLetConstInLoop6.ts] // ====let for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop6.symbols b/tests/baselines/reference/capturedLetConstInLoop6.symbols index 872bc3a4727b1..a40c1a0a9688f 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop6.ts] //// + +=== capturedLetConstInLoop6.ts === // ====let for (let x of []) { >x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 1, 8)) diff --git a/tests/baselines/reference/capturedLetConstInLoop6.types b/tests/baselines/reference/capturedLetConstInLoop6.types index c7f6392139e97..a142ebb923fd9 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6.types +++ b/tests/baselines/reference/capturedLetConstInLoop6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop6.ts] //// + +=== capturedLetConstInLoop6.ts === // ====let for (let x of []) { >x : any diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt index 9b11f5d34bb81..f4e20c28788b4 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(147,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(150,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(194,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop6_ES6.ts(197,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop6_ES6.ts(147,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop6_ES6.ts(150,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop6_ES6.ts(194,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop6_ES6.ts(197,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop6_ES6.ts (4 errors) ==== +==== capturedLetConstInLoop6_ES6.ts (4 errors) ==== // ====let for (let x of []) { (function() { return x}); diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.js b/tests/baselines/reference/capturedLetConstInLoop6_ES6.js index 33d64e889276a..ca856a9f3f9c4 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop6_ES6.ts] //// + //// [capturedLetConstInLoop6_ES6.ts] // ====let for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop6_ES6.symbols index 63cb26c4300ad..5a78f33f097f0 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop6_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop6_ES6.ts] //// + +=== capturedLetConstInLoop6_ES6.ts === // ====let for (let x of []) { >x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 1, 8)) diff --git a/tests/baselines/reference/capturedLetConstInLoop6_ES6.types b/tests/baselines/reference/capturedLetConstInLoop6_ES6.types index 79da473e9344e..8807dc4cc806d 100644 --- a/tests/baselines/reference/capturedLetConstInLoop6_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop6_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop6_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop6_ES6.ts] //// + +=== capturedLetConstInLoop6_ES6.ts === // ====let for (let x of []) { >x : any diff --git a/tests/baselines/reference/capturedLetConstInLoop7.errors.txt b/tests/baselines/reference/capturedLetConstInLoop7.errors.txt index e8b41b1756954..d6f7d6d3fc51e 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop7.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/capturedLetConstInLoop7.ts(230,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(233,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(236,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(239,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(305,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(308,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(311,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7.ts(314,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7.ts(230,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7.ts(233,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7.ts(236,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7.ts(239,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7.ts(305,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7.ts(308,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7.ts(311,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7.ts(314,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop7.ts (8 errors) ==== +==== capturedLetConstInLoop7.ts (8 errors) ==== //===let l0: for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop7.js b/tests/baselines/reference/capturedLetConstInLoop7.js index c4bd9b2d2b989..9b1d205f53e36 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.js +++ b/tests/baselines/reference/capturedLetConstInLoop7.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop7.ts] //// + //// [capturedLetConstInLoop7.ts] //===let l0: diff --git a/tests/baselines/reference/capturedLetConstInLoop7.symbols b/tests/baselines/reference/capturedLetConstInLoop7.symbols index 0f4395a6d6873..ff88be58025fe 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop7.ts === +//// [tests/cases/compiler/capturedLetConstInLoop7.ts] //// + +=== capturedLetConstInLoop7.ts === //===let l0: for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop7.types b/tests/baselines/reference/capturedLetConstInLoop7.types index 39f09100eeb37..7462fb3f3a85c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7.types +++ b/tests/baselines/reference/capturedLetConstInLoop7.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop7.ts === +//// [tests/cases/compiler/capturedLetConstInLoop7.ts] //// + +=== capturedLetConstInLoop7.ts === //===let l0: >l0 : any diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt index f789ae176b772..f321eadc7fdf4 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(230,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(233,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(236,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(239,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(305,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(308,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(311,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop7_ES6.ts(314,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7_ES6.ts(230,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7_ES6.ts(233,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7_ES6.ts(236,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7_ES6.ts(239,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7_ES6.ts(305,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7_ES6.ts(308,9): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop7_ES6.ts(311,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop7_ES6.ts(314,9): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop7_ES6.ts (8 errors) ==== +==== capturedLetConstInLoop7_ES6.ts (8 errors) ==== //===let l0: for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.js b/tests/baselines/reference/capturedLetConstInLoop7_ES6.js index 13c69a883921f..38974e9809ab1 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop7_ES6.ts] //// + //// [capturedLetConstInLoop7_ES6.ts] //===let l0: diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop7_ES6.symbols index a817377834ba8..8aa0e614f527e 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop7_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop7_ES6.ts] //// + +=== capturedLetConstInLoop7_ES6.ts === //===let l0: for (let x of []) { diff --git a/tests/baselines/reference/capturedLetConstInLoop7_ES6.types b/tests/baselines/reference/capturedLetConstInLoop7_ES6.types index 48499659aa3ba..6a365f63bdae8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop7_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop7_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop7_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop7_ES6.ts] //// + +=== capturedLetConstInLoop7_ES6.ts === //===let l0: >l0 : any diff --git a/tests/baselines/reference/capturedLetConstInLoop8.errors.txt b/tests/baselines/reference/capturedLetConstInLoop8.errors.txt index 19f2fd0154c24..161a8edbae49b 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop8.errors.txt @@ -1,22 +1,22 @@ -tests/cases/compiler/capturedLetConstInLoop8.ts(73,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(76,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(79,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(82,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(86,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(89,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(92,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(95,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(98,21): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(102,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(105,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(108,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(111,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(114,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(117,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8.ts(120,17): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. +capturedLetConstInLoop8.ts(73,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8.ts(76,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8.ts(79,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8.ts(82,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8.ts(86,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(89,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(92,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(95,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(98,21): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. +capturedLetConstInLoop8.ts(102,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8.ts(105,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8.ts(108,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(111,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(114,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(117,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8.ts(120,17): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop8.ts (16 errors) ==== +==== capturedLetConstInLoop8.ts (16 errors) ==== function foo() { l0: for (let z = 0; z < 1; ++z) { diff --git a/tests/baselines/reference/capturedLetConstInLoop8.js b/tests/baselines/reference/capturedLetConstInLoop8.js index cb13f76ac6160..147fe3447eb2a 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.js +++ b/tests/baselines/reference/capturedLetConstInLoop8.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop8.ts] //// + //// [capturedLetConstInLoop8.ts] function foo() { l0: diff --git a/tests/baselines/reference/capturedLetConstInLoop8.symbols b/tests/baselines/reference/capturedLetConstInLoop8.symbols index 9622062c94bce..70a237c35cbef 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop8.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop8.ts === +//// [tests/cases/compiler/capturedLetConstInLoop8.ts] //// + +=== capturedLetConstInLoop8.ts === function foo() { >foo : Symbol(foo, Decl(capturedLetConstInLoop8.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop8.types b/tests/baselines/reference/capturedLetConstInLoop8.types index 264733080391e..473755f7e5db7 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8.types +++ b/tests/baselines/reference/capturedLetConstInLoop8.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop8.ts === +//// [tests/cases/compiler/capturedLetConstInLoop8.ts] //// + +=== capturedLetConstInLoop8.ts === function foo() { >foo : () => "123" | "456" diff --git a/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt b/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt index 66a6f111caf4c..f2f0775722158 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt +++ b/tests/baselines/reference/capturedLetConstInLoop8_ES6.errors.txt @@ -1,22 +1,22 @@ -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(73,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(76,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(79,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(82,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(86,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(89,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(92,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(95,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(98,21): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(102,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(105,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(108,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(111,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(114,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(117,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. -tests/cases/compiler/capturedLetConstInLoop8_ES6.ts(120,17): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. +capturedLetConstInLoop8_ES6.ts(73,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8_ES6.ts(76,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8_ES6.ts(79,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8_ES6.ts(82,21): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8_ES6.ts(86,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(89,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(92,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(95,21): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(98,21): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. +capturedLetConstInLoop8_ES6.ts(102,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8_ES6.ts(105,17): error TS2367: This comparison appears to be unintentional because the types '0' and '1' have no overlap. +capturedLetConstInLoop8_ES6.ts(108,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(111,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(114,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(117,17): error TS2367: This comparison appears to be unintentional because the types '0' and '2' have no overlap. +capturedLetConstInLoop8_ES6.ts(120,17): error TS2367: This comparison appears to be unintentional because the types '0' and '3' have no overlap. -==== tests/cases/compiler/capturedLetConstInLoop8_ES6.ts (16 errors) ==== +==== capturedLetConstInLoop8_ES6.ts (16 errors) ==== function foo() { l0: for (let z = 0; z < 1; ++z) { diff --git a/tests/baselines/reference/capturedLetConstInLoop8_ES6.js b/tests/baselines/reference/capturedLetConstInLoop8_ES6.js index 71d0ecd4c4c7f..7ade5fcecd882 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop8_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop8_ES6.ts] //// + //// [capturedLetConstInLoop8_ES6.ts] function foo() { l0: diff --git a/tests/baselines/reference/capturedLetConstInLoop8_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop8_ES6.symbols index 01ca5f227f4fd..aacd5f7c2385c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop8_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop8_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop8_ES6.ts] //// + +=== capturedLetConstInLoop8_ES6.ts === function foo() { >foo : Symbol(foo, Decl(capturedLetConstInLoop8_ES6.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedLetConstInLoop8_ES6.types b/tests/baselines/reference/capturedLetConstInLoop8_ES6.types index 99d07bb99bf54..66070d0f497b9 100644 --- a/tests/baselines/reference/capturedLetConstInLoop8_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop8_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop8_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop8_ES6.ts] //// + +=== capturedLetConstInLoop8_ES6.ts === function foo() { >foo : () => "123" | "456" diff --git a/tests/baselines/reference/capturedLetConstInLoop9.js b/tests/baselines/reference/capturedLetConstInLoop9.js index 4f858a91a9c6b..be7d4bb85e6d8 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.js +++ b/tests/baselines/reference/capturedLetConstInLoop9.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop9.ts] //// + //// [capturedLetConstInLoop9.ts] for (let x = 0; x < 1; ++x) { let x; diff --git a/tests/baselines/reference/capturedLetConstInLoop9.symbols b/tests/baselines/reference/capturedLetConstInLoop9.symbols index 70f3fc7c628a0..3773c5fcdf9e6 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop9.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop9.ts === +//// [tests/cases/compiler/capturedLetConstInLoop9.ts] //// + +=== capturedLetConstInLoop9.ts === for (let x = 0; x < 1; ++x) { >x : Symbol(x, Decl(capturedLetConstInLoop9.ts, 0, 8)) >x : Symbol(x, Decl(capturedLetConstInLoop9.ts, 0, 8)) diff --git a/tests/baselines/reference/capturedLetConstInLoop9.types b/tests/baselines/reference/capturedLetConstInLoop9.types index 486697b8d8409..2946bdf4c6e60 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9.types +++ b/tests/baselines/reference/capturedLetConstInLoop9.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop9.ts === +//// [tests/cases/compiler/capturedLetConstInLoop9.ts] //// + +=== capturedLetConstInLoop9.ts === for (let x = 0; x < 1; ++x) { >x : number >0 : 0 diff --git a/tests/baselines/reference/capturedLetConstInLoop9_ES6.js b/tests/baselines/reference/capturedLetConstInLoop9_ES6.js index 783140426d267..d5eb6a5571405 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9_ES6.js +++ b/tests/baselines/reference/capturedLetConstInLoop9_ES6.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedLetConstInLoop9_ES6.ts] //// + //// [capturedLetConstInLoop9_ES6.ts] for (let x = 0; x < 1; ++x) { let x; diff --git a/tests/baselines/reference/capturedLetConstInLoop9_ES6.symbols b/tests/baselines/reference/capturedLetConstInLoop9_ES6.symbols index 4d4013096fcc8..cbaeb3b16de40 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9_ES6.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop9_ES6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop9_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop9_ES6.ts] //// + +=== capturedLetConstInLoop9_ES6.ts === for (let x = 0; x < 1; ++x) { >x : Symbol(x, Decl(capturedLetConstInLoop9_ES6.ts, 0, 8)) >x : Symbol(x, Decl(capturedLetConstInLoop9_ES6.ts, 0, 8)) diff --git a/tests/baselines/reference/capturedLetConstInLoop9_ES6.types b/tests/baselines/reference/capturedLetConstInLoop9_ES6.types index 26d2b770a3118..0d119766e5071 100644 --- a/tests/baselines/reference/capturedLetConstInLoop9_ES6.types +++ b/tests/baselines/reference/capturedLetConstInLoop9_ES6.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedLetConstInLoop9_ES6.ts === +//// [tests/cases/compiler/capturedLetConstInLoop9_ES6.ts] //// + +=== capturedLetConstInLoop9_ES6.ts === for (let x = 0; x < 1; ++x) { >x : number >0 : 0 diff --git a/tests/baselines/reference/capturedParametersInInitializers1.errors.txt b/tests/baselines/reference/capturedParametersInInitializers1.errors.txt index bbd19e7f64de1..ff78c9378546f 100644 --- a/tests/baselines/reference/capturedParametersInInitializers1.errors.txt +++ b/tests/baselines/reference/capturedParametersInInitializers1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -tests/cases/compiler/capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -tests/cases/compiler/capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -==== tests/cases/compiler/capturedParametersInInitializers1.ts (3 errors) ==== +==== capturedParametersInInitializers1.ts (3 errors) ==== // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { new y().c; diff --git a/tests/baselines/reference/capturedParametersInInitializers1.js b/tests/baselines/reference/capturedParametersInInitializers1.js index ec5ff77d84b92..c3403b7186889 100644 --- a/tests/baselines/reference/capturedParametersInInitializers1.js +++ b/tests/baselines/reference/capturedParametersInInitializers1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// + //// [capturedParametersInInitializers1.ts] // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { diff --git a/tests/baselines/reference/capturedParametersInInitializers1.symbols b/tests/baselines/reference/capturedParametersInInitializers1.symbols index d9ab1ef6cc25a..000e625497255 100644 --- a/tests/baselines/reference/capturedParametersInInitializers1.symbols +++ b/tests/baselines/reference/capturedParametersInInitializers1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedParametersInInitializers1.ts === +//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// + +=== capturedParametersInInitializers1.ts === // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { >foo1 : Symbol(foo1, Decl(capturedParametersInInitializers1.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedParametersInInitializers1.types b/tests/baselines/reference/capturedParametersInInitializers1.types index 02f0bb13a90ef..53199555c3412 100644 --- a/tests/baselines/reference/capturedParametersInInitializers1.types +++ b/tests/baselines/reference/capturedParametersInInitializers1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedParametersInInitializers1.ts === +//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// + +=== capturedParametersInInitializers1.ts === // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { >foo1 : (y?: typeof (Anonymous class), x?: number) => void diff --git a/tests/baselines/reference/capturedParametersInInitializers2.errors.txt b/tests/baselines/reference/capturedParametersInInitializers2.errors.txt index aba66cbd30a58..7f7e502bfbba2 100644 --- a/tests/baselines/reference/capturedParametersInInitializers2.errors.txt +++ b/tests/baselines/reference/capturedParametersInInitializers2.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/capturedParametersInInitializers2.ts(3,20): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. -tests/cases/compiler/capturedParametersInInitializers2.ts(4,14): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. -tests/cases/compiler/capturedParametersInInitializers2.ts(6,10): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -tests/cases/compiler/capturedParametersInInitializers2.ts(13,26): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -tests/cases/compiler/capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. +capturedParametersInInitializers2.ts(3,20): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. +capturedParametersInInitializers2.ts(4,14): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. +capturedParametersInInitializers2.ts(6,10): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers2.ts(13,26): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +capturedParametersInInitializers2.ts(13,27): error TS2373: Parameter 'y' cannot reference identifier 'x' declared after it. -==== tests/cases/compiler/capturedParametersInInitializers2.ts (5 errors) ==== +==== capturedParametersInInitializers2.ts (5 errors) ==== function foo( y = class { static c = x; diff --git a/tests/baselines/reference/capturedParametersInInitializers2.js b/tests/baselines/reference/capturedParametersInInitializers2.js index 1e84e0fe23685..5289fa14092ac 100644 --- a/tests/baselines/reference/capturedParametersInInitializers2.js +++ b/tests/baselines/reference/capturedParametersInInitializers2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedParametersInInitializers2.ts] //// + //// [capturedParametersInInitializers2.ts] function foo( y = class { diff --git a/tests/baselines/reference/capturedParametersInInitializers2.symbols b/tests/baselines/reference/capturedParametersInInitializers2.symbols index e3cf3a07dff6b..e89b7cbbd793a 100644 --- a/tests/baselines/reference/capturedParametersInInitializers2.symbols +++ b/tests/baselines/reference/capturedParametersInInitializers2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedParametersInInitializers2.ts === +//// [tests/cases/compiler/capturedParametersInInitializers2.ts] //// + +=== capturedParametersInInitializers2.ts === function foo( >foo : Symbol(foo, Decl(capturedParametersInInitializers2.ts, 0, 0)) diff --git a/tests/baselines/reference/capturedParametersInInitializers2.types b/tests/baselines/reference/capturedParametersInInitializers2.types index bc135347bcaa3..280faab95227d 100644 --- a/tests/baselines/reference/capturedParametersInInitializers2.types +++ b/tests/baselines/reference/capturedParametersInInitializers2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedParametersInInitializers2.ts === +//// [tests/cases/compiler/capturedParametersInInitializers2.ts] //// + +=== capturedParametersInInitializers2.ts === function foo( >foo : (y?: typeof (Anonymous class), x?: number, z?: number) => void diff --git a/tests/baselines/reference/capturedVarInLoop.js b/tests/baselines/reference/capturedVarInLoop.js index 303c18eda2ddd..ff49cda7181b3 100644 --- a/tests/baselines/reference/capturedVarInLoop.js +++ b/tests/baselines/reference/capturedVarInLoop.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/capturedVarInLoop.ts] //// + //// [capturedVarInLoop.ts] for (var i = 0; i < 10; i++) { var str = 'x', len = str.length; diff --git a/tests/baselines/reference/capturedVarInLoop.symbols b/tests/baselines/reference/capturedVarInLoop.symbols index ac741dc511361..9f60a638ae8b8 100644 --- a/tests/baselines/reference/capturedVarInLoop.symbols +++ b/tests/baselines/reference/capturedVarInLoop.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedVarInLoop.ts === +//// [tests/cases/compiler/capturedVarInLoop.ts] //// + +=== capturedVarInLoop.ts === for (var i = 0; i < 10; i++) { >i : Symbol(i, Decl(capturedVarInLoop.ts, 0, 8)) >i : Symbol(i, Decl(capturedVarInLoop.ts, 0, 8)) diff --git a/tests/baselines/reference/capturedVarInLoop.types b/tests/baselines/reference/capturedVarInLoop.types index 37d78df8ba30a..7f0b4c53fe1ff 100644 --- a/tests/baselines/reference/capturedVarInLoop.types +++ b/tests/baselines/reference/capturedVarInLoop.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/capturedVarInLoop.ts === +//// [tests/cases/compiler/capturedVarInLoop.ts] //// + +=== capturedVarInLoop.ts === for (var i = 0; i < 10; i++) { >i : number >0 : 0 diff --git a/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.symbols b/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.symbols index 2b5c3accb2712..cdbe3125967b9 100644 --- a/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.symbols +++ b/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/Uppercased_Dir/src/index.ts === +//// [tests/cases/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.ts] //// + +=== Uppercased_Dir/src/index.ts === import { TypeB } from './type-b'; >TypeB : Symbol(TypeB, Decl(index.ts, 0, 8)) @@ -12,7 +14,7 @@ export class Broken { >TypeB : Symbol(TypeB, Decl(index.ts, 0, 8)) } } -=== tests/cases/compiler/Uppercased_Dir/src/type-b.ts === +=== Uppercased_Dir/src/type-b.ts === import { Merge } from './types'; >Merge : Symbol(Merge, Decl(type-b.ts, 0, 8)) @@ -28,14 +30,14 @@ export type TypeB = Mergeb : Symbol(b, Decl(type-b.ts, 3, 34)) }>; -=== tests/cases/compiler/Uppercased_Dir/src/type-a.ts === +=== Uppercased_Dir/src/type-a.ts === export type TypeA = { >TypeA : Symbol(TypeA, Decl(type-a.ts, 0, 0)) a: string; >a : Symbol(a, Decl(type-a.ts, 0, 21)) } -=== tests/cases/compiler/Uppercased_Dir/src/types.ts === +=== Uppercased_Dir/src/types.ts === export type Merge = T & U; >Merge : Symbol(Merge, Decl(types.ts, 0, 0)) >T : Symbol(T, Decl(types.ts, 0, 18)) diff --git a/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types b/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types index c59089053583e..88f33f8900f66 100644 --- a/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types +++ b/tests/baselines/reference/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/Uppercased_Dir/src/index.ts === +//// [tests/cases/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.ts] //// + +=== Uppercased_Dir/src/index.ts === import { TypeB } from './type-b'; >TypeB : any @@ -13,7 +15,7 @@ export class Broken { >{ } : {} } } -=== tests/cases/compiler/Uppercased_Dir/src/type-b.ts === +=== Uppercased_Dir/src/type-b.ts === import { Merge } from './types'; >Merge : any @@ -27,14 +29,14 @@ export type TypeB = Mergeb : string }>; -=== tests/cases/compiler/Uppercased_Dir/src/type-a.ts === +=== Uppercased_Dir/src/type-a.ts === export type TypeA = { >TypeA : { a: string; } a: string; >a : string } -=== tests/cases/compiler/Uppercased_Dir/src/types.ts === +=== Uppercased_Dir/src/types.ts === export type Merge = T & U; >Merge : Merge diff --git a/tests/baselines/reference/castExpressionParentheses.js b/tests/baselines/reference/castExpressionParentheses.js index b1f4507f98292..8d2f0a15ddf98 100644 --- a/tests/baselines/reference/castExpressionParentheses.js +++ b/tests/baselines/reference/castExpressionParentheses.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castExpressionParentheses.ts] //// + //// [castExpressionParentheses.ts] declare var a; diff --git a/tests/baselines/reference/castExpressionParentheses.symbols b/tests/baselines/reference/castExpressionParentheses.symbols index ebc326e0a854b..6d577c371c5b6 100644 --- a/tests/baselines/reference/castExpressionParentheses.symbols +++ b/tests/baselines/reference/castExpressionParentheses.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castExpressionParentheses.ts === +//// [tests/cases/compiler/castExpressionParentheses.ts] //// + +=== castExpressionParentheses.ts === declare var a; >a : Symbol(a, Decl(castExpressionParentheses.ts, 0, 11)) diff --git a/tests/baselines/reference/castExpressionParentheses.types b/tests/baselines/reference/castExpressionParentheses.types index 489ae09889a81..c27af504f8935 100644 --- a/tests/baselines/reference/castExpressionParentheses.types +++ b/tests/baselines/reference/castExpressionParentheses.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castExpressionParentheses.ts === +//// [tests/cases/compiler/castExpressionParentheses.ts] //// + +=== castExpressionParentheses.ts === declare var a; >a : any diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js index e96b93bae8506..e42bd801c4f6f 100644 --- a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts] //// + //// [castFunctionExpressionShouldBeParenthesized.ts] (function a() { } as any)().foo() diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols index 975a9480c3ccd..e37a347a5b8f3 100644 --- a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts === +//// [tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts] //// + +=== castFunctionExpressionShouldBeParenthesized.ts === (function a() { } as any)().foo() >a : Symbol(a, Decl(castFunctionExpressionShouldBeParenthesized.ts, 0, 1)) diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types index 337c5163ff26d..7b19d72500676 100644 --- a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts === +//// [tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts] //// + +=== castFunctionExpressionShouldBeParenthesized.ts === (function a() { } as any)().foo() >(function a() { } as any)().foo() : any >(function a() { } as any)().foo : any diff --git a/tests/baselines/reference/castNewObjectBug.js b/tests/baselines/reference/castNewObjectBug.js index ccf7c117e1a2d..54fcd26568be7 100644 --- a/tests/baselines/reference/castNewObjectBug.js +++ b/tests/baselines/reference/castNewObjectBug.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castNewObjectBug.ts] //// + //// [castNewObjectBug.ts] interface Foo { } var xx = new Object(); diff --git a/tests/baselines/reference/castNewObjectBug.symbols b/tests/baselines/reference/castNewObjectBug.symbols index 7fca8148fb022..b5d0df0098c1f 100644 --- a/tests/baselines/reference/castNewObjectBug.symbols +++ b/tests/baselines/reference/castNewObjectBug.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castNewObjectBug.ts === +//// [tests/cases/compiler/castNewObjectBug.ts] //// + +=== castNewObjectBug.ts === interface Foo { } >Foo : Symbol(Foo, Decl(castNewObjectBug.ts, 0, 0)) diff --git a/tests/baselines/reference/castNewObjectBug.types b/tests/baselines/reference/castNewObjectBug.types index bbafb8ff9c4c2..ff09ff556e7d1 100644 --- a/tests/baselines/reference/castNewObjectBug.types +++ b/tests/baselines/reference/castNewObjectBug.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castNewObjectBug.ts === +//// [tests/cases/compiler/castNewObjectBug.ts] //// + +=== castNewObjectBug.ts === interface Foo { } var xx = new Object(); >xx : Foo diff --git a/tests/baselines/reference/castOfAwait.js b/tests/baselines/reference/castOfAwait.js index c00c1b028f4bf..7450b64f47233 100644 --- a/tests/baselines/reference/castOfAwait.js +++ b/tests/baselines/reference/castOfAwait.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castOfAwait.ts] //// + //// [castOfAwait.ts] async function f() { await 0; diff --git a/tests/baselines/reference/castOfAwait.symbols b/tests/baselines/reference/castOfAwait.symbols index 574ee21f7731b..756b94c173768 100644 --- a/tests/baselines/reference/castOfAwait.symbols +++ b/tests/baselines/reference/castOfAwait.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castOfAwait.ts === +//// [tests/cases/compiler/castOfAwait.ts] //// + +=== castOfAwait.ts === async function f() { >f : Symbol(f, Decl(castOfAwait.ts, 0, 0)) diff --git a/tests/baselines/reference/castOfAwait.types b/tests/baselines/reference/castOfAwait.types index 34934b8912885..4e65969a174a6 100644 --- a/tests/baselines/reference/castOfAwait.types +++ b/tests/baselines/reference/castOfAwait.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castOfAwait.ts === +//// [tests/cases/compiler/castOfAwait.ts] //// + +=== castOfAwait.ts === async function f() { >f : () => Promise diff --git a/tests/baselines/reference/castOfYield.errors.txt b/tests/baselines/reference/castOfYield.errors.txt index 0d40a4dcd987d..4215481e78425 100644 --- a/tests/baselines/reference/castOfYield.errors.txt +++ b/tests/baselines/reference/castOfYield.errors.txt @@ -1,9 +1,9 @@ error TS2318: Cannot find global type 'IterableIterator'. -tests/cases/compiler/castOfYield.ts(4,14): error TS1109: Expression expected. +castOfYield.ts(4,14): error TS1109: Expression expected. !!! error TS2318: Cannot find global type 'IterableIterator'. -==== tests/cases/compiler/castOfYield.ts (1 errors) ==== +==== castOfYield.ts (1 errors) ==== function* f() { (yield 0); // Unlike await, yield is not allowed to appear in a simple unary expression. diff --git a/tests/baselines/reference/castOfYield.js b/tests/baselines/reference/castOfYield.js index 0af321306cdd6..0392eb7e354fa 100644 --- a/tests/baselines/reference/castOfYield.js +++ b/tests/baselines/reference/castOfYield.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castOfYield.ts] //// + //// [castOfYield.ts] function* f() { (yield 0); diff --git a/tests/baselines/reference/castOfYield.symbols b/tests/baselines/reference/castOfYield.symbols index b4b495a0a3639..ff4328ea258ff 100644 --- a/tests/baselines/reference/castOfYield.symbols +++ b/tests/baselines/reference/castOfYield.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castOfYield.ts === +//// [tests/cases/compiler/castOfYield.ts] //// + +=== castOfYield.ts === function* f() { >f : Symbol(f, Decl(castOfYield.ts, 0, 0)) diff --git a/tests/baselines/reference/castOfYield.types b/tests/baselines/reference/castOfYield.types index c005205609196..137fc068e2767 100644 --- a/tests/baselines/reference/castOfYield.types +++ b/tests/baselines/reference/castOfYield.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castOfYield.ts === +//// [tests/cases/compiler/castOfYield.ts] //// + +=== castOfYield.ts === function* f() { >f : () => {} diff --git a/tests/baselines/reference/castParentheses.js b/tests/baselines/reference/castParentheses.js index e5ca16f0823eb..a00bfbb65f62e 100644 --- a/tests/baselines/reference/castParentheses.js +++ b/tests/baselines/reference/castParentheses.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castParentheses.ts] //// + //// [castParentheses.ts] class a { static b: any; diff --git a/tests/baselines/reference/castParentheses.symbols b/tests/baselines/reference/castParentheses.symbols index 0ef44823f2dde..196305d7a3bfb 100644 --- a/tests/baselines/reference/castParentheses.symbols +++ b/tests/baselines/reference/castParentheses.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castParentheses.ts === +//// [tests/cases/compiler/castParentheses.ts] //// + +=== castParentheses.ts === class a { >a : Symbol(a, Decl(castParentheses.ts, 0, 0)) diff --git a/tests/baselines/reference/castParentheses.types b/tests/baselines/reference/castParentheses.types index f65a1d8f74813..45252c4326dba 100644 --- a/tests/baselines/reference/castParentheses.types +++ b/tests/baselines/reference/castParentheses.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castParentheses.ts === +//// [tests/cases/compiler/castParentheses.ts] //// + +=== castParentheses.ts === class a { >a : a diff --git a/tests/baselines/reference/castTest.js b/tests/baselines/reference/castTest.js index 930086bdd9464..02412d44beded 100644 --- a/tests/baselines/reference/castTest.js +++ b/tests/baselines/reference/castTest.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/castTest.ts] //// + //// [castTest.ts] var x : any = 0; var z = x; diff --git a/tests/baselines/reference/castTest.symbols b/tests/baselines/reference/castTest.symbols index 9d03cb008ba4d..6c4fd6d8d36cb 100644 --- a/tests/baselines/reference/castTest.symbols +++ b/tests/baselines/reference/castTest.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castTest.ts === +//// [tests/cases/compiler/castTest.ts] //// + +=== castTest.ts === var x : any = 0; >x : Symbol(x, Decl(castTest.ts, 0, 3)) diff --git a/tests/baselines/reference/castTest.types b/tests/baselines/reference/castTest.types index 1e7e89868e280..b9c2938ee28b6 100644 --- a/tests/baselines/reference/castTest.types +++ b/tests/baselines/reference/castTest.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/castTest.ts === +//// [tests/cases/compiler/castTest.ts] //// + +=== castTest.ts === var x : any = 0; >x : any >0 : 0 diff --git a/tests/baselines/reference/castingTuple.errors.txt b/tests/baselines/reference/castingTuple.errors.txt index 9df7953c0a2ff..16cbceb474896 100644 --- a/tests/baselines/reference/castingTuple.errors.txt +++ b/tests/baselines/reference/castingTuple.errors.txt @@ -1,22 +1,22 @@ -tests/cases/conformance/types/tuple/castingTuple.ts(13,23): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +castingTuple.ts(13,23): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Source has 2 element(s) but target requires 3. -tests/cases/conformance/types/tuple/castingTuple.ts(14,15): error TS2352: Conversion of type '[number, string, boolean]' to type '[number, string]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +castingTuple.ts(14,15): error TS2352: Conversion of type '[number, string, boolean]' to type '[number, string]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Source has 3 element(s) but target allows only 2. -tests/cases/conformance/types/tuple/castingTuple.ts(15,14): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -tests/cases/conformance/types/tuple/castingTuple.ts(18,21): error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +castingTuple.ts(15,14): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +castingTuple.ts(18,21): error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Source has 2 element(s) but target requires 3. -tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2493: Tuple type '[C, D, A]' of length '3' has no element at index '5'. -tests/cases/conformance/types/tuple/castingTuple.ts(30,10): error TS2352: Conversion of type '[number, string]' to type '[number, number]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +castingTuple.ts(20,33): error TS2493: Tuple type '[C, D, A]' of length '3' has no element at index '5'. +castingTuple.ts(30,10): error TS2352: Conversion of type '[number, string]' to type '[number, number]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type at position 1 in source is not compatible with type at position 1 in target. Type 'string' is not comparable to type 'number'. -tests/cases/conformance/types/tuple/castingTuple.ts(31,10): error TS2352: Conversion of type '[C, D]' to type '[A, I]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +castingTuple.ts(31,10): error TS2352: Conversion of type '[C, D]' to type '[A, I]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type at position 0 in source is not compatible with type at position 0 in target. Property 'a' is missing in type 'C' but required in type 'A'. -tests/cases/conformance/types/tuple/castingTuple.ts(32,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'. -tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot find name 't4'. +castingTuple.ts(32,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'. +castingTuple.ts(33,1): error TS2304: Cannot find name 't4'. -==== tests/cases/conformance/types/tuple/castingTuple.ts (9 errors) ==== +==== castingTuple.ts (9 errors) ==== interface I { } class A { a = 10; } class C implements I { c }; @@ -69,11 +69,11 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot !!! error TS2352: Conversion of type '[C, D]' to type '[A, I]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. !!! error TS2352: Type at position 0 in source is not compatible with type at position 0 in target. !!! error TS2352: Property 'a' is missing in type 'C' but required in type 'A'. -!!! related TS2728 tests/cases/conformance/types/tuple/castingTuple.ts:2:11: 'a' is declared here. +!!! related TS2728 castingTuple.ts:2:11: 'a' is declared here. var array1 = numStrTuple; ~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'array1' must be of type '{}[]', but here has type 'number[]'. -!!! related TS6203 tests/cases/conformance/types/tuple/castingTuple.ts:23:5: 'array1' was also declared here. +!!! related TS6203 castingTuple.ts:23:5: 'array1' was also declared here. t4[2] = 10; ~~ !!! error TS2304: Cannot find name 't4'. diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 85ed6ff3757a8..247bfff81bfdd 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/types/tuple/castingTuple.ts] //// + //// [castingTuple.ts] interface I { } class A { a = 10; } diff --git a/tests/baselines/reference/castingTuple.symbols b/tests/baselines/reference/castingTuple.symbols index 3cf5face2a656..9f576a1155c3b 100644 --- a/tests/baselines/reference/castingTuple.symbols +++ b/tests/baselines/reference/castingTuple.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/tuple/castingTuple.ts === +//// [tests/cases/conformance/types/tuple/castingTuple.ts] //// + +=== castingTuple.ts === interface I { } >I : Symbol(I, Decl(castingTuple.ts, 0, 0)) diff --git a/tests/baselines/reference/castingTuple.types b/tests/baselines/reference/castingTuple.types index 199c28149c7bf..fe2a389f0562c 100644 --- a/tests/baselines/reference/castingTuple.types +++ b/tests/baselines/reference/castingTuple.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/types/tuple/castingTuple.ts === +//// [tests/cases/conformance/types/tuple/castingTuple.ts] //// + +=== castingTuple.ts === interface I { } class A { a = 10; } >A : A diff --git a/tests/baselines/reference/catch.js b/tests/baselines/reference/catch.js index d3babf1f31d0e..2539bad1eaa48 100644 --- a/tests/baselines/reference/catch.js +++ b/tests/baselines/reference/catch.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/catch.ts] //// + //// [catch.ts] function f() { try {} catch(e) { } diff --git a/tests/baselines/reference/catch.symbols b/tests/baselines/reference/catch.symbols index 155d262af5889..575fa26f2666c 100644 --- a/tests/baselines/reference/catch.symbols +++ b/tests/baselines/reference/catch.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/catch.ts === +//// [tests/cases/compiler/catch.ts] //// + +=== catch.ts === function f() { >f : Symbol(f, Decl(catch.ts, 0, 0)) diff --git a/tests/baselines/reference/catch.types b/tests/baselines/reference/catch.types index bb0b2adbefebd..aa1e448e73d01 100644 --- a/tests/baselines/reference/catch.types +++ b/tests/baselines/reference/catch.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/catch.ts === +//// [tests/cases/compiler/catch.ts] //// + +=== catch.ts === function f() { >f : () => void diff --git a/tests/baselines/reference/catchClauseWithInitializer1.errors.txt b/tests/baselines/reference/catchClauseWithInitializer1.errors.txt index b13644f4d8396..ac701ed509d95 100644 --- a/tests/baselines/reference/catchClauseWithInitializer1.errors.txt +++ b/tests/baselines/reference/catchClauseWithInitializer1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/catchClauseWithInitializer1.ts(3,12): error TS1197: Catch clause variable cannot have an initializer. +catchClauseWithInitializer1.ts(3,12): error TS1197: Catch clause variable cannot have an initializer. -==== tests/cases/compiler/catchClauseWithInitializer1.ts (1 errors) ==== +==== catchClauseWithInitializer1.ts (1 errors) ==== try { } catch (e = 1) { diff --git a/tests/baselines/reference/catchClauseWithInitializer1.js b/tests/baselines/reference/catchClauseWithInitializer1.js index 5cb89a567f18f..7ddb817e90a81 100644 --- a/tests/baselines/reference/catchClauseWithInitializer1.js +++ b/tests/baselines/reference/catchClauseWithInitializer1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/catchClauseWithInitializer1.ts] //// + //// [catchClauseWithInitializer1.ts] try { } diff --git a/tests/baselines/reference/catchClauseWithInitializer1.symbols b/tests/baselines/reference/catchClauseWithInitializer1.symbols index 6f39eb6b24446..fefcc277f9cd0 100644 --- a/tests/baselines/reference/catchClauseWithInitializer1.symbols +++ b/tests/baselines/reference/catchClauseWithInitializer1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/catchClauseWithInitializer1.ts === +//// [tests/cases/compiler/catchClauseWithInitializer1.ts] //// + +=== catchClauseWithInitializer1.ts === try { } catch (e = 1) { diff --git a/tests/baselines/reference/catchClauseWithInitializer1.types b/tests/baselines/reference/catchClauseWithInitializer1.types index 68fe7ce286a08..5544c1345912f 100644 --- a/tests/baselines/reference/catchClauseWithInitializer1.types +++ b/tests/baselines/reference/catchClauseWithInitializer1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/catchClauseWithInitializer1.ts === +//// [tests/cases/compiler/catchClauseWithInitializer1.ts] //// + +=== catchClauseWithInitializer1.ts === try { } catch (e = 1) { diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt index 0ab7fa4399a94..9d982bca4f517 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(17,36): error TS2339: Property 'foo' does not exist on type 'unknown'. -tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(18,37): error TS2339: Property 'foo' does not exist on type 'unknown'. -tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(19,23): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. -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(36,22): error TS2339: Property 'x' does not exist on type '{}'. -tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(37,22): error TS2339: Property 'x' does not exist on type '{}'. -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. +catchClauseWithTypeAnnotation.ts(17,36): error TS2339: Property 'foo' does not exist on type 'unknown'. +catchClauseWithTypeAnnotation.ts(18,37): error TS2339: Property 'foo' does not exist on type 'unknown'. +catchClauseWithTypeAnnotation.ts(19,23): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. +catchClauseWithTypeAnnotation.ts(20,23): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. +catchClauseWithTypeAnnotation.ts(29,29): error TS2492: Cannot redeclare identifier 'x' in catch clause. +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'. +catchClauseWithTypeAnnotation.ts(36,22): error TS2339: Property 'x' does not exist on type '{}'. +catchClauseWithTypeAnnotation.ts(37,22): error TS2339: Property 'x' does not exist on type '{}'. +catchClauseWithTypeAnnotation.ts(38,27): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. +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 (10 errors) ==== +==== catchClauseWithTypeAnnotation.ts (10 errors) ==== type any1 = any; type unknown1 = unknown; @@ -53,7 +53,7 @@ tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.t try { } catch (x) { var x: string; } ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'boolean', but here has type 'string'. -!!! related TS6203 tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts:4:13: 'x' was also declared here. +!!! related TS6203 catchClauseWithTypeAnnotation.ts:4:13: 'x' was also declared here. try { } catch (x) { var x: boolean; } try { } catch ({ x }) { } // should be OK diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.js b/tests/baselines/reference/catchClauseWithTypeAnnotation.js index 06de0b2667287..f93af26df239e 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.js +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts] //// + //// [catchClauseWithTypeAnnotation.ts] type any1 = any; type unknown1 = unknown; diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols b/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols index 062d98db83d8b..1ab4aca7f1ef6 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts === +//// [tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts] //// + +=== catchClauseWithTypeAnnotation.ts === type any1 = any; >any1 : Symbol(any1, Decl(catchClauseWithTypeAnnotation.ts, 0, 0)) diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.types b/tests/baselines/reference/catchClauseWithTypeAnnotation.types index 03eb73cfd268e..3edc197967527 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.types +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts === +//// [tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts] //// + +=== catchClauseWithTypeAnnotation.ts === type any1 = any; >any1 : any diff --git a/tests/baselines/reference/cf.errors.txt b/tests/baselines/reference/cf.errors.txt index 910ffe5d88d37..2dd28cd018473 100644 --- a/tests/baselines/reference/cf.errors.txt +++ b/tests/baselines/reference/cf.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/cf.ts(9,13): error TS7027: Unreachable code detected. -tests/cases/compiler/cf.ts(21,17): error TS7027: Unreachable code detected. -tests/cases/compiler/cf.ts(32,13): error TS7027: Unreachable code detected. -tests/cases/compiler/cf.ts(36,13): error TS7027: Unreachable code detected. +cf.ts(9,13): error TS7027: Unreachable code detected. +cf.ts(21,17): error TS7027: Unreachable code detected. +cf.ts(32,13): error TS7027: Unreachable code detected. +cf.ts(36,13): error TS7027: Unreachable code detected. -==== tests/cases/compiler/cf.ts (4 errors) ==== +==== cf.ts (4 errors) ==== function f() { var z; var x=10; diff --git a/tests/baselines/reference/cf.js b/tests/baselines/reference/cf.js index 7e95dca1944cc..025f7e4cd88f7 100644 --- a/tests/baselines/reference/cf.js +++ b/tests/baselines/reference/cf.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/cf.ts] //// + //// [cf.ts] function f() { var z; diff --git a/tests/baselines/reference/cf.symbols b/tests/baselines/reference/cf.symbols index d1f1c8392d1f8..ff3661ab30e5d 100644 --- a/tests/baselines/reference/cf.symbols +++ b/tests/baselines/reference/cf.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cf.ts === +//// [tests/cases/compiler/cf.ts] //// + +=== cf.ts === function f() { >f : Symbol(f, Decl(cf.ts, 0, 0)) diff --git a/tests/baselines/reference/cf.types b/tests/baselines/reference/cf.types index ba71e388dbdf1..5cb0833126508 100644 --- a/tests/baselines/reference/cf.types +++ b/tests/baselines/reference/cf.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/cf.ts === +//// [tests/cases/compiler/cf.ts] //// + +=== cf.ts === function f() { >f : () => void diff --git a/tests/baselines/reference/chained.symbols b/tests/baselines/reference/chained.symbols index 228befe74f543..b93742ba3183b 100644 --- a/tests/baselines/reference/chained.symbols +++ b/tests/baselines/reference/chained.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/typeOnly/chained.ts] //// + === /a.ts === class A { a!: string } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/chained.types b/tests/baselines/reference/chained.types index c694bceffd5e1..f0ec956b4106c 100644 --- a/tests/baselines/reference/chained.types +++ b/tests/baselines/reference/chained.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/typeOnly/chained.ts] //// + === /a.ts === class A { a!: string } >A : A diff --git a/tests/baselines/reference/chained2.symbols b/tests/baselines/reference/chained2.symbols index d4cf1c245ae8d..5b4d9aa9b6cd6 100644 --- a/tests/baselines/reference/chained2.symbols +++ b/tests/baselines/reference/chained2.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/typeOnly/chained2.ts] //// + === /a.ts === class A { a!: string } >A : Symbol(A, Decl(a.ts, 0, 0)) diff --git a/tests/baselines/reference/chained2.types b/tests/baselines/reference/chained2.types index d3b12f0f25c8f..18cd400749ce2 100644 --- a/tests/baselines/reference/chained2.types +++ b/tests/baselines/reference/chained2.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/externalModules/typeOnly/chained2.ts] //// + === /a.ts === class A { a!: string } >A : A diff --git a/tests/baselines/reference/chainedAssignment1.errors.txt b/tests/baselines/reference/chainedAssignment1.errors.txt index 32ae0f63dc751..fad32e7ea26de 100644 --- a/tests/baselines/reference/chainedAssignment1.errors.txt +++ b/tests/baselines/reference/chainedAssignment1.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/chainedAssignment1.ts(21,1): error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. -tests/cases/compiler/chainedAssignment1.ts(21,6): error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b -tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2322: Type 'Z' is not assignable to type 'Y'. +chainedAssignment1.ts(21,1): error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. +chainedAssignment1.ts(21,6): error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b +chainedAssignment1.ts(22,1): error TS2322: Type 'Z' is not assignable to type 'Y'. -==== tests/cases/compiler/chainedAssignment1.ts (3 errors) ==== +==== chainedAssignment1.ts (3 errors) ==== class X { constructor(public z) { } a: number; @@ -27,7 +27,7 @@ tests/cases/compiler/chainedAssignment1.ts(22,1): error TS2322: Type 'Z' is not c1 = c2 = c3; // a bug made this not report the same error as below ~~ !!! error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. -!!! related TS2728 tests/cases/compiler/chainedAssignment1.ts:3:5: 'a' is declared here. +!!! related TS2728 chainedAssignment1.ts:3:5: 'a' is declared here. ~~ !!! error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b c2 = c3; // Error TS111: Cannot convert Z to Y diff --git a/tests/baselines/reference/chainedAssignment1.js b/tests/baselines/reference/chainedAssignment1.js index 074165188ba76..1b45fda503a94 100644 --- a/tests/baselines/reference/chainedAssignment1.js +++ b/tests/baselines/reference/chainedAssignment1.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedAssignment1.ts] //// + //// [chainedAssignment1.ts] class X { constructor(public z) { } diff --git a/tests/baselines/reference/chainedAssignment1.symbols b/tests/baselines/reference/chainedAssignment1.symbols index f3ee78145820b..2c37e014a5f91 100644 --- a/tests/baselines/reference/chainedAssignment1.symbols +++ b/tests/baselines/reference/chainedAssignment1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignment1.ts === +//// [tests/cases/compiler/chainedAssignment1.ts] //// + +=== chainedAssignment1.ts === class X { >X : Symbol(X, Decl(chainedAssignment1.ts, 0, 0)) diff --git a/tests/baselines/reference/chainedAssignment1.types b/tests/baselines/reference/chainedAssignment1.types index 7517f34fb5197..2aa2db3109c2c 100644 --- a/tests/baselines/reference/chainedAssignment1.types +++ b/tests/baselines/reference/chainedAssignment1.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignment1.ts === +//// [tests/cases/compiler/chainedAssignment1.ts] //// + +=== chainedAssignment1.ts === class X { >X : X diff --git a/tests/baselines/reference/chainedAssignment2.js b/tests/baselines/reference/chainedAssignment2.js index 482d97da80947..7a92c942d7f1f 100644 --- a/tests/baselines/reference/chainedAssignment2.js +++ b/tests/baselines/reference/chainedAssignment2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedAssignment2.ts] //// + //// [chainedAssignment2.ts] var a: string; var b: number; diff --git a/tests/baselines/reference/chainedAssignment2.symbols b/tests/baselines/reference/chainedAssignment2.symbols index f8e82af0a82fa..c894f6a30ac34 100644 --- a/tests/baselines/reference/chainedAssignment2.symbols +++ b/tests/baselines/reference/chainedAssignment2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignment2.ts === +//// [tests/cases/compiler/chainedAssignment2.ts] //// + +=== chainedAssignment2.ts === var a: string; >a : Symbol(a, Decl(chainedAssignment2.ts, 0, 3)) diff --git a/tests/baselines/reference/chainedAssignment2.types b/tests/baselines/reference/chainedAssignment2.types index 03f3ff3f7e279..d7cf5d0964c94 100644 --- a/tests/baselines/reference/chainedAssignment2.types +++ b/tests/baselines/reference/chainedAssignment2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignment2.ts === +//// [tests/cases/compiler/chainedAssignment2.ts] //// + +=== chainedAssignment2.ts === var a: string; >a : string diff --git a/tests/baselines/reference/chainedAssignment3.errors.txt b/tests/baselines/reference/chainedAssignment3.errors.txt index 16f6b2fe6529b..b33f6d87a2c97 100644 --- a/tests/baselines/reference/chainedAssignment3.errors.txt +++ b/tests/baselines/reference/chainedAssignment3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/chainedAssignment3.ts(18,1): error TS2741: Property 'value' is missing in type 'A' but required in type 'B'. -tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2322: Type 'A' is not assignable to type 'B'. +chainedAssignment3.ts(18,1): error TS2741: Property 'value' is missing in type 'A' but required in type 'B'. +chainedAssignment3.ts(19,5): error TS2322: Type 'A' is not assignable to type 'B'. -==== tests/cases/compiler/chainedAssignment3.ts (2 errors) ==== +==== chainedAssignment3.ts (2 errors) ==== class A { id: number; } @@ -23,7 +23,7 @@ tests/cases/compiler/chainedAssignment3.ts(19,5): error TS2322: Type 'A' is not b = a = new A(); ~ !!! error TS2741: Property 'value' is missing in type 'A' but required in type 'B'. -!!! related TS2728 tests/cases/compiler/chainedAssignment3.ts:6:5: 'value' is declared here. +!!! related TS2728 chainedAssignment3.ts:6:5: 'value' is declared here. a = b = new A(); ~ !!! error TS2322: Type 'A' is not assignable to type 'B'. diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 5b642013c6143..d08a5426f492f 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedAssignment3.ts] //// + //// [chainedAssignment3.ts] class A { id: number; diff --git a/tests/baselines/reference/chainedAssignment3.symbols b/tests/baselines/reference/chainedAssignment3.symbols index 5dd02828f83f3..f4aadbb7e895d 100644 --- a/tests/baselines/reference/chainedAssignment3.symbols +++ b/tests/baselines/reference/chainedAssignment3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignment3.ts === +//// [tests/cases/compiler/chainedAssignment3.ts] //// + +=== chainedAssignment3.ts === class A { >A : Symbol(A, Decl(chainedAssignment3.ts, 0, 0)) diff --git a/tests/baselines/reference/chainedAssignment3.types b/tests/baselines/reference/chainedAssignment3.types index 963dd79156af6..b357fdf61d24f 100644 --- a/tests/baselines/reference/chainedAssignment3.types +++ b/tests/baselines/reference/chainedAssignment3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignment3.ts === +//// [tests/cases/compiler/chainedAssignment3.ts] //// + +=== chainedAssignment3.ts === class A { >A : A diff --git a/tests/baselines/reference/chainedAssignmentChecking.errors.txt b/tests/baselines/reference/chainedAssignmentChecking.errors.txt index 567a599b63ee5..fffb2e7a4237a 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.errors.txt +++ b/tests/baselines/reference/chainedAssignmentChecking.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/chainedAssignmentChecking.ts(21,1): error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. -tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b +chainedAssignmentChecking.ts(21,1): error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. +chainedAssignmentChecking.ts(21,6): error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b -==== tests/cases/compiler/chainedAssignmentChecking.ts (2 errors) ==== +==== chainedAssignmentChecking.ts (2 errors) ==== class X { constructor(public z) { } a: number; @@ -26,7 +26,7 @@ tests/cases/compiler/chainedAssignmentChecking.ts(21,6): error TS2739: Type 'Z' c1 = c2 = c3; // Should be error ~~ !!! error TS2741: Property 'a' is missing in type 'Z' but required in type 'X'. -!!! related TS2728 tests/cases/compiler/chainedAssignmentChecking.ts:3:3: 'a' is declared here. +!!! related TS2728 chainedAssignmentChecking.ts:3:3: 'a' is declared here. ~~ !!! error TS2739: Type 'Z' is missing the following properties from type 'Y': a, b \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignmentChecking.js b/tests/baselines/reference/chainedAssignmentChecking.js index 9ea4020199017..f5334ad6bcae8 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.js +++ b/tests/baselines/reference/chainedAssignmentChecking.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedAssignmentChecking.ts] //// + //// [chainedAssignmentChecking.ts] class X { constructor(public z) { } diff --git a/tests/baselines/reference/chainedAssignmentChecking.symbols b/tests/baselines/reference/chainedAssignmentChecking.symbols index 8b23acb7a2bd1..b3c6af9ddddde 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.symbols +++ b/tests/baselines/reference/chainedAssignmentChecking.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignmentChecking.ts === +//// [tests/cases/compiler/chainedAssignmentChecking.ts] //// + +=== chainedAssignmentChecking.ts === class X { >X : Symbol(X, Decl(chainedAssignmentChecking.ts, 0, 0)) diff --git a/tests/baselines/reference/chainedAssignmentChecking.types b/tests/baselines/reference/chainedAssignmentChecking.types index b9e8529f61725..a39fcdca61634 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.types +++ b/tests/baselines/reference/chainedAssignmentChecking.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedAssignmentChecking.ts === +//// [tests/cases/compiler/chainedAssignmentChecking.ts] //// + +=== chainedAssignmentChecking.ts === class X { >X : X diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 777130d8893b6..6679063d1a3bf 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,64): error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': z, y +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,64): error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': z, y -==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (2 errors) ==== +==== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (2 errors) ==== class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { @@ -24,8 +24,8 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ~~~~~ !!! error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. -!!! related TS2728 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. +!!! related TS2728 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. +!!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. ~~~~~ !!! error TS2739: Type 'A' is missing the following properties from type 'C': z, y -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file +!!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index cf4c12582054d..76497857f99a0 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts] //// + //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts] class Chain { constructor(public value: T) { } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols index 164005d035c32..cfd91ee13c72b 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts === +//// [tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts] //// + +=== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts === class Chain { >Chain : Symbol(Chain, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 0, 0)) >T : Symbol(T, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts, 0, 12)) diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types index 394a3f241dd70..9c29dcef1d993 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts === +//// [tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts] //// + +=== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts === class Chain { >Chain : Chain diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index a778f5b4b2a1d..321b5a897632b 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(7,49): error TS2322: Type 'T' is not assignable to type 'S'. +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(7,49): error TS2322: Type 'T' is not assignable to type 'S'. 'S' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(10,35): error TS2322: Type 'T' is not assignable to type 'S'. +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(10,35): error TS2322: Type 'T' is not assignable to type 'S'. 'S' could be instantiated with an arbitrary type which could be unrelated to 'T'. -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2322: Type 'string' is not assignable to type 'number'. +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(32,9): error TS2322: Type 'string' is not assignable to type 'number'. +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(36,9): error TS2322: Type 'string' is not assignable to type 'number'. +chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts(37,9): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts (5 errors) ==== +==== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts (5 errors) ==== class Chain { constructor(public value: T) { } then(cb: (x: T) => S): Chain { @@ -18,16 +18,16 @@ tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParamete ~ !!! error TS2322: Type 'T' is not assignable to type 'S'. !!! error TS2322: 'S' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13: This type parameter might need an `extends S` constraint. -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:27: The expected type comes from the return type of this signature. +!!! related TS2208 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13: This type parameter might need an `extends S` constraint. +!!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:27: The expected type comes from the return type of this signature. // But error to try to climb up the chain (new Chain(s)).then(ss => t); ~ !!! error TS2322: Type 'T' is not assignable to type 'S'. !!! error TS2322: 'S' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! related TS2208 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13: This type parameter might need an `extends S` constraint. -!!! related TS6502 tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:27: The expected type comes from the return type of this signature. +!!! related TS2208 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:1:13: This type parameter might need an `extends S` constraint. +!!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts:3:27: The expected type comes from the return type of this signature. // Staying at T or S should be fine (new Chain(t)).then(tt => t).then(tt => t).then(tt => t); diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js index 15c723524807a..a4019d31a3754 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts] //// + //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts] class Chain { constructor(public value: T) { } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols index e8affe5f84fbc..471634c5f6fe5 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts === +//// [tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts] //// + +=== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts === class Chain { >Chain : Symbol(Chain, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 0, 0)) >T : Symbol(T, Decl(chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts, 0, 12)) diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types index 15070cd55c249..81e6e440584fa 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts === +//// [tests/cases/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts] //// + +=== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.ts === class Chain { >Chain : Chain diff --git a/tests/baselines/reference/chainedImportAlias.symbols b/tests/baselines/reference/chainedImportAlias.symbols index d10e22af1199f..e0fb8fe612fa8 100644 --- a/tests/baselines/reference/chainedImportAlias.symbols +++ b/tests/baselines/reference/chainedImportAlias.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedImportAlias_file1.ts === +//// [tests/cases/compiler/chainedImportAlias.ts] //// + +=== chainedImportAlias_file1.ts === import x = require('./chainedImportAlias_file0'); >x : Symbol(x, Decl(chainedImportAlias_file1.ts, 0, 0)) @@ -13,7 +15,7 @@ y.m.foo(); >m : Symbol(x.m, Decl(chainedImportAlias_file0.ts, 0, 0)) >foo : Symbol(x.m.foo, Decl(chainedImportAlias_file0.ts, 0, 17)) -=== tests/cases/compiler/chainedImportAlias_file0.ts === +=== chainedImportAlias_file0.ts === export module m { >m : Symbol(m, Decl(chainedImportAlias_file0.ts, 0, 0)) diff --git a/tests/baselines/reference/chainedImportAlias.types b/tests/baselines/reference/chainedImportAlias.types index db06c833d0b0a..c6e70e4691a75 100644 --- a/tests/baselines/reference/chainedImportAlias.types +++ b/tests/baselines/reference/chainedImportAlias.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedImportAlias_file1.ts === +//// [tests/cases/compiler/chainedImportAlias.ts] //// + +=== chainedImportAlias_file1.ts === import x = require('./chainedImportAlias_file0'); >x : typeof x @@ -14,7 +16,7 @@ y.m.foo(); >m : typeof x.m >foo : () => void -=== tests/cases/compiler/chainedImportAlias_file0.ts === +=== chainedImportAlias_file0.ts === export module m { >m : typeof m diff --git a/tests/baselines/reference/chainedPrototypeAssignment.errors.txt b/tests/baselines/reference/chainedPrototypeAssignment.errors.txt index 509cad2d114eb..0d46ca53609ea 100644 --- a/tests/baselines/reference/chainedPrototypeAssignment.errors.txt +++ b/tests/baselines/reference/chainedPrototypeAssignment.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/salsa/use.js(5,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/conformance/salsa/use.js(6,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +use.js(5,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +use.js(6,5): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -==== tests/cases/conformance/salsa/use.js (2 errors) ==== +==== use.js (2 errors) ==== /// var mod = require('./mod'); var a = new mod.A() @@ -14,10 +14,10 @@ tests/cases/conformance/salsa/use.js(6,5): error TS2345: Argument of type 'strin ~~~~~~~~~~~~ !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -==== tests/cases/conformance/salsa/types.d.ts (0 errors) ==== +==== types.d.ts (0 errors) ==== declare function require(name: string): any; declare var exports: any; -==== tests/cases/conformance/salsa/mod.js (0 errors) ==== +==== mod.js (0 errors) ==== /// var A = function A() { this.a = 1 diff --git a/tests/baselines/reference/chainedPrototypeAssignment.symbols b/tests/baselines/reference/chainedPrototypeAssignment.symbols index bd31b70bc87f1..d2a143280a888 100644 --- a/tests/baselines/reference/chainedPrototypeAssignment.symbols +++ b/tests/baselines/reference/chainedPrototypeAssignment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/salsa/use.js === +//// [tests/cases/conformance/salsa/chainedPrototypeAssignment.ts] //// + +=== use.js === /// var mod = require('./mod'); >mod : Symbol(mod, Decl(use.js, 1, 3)) @@ -27,7 +29,7 @@ b.m('not really') >b : Symbol(b, Decl(use.js, 3, 3)) >m : Symbol(m, Decl(mod.js, 9, 29)) -=== tests/cases/conformance/salsa/types.d.ts === +=== types.d.ts === declare function require(name: string): any; >require : Symbol(require, Decl(types.d.ts, 0, 0)) >name : Symbol(name, Decl(types.d.ts, 0, 25)) @@ -35,7 +37,7 @@ declare function require(name: string): any; declare var exports: any; >exports : Symbol(exports, Decl(types.d.ts, 1, 11)) -=== tests/cases/conformance/salsa/mod.js === +=== mod.js === /// var A = function A() { >A : Symbol(A, Decl(mod.js, 1, 3), Decl(mod.js, 8, 13)) diff --git a/tests/baselines/reference/chainedPrototypeAssignment.types b/tests/baselines/reference/chainedPrototypeAssignment.types index ccd81fa038096..3b228b65ed4c8 100644 --- a/tests/baselines/reference/chainedPrototypeAssignment.types +++ b/tests/baselines/reference/chainedPrototypeAssignment.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/salsa/use.js === +//// [tests/cases/conformance/salsa/chainedPrototypeAssignment.ts] //// + +=== use.js === /// var mod = require('./mod'); >mod : typeof mod @@ -34,7 +36,7 @@ b.m('not really') >m : (n: number) => number >'not really' : "not really" -=== tests/cases/conformance/salsa/types.d.ts === +=== types.d.ts === declare function require(name: string): any; >require : (name: string) => any >name : string @@ -42,7 +44,7 @@ declare function require(name: string): any; declare var exports: any; >exports : any -=== tests/cases/conformance/salsa/mod.js === +=== mod.js === /// var A = function A() { >A : typeof A @@ -71,14 +73,14 @@ var B = function B() { exports.A = A >exports.A = A : typeof A >exports.A : typeof A ->exports : typeof import("tests/cases/conformance/salsa/mod") +>exports : typeof import("mod") >A : typeof A >A : typeof A exports.B = B >exports.B = B : typeof B >exports.B : typeof B ->exports : typeof import("tests/cases/conformance/salsa/mod") +>exports : typeof import("mod") >B : typeof B >B : typeof B diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js index 1884967aa9ecc..dda6c2b79b367 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/chainedSpecializationToObjectTypeLiteral.ts] //// + //// [chainedSpecializationToObjectTypeLiteral.ts] interface Sequence { each(iterator: (value: T) => void): void; diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols index cabd73fe01468..509a9932c3d45 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedSpecializationToObjectTypeLiteral.ts === +//// [tests/cases/compiler/chainedSpecializationToObjectTypeLiteral.ts] //// + +=== chainedSpecializationToObjectTypeLiteral.ts === interface Sequence { >Sequence : Symbol(Sequence, Decl(chainedSpecializationToObjectTypeLiteral.ts, 0, 0)) >T : Symbol(T, Decl(chainedSpecializationToObjectTypeLiteral.ts, 0, 19)) diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types index c6956f6373eda..9db7bc6e47c21 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/chainedSpecializationToObjectTypeLiteral.ts === +//// [tests/cases/compiler/chainedSpecializationToObjectTypeLiteral.ts] //// + +=== chainedSpecializationToObjectTypeLiteral.ts === interface Sequence { each(iterator: (value: T) => void): void; >each : (iterator: (value: T) => void) => void diff --git a/tests/baselines/reference/checkDestructuringShorthandAssigment.errors.txt b/tests/baselines/reference/checkDestructuringShorthandAssigment.errors.txt index f6b8576c834f7..5ae7ba961d34d 100644 --- a/tests/baselines/reference/checkDestructuringShorthandAssigment.errors.txt +++ b/tests/baselines/reference/checkDestructuringShorthandAssigment.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/bug25434.js(4,9): error TS18004: No value exists in scope for the shorthand property 'b'. Either declare one or provide an initializer. +bug25434.js(4,9): error TS18004: No value exists in scope for the shorthand property 'b'. Either declare one or provide an initializer. -==== tests/cases/compiler/bug25434.js (1 errors) ==== +==== bug25434.js (1 errors) ==== // should not crash while checking function Test({ b = '' } = {}) {} diff --git a/tests/baselines/reference/checkDestructuringShorthandAssigment.symbols b/tests/baselines/reference/checkDestructuringShorthandAssigment.symbols index efe0b4f085033..20818228e8ac0 100644 --- a/tests/baselines/reference/checkDestructuringShorthandAssigment.symbols +++ b/tests/baselines/reference/checkDestructuringShorthandAssigment.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bug25434.js === +//// [tests/cases/compiler/checkDestructuringShorthandAssigment.ts] //// + +=== bug25434.js === // should not crash while checking function Test({ b = '' } = {}) {} >Test : Symbol(Test, Decl(bug25434.js, 0, 0)) diff --git a/tests/baselines/reference/checkDestructuringShorthandAssigment.types b/tests/baselines/reference/checkDestructuringShorthandAssigment.types index 336a679607d20..339f6b4f0dc06 100644 --- a/tests/baselines/reference/checkDestructuringShorthandAssigment.types +++ b/tests/baselines/reference/checkDestructuringShorthandAssigment.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/bug25434.js === +//// [tests/cases/compiler/checkDestructuringShorthandAssigment.ts] //// + +=== bug25434.js === // should not crash while checking function Test({ b = '' } = {}) {} >Test : ({ b }?: { b?: string; }) => void diff --git a/tests/baselines/reference/checkDestructuringShorthandAssigment2.errors.txt b/tests/baselines/reference/checkDestructuringShorthandAssigment2.errors.txt index a06d1b3863e9b..42032f9db1bb1 100644 --- a/tests/baselines/reference/checkDestructuringShorthandAssigment2.errors.txt +++ b/tests/baselines/reference/checkDestructuringShorthandAssigment2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/checkDestructuringShorthandAssigment2.ts(4,7): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. -tests/cases/compiler/checkDestructuringShorthandAssigment2.ts(4,27): error TS2353: Object literal may only specify known properties, and '[k]' does not exist in type '{ x: any; }'. +checkDestructuringShorthandAssigment2.ts(4,7): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. +checkDestructuringShorthandAssigment2.ts(4,27): error TS2353: Object literal may only specify known properties, and '[k]' does not exist in type '{ x: any; }'. -==== tests/cases/compiler/checkDestructuringShorthandAssigment2.ts (2 errors) ==== +==== checkDestructuringShorthandAssigment2.ts (2 errors) ==== // GH #38175 -- should not crash while checking let o: any, k: any; diff --git a/tests/baselines/reference/checkDestructuringShorthandAssigment2.symbols b/tests/baselines/reference/checkDestructuringShorthandAssigment2.symbols index 06ca1da8b047f..63500aefa5b3f 100644 --- a/tests/baselines/reference/checkDestructuringShorthandAssigment2.symbols +++ b/tests/baselines/reference/checkDestructuringShorthandAssigment2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkDestructuringShorthandAssigment2.ts === +//// [tests/cases/compiler/checkDestructuringShorthandAssigment2.ts] //// + +=== checkDestructuringShorthandAssigment2.ts === // GH #38175 -- should not crash while checking let o: any, k: any; diff --git a/tests/baselines/reference/checkDestructuringShorthandAssigment2.types b/tests/baselines/reference/checkDestructuringShorthandAssigment2.types index 00b31a57b6a71..7ac31dc56e25f 100644 --- a/tests/baselines/reference/checkDestructuringShorthandAssigment2.types +++ b/tests/baselines/reference/checkDestructuringShorthandAssigment2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkDestructuringShorthandAssigment2.ts === +//// [tests/cases/compiler/checkDestructuringShorthandAssigment2.ts] //// + +=== checkDestructuringShorthandAssigment2.ts === // GH #38175 -- should not crash while checking let o: any, k: any; diff --git a/tests/baselines/reference/checkExportsObjectAssignProperty.errors.txt b/tests/baselines/reference/checkExportsObjectAssignProperty.errors.txt index 6a4bdaf30a80f..32d4e79828823 100644 --- a/tests/baselines/reference/checkExportsObjectAssignProperty.errors.txt +++ b/tests/baselines/reference/checkExportsObjectAssignProperty.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/jsdoc/validator.ts(17,4): error TS2540: Cannot assign to 'readonlyProp' because it is a read-only property. -tests/cases/conformance/jsdoc/validator.ts(18,4): error TS2540: Cannot assign to 'readonlyAccessor' because it is a read-only property. -tests/cases/conformance/jsdoc/validator.ts(19,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/validator.ts(20,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/validator.ts(21,1): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/validator.ts(37,4): error TS2540: Cannot assign to 'readonlyProp' because it is a read-only property. -tests/cases/conformance/jsdoc/validator.ts(38,4): error TS2540: Cannot assign to 'readonlyAccessor' because it is a read-only property. -tests/cases/conformance/jsdoc/validator.ts(39,1): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/validator.ts(40,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/validator.ts(41,1): error TS2322: Type 'number' is not assignable to type 'string'. +validator.ts(17,4): error TS2540: Cannot assign to 'readonlyProp' because it is a read-only property. +validator.ts(18,4): error TS2540: Cannot assign to 'readonlyAccessor' because it is a read-only property. +validator.ts(19,1): error TS2322: Type 'string' is not assignable to type 'number'. +validator.ts(20,1): error TS2322: Type 'string' is not assignable to type 'number'. +validator.ts(21,1): error TS2322: Type 'number' is not assignable to type 'string'. +validator.ts(37,4): error TS2540: Cannot assign to 'readonlyProp' because it is a read-only property. +validator.ts(38,4): error TS2540: Cannot assign to 'readonlyAccessor' because it is a read-only property. +validator.ts(39,1): error TS2322: Type 'number' is not assignable to type 'string'. +validator.ts(40,1): error TS2322: Type 'string' is not assignable to type 'number'. +validator.ts(41,1): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsdoc/validator.ts (10 errors) ==== +==== validator.ts (10 errors) ==== import "./"; import m1 = require("./mod1"); @@ -73,7 +73,7 @@ tests/cases/conformance/jsdoc/validator.ts(41,1): error TS2322: Type 'number' is ~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsdoc/mod1.js (0 errors) ==== +==== mod1.js (0 errors) ==== Object.defineProperty(exports, "thing", { value: 42, writable: true }); Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false }); Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }); @@ -85,7 +85,7 @@ tests/cases/conformance/jsdoc/validator.ts(41,1): error TS2322: Type 'number' is } }); -==== tests/cases/conformance/jsdoc/mod2.js (0 errors) ==== +==== mod2.js (0 errors) ==== Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }); Object.defineProperty(module.exports, "readonlyProp", { value: "Smith", writable: false }); Object.defineProperty(module.exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }); @@ -97,7 +97,7 @@ tests/cases/conformance/jsdoc/validator.ts(41,1): error TS2322: Type 'number' is } }); -==== tests/cases/conformance/jsdoc/index.js (0 errors) ==== +==== index.js (0 errors) ==== /** * @type {number} */ diff --git a/tests/baselines/reference/checkExportsObjectAssignProperty.symbols b/tests/baselines/reference/checkExportsObjectAssignProperty.symbols index df426ed4efc09..684b7bae7edfa 100644 --- a/tests/baselines/reference/checkExportsObjectAssignProperty.symbols +++ b/tests/baselines/reference/checkExportsObjectAssignProperty.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/validator.ts === +//// [tests/cases/conformance/jsdoc/checkExportsObjectAssignProperty.ts] //// + +=== validator.ts === import "./"; import m1 = require("./mod1"); @@ -141,12 +143,12 @@ m2.setonlyAccessor = 0; >m2 : Symbol(m2, Decl(validator.ts, 20, 23)) >setonlyAccessor : Symbol(m2.setonlyAccessor, Decl(mod2.js, 3, 86)) -=== tests/cases/conformance/jsdoc/mod1.js === +=== mod1.js === Object.defineProperty(exports, "thing", { value: 42, writable: true }); >Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) ->exports : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>exports : Symbol("mod1", Decl(mod1.js, 0, 0)) >"thing" : Symbol(thing, Decl(mod1.js, 0, 0)) >value : Symbol(value, Decl(mod1.js, 0, 41)) >writable : Symbol(writable, Decl(mod1.js, 0, 52)) @@ -155,7 +157,7 @@ Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false >Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) ->exports : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>exports : Symbol("mod1", Decl(mod1.js, 0, 0)) >"readonlyProp" : Symbol(readonlyProp, Decl(mod1.js, 0, 71)) >value : Symbol(value, Decl(mod1.js, 1, 48)) >writable : Symbol(writable, Decl(mod1.js, 1, 64)) @@ -164,7 +166,7 @@ Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { >Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) ->exports : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>exports : Symbol("mod1", Decl(mod1.js, 0, 0)) >"rwAccessors" : Symbol(rwAccessors, Decl(mod1.js, 1, 84)) >get : Symbol(get, Decl(mod1.js, 2, 47)) >set : Symbol(set, Decl(mod1.js, 2, 71)) @@ -174,7 +176,7 @@ Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }); >Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) ->exports : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>exports : Symbol("mod1", Decl(mod1.js, 0, 0)) >"readonlyAccessor" : Symbol(readonlyAccessor, Decl(mod1.js, 2, 97)) >get : Symbol(get, Decl(mod1.js, 3, 52)) @@ -182,7 +184,7 @@ Object.defineProperty(exports, "setonlyAccessor", { >Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) ->exports : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>exports : Symbol("mod1", Decl(mod1.js, 0, 0)) >"setonlyAccessor" : Symbol(setonlyAccessor, Decl(mod1.js, 3, 79)) /** @param {string} str */ @@ -197,7 +199,7 @@ Object.defineProperty(exports, "setonlyAccessor", { } }); -=== tests/cases/conformance/jsdoc/mod2.js === +=== mod2.js === Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }); >Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -263,7 +265,7 @@ Object.defineProperty(module.exports, "setonlyAccessor", { } }); -=== tests/cases/conformance/jsdoc/index.js === +=== index.js === /** * @type {number} */ @@ -271,7 +273,7 @@ const q = require("./mod1").thing; >q : Symbol(q, Decl(index.js, 3, 5)) >require("./mod1").thing : Symbol(thing, Decl(mod1.js, 0, 0)) >require : Symbol(require) ->"./mod1" : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>"./mod1" : Symbol("mod1", Decl(mod1.js, 0, 0)) >thing : Symbol(thing, Decl(mod1.js, 0, 0)) /** @@ -281,6 +283,6 @@ const u = require("./mod2").thing; >u : Symbol(u, Decl(index.js, 8, 5)) >require("./mod2").thing : Symbol(thing, Decl(mod2.js, 0, 0)) >require : Symbol(require) ->"./mod2" : Symbol("tests/cases/conformance/jsdoc/mod2", Decl(mod2.js, 0, 0)) +>"./mod2" : Symbol("mod2", Decl(mod2.js, 0, 0)) >thing : Symbol(thing, Decl(mod2.js, 0, 0)) diff --git a/tests/baselines/reference/checkExportsObjectAssignProperty.types b/tests/baselines/reference/checkExportsObjectAssignProperty.types index 60fcd84477a12..21b6936a192d1 100644 --- a/tests/baselines/reference/checkExportsObjectAssignProperty.types +++ b/tests/baselines/reference/checkExportsObjectAssignProperty.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/validator.ts === +//// [tests/cases/conformance/jsdoc/checkExportsObjectAssignProperty.ts] //// + +=== validator.ts === import "./"; import m1 = require("./mod1"); @@ -173,13 +175,13 @@ m2.setonlyAccessor = 0; >setonlyAccessor : string >0 : 0 -=== tests/cases/conformance/jsdoc/mod1.js === +=== mod1.js === Object.defineProperty(exports, "thing", { value: 42, writable: true }); ->Object.defineProperty(exports, "thing", { value: 42, writable: true }) : typeof import("tests/cases/conformance/jsdoc/mod1") +>Object.defineProperty(exports, "thing", { value: 42, writable: true }) : typeof import("mod1") >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T ->exports : typeof import("tests/cases/conformance/jsdoc/mod1") +>exports : typeof import("mod1") >"thing" : "thing" >{ value: 42, writable: true } : { value: number; writable: true; } >value : number @@ -188,11 +190,11 @@ Object.defineProperty(exports, "thing", { value: 42, writable: true }); >true : true Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false }); ->Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false }) : typeof import("tests/cases/conformance/jsdoc/mod1") +>Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false }) : typeof import("mod1") >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T ->exports : typeof import("tests/cases/conformance/jsdoc/mod1") +>exports : typeof import("mod1") >"readonlyProp" : "readonlyProp" >{ value: "Smith", writable: false } : { value: string; writable: false; } >value : string @@ -201,11 +203,11 @@ Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false >false : false Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }); ->Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }) : typeof import("tests/cases/conformance/jsdoc/mod1") +>Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }) : typeof import("mod1") >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T ->exports : typeof import("tests/cases/conformance/jsdoc/mod1") +>exports : typeof import("mod1") >"rwAccessors" : "rwAccessors" >{ get() { return 98122 }, set(_) { /*ignore*/ } } : { get(): number; set(_: any): void; } >get : () => number @@ -214,22 +216,22 @@ Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { >_ : any Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }); ->Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }) : typeof import("tests/cases/conformance/jsdoc/mod1") +>Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }) : typeof import("mod1") >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T ->exports : typeof import("tests/cases/conformance/jsdoc/mod1") +>exports : typeof import("mod1") >"readonlyAccessor" : "readonlyAccessor" >{ get() { return 21.75 } } : { get(): number; } >get : () => number >21.75 : 21.75 Object.defineProperty(exports, "setonlyAccessor", { ->Object.defineProperty(exports, "setonlyAccessor", { /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }}) : typeof import("tests/cases/conformance/jsdoc/mod1") +>Object.defineProperty(exports, "setonlyAccessor", { /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }}) : typeof import("mod1") >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor >defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T ->exports : typeof import("tests/cases/conformance/jsdoc/mod1") +>exports : typeof import("mod1") >"setonlyAccessor" : "setonlyAccessor" >{ /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }} : { set(str: string): void; } @@ -249,7 +251,7 @@ Object.defineProperty(exports, "setonlyAccessor", { } }); -=== tests/cases/conformance/jsdoc/mod2.js === +=== mod2.js === Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }); >Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }) : typeof module.exports >Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T @@ -335,14 +337,14 @@ Object.defineProperty(module.exports, "setonlyAccessor", { } }); -=== tests/cases/conformance/jsdoc/index.js === +=== index.js === /** * @type {number} */ const q = require("./mod1").thing; >q : number >require("./mod1").thing : number ->require("./mod1") : typeof import("tests/cases/conformance/jsdoc/mod1") +>require("./mod1") : typeof import("mod1") >require : any >"./mod1" : "./mod1" >thing : number @@ -353,7 +355,7 @@ const q = require("./mod1").thing; const u = require("./mod2").thing; >u : string >require("./mod2").thing : string ->require("./mod2") : typeof import("tests/cases/conformance/jsdoc/mod2") +>require("./mod2") : typeof import("mod2") >require : any >"./mod2" : "./mod2" >thing : string diff --git a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.errors.txt b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.errors.txt index 316c07854eb3d..805191bcca68f 100644 --- a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.errors.txt +++ b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/jsdoc/validator.ts(19,4): error TS2540: Cannot assign to 'readonlyProp' because it is a read-only property. -tests/cases/conformance/jsdoc/validator.ts(20,4): error TS2540: Cannot assign to 'readonlyAccessor' because it is a read-only property. -tests/cases/conformance/jsdoc/validator.ts(21,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/validator.ts(22,1): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/validator.ts(23,1): error TS2322: Type 'number' is not assignable to type 'string'. +validator.ts(19,4): error TS2540: Cannot assign to 'readonlyProp' because it is a read-only property. +validator.ts(20,4): error TS2540: Cannot assign to 'readonlyAccessor' because it is a read-only property. +validator.ts(21,1): error TS2322: Type 'string' is not assignable to type 'number'. +validator.ts(22,1): error TS2322: Type 'string' is not assignable to type 'number'. +validator.ts(23,1): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsdoc/validator.ts (5 errors) ==== +==== validator.ts (5 errors) ==== import "./"; import Person = require("./mod1"); @@ -41,7 +41,7 @@ tests/cases/conformance/jsdoc/validator.ts(23,1): error TS2322: Type 'number' is !!! error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsdoc/mod1.js (0 errors) ==== +==== mod1.js (0 errors) ==== /** * @constructor * @param {string} name diff --git a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.symbols b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.symbols index c06d66518ec43..a4bd591843df3 100644 --- a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.symbols +++ b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/validator.ts === +//// [tests/cases/conformance/jsdoc/checkExportsObjectAssignPrototypeProperty.ts] //// + +=== validator.ts === import "./"; import Person = require("./mod1"); @@ -76,7 +78,7 @@ m1.setonlyAccessor = 0; >setonlyAccessor : Symbol(Person.setonlyAccessor, Decl(mod1.js, 13, 88)) -=== tests/cases/conformance/jsdoc/mod1.js === +=== mod1.js === /** * @constructor * @param {string} name diff --git a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types index 6ea6a5ff129b8..d74150a17c20a 100644 --- a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types +++ b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/validator.ts === +//// [tests/cases/conformance/jsdoc/checkExportsObjectAssignPrototypeProperty.ts] //// + +=== validator.ts === import "./"; import Person = require("./mod1"); @@ -94,7 +96,7 @@ m1.setonlyAccessor = 0; >0 : 0 -=== tests/cases/conformance/jsdoc/mod1.js === +=== mod1.js === /** * @constructor * @param {string} name diff --git a/tests/baselines/reference/checkForObjectTooStrict.errors.txt b/tests/baselines/reference/checkForObjectTooStrict.errors.txt index 6da0ffc4e1331..0a6236689f01b 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.errors.txt +++ b/tests/baselines/reference/checkForObjectTooStrict.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/checkForObjectTooStrict.ts(3,18): error TS2725: Class name cannot be 'Object' when targeting ES5 with module CommonJS. +checkForObjectTooStrict.ts(3,18): error TS2725: Class name cannot be 'Object' when targeting ES5 with module CommonJS. -==== tests/cases/compiler/checkForObjectTooStrict.ts (1 errors) ==== +==== checkForObjectTooStrict.ts (1 errors) ==== module Foo { export class Object { diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 3410b421a7825..b25da57defacb 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/checkForObjectTooStrict.ts] //// + //// [checkForObjectTooStrict.ts] module Foo { diff --git a/tests/baselines/reference/checkForObjectTooStrict.symbols b/tests/baselines/reference/checkForObjectTooStrict.symbols index f48c4cd68d2eb..78bd373afe7ac 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.symbols +++ b/tests/baselines/reference/checkForObjectTooStrict.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkForObjectTooStrict.ts === +//// [tests/cases/compiler/checkForObjectTooStrict.ts] //// + +=== checkForObjectTooStrict.ts === module Foo { >Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0)) diff --git a/tests/baselines/reference/checkForObjectTooStrict.types b/tests/baselines/reference/checkForObjectTooStrict.types index f6b63019cd567..4cf7d4f17c6bf 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.types +++ b/tests/baselines/reference/checkForObjectTooStrict.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkForObjectTooStrict.ts === +//// [tests/cases/compiler/checkForObjectTooStrict.ts] //// + +=== checkForObjectTooStrict.ts === module Foo { >Foo : typeof Foo diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt index c62df130f972a..4cdbf6b79170c 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt @@ -1,17 +1,17 @@ error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'outFile' instead. -tests/cases/compiler/weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? -tests/cases/compiler/weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. -tests/cases/compiler/weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. +weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? +weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. +weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. -==== tests/cases/compiler/weird.js (3 errors) ==== +==== weird.js (3 errors) ==== someFunction(function(BaseClass) { ~~~~~~~~~~~~ !!! error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? -!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Function' is declared here. +!!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here. ~~~~~~~~~ !!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. 'use strict'; diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.symbols b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.symbols index 4146ee56e6240..99ddd57e9d8cd 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.symbols +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/weird.js === +//// [tests/cases/compiler/checkIndexConstraintOfJavascriptClassExpression.ts] //// + +=== weird.js === someFunction(function(BaseClass) { >BaseClass : Symbol(BaseClass, Decl(weird.js, 0, 22)) diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types index 465e3faea627f..7f98768cc3b3e 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/weird.js === +//// [tests/cases/compiler/checkIndexConstraintOfJavascriptClassExpression.ts] //// + +=== weird.js === someFunction(function(BaseClass) { >someFunction(function(BaseClass) { 'use strict'; const DEFAULT_MESSAGE = "nop!"; class Hello extends BaseClass { constructor() { super(); this.foo = "bar"; } _render(error) { const message = error.message || DEFAULT_MESSAGE; } }}) : any >someFunction : any diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination.js b/tests/baselines/reference/checkInfiniteExpansionTermination.js index ed52ea6b4190c..d54c2d76667ae 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination.js +++ b/tests/baselines/reference/checkInfiniteExpansionTermination.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/checkInfiniteExpansionTermination.ts] //// + //// [checkInfiniteExpansionTermination.ts] // Regression test for #1002 // Before fix this code would cause infinite loop diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination.symbols b/tests/baselines/reference/checkInfiniteExpansionTermination.symbols index e6d75d40cee49..8595821006e70 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination.symbols +++ b/tests/baselines/reference/checkInfiniteExpansionTermination.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkInfiniteExpansionTermination.ts === +//// [tests/cases/compiler/checkInfiniteExpansionTermination.ts] //// + +=== checkInfiniteExpansionTermination.ts === // Regression test for #1002 // Before fix this code would cause infinite loop diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination.types b/tests/baselines/reference/checkInfiniteExpansionTermination.types index 07d3cb00487ae..5908eae7cd1d0 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination.types +++ b/tests/baselines/reference/checkInfiniteExpansionTermination.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkInfiniteExpansionTermination.ts === +//// [tests/cases/compiler/checkInfiniteExpansionTermination.ts] //// + +=== checkInfiniteExpansionTermination.ts === // Regression test for #1002 // Before fix this code would cause infinite loop diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination2.js b/tests/baselines/reference/checkInfiniteExpansionTermination2.js index 6175b34e52216..9726e7840487d 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination2.js +++ b/tests/baselines/reference/checkInfiniteExpansionTermination2.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/checkInfiniteExpansionTermination2.ts] //// + //// [checkInfiniteExpansionTermination2.ts] // Regression test for #1002 // Before fix this code would cause infinite loop diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination2.symbols b/tests/baselines/reference/checkInfiniteExpansionTermination2.symbols index b7be2445e0da2..28d6d5eeabc6d 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination2.symbols +++ b/tests/baselines/reference/checkInfiniteExpansionTermination2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkInfiniteExpansionTermination2.ts === +//// [tests/cases/compiler/checkInfiniteExpansionTermination2.ts] //// + +=== checkInfiniteExpansionTermination2.ts === // Regression test for #1002 // Before fix this code would cause infinite loop diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination2.types b/tests/baselines/reference/checkInfiniteExpansionTermination2.types index 61f3410198982..7a7d3e07416ae 100644 --- a/tests/baselines/reference/checkInfiniteExpansionTermination2.types +++ b/tests/baselines/reference/checkInfiniteExpansionTermination2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/checkInfiniteExpansionTermination2.ts === +//// [tests/cases/compiler/checkInfiniteExpansionTermination2.ts] //// + +=== checkInfiniteExpansionTermination2.ts === // Regression test for #1002 // Before fix this code would cause infinite loop diff --git a/tests/baselines/reference/checkInterfaceBases.symbols b/tests/baselines/reference/checkInterfaceBases.symbols index 57a820dcfaf84..7a07e9c576726 100644 --- a/tests/baselines/reference/checkInterfaceBases.symbols +++ b/tests/baselines/reference/checkInterfaceBases.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/app.ts === +//// [tests/cases/compiler/checkInterfaceBases.ts] //// + +=== app.ts === /// interface SecondEvent { >SecondEvent : Symbol(SecondEvent, Decl(app.ts, 0, 0)) @@ -11,7 +13,7 @@ interface Third extends JQueryEventObjectTest, SecondEvent {} >JQueryEventObjectTest : Symbol(JQueryEventObjectTest, Decl(jquery.d.ts, 0, 0)) >SecondEvent : Symbol(SecondEvent, Decl(app.ts, 0, 0)) -=== tests/cases/compiler/jquery.d.ts === +=== jquery.d.ts === interface JQueryEventObjectTest { >JQueryEventObjectTest : Symbol(JQueryEventObjectTest, Decl(jquery.d.ts, 0, 0)) diff --git a/tests/baselines/reference/checkInterfaceBases.types b/tests/baselines/reference/checkInterfaceBases.types index 24a7bdf06c1a2..850d0a2217b6d 100644 --- a/tests/baselines/reference/checkInterfaceBases.types +++ b/tests/baselines/reference/checkInterfaceBases.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/app.ts === +//// [tests/cases/compiler/checkInterfaceBases.ts] //// + +=== app.ts === /// interface SecondEvent { data: any; @@ -6,7 +8,7 @@ interface SecondEvent { } interface Third extends JQueryEventObjectTest, SecondEvent {} -=== tests/cases/compiler/jquery.d.ts === +=== jquery.d.ts === interface JQueryEventObjectTest { data: any; >data : any diff --git a/tests/baselines/reference/checkJsFiles.errors.txt b/tests/baselines/reference/checkJsFiles.errors.txt index af11070f31766..596b3b8b98542 100644 --- a/tests/baselines/reference/checkJsFiles.errors.txt +++ b/tests/baselines/reference/checkJsFiles.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/a.js(2,1): error TS2322: Type 'number' is not assignable to type 'string'. +a.js(2,1): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== var x = "string"; x = 0; ~ diff --git a/tests/baselines/reference/checkJsFiles.symbols b/tests/baselines/reference/checkJsFiles.symbols index c234a5a3e1350..2f5927162846c 100644 --- a/tests/baselines/reference/checkJsFiles.symbols +++ b/tests/baselines/reference/checkJsFiles.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles.ts] //// + +=== a.js === var x = "string"; >x : Symbol(x, Decl(a.js, 0, 3)) diff --git a/tests/baselines/reference/checkJsFiles.types b/tests/baselines/reference/checkJsFiles.types index 10159b5d06541..bd46e46cdaf27 100644 --- a/tests/baselines/reference/checkJsFiles.types +++ b/tests/baselines/reference/checkJsFiles.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles.ts] //// + +=== a.js === var x = "string"; >x : string >"string" : "string" diff --git a/tests/baselines/reference/checkJsFiles2.errors.txt b/tests/baselines/reference/checkJsFiles2.errors.txt index 6b76852e4b8a5..f10605430642e 100644 --- a/tests/baselines/reference/checkJsFiles2.errors.txt +++ b/tests/baselines/reference/checkJsFiles2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/a.js(3,1): error TS2322: Type 'number' is not assignable to type 'string'. +a.js(3,1): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== // @ts-check var x = "string"; x = 0; diff --git a/tests/baselines/reference/checkJsFiles2.symbols b/tests/baselines/reference/checkJsFiles2.symbols index e70fee491537e..a0072f072dca4 100644 --- a/tests/baselines/reference/checkJsFiles2.symbols +++ b/tests/baselines/reference/checkJsFiles2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles2.ts] //// + +=== a.js === // @ts-check var x = "string"; >x : Symbol(x, Decl(a.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsFiles2.types b/tests/baselines/reference/checkJsFiles2.types index e5aa1997663c6..cdedfca95d089 100644 --- a/tests/baselines/reference/checkJsFiles2.types +++ b/tests/baselines/reference/checkJsFiles2.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles2.ts] //// + +=== a.js === // @ts-check var x = "string"; >x : string diff --git a/tests/baselines/reference/checkJsFiles3.errors.txt b/tests/baselines/reference/checkJsFiles3.errors.txt index 6b76852e4b8a5..f10605430642e 100644 --- a/tests/baselines/reference/checkJsFiles3.errors.txt +++ b/tests/baselines/reference/checkJsFiles3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/a.js(3,1): error TS2322: Type 'number' is not assignable to type 'string'. +a.js(3,1): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== // @ts-check var x = "string"; x = 0; diff --git a/tests/baselines/reference/checkJsFiles3.symbols b/tests/baselines/reference/checkJsFiles3.symbols index e70fee491537e..8be0592a7c180 100644 --- a/tests/baselines/reference/checkJsFiles3.symbols +++ b/tests/baselines/reference/checkJsFiles3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles3.ts] //// + +=== a.js === // @ts-check var x = "string"; >x : Symbol(x, Decl(a.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsFiles3.types b/tests/baselines/reference/checkJsFiles3.types index e5aa1997663c6..2aa8e520de235 100644 --- a/tests/baselines/reference/checkJsFiles3.types +++ b/tests/baselines/reference/checkJsFiles3.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles3.ts] //// + +=== a.js === // @ts-check var x = "string"; >x : string diff --git a/tests/baselines/reference/checkJsFiles4.errors.txt b/tests/baselines/reference/checkJsFiles4.errors.txt index 6b76852e4b8a5..f10605430642e 100644 --- a/tests/baselines/reference/checkJsFiles4.errors.txt +++ b/tests/baselines/reference/checkJsFiles4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/a.js(3,1): error TS2322: Type 'number' is not assignable to type 'string'. +a.js(3,1): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== // @ts-check var x = "string"; x = 0; diff --git a/tests/baselines/reference/checkJsFiles4.symbols b/tests/baselines/reference/checkJsFiles4.symbols index e70fee491537e..10dcc2d76a355 100644 --- a/tests/baselines/reference/checkJsFiles4.symbols +++ b/tests/baselines/reference/checkJsFiles4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles4.ts] //// + +=== a.js === // @ts-check var x = "string"; >x : Symbol(x, Decl(a.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsFiles4.types b/tests/baselines/reference/checkJsFiles4.types index e5aa1997663c6..af6c8901332b3 100644 --- a/tests/baselines/reference/checkJsFiles4.types +++ b/tests/baselines/reference/checkJsFiles4.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles4.ts] //// + +=== a.js === // @ts-check var x = "string"; >x : string diff --git a/tests/baselines/reference/checkJsFiles5.symbols b/tests/baselines/reference/checkJsFiles5.symbols index 696a706601ded..afb1de5365493 100644 --- a/tests/baselines/reference/checkJsFiles5.symbols +++ b/tests/baselines/reference/checkJsFiles5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles5.ts] //// + +=== a.js === // @ts-nocheck var x = "string"; >x : Symbol(x, Decl(a.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsFiles5.types b/tests/baselines/reference/checkJsFiles5.types index f566230948a2d..5758ec2510448 100644 --- a/tests/baselines/reference/checkJsFiles5.types +++ b/tests/baselines/reference/checkJsFiles5.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles5.ts] //// + +=== a.js === // @ts-nocheck var x = "string"; >x : string diff --git a/tests/baselines/reference/checkJsFiles6.errors.txt b/tests/baselines/reference/checkJsFiles6.errors.txt index d0c5d9c933844..64ee1083a7f0b 100644 --- a/tests/baselines/reference/checkJsFiles6.errors.txt +++ b/tests/baselines/reference/checkJsFiles6.errors.txt @@ -1,12 +1,12 @@ error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. -error TS6504: File 'tests/cases/compiler/a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? +error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? The file is in the program because: Root file specified for compilation !!! error TS5052: Option 'checkJs' cannot be specified without specifying option 'allowJs'. -!!! error TS6504: File 'tests/cases/compiler/a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? +!!! error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? !!! error TS6504: The file is in the program because: !!! error TS6504: Root file specified for compilation -==== tests/cases/compiler/a.js (0 errors) ==== +==== a.js (0 errors) ==== var x; \ No newline at end of file diff --git a/tests/baselines/reference/checkJsFiles7.symbols b/tests/baselines/reference/checkJsFiles7.symbols index a8214483b86f3..697f94d36d2ac 100644 --- a/tests/baselines/reference/checkJsFiles7.symbols +++ b/tests/baselines/reference/checkJsFiles7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles7.ts] //// + +=== a.js === class C { >C : Symbol(C, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/checkJsFiles7.types b/tests/baselines/reference/checkJsFiles7.types index a86767b5e444f..c4335e1467db1 100644 --- a/tests/baselines/reference/checkJsFiles7.types +++ b/tests/baselines/reference/checkJsFiles7.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles7.ts] //// + +=== a.js === class C { >C : C diff --git a/tests/baselines/reference/checkJsFiles_noErrorLocation.symbols b/tests/baselines/reference/checkJsFiles_noErrorLocation.symbols index a2cd8a0b7ac52..109a576bc379f 100644 --- a/tests/baselines/reference/checkJsFiles_noErrorLocation.symbols +++ b/tests/baselines/reference/checkJsFiles_noErrorLocation.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles_noErrorLocation.ts] //// + +=== a.js === // @ts-check class A { >A : Symbol(A, Decl(a.js, 0, 0)) diff --git a/tests/baselines/reference/checkJsFiles_noErrorLocation.types b/tests/baselines/reference/checkJsFiles_noErrorLocation.types index b0dceb2d33cad..3f82f5dc0a61c 100644 --- a/tests/baselines/reference/checkJsFiles_noErrorLocation.types +++ b/tests/baselines/reference/checkJsFiles_noErrorLocation.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles_noErrorLocation.ts] //// + +=== a.js === // @ts-check class A { >A : A diff --git a/tests/baselines/reference/checkJsFiles_skipDiagnostics.errors.txt b/tests/baselines/reference/checkJsFiles_skipDiagnostics.errors.txt index 7a1455efeadcf..55687636c73ee 100644 --- a/tests/baselines/reference/checkJsFiles_skipDiagnostics.errors.txt +++ b/tests/baselines/reference/checkJsFiles_skipDiagnostics.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/a.js(29,1): error TS2349: This expression is not callable. +a.js(29,1): error TS2349: This expression is not callable. Type 'Number' has no call signatures. -tests/cases/compiler/a.js(35,1): error TS2349: This expression is not callable. +a.js(35,1): error TS2349: This expression is not callable. Type 'Number' has no call signatures. -==== tests/cases/compiler/a.js (2 errors) ==== +==== a.js (2 errors) ==== var x = 0; diff --git a/tests/baselines/reference/checkJsFiles_skipDiagnostics.symbols b/tests/baselines/reference/checkJsFiles_skipDiagnostics.symbols index 7bf2e437d05ab..704ac88dbd386 100644 --- a/tests/baselines/reference/checkJsFiles_skipDiagnostics.symbols +++ b/tests/baselines/reference/checkJsFiles_skipDiagnostics.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles_skipDiagnostics.ts] //// + +=== a.js === var x = 0; >x : Symbol(x, Decl(a.js, 0, 3)) diff --git a/tests/baselines/reference/checkJsFiles_skipDiagnostics.types b/tests/baselines/reference/checkJsFiles_skipDiagnostics.types index 67c4fbaad1aa1..0bb1f6b73ee32 100644 --- a/tests/baselines/reference/checkJsFiles_skipDiagnostics.types +++ b/tests/baselines/reference/checkJsFiles_skipDiagnostics.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/a.js === +//// [tests/cases/compiler/checkJsFiles_skipDiagnostics.ts] //// + +=== a.js === var x = 0; >x : number >0 : 0 diff --git a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.errors.txt b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.errors.txt index 978cd8e82b7ea..50e261254c9f2 100644 --- a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.errors.txt +++ b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/file.js(11,1): error TS2322: Type '"z"' is not assignable to type '"x" | "y"'. +file.js(11,1): error TS2322: Type '"z"' is not assignable to type '"x" | "y"'. -==== tests/cases/compiler/file.js (1 errors) ==== +==== file.js (1 errors) ==== // @ts-check const obj = { x: 1, diff --git a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.js b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.js index 66c46c9214d77..c8513a0fdc65c 100644 --- a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.js +++ b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/checkJsObjectLiteralHasCheckedKeyof.ts] //// + //// [file.js] // @ts-check const obj = { diff --git a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.symbols b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.symbols index 1380ef733ccbd..15db093ec205a 100644 --- a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.symbols +++ b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file.js === +//// [tests/cases/compiler/checkJsObjectLiteralHasCheckedKeyof.ts] //// + +=== file.js === // @ts-check const obj = { >obj : Symbol(obj, Decl(file.js, 1, 5)) diff --git a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.types b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.types index 7483991884872..c8b0666cfca66 100644 --- a/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.types +++ b/tests/baselines/reference/checkJsObjectLiteralHasCheckedKeyof.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file.js === +//// [tests/cases/compiler/checkJsObjectLiteralHasCheckedKeyof.ts] //// + +=== file.js === // @ts-check const obj = { >obj : { x: number; y: number; } diff --git a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.js b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.js index b133c6c6ba593..2ed6da1651593 100644 --- a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.js +++ b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/checkJsObjectLiteralIndexSignatures.ts] //// + //// [file.js] // @ts-check diff --git a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.symbols b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.symbols index b151ab32ae1fd..1a3dc32c81143 100644 --- a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.symbols +++ b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file.js === +//// [tests/cases/compiler/checkJsObjectLiteralIndexSignatures.ts] //// + +=== file.js === // @ts-check let n = Math.random(); diff --git a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types index 21653432b5acb..9ee51c2924bc3 100644 --- a/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types +++ b/tests/baselines/reference/checkJsObjectLiteralIndexSignatures.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file.js === +//// [tests/cases/compiler/checkJsObjectLiteralIndexSignatures.ts] //// + +=== file.js === // @ts-check let n = Math.random(); diff --git a/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.symbols b/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.symbols index 34b50108d3012..d97618ffa82ab 100644 --- a/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.symbols +++ b/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file.ts === +//// [tests/cases/compiler/checkJsTypeDefNoUnusedLocalMarked.ts] //// + +=== file.ts === class Foo { >Foo : Symbol(Foo, Decl(file.ts, 0, 0)) @@ -16,7 +18,7 @@ declare global { export = Foo; >Foo : Symbol(Foo, Decl(file.ts, 0, 0)) -=== tests/cases/compiler/something.js === +=== something.js === /** @typedef {typeof import("./file")} Foo */ /** @typedef {(foo: Foo) => string} FooFun */ diff --git a/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.types b/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.types index d3c62c6f0ab07..60b349754b989 100644 --- a/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.types +++ b/tests/baselines/reference/checkJsTypeDefNoUnusedLocalMarked.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/file.ts === +//// [tests/cases/compiler/checkJsTypeDefNoUnusedLocalMarked.ts] //// + +=== file.ts === class Foo { >Foo : Foo @@ -16,16 +18,16 @@ declare global { export = Foo; >Foo : Foo -=== tests/cases/compiler/something.js === +=== something.js === /** @typedef {typeof import("./file")} Foo */ /** @typedef {(foo: Foo) => string} FooFun */ module.exports = /** @type {FooFun} */(void 0); >module.exports = /** @type {FooFun} */(void 0) : (foo: Foo) => string ->module.exports : (foo: typeof import("tests/cases/compiler/file")) => string ->module : { exports: (foo: typeof import("tests/cases/compiler/file")) => string; } ->exports : (foo: typeof import("tests/cases/compiler/file")) => string +>module.exports : (foo: typeof import("file")) => string +>module : { exports: (foo: typeof import("file")) => string; } +>exports : (foo: typeof import("file")) => string >(void 0) : FooFun >void 0 : undefined >0 : 0 diff --git a/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt b/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt index 4dc2320dcd80f..19e950b028c0a 100644 --- a/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt +++ b/tests/baselines/reference/checkJsdocOnEndOfFile.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/eof.js(2,20): error TS2304: Cannot find name 'bad'. +eof.js(2,20): error TS2304: Cannot find name 'bad'. -==== tests/cases/conformance/jsdoc/eof.js (1 errors) ==== +==== eof.js (1 errors) ==== /** * @typedef {Array} Should have error here ~~~ diff --git a/tests/baselines/reference/checkJsdocOnEndOfFile.js b/tests/baselines/reference/checkJsdocOnEndOfFile.js index a9d07d45e54ad..2afda1d7ed4ec 100644 --- a/tests/baselines/reference/checkJsdocOnEndOfFile.js +++ b/tests/baselines/reference/checkJsdocOnEndOfFile.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocOnEndOfFile.ts] //// + //// [eof.js] /** * @typedef {Array} Should have error here diff --git a/tests/baselines/reference/checkJsdocOnEndOfFile.symbols b/tests/baselines/reference/checkJsdocOnEndOfFile.symbols index 2b601e10df699..3ee1c8ce74212 100644 --- a/tests/baselines/reference/checkJsdocOnEndOfFile.symbols +++ b/tests/baselines/reference/checkJsdocOnEndOfFile.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/eof.js === +//// [tests/cases/conformance/jsdoc/checkJsdocOnEndOfFile.ts] //// + +=== eof.js === /** * @typedef {Array} Should have error here diff --git a/tests/baselines/reference/checkJsdocOnEndOfFile.types b/tests/baselines/reference/checkJsdocOnEndOfFile.types index 2b601e10df699..3ee1c8ce74212 100644 --- a/tests/baselines/reference/checkJsdocOnEndOfFile.types +++ b/tests/baselines/reference/checkJsdocOnEndOfFile.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/eof.js === +//// [tests/cases/conformance/jsdoc/checkJsdocOnEndOfFile.ts] //// + +=== eof.js === /** * @typedef {Array} Should have error here diff --git a/tests/baselines/reference/checkJsdocOptionalParamOrder.errors.txt b/tests/baselines/reference/checkJsdocOptionalParamOrder.errors.txt index 82e6f5c5d1521..b29c988e17188 100644 --- a/tests/baselines/reference/checkJsdocOptionalParamOrder.errors.txt +++ b/tests/baselines/reference/checkJsdocOptionalParamOrder.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/0.js(7,20): error TS1016: A required parameter cannot follow an optional parameter. +0.js(7,20): error TS1016: A required parameter cannot follow an optional parameter. -==== tests/cases/conformance/jsdoc/0.js (1 errors) ==== +==== 0.js (1 errors) ==== // @ts-check /** * @param {number} a diff --git a/tests/baselines/reference/checkJsdocOptionalParamOrder.js b/tests/baselines/reference/checkJsdocOptionalParamOrder.js index 69b999fb2bd85..fb8c21dabd77f 100644 --- a/tests/baselines/reference/checkJsdocOptionalParamOrder.js +++ b/tests/baselines/reference/checkJsdocOptionalParamOrder.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocOptionalParamOrder.ts] //// + //// [0.js] // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocOptionalParamOrder.symbols b/tests/baselines/reference/checkJsdocOptionalParamOrder.symbols index 786f7a1bcf5b1..61560a5271f0c 100644 --- a/tests/baselines/reference/checkJsdocOptionalParamOrder.symbols +++ b/tests/baselines/reference/checkJsdocOptionalParamOrder.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocOptionalParamOrder.ts] //// + +=== 0.js === // @ts-check /** * @param {number} a diff --git a/tests/baselines/reference/checkJsdocOptionalParamOrder.types b/tests/baselines/reference/checkJsdocOptionalParamOrder.types index 1636462c8a964..17d685cddcae1 100644 --- a/tests/baselines/reference/checkJsdocOptionalParamOrder.types +++ b/tests/baselines/reference/checkJsdocOptionalParamOrder.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocOptionalParamOrder.ts] //// + +=== 0.js === // @ts-check /** * @param {number} a diff --git a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.errors.txt b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.errors.txt index f3ea79ea97cfa..51691358499cb 100644 --- a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.errors.txt +++ b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/0.js(14,20): error TS8024: JSDoc '@param' tag has name 's', but there is no parameter with that name. +0.js(14,20): error TS8024: JSDoc '@param' tag has name 's', but there is no parameter with that name. -==== tests/cases/conformance/jsdoc/0.js (1 errors) ==== +==== 0.js (1 errors) ==== // @ts-check /** * @param {number=} n diff --git a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js index 59d2fe5b14b96..fc3748709e8a5 100644 --- a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js +++ b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocParamOnVariableDeclaredFunctionExpression.ts] //// + //// [0.js] // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.symbols b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.symbols index 82e92a5cea128..75fded2d7059d 100644 --- a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.symbols +++ b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocParamOnVariableDeclaredFunctionExpression.ts] //// + +=== 0.js === // @ts-check /** * @param {number=} n diff --git a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.types b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.types index dff461060728a..f58740120e0fc 100644 --- a/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.types +++ b/tests/baselines/reference/checkJsdocParamOnVariableDeclaredFunctionExpression.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocParamOnVariableDeclaredFunctionExpression.ts] //// + +=== 0.js === // @ts-check /** * @param {number=} n diff --git a/tests/baselines/reference/checkJsdocParamTag1.js b/tests/baselines/reference/checkJsdocParamTag1.js index 577460626a18f..495daf0bcae8d 100644 --- a/tests/baselines/reference/checkJsdocParamTag1.js +++ b/tests/baselines/reference/checkJsdocParamTag1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocParamTag1.ts] //// + //// [0.js] // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocParamTag1.symbols b/tests/baselines/reference/checkJsdocParamTag1.symbols index d16816f908b26..68bd792443955 100644 --- a/tests/baselines/reference/checkJsdocParamTag1.symbols +++ b/tests/baselines/reference/checkJsdocParamTag1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocParamTag1.ts] //// + +=== 0.js === // @ts-check /** * @param {number=} n diff --git a/tests/baselines/reference/checkJsdocParamTag1.types b/tests/baselines/reference/checkJsdocParamTag1.types index da4397da94c32..f7791479458db 100644 --- a/tests/baselines/reference/checkJsdocParamTag1.types +++ b/tests/baselines/reference/checkJsdocParamTag1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocParamTag1.ts] //// + +=== 0.js === // @ts-check /** * @param {number=} n diff --git a/tests/baselines/reference/checkJsdocReturnTag1.errors.txt b/tests/baselines/reference/checkJsdocReturnTag1.errors.txt index 69a8247b72191..5737592582e53 100644 --- a/tests/baselines/reference/checkJsdocReturnTag1.errors.txt +++ b/tests/baselines/reference/checkJsdocReturnTag1.errors.txt @@ -4,7 +4,7 @@ error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. -==== tests/cases/conformance/jsdoc/returns.js (0 errors) ==== +==== returns.js (0 errors) ==== // @ts-check /** * @returns {string} This comment is not currently exposed diff --git a/tests/baselines/reference/checkJsdocReturnTag1.js b/tests/baselines/reference/checkJsdocReturnTag1.js index 31c30e54dfc40..dfb57637c85d1 100644 --- a/tests/baselines/reference/checkJsdocReturnTag1.js +++ b/tests/baselines/reference/checkJsdocReturnTag1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocReturnTag1.ts] //// + //// [returns.js] // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocReturnTag1.symbols b/tests/baselines/reference/checkJsdocReturnTag1.symbols index ec6376d02ab9d..950164401c04c 100644 --- a/tests/baselines/reference/checkJsdocReturnTag1.symbols +++ b/tests/baselines/reference/checkJsdocReturnTag1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/returns.js === +//// [tests/cases/conformance/jsdoc/checkJsdocReturnTag1.ts] //// + +=== returns.js === // @ts-check /** * @returns {string} This comment is not currently exposed diff --git a/tests/baselines/reference/checkJsdocReturnTag1.types b/tests/baselines/reference/checkJsdocReturnTag1.types index 919b029412254..5b2f4ce07f6e3 100644 --- a/tests/baselines/reference/checkJsdocReturnTag1.types +++ b/tests/baselines/reference/checkJsdocReturnTag1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/returns.js === +//// [tests/cases/conformance/jsdoc/checkJsdocReturnTag1.ts] //// + +=== returns.js === // @ts-check /** * @returns {string} This comment is not currently exposed diff --git a/tests/baselines/reference/checkJsdocReturnTag2.errors.txt b/tests/baselines/reference/checkJsdocReturnTag2.errors.txt index 3d4ed2903ef27..9969a0fac028b 100644 --- a/tests/baselines/reference/checkJsdocReturnTag2.errors.txt +++ b/tests/baselines/reference/checkJsdocReturnTag2.errors.txt @@ -1,13 +1,13 @@ error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'outFile' instead. -tests/cases/conformance/jsdoc/returns.js(6,5): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/returns.js(13,5): error TS2322: Type 'number | boolean' is not assignable to type 'string | number'. +returns.js(6,5): error TS2322: Type 'number' is not assignable to type 'string'. +returns.js(13,5): error TS2322: Type 'number | boolean' is not assignable to type 'string | number'. Type 'boolean' is not assignable to type 'string | number'. !!! error TS5101: Option 'out' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'outFile' instead. -==== tests/cases/conformance/jsdoc/returns.js (2 errors) ==== +==== returns.js (2 errors) ==== // @ts-check /** * @returns {string} This comment is not currently exposed diff --git a/tests/baselines/reference/checkJsdocReturnTag2.js b/tests/baselines/reference/checkJsdocReturnTag2.js index 4a68e5d85b7fd..beb9fc0179f2d 100644 --- a/tests/baselines/reference/checkJsdocReturnTag2.js +++ b/tests/baselines/reference/checkJsdocReturnTag2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocReturnTag2.ts] //// + //// [returns.js] // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocReturnTag2.symbols b/tests/baselines/reference/checkJsdocReturnTag2.symbols index 43fa1a800e1f2..0dbb4a6e0106f 100644 --- a/tests/baselines/reference/checkJsdocReturnTag2.symbols +++ b/tests/baselines/reference/checkJsdocReturnTag2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/returns.js === +//// [tests/cases/conformance/jsdoc/checkJsdocReturnTag2.ts] //// + +=== returns.js === // @ts-check /** * @returns {string} This comment is not currently exposed diff --git a/tests/baselines/reference/checkJsdocReturnTag2.types b/tests/baselines/reference/checkJsdocReturnTag2.types index fe7dca7a36437..9f95e8d19c014 100644 --- a/tests/baselines/reference/checkJsdocReturnTag2.types +++ b/tests/baselines/reference/checkJsdocReturnTag2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/returns.js === +//// [tests/cases/conformance/jsdoc/checkJsdocReturnTag2.ts] //// + +=== returns.js === // @ts-check /** * @returns {string} This comment is not currently exposed diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag1.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag1.symbols index 251532e5c77d7..72a21210f009c 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag1.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag1.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag1.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag1.types b/tests/baselines/reference/checkJsdocSatisfiesTag1.types index 9a7f071e8fef6..6761002052ca3 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag1.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag1.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag1.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag10.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag10.symbols index 47ea5801f763b..26672640f4bd5 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag10.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag10.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag10.ts] //// + === /a.js === /** @typedef {"a" | "b" | "c" | "d"} Keys */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag10.types b/tests/baselines/reference/checkJsdocSatisfiesTag10.types index 7fb3c450641d7..19bb42f76165c 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag10.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag10.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag10.ts] //// + === /a.js === /** @typedef {"a" | "b" | "c" | "d"} Keys */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag11.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag11.symbols index 2cf68fe55027d..5e3af404c3ff7 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag11.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag11.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag11.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag11.types b/tests/baselines/reference/checkJsdocSatisfiesTag11.types index c02af90fc2f84..a9dfcaf190834 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag11.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag11.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag11.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag12.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag12.symbols index 62526d8a278f4..ded3671a5479c 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag12.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag12.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag12.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag12.types b/tests/baselines/reference/checkJsdocSatisfiesTag12.types index 4c767ef749d66..7bd3c095a5584 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag12.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag12.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag12.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag13.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag13.symbols index 6d34d3b11dd36..3b1396ec71266 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag13.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag13.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag13.ts] //// + === /a.js === /** @satisfies {{ f: (x: string) => string }} */ const t1 = { f: s => s.toLowerCase() }; // should work diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag13.types b/tests/baselines/reference/checkJsdocSatisfiesTag13.types index ba3a4423aac3c..7bdcc45040de7 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag13.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag13.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag13.ts] //// + === /a.js === /** @satisfies {{ f: (x: string) => string }} */ const t1 = { f: s => s.toLowerCase() }; // should work diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag14.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag14.symbols index b3d346e73b635..427e411bf235e 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag14.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag14.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag14.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag14.types b/tests/baselines/reference/checkJsdocSatisfiesTag14.types index 5f22412f586be..be25ed76fd273 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag14.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag14.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag14.ts] //// + === /a.js === /** * @typedef {Object} T1 diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag2.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag2.symbols index 242f5c2f922a7..c40b2a537bc42 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag2.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag2.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag2.ts] //// + === /a.js === /** @typedef {Object. boolean>} Predicates */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag2.types b/tests/baselines/reference/checkJsdocSatisfiesTag2.types index 3040c6258c795..58df2c842980c 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag2.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag2.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag2.ts] //// + === /a.js === /** @typedef {Object. boolean>} Predicates */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag3.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag3.symbols index d468ebb534842..1f87a5e6db84d 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag3.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag3.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag3.ts] //// + === /a.js === /** @type {{ f(s: string): void } & Record }} */ let obj = /** @satisfies {{ g(s: string): void } & Record} */ ({ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag3.types b/tests/baselines/reference/checkJsdocSatisfiesTag3.types index 5714bec139a41..75e9625488de0 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag3.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag3.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag3.ts] //// + === /a.js === /** @type {{ f(s: string): void } & Record }} */ let obj = /** @satisfies {{ g(s: string): void } & Record} */ ({ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag4.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag4.symbols index 1ffaa36ba0993..668caabf6fee4 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag4.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag4.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag4.ts] //// + === /a.js === /** diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag4.types b/tests/baselines/reference/checkJsdocSatisfiesTag4.types index fa03b4f474065..0d01dd7d19151 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag4.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag4.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag4.ts] //// + === /a.js === /** * @typedef {Object} Foo diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag5.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag5.symbols index 0e36d7d335dbd..93b511fee3b52 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag5.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag5.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag5.ts] //// + === /a.js === /** @typedef {{ move(distance: number): void }} Movable */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag5.types b/tests/baselines/reference/checkJsdocSatisfiesTag5.types index 5bcd9c0ce9337..d11b05dedbf00 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag5.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag5.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag5.ts] //// + === /a.js === /** @typedef {{ move(distance: number): void }} Movable */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag6.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag6.symbols index 76a4c6ebcf7eb..f652573f67cd0 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag6.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag6.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag6.ts] //// + === /a.js === /** * @typedef {Object} Point2d diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag6.types b/tests/baselines/reference/checkJsdocSatisfiesTag6.types index a7117dbc5a134..27731e2ff5b60 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag6.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag6.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag6.ts] //// + === /a.js === /** * @typedef {Object} Point2d diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag7.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag7.symbols index c1c87516212c2..7d72e97a3f96f 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag7.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag7.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag7.ts] //// + === /a.js === /** @typedef {"a" | "b" | "c" | "d"} Keys */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag7.types b/tests/baselines/reference/checkJsdocSatisfiesTag7.types index 2b0987ca00bc9..e5a245e579b81 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag7.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag7.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag7.ts] //// + === /a.js === /** @typedef {"a" | "b" | "c" | "d"} Keys */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag8.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag8.symbols index 8997ccecede79..1f6e6afdbe134 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag8.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag8.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag8.ts] //// + === /a.js === /** @typedef {Object.} Facts */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag8.types b/tests/baselines/reference/checkJsdocSatisfiesTag8.types index 59a3342382ffb..24ad5586b15f3 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag8.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag8.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag8.ts] //// + === /a.js === /** @typedef {Object.} Facts */ diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag9.symbols b/tests/baselines/reference/checkJsdocSatisfiesTag9.symbols index 46966d216afcf..10ea8be886c56 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag9.symbols +++ b/tests/baselines/reference/checkJsdocSatisfiesTag9.symbols @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag9.ts] //// + === /a.js === /** * @typedef {Object} Color diff --git a/tests/baselines/reference/checkJsdocSatisfiesTag9.types b/tests/baselines/reference/checkJsdocSatisfiesTag9.types index 3aaee7a16270f..98fe398fad884 100644 --- a/tests/baselines/reference/checkJsdocSatisfiesTag9.types +++ b/tests/baselines/reference/checkJsdocSatisfiesTag9.types @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocSatisfiesTag9.ts] //// + === /a.js === /** * @typedef {Object} Color diff --git a/tests/baselines/reference/checkJsdocTypeTag1.errors.txt b/tests/baselines/reference/checkJsdocTypeTag1.errors.txt index ee915f6aea327..9a2afaa049b76 100644 --- a/tests/baselines/reference/checkJsdocTypeTag1.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTag1.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/0.js(24,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. +0.js(24,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. -==== tests/cases/conformance/jsdoc/0.js (1 errors) ==== +==== 0.js (1 errors) ==== // @ts-check /** @type {String} */ var S = "hello world"; diff --git a/tests/baselines/reference/checkJsdocTypeTag1.js b/tests/baselines/reference/checkJsdocTypeTag1.js index 0613a237d7bd2..e605dfc187b34 100644 --- a/tests/baselines/reference/checkJsdocTypeTag1.js +++ b/tests/baselines/reference/checkJsdocTypeTag1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag1.ts] //// + //// [0.js] // @ts-check /** @type {String} */ diff --git a/tests/baselines/reference/checkJsdocTypeTag1.symbols b/tests/baselines/reference/checkJsdocTypeTag1.symbols index 281b59d37a0f9..9fff89ff20435 100644 --- a/tests/baselines/reference/checkJsdocTypeTag1.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag1.ts] //// + +=== 0.js === // @ts-check /** @type {String} */ var S = "hello world"; diff --git a/tests/baselines/reference/checkJsdocTypeTag1.types b/tests/baselines/reference/checkJsdocTypeTag1.types index f5ec1c0d33786..cb0e48e550f08 100644 --- a/tests/baselines/reference/checkJsdocTypeTag1.types +++ b/tests/baselines/reference/checkJsdocTypeTag1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag1.ts] //// + +=== 0.js === // @ts-check /** @type {String} */ var S = "hello world"; diff --git a/tests/baselines/reference/checkJsdocTypeTag2.errors.txt b/tests/baselines/reference/checkJsdocTypeTag2.errors.txt index ca1750593060e..fe4efc2741f8a 100644 --- a/tests/baselines/reference/checkJsdocTypeTag2.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTag2.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/jsdoc/0.js(3,5): error TS2322: Type 'boolean' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/0.js(6,5): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/0.js(8,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. -tests/cases/conformance/jsdoc/0.js(10,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/conformance/jsdoc/0.js(17,1): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/0.js(20,21): error TS2339: Property 'concat' does not exist on type 'number'. -tests/cases/conformance/jsdoc/0.js(24,19): error TS2322: Type 'number' is not assignable to type 'string'. +0.js(3,5): error TS2322: Type 'boolean' is not assignable to type 'string'. +0.js(6,5): error TS2322: Type 'string' is not assignable to type 'number'. +0.js(8,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. +0.js(10,4): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +0.js(17,1): error TS2322: Type 'number' is not assignable to type 'string'. +0.js(20,21): error TS2339: Property 'concat' does not exist on type 'number'. +0.js(24,19): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/conformance/jsdoc/0.js (7 errors) ==== +==== 0.js (7 errors) ==== // @ts-check /** @type {String} */ var S = true; diff --git a/tests/baselines/reference/checkJsdocTypeTag2.js b/tests/baselines/reference/checkJsdocTypeTag2.js index 0e550d3ba333f..1e7db9aa49c82 100644 --- a/tests/baselines/reference/checkJsdocTypeTag2.js +++ b/tests/baselines/reference/checkJsdocTypeTag2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag2.ts] //// + //// [0.js] // @ts-check /** @type {String} */ diff --git a/tests/baselines/reference/checkJsdocTypeTag2.symbols b/tests/baselines/reference/checkJsdocTypeTag2.symbols index ed35232f44544..22d02d69a0921 100644 --- a/tests/baselines/reference/checkJsdocTypeTag2.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag2.ts] //// + +=== 0.js === // @ts-check /** @type {String} */ var S = true; diff --git a/tests/baselines/reference/checkJsdocTypeTag2.types b/tests/baselines/reference/checkJsdocTypeTag2.types index 3fdd286cde1c7..5588e85cdda6a 100644 --- a/tests/baselines/reference/checkJsdocTypeTag2.types +++ b/tests/baselines/reference/checkJsdocTypeTag2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag2.ts] //// + +=== 0.js === // @ts-check /** @type {String} */ var S = true; diff --git a/tests/baselines/reference/checkJsdocTypeTag3.symbols b/tests/baselines/reference/checkJsdocTypeTag3.symbols index 4e731fbdc8748..536a506fa6b6e 100644 --- a/tests/baselines/reference/checkJsdocTypeTag3.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag3.ts] //// + +=== test.js === /** @type {Array} */ var nns; >nns : Symbol(nns, Decl(test.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsdocTypeTag3.types b/tests/baselines/reference/checkJsdocTypeTag3.types index 94d953e0b441d..593bac0790bba 100644 --- a/tests/baselines/reference/checkJsdocTypeTag3.types +++ b/tests/baselines/reference/checkJsdocTypeTag3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag3.ts] //// + +=== test.js === /** @type {Array} */ var nns; >nns : number[] diff --git a/tests/baselines/reference/checkJsdocTypeTag4.errors.txt b/tests/baselines/reference/checkJsdocTypeTag4.errors.txt index 4683f25609350..6735c424bd823 100644 --- a/tests/baselines/reference/checkJsdocTypeTag4.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTag4.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/jsdoc/test.js(5,14): error TS2344: Type 'number' does not satisfy the constraint 'string'. -tests/cases/conformance/jsdoc/test.js(7,14): error TS2344: Type 'number' does not satisfy the constraint 'string'. +test.js(5,14): error TS2344: Type 'number' does not satisfy the constraint 'string'. +test.js(7,14): error TS2344: Type 'number' does not satisfy the constraint 'string'. -==== tests/cases/conformance/jsdoc/t.d.ts (0 errors) ==== +==== t.d.ts (0 errors) ==== type A = { a: T } -==== tests/cases/conformance/jsdoc/test.js (2 errors) ==== +==== test.js (2 errors) ==== /** Also should error for jsdoc typedefs * @template {string} U * @typedef {{ b: U }} B diff --git a/tests/baselines/reference/checkJsdocTypeTag4.symbols b/tests/baselines/reference/checkJsdocTypeTag4.symbols index 50e70ad394403..3916d709ab952 100644 --- a/tests/baselines/reference/checkJsdocTypeTag4.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag4.symbols @@ -1,11 +1,13 @@ -=== tests/cases/conformance/jsdoc/t.d.ts === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag4.ts] //// + +=== t.d.ts === type A = { a: T } >A : Symbol(A, Decl(t.d.ts, 0, 0)) >T : Symbol(T, Decl(t.d.ts, 0, 7)) >a : Symbol(a, Decl(t.d.ts, 0, 28)) >T : Symbol(T, Decl(t.d.ts, 0, 7)) -=== tests/cases/conformance/jsdoc/test.js === +=== test.js === /** Also should error for jsdoc typedefs * @template {string} U * @typedef {{ b: U }} B diff --git a/tests/baselines/reference/checkJsdocTypeTag4.types b/tests/baselines/reference/checkJsdocTypeTag4.types index 1edf72d685b9f..cfec71866add9 100644 --- a/tests/baselines/reference/checkJsdocTypeTag4.types +++ b/tests/baselines/reference/checkJsdocTypeTag4.types @@ -1,9 +1,11 @@ -=== tests/cases/conformance/jsdoc/t.d.ts === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag4.ts] //// + +=== t.d.ts === type A = { a: T } >A : A >a : T -=== tests/cases/conformance/jsdoc/test.js === +=== test.js === /** Also should error for jsdoc typedefs * @template {string} U * @typedef {{ b: U }} B diff --git a/tests/baselines/reference/checkJsdocTypeTag5.errors.txt b/tests/baselines/reference/checkJsdocTypeTag5.errors.txt index aa1e9b85ed109..d1a0e459df90d 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTag5.errors.txt @@ -1,15 +1,15 @@ -tests/cases/conformance/jsdoc/test.js(3,17): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/test.js(5,14): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/test.js(7,24): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/test.js(10,17): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/test.js(12,14): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/test.js(14,24): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/test.js(28,12): error TS8030: The type of a function declaration must match the function's signature. -tests/cases/conformance/jsdoc/test.js(34,5): error TS2322: Type '1 | 2' is not assignable to type '2 | 3'. +test.js(3,17): error TS2322: Type 'number' is not assignable to type 'string'. +test.js(5,14): error TS2322: Type 'number' is not assignable to type 'string'. +test.js(7,24): error TS2322: Type 'number' is not assignable to type 'string'. +test.js(10,17): error TS2322: Type 'number' is not assignable to type 'string'. +test.js(12,14): error TS2322: Type 'number' is not assignable to type 'string'. +test.js(14,24): error TS2322: Type 'number' is not assignable to type 'string'. +test.js(28,12): error TS8030: The type of a function declaration must match the function's signature. +test.js(34,5): error TS2322: Type '1 | 2' is not assignable to type '2 | 3'. Type '1' is not assignable to type '2 | 3'. -==== tests/cases/conformance/jsdoc/test.js (8 errors) ==== +==== test.js (8 errors) ==== // all 6 should error on return statement/expression /** @type {(x: number) => string} */ function h(x) { return x } diff --git a/tests/baselines/reference/checkJsdocTypeTag5.symbols b/tests/baselines/reference/checkJsdocTypeTag5.symbols index b1910e5d72d0d..f6b32107aa4c2 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag5.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag5.ts] //// + +=== test.js === // all 6 should error on return statement/expression /** @type {(x: number) => string} */ function h(x) { return x } diff --git a/tests/baselines/reference/checkJsdocTypeTag5.types b/tests/baselines/reference/checkJsdocTypeTag5.types index c2dca1475daa3..de74c9eca9aac 100644 --- a/tests/baselines/reference/checkJsdocTypeTag5.types +++ b/tests/baselines/reference/checkJsdocTypeTag5.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag5.ts] //// + +=== test.js === // all 6 should error on return statement/expression /** @type {(x: number) => string} */ function h(x) { return x } diff --git a/tests/baselines/reference/checkJsdocTypeTag6.errors.txt b/tests/baselines/reference/checkJsdocTypeTag6.errors.txt index 762128117ce54..0cc2888acbf66 100644 --- a/tests/baselines/reference/checkJsdocTypeTag6.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTag6.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/jsdoc/test.js(1,12): error TS8030: The type of a function declaration must match the function's signature. -tests/cases/conformance/jsdoc/test.js(7,5): error TS2322: Type '(prop: any) => void' is not assignable to type '{ prop: string; }'. -tests/cases/conformance/jsdoc/test.js(10,12): error TS8030: The type of a function declaration must match the function's signature. -tests/cases/conformance/jsdoc/test.js(23,12): error TS8030: The type of a function declaration must match the function's signature. -tests/cases/conformance/jsdoc/test.js(27,7): error TS2322: Type '(more: any) => void' is not assignable to type '() => void'. +test.js(1,12): error TS8030: The type of a function declaration must match the function's signature. +test.js(7,5): error TS2322: Type '(prop: any) => void' is not assignable to type '{ prop: string; }'. +test.js(10,12): error TS8030: The type of a function declaration must match the function's signature. +test.js(23,12): error TS8030: The type of a function declaration must match the function's signature. +test.js(27,7): error TS2322: Type '(more: any) => void' is not assignable to type '() => void'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/jsdoc/test.js(30,7): error TS2322: Type '(more: any) => void' is not assignable to type '() => void'. +test.js(30,7): error TS2322: Type '(more: any) => void' is not assignable to type '() => void'. Target signature provides too few arguments. Expected 1 or more, but got 0. -tests/cases/conformance/jsdoc/test.js(34,3): error TS2322: Type '(more: any) => void' is not assignable to type '() => void'. +test.js(34,3): error TS2322: Type '(more: any) => void' is not assignable to type '() => void'. Target signature provides too few arguments. Expected 1 or more, but got 0. -==== tests/cases/conformance/jsdoc/test.js (7 errors) ==== +==== test.js (7 errors) ==== /** @type {number} */ ~~~~~~ !!! error TS8030: The type of a function declaration must match the function's signature. diff --git a/tests/baselines/reference/checkJsdocTypeTag6.symbols b/tests/baselines/reference/checkJsdocTypeTag6.symbols index e87b49f2a1d82..04aa4166a15d3 100644 --- a/tests/baselines/reference/checkJsdocTypeTag6.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag6.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag6.ts] //// + +=== test.js === /** @type {number} */ function f() { >f : Symbol(f, Decl(test.js, 0, 0)) diff --git a/tests/baselines/reference/checkJsdocTypeTag6.types b/tests/baselines/reference/checkJsdocTypeTag6.types index 3feb2222e292b..88398830d0f7f 100644 --- a/tests/baselines/reference/checkJsdocTypeTag6.types +++ b/tests/baselines/reference/checkJsdocTypeTag6.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag6.ts] //// + +=== test.js === /** @type {number} */ function f() { >f : () => number diff --git a/tests/baselines/reference/checkJsdocTypeTag7.symbols b/tests/baselines/reference/checkJsdocTypeTag7.symbols index 50b91e0984572..99d40375611f9 100644 --- a/tests/baselines/reference/checkJsdocTypeTag7.symbols +++ b/tests/baselines/reference/checkJsdocTypeTag7.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag7.ts] //// + +=== test.js === /** * @typedef {(a: string, b: number) => void} Foo */ diff --git a/tests/baselines/reference/checkJsdocTypeTag7.types b/tests/baselines/reference/checkJsdocTypeTag7.types index 990535c17e45f..6899db37955bb 100644 --- a/tests/baselines/reference/checkJsdocTypeTag7.types +++ b/tests/baselines/reference/checkJsdocTypeTag7.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/test.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTag7.ts] //// + +=== test.js === /** * @typedef {(a: string, b: number) => void} Foo */ diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.errors.txt index 4d2080607d510..42b3a6b5ecab7 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/a.js(8,18): error TS2322: Type '{ c: boolean; }' is not assignable to type 'Foo'. +a.js(8,18): error TS2322: Type '{ c: boolean; }' is not assignable to type 'Foo'. Object literal may only specify known properties, and 'c' does not exist in type 'Foo'. -==== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment1.js (0 errors) ==== +==== checkJsdocTypeTagOnExportAssignment1.js (0 errors) ==== -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== /** * @typedef {Object} Foo * @property {boolean} a @@ -17,7 +17,7 @@ tests/cases/compiler/a.js(8,18): error TS2322: Type '{ c: boolean; }' is not ass !!! error TS2322: Type '{ c: boolean; }' is not assignable to type 'Foo'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'Foo'. -==== tests/cases/compiler/b.js (0 errors) ==== +==== b.js (0 errors) ==== import a from "./a"; a; \ No newline at end of file diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.symbols index 22b10b5d5173d..7d4e43a11eb3c 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment1.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment1.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment1.js === + +=== a.js === /** * @typedef {Object} Foo * @property {boolean} a @@ -11,7 +13,7 @@ export default { c: false }; >c : Symbol(c, Decl(a.js, 7, 16)) -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; >a : Symbol(a, Decl(b.js, 0, 6)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.types index 0ebe0b11b2874..1ad7a123fa545 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment1.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment1.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment1.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment1.js === + +=== a.js === /** * @typedef {Object} Foo * @property {boolean} a @@ -13,10 +15,10 @@ export default { c: false }; >c : boolean >false : false -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo a; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.errors.txt index e3c3befbcacbd..faa2fbccec9d9 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.errors.txt @@ -1,23 +1,23 @@ -tests/cases/compiler/b.js(2,18): error TS2322: Type '{ c: boolean; }' is not assignable to type 'Foo'. +b.js(2,18): error TS2322: Type '{ c: boolean; }' is not assignable to type 'Foo'. Object literal may only specify known properties, and 'c' does not exist in type 'Foo'. -==== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment2.js (0 errors) ==== +==== checkJsdocTypeTagOnExportAssignment2.js (0 errors) ==== -==== tests/cases/compiler/a.ts (0 errors) ==== +==== a.ts (0 errors) ==== export interface Foo { a: number; b: number; } -==== tests/cases/compiler/b.js (1 errors) ==== +==== b.js (1 errors) ==== /** @type {import("./a").Foo} */ export default { c: false }; ~ !!! error TS2322: Type '{ c: boolean; }' is not assignable to type 'Foo'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'Foo'. -==== tests/cases/compiler/c.js (0 errors) ==== +==== c.js (0 errors) ==== import b from "./b"; b; \ No newline at end of file diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.symbols index b24c0e9142a26..1dc728260e935 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment2.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment2.ts] //// -=== tests/cases/compiler/a.ts === +=== checkJsdocTypeTagOnExportAssignment2.js === + +=== a.ts === export interface Foo { >Foo : Symbol(Foo, Decl(a.ts, 0, 0)) @@ -11,12 +13,12 @@ export interface Foo { >b : Symbol(Foo.b, Decl(a.ts, 1, 14)) } -=== tests/cases/compiler/b.js === +=== b.js === /** @type {import("./a").Foo} */ export default { c: false }; >c : Symbol(c, Decl(b.js, 1, 16)) -=== tests/cases/compiler/c.js === +=== c.js === import b from "./b"; >b : Symbol(b, Decl(c.js, 0, 6)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.types index e8bbda7ca55d8..a0bdcb21f24f7 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment2.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment2.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment2.ts] //// -=== tests/cases/compiler/a.ts === +=== checkJsdocTypeTagOnExportAssignment2.js === + +=== a.ts === export interface Foo { a: number; >a : number @@ -9,17 +11,17 @@ export interface Foo { >b : number } -=== tests/cases/compiler/b.js === +=== b.js === /** @type {import("./a").Foo} */ export default { c: false }; >{ c: false } : { c: boolean; } >c : boolean >false : false -=== tests/cases/compiler/c.js === +=== c.js === import b from "./b"; ->b : import("tests/cases/compiler/a").Foo +>b : import("a").Foo b; ->b : import("tests/cases/compiler/a").Foo +>b : import("a").Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.errors.txt index 77881a2b223ed..71a14f0261804 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/a.js(10,16): error TS2739: Type '{ c: number; }' is missing the following properties from type 'Foo': a, b +a.js(10,16): error TS2739: Type '{ c: number; }' is missing the following properties from type 'Foo': a, b -==== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment3.js (0 errors) ==== +==== checkJsdocTypeTagOnExportAssignment3.js (0 errors) ==== -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== /** * @typedef {Object} Foo * @property {boolean} a @@ -17,7 +17,7 @@ tests/cases/compiler/a.js(10,16): error TS2739: Type '{ c: number; }' is missing ~~~ !!! error TS2739: Type '{ c: number; }' is missing the following properties from type 'Foo': a, b -==== tests/cases/compiler/b.js (0 errors) ==== +==== b.js (0 errors) ==== import a from "./a"; a; \ No newline at end of file diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.symbols index c57b4851ad917..ed178d097d982 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment3.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment3.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment3.js === + +=== a.js === /** * @typedef {Object} Foo * @property {boolean} a @@ -15,7 +17,7 @@ const bar = { c: 1 }; export default bar; >bar : Symbol(bar, Decl(a.js, 6, 5)) -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; >a : Symbol(a, Decl(b.js, 0, 6)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.types index 440d26570b56d..c71af7b66c1e5 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment3.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment3.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment3.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment3.js === + +=== a.js === /** * @typedef {Object} Foo * @property {boolean} a @@ -17,10 +19,10 @@ const bar = { c: 1 }; export default bar; >bar : { c: number; } -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo a; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.errors.txt index 331a2550980b7..b9fbe6d353106 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/a.js(6,16): error TS2322: Type 'string' is not assignable to type 'number'. +a.js(6,16): error TS2322: Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment4.js (0 errors) ==== +==== checkJsdocTypeTagOnExportAssignment4.js (0 errors) ==== -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== /** * @typedef {number} Foo */ diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.symbols index 65ff844759423..0a3192894413f 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment4.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment4.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment4.js === + +=== a.js === /** * @typedef {number} Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.types index 65ff844759423..0a3192894413f 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment4.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment4.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment4.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment4.js === + +=== a.js === /** * @typedef {number} Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.symbols index fd98f27eaa320..7241719456114 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment5.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment5.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment5.js === + +=== a.js === /** * @typedef {Object} Foo * @property {number} a @@ -12,7 +14,7 @@ export default { a: 1, b: 1 }; >a : Symbol(a, Decl(a.js, 7, 16)) >b : Symbol(b, Decl(a.js, 7, 22)) -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; >a : Symbol(a, Decl(b.js, 0, 6)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.types index 5821997d0d741..281fc855ad962 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment5.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment5.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment5.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment5.js === + +=== a.js === /** * @typedef {Object} Foo * @property {number} a @@ -15,10 +17,10 @@ export default { a: 1, b: 1 }; >b : number >1 : 1 -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo a; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.errors.txt index 1945a6f88ef2a..f725c913f8732 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/a.js(8,30): error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'Foo'. +a.js(8,30): error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'Foo'. Object literal may only specify known properties, and 'c' does not exist in type 'Foo'. -==== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment6.js (0 errors) ==== +==== checkJsdocTypeTagOnExportAssignment6.js (0 errors) ==== -==== tests/cases/compiler/a.js (1 errors) ==== +==== a.js (1 errors) ==== /** * @typedef {Object} Foo * @property {number} a @@ -17,7 +17,7 @@ tests/cases/compiler/a.js(8,30): error TS2322: Type '{ a: number; b: number; c: !!! error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'Foo'. !!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'Foo'. -==== tests/cases/compiler/b.js (0 errors) ==== +==== b.js (0 errors) ==== import a from "./a"; a; \ No newline at end of file diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.symbols index c8e03908a2c80..6ad4743a1212d 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment6.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment6.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment6.js === + +=== a.js === /** * @typedef {Object} Foo * @property {number} a @@ -13,7 +15,7 @@ export default { a: 1, b: 1, c: 1 }; >b : Symbol(b, Decl(a.js, 7, 22)) >c : Symbol(c, Decl(a.js, 7, 28)) -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; >a : Symbol(a, Decl(b.js, 0, 6)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.types index 9a0dcdbdeba44..f4c55c52e4da0 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment6.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment6.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment6.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment6.js === + +=== a.js === /** * @typedef {Object} Foo * @property {number} a @@ -17,10 +19,10 @@ export default { a: 1, b: 1, c: 1 }; >c : number >1 : 1 -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo a; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.symbols index d5e1b4274e36e..679099f3e2dc6 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment7.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment7.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment7.js === + +=== a.js === /** * @typedef {Object} Foo * @property {number} a @@ -17,7 +19,7 @@ const abc = { a: 1, b: 1, c: 1 }; export default abc; >abc : Symbol(abc, Decl(a.js, 6, 5)) -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; >a : Symbol(a, Decl(b.js, 0, 6)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.types index eda30a44f9e87..904013b9a4ab5 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment7.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment7.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment7.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment7.js === + +=== a.js === /** * @typedef {Object} Foo * @property {number} a @@ -21,10 +23,10 @@ const abc = { a: 1, b: 1, c: 1 }; export default abc; >abc : { a: number; b: number; c: number; } -=== tests/cases/compiler/b.js === +=== b.js === import a from "./a"; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo a; ->a : import("tests/cases/compiler/a").Foo +>a : import("a").Foo diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.symbols b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.symbols index d605d9fc7c857..4e606e8a8bc43 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.symbols @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment8.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment8.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment8.js === + +=== a.js === /** * @typedef Foo * @property {string} a diff --git a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.types b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.types index 09cc754f12c33..645e035f177a4 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnExportAssignment8.types @@ -1,6 +1,8 @@ -=== tests/cases/compiler/checkJsdocTypeTagOnExportAssignment8.js === +//// [tests/cases/compiler/checkJsdocTypeTagOnExportAssignment8.ts] //// -=== tests/cases/compiler/a.js === +=== checkJsdocTypeTagOnExportAssignment8.js === + +=== a.js === /** * @typedef Foo * @property {string} a diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.js b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.js index 90f83b4ff999d..1c5c61fcbf5f2 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.js +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty1.ts] //// + //// [0.js] // @ts-check var lol = "hello Lol" diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.symbols b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.symbols index b2e22ae924a95..d26882ceffff4 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty1.ts] //// + +=== 0.js === // @ts-check var lol = "hello Lol" >lol : Symbol(lol, Decl(0.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.types b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.types index eba23433568cd..0488efc558ff3 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty1.ts] //// + +=== 0.js === // @ts-check var lol = "hello Lol" >lol : string diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt index 7fea8bc1a09e6..39486a25a3b87 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/jsdoc/0.js(5,3): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/0.js(8,7): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/0.js(11,20): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/0.js(13,15): error TS2322: Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsdoc/0.js(15,3): error TS2322: Type 'undefined' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/0.js(19,5): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/0.js(22,5): error TS2322: Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsdoc/0.js(22,22): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. +0.js(5,3): error TS2322: Type 'number' is not assignable to type 'string'. +0.js(8,7): error TS2322: Type 'string' is not assignable to type 'number'. +0.js(11,20): error TS2322: Type 'string' is not assignable to type 'number'. +0.js(13,15): error TS2322: Type 'string' is not assignable to type 'number'. +0.js(15,3): error TS2322: Type 'undefined' is not assignable to type 'string'. +0.js(19,5): error TS2322: Type 'number' is not assignable to type 'string'. +0.js(22,5): error TS2322: Type 'number' is not assignable to type 'string'. +0.js(22,22): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -==== tests/cases/conformance/jsdoc/0.js (8 errors) ==== +==== 0.js (8 errors) ==== // @ts-check var lol; const obj = { diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.js b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.js index ab574fddcedbf..62fe33e8b2675 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.js +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty2.ts] //// + //// [0.js] // @ts-check var lol; diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.symbols b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.symbols index 603b395a7558d..a457021d47266 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.symbols +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty2.ts] //// + +=== 0.js === // @ts-check var lol; >lol : Symbol(lol, Decl(0.js, 1, 3)) diff --git a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.types b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.types index 37c2bc2d24013..6ffda7fd24cb1 100644 --- a/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.types +++ b/tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypeTagOnObjectProperty2.ts] //// + +=== 0.js === // @ts-check var lol; >lol : any diff --git a/tests/baselines/reference/checkJsdocTypedefInParamTag1.js b/tests/baselines/reference/checkJsdocTypedefInParamTag1.js index d50f126c54e1d..15c7e79d6f7bb 100644 --- a/tests/baselines/reference/checkJsdocTypedefInParamTag1.js +++ b/tests/baselines/reference/checkJsdocTypedefInParamTag1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts] //// + //// [0.js] // @ts-check /** diff --git a/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols b/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols index e6f98a76fa316..f0f06c6fc06db 100644 --- a/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols +++ b/tests/baselines/reference/checkJsdocTypedefInParamTag1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts] //// + +=== 0.js === // @ts-check /** * @typedef {Object} Opts diff --git a/tests/baselines/reference/checkJsdocTypedefInParamTag1.types b/tests/baselines/reference/checkJsdocTypedefInParamTag1.types index ffc7fe505e6d1..72342ed3d0ebc 100644 --- a/tests/baselines/reference/checkJsdocTypedefInParamTag1.types +++ b/tests/baselines/reference/checkJsdocTypedefInParamTag1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypedefInParamTag1.ts] //// + +=== 0.js === // @ts-check /** * @typedef {Object} Opts diff --git a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.errors.txt b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.errors.txt index 52b43068c0493..754da41801917 100644 --- a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.errors.txt +++ b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsdoc/0.js(10,20): error TS2694: Namespace 'exports' has no exported member 'SomeName'. +0.js(10,20): error TS2694: Namespace 'exports' has no exported member 'SomeName'. -==== tests/cases/conformance/jsdoc/0.js (1 errors) ==== +==== 0.js (1 errors) ==== // @ts-check var exports = {}; diff --git a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js index 7f4d7f4bcfd59..5289265970499 100644 --- a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js +++ b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsdoc/checkJsdocTypedefOnlySourceFile.ts] //// + //// [0.js] // @ts-check diff --git a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.symbols b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.symbols index 0adf9a93444a1..91141f5782f21 100644 --- a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.symbols +++ b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypedefOnlySourceFile.ts] //// + +=== 0.js === // @ts-check var exports = {}; diff --git a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.types b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.types index 9dad55cb24381..b22caa7dc8be2 100644 --- a/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.types +++ b/tests/baselines/reference/checkJsdocTypedefOnlySourceFile.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsdoc/0.js === +//// [tests/cases/conformance/jsdoc/checkJsdocTypedefOnlySourceFile.ts] //// + +=== 0.js === // @ts-check var exports = {}; diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt index e003223fd1d9f..5736290f8a104 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,18): error TS2769: No overload matches this call. +checkJsxChildrenCanBeTupleType.tsx(17,18): error TS2769: No overload matches this call. Overload 1 of 2, '(props: Readonly): ResizablePanel', gave the following error. Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly'. Types of property 'children' are incompatible. @@ -10,7 +10,7 @@ tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,18): error TS2 Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'. -==== tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx (1 errors) ==== +==== checkJsxChildrenCanBeTupleType.tsx (1 errors) ==== /// import React from 'react' diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js index 6464dc91118f5..e39ef89f279b1 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx] //// + //// [checkJsxChildrenCanBeTupleType.tsx] /// diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols index eb16e5a085075..75be44424d62f 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx] //// + +=== checkJsxChildrenCanBeTupleType.tsx === /// import React from 'react' diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.types b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.types index a710c9b178775..ad9c4aeda1fad 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.types +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx] //// + +=== checkJsxChildrenCanBeTupleType.tsx === /// import React from 'react' diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.js b/tests/baselines/reference/checkJsxChildrenProperty1.js index 8609e012d74f0..90e72ea120cf6 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.js +++ b/tests/baselines/reference/checkJsxChildrenProperty1.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.symbols b/tests/baselines/reference/checkJsxChildrenProperty1.symbols index ede60746f4bf8..03f6c72ee088f 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty1.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.types b/tests/baselines/reference/checkJsxChildrenProperty1.types index 1a436091178a8..43f8d3227b900 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.types +++ b/tests/baselines/reference/checkJsxChildrenProperty1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty10.js b/tests/baselines/reference/checkJsxChildrenProperty10.js index 18d1f3affa33e..a63bd97c28072 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty10.js +++ b/tests/baselines/reference/checkJsxChildrenProperty10.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty10.tsx] //// + //// [file.tsx] declare module JSX { interface Element { } diff --git a/tests/baselines/reference/checkJsxChildrenProperty10.symbols b/tests/baselines/reference/checkJsxChildrenProperty10.symbols index bf054377fb16a..af85623a3de85 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty10.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty10.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty10.tsx] //// + +=== file.tsx === declare module JSX { >JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty10.types b/tests/baselines/reference/checkJsxChildrenProperty10.types index 785e690f637b2..a58e7e69bd556 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty10.types +++ b/tests/baselines/reference/checkJsxChildrenProperty10.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty10.tsx] //// + +=== file.tsx === declare module JSX { interface Element { } interface ElementAttributesProperty { props: {} } diff --git a/tests/baselines/reference/checkJsxChildrenProperty11.js b/tests/baselines/reference/checkJsxChildrenProperty11.js index 18d1f3affa33e..9ba605e32c7aa 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty11.js +++ b/tests/baselines/reference/checkJsxChildrenProperty11.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty11.tsx] //// + //// [file.tsx] declare module JSX { interface Element { } diff --git a/tests/baselines/reference/checkJsxChildrenProperty11.symbols b/tests/baselines/reference/checkJsxChildrenProperty11.symbols index bf054377fb16a..3882f95268d3f 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty11.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty11.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty11.tsx] //// + +=== file.tsx === declare module JSX { >JSX : Symbol(JSX, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty11.types b/tests/baselines/reference/checkJsxChildrenProperty11.types index 785e690f637b2..40be945c2a31b 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty11.types +++ b/tests/baselines/reference/checkJsxChildrenProperty11.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty11.tsx] //// + +=== file.tsx === declare module JSX { interface Element { } interface ElementAttributesProperty { props: {} } diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.js b/tests/baselines/reference/checkJsxChildrenProperty12.js index e08be055fe857..5288eddbe8b90 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.js +++ b/tests/baselines/reference/checkJsxChildrenProperty12.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.symbols b/tests/baselines/reference/checkJsxChildrenProperty12.symbols index 09080234ea930..6d3f833fe7024 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty12.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.types b/tests/baselines/reference/checkJsxChildrenProperty12.types index 9204e4985d26e..36c1b1914a709 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.types +++ b/tests/baselines/reference/checkJsxChildrenProperty12.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt index c926980cab11f..3f1b4539a58d9 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty13.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/file.tsx(12,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. +file.tsx(12,30): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== file.tsx (1 errors) ==== import React = require('react'); interface ButtonProp { diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.js b/tests/baselines/reference/checkJsxChildrenProperty13.js index 52bff75c85999..304266b096d0c 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.js +++ b/tests/baselines/reference/checkJsxChildrenProperty13.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.symbols b/tests/baselines/reference/checkJsxChildrenProperty13.symbols index 24bf8a2162a3c..d79d9df5d7ccc 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty13.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.types b/tests/baselines/reference/checkJsxChildrenProperty13.types index 38cc2660c0869..74df7e30b38f2 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.types +++ b/tests/baselines/reference/checkJsxChildrenProperty13.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt index 0f44d023a76a4..0fefce4922a9f 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty14.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/file.tsx(42,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided. +file.tsx(42,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided. -==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== +==== file.tsx (1 errors) ==== import React = require('react'); interface Prop { diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.js b/tests/baselines/reference/checkJsxChildrenProperty14.js index a4ab39422e756..ea803d1134c64 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.js +++ b/tests/baselines/reference/checkJsxChildrenProperty14.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.symbols b/tests/baselines/reference/checkJsxChildrenProperty14.symbols index c8b5ef0e9694a..b9990ebaadeb4 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty14.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.types b/tests/baselines/reference/checkJsxChildrenProperty14.types index 1910d47a30446..d30f6b0678e07 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.types +++ b/tests/baselines/reference/checkJsxChildrenProperty14.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty14.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt index d0be275765ffd..bd58dea1368da 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty15.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/jsx/file.tsx(10,17): error TS2322: Type '{ children: Element; }' is not assignable to type 'IntrinsicAttributes'. +file.tsx(10,17): error TS2322: Type '{ children: Element; }' is not assignable to type 'IntrinsicAttributes'. Property 'children' does not exist on type 'IntrinsicAttributes'. -tests/cases/conformance/jsx/file.tsx(11,13): error TS2322: Type '{ children: Element; key: string; }' is not assignable to type 'IntrinsicAttributes'. +file.tsx(11,13): error TS2322: Type '{ children: Element; key: string; }' is not assignable to type 'IntrinsicAttributes'. Property 'children' does not exist on type 'IntrinsicAttributes'. -tests/cases/conformance/jsx/file.tsx(12,13): error TS2322: Type '{ children: Element[]; key: string; }' is not assignable to type 'IntrinsicAttributes'. +file.tsx(12,13): error TS2322: Type '{ children: Element[]; key: string; }' is not assignable to type 'IntrinsicAttributes'. Property 'children' does not exist on type 'IntrinsicAttributes'. -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== file.tsx (3 errors) ==== import React = require('react'); const Tag = (x: {}) =>
; diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.js b/tests/baselines/reference/checkJsxChildrenProperty15.js index 17c0d417862c2..69798d43b296e 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty15.js +++ b/tests/baselines/reference/checkJsxChildrenProperty15.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.symbols b/tests/baselines/reference/checkJsxChildrenProperty15.symbols index ec8e0ab5b0b5e..771d3d7eff87c 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty15.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty15.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty15.types b/tests/baselines/reference/checkJsxChildrenProperty15.types index 00b70f990fc17..db54e93977705 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty15.types +++ b/tests/baselines/reference/checkJsxChildrenProperty15.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty15.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty16.symbols b/tests/baselines/reference/checkJsxChildrenProperty16.symbols index 32806ee98cfae..b326f33ab7be5 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty16.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty16.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/checkJsxChildrenProperty16.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty16.tsx] //// + +=== checkJsxChildrenProperty16.tsx === /// // repro from #53493 diff --git a/tests/baselines/reference/checkJsxChildrenProperty16.types b/tests/baselines/reference/checkJsxChildrenProperty16.types index bf10ebff297bf..735d396f340b2 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty16.types +++ b/tests/baselines/reference/checkJsxChildrenProperty16.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/checkJsxChildrenProperty16.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty16.tsx] //// + +=== checkJsxChildrenProperty16.tsx === /// // repro from #53493 diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt index 23b6b7287147d..51b0362c90e27 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty2.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/jsx/file.tsx(14,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. -tests/cases/conformance/jsx/file.tsx(17,11): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. -tests/cases/conformance/jsx/file.tsx(31,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. -tests/cases/conformance/jsx/file.tsx(37,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. -tests/cases/conformance/jsx/file.tsx(43,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. -tests/cases/conformance/jsx/file.tsx(49,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. +file.tsx(14,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. +file.tsx(17,11): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten. +file.tsx(31,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. +file.tsx(37,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. +file.tsx(43,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. +file.tsx(49,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided. -==== tests/cases/conformance/jsx/file.tsx (6 errors) ==== +==== file.tsx (6 errors) ==== import React = require('react'); interface Prop { @@ -23,7 +23,7 @@ tests/cases/conformance/jsx/file.tsx(49,6): error TS2746: This JSX tag's 'childr let k = ; ~~~~ !!! error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. -!!! related TS2728 tests/cases/conformance/jsx/file.tsx:6:5: 'children' is declared here. +!!! related TS2728 file.tsx:6:5: 'children' is declared here. let k0 = diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.js b/tests/baselines/reference/checkJsxChildrenProperty2.js index 1adf9bef68b0c..b609be2a5cc68 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.js +++ b/tests/baselines/reference/checkJsxChildrenProperty2.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.symbols b/tests/baselines/reference/checkJsxChildrenProperty2.symbols index 882c83b177a06..5a97da007b5eb 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.types b/tests/baselines/reference/checkJsxChildrenProperty2.types index ea2974f6a086b..7c2ea1ff3fa5e 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.types +++ b/tests/baselines/reference/checkJsxChildrenProperty2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.js b/tests/baselines/reference/checkJsxChildrenProperty3.js index bf692a3fbdab5..6e5d5407baa78 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.js +++ b/tests/baselines/reference/checkJsxChildrenProperty3.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.symbols b/tests/baselines/reference/checkJsxChildrenProperty3.symbols index ea1beff75ac56..3c5afc6327db6 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.types b/tests/baselines/reference/checkJsxChildrenProperty3.types index 80ed6a9ce1acc..de48b076dd6e2 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.types +++ b/tests/baselines/reference/checkJsxChildrenProperty3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index f5daf1b17c0b2..523bfb49a270b 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? -tests/cases/conformance/jsx/file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. -tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. +file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? +file.tsx(36,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. +file.tsx(39,15): error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== file.tsx (3 errors) ==== import React = require('react'); interface IUser { @@ -30,7 +30,7 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) =

{ user.NAme }

~~~~ !!! error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? -!!! related TS2728 tests/cases/conformance/jsx/file.tsx:4:5: 'Name' is declared here. +!!! related TS2728 file.tsx:4:5: 'Name' is declared here. ) } ); @@ -49,7 +49,7 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ) } ~~~~~~~~~~~~~ !!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. -!!! related TS6212 tests/cases/conformance/jsx/file.tsx:36:15: Did you mean to call this expression? +!!! related TS6212 file.tsx:36:15: Did you mean to call this expression? { user => ( ~~~~~~~~~

{ user.Name }

@@ -57,7 +57,7 @@ tests/cases/conformance/jsx/file.tsx(39,15): error TS2322: Type '(user: IUser) = ) } ~~~~~~~~~~~~~ !!! error TS2322: Type '(user: IUser) => Element' is not assignable to type 'boolean | any[] | ReactChild'. -!!! related TS6212 tests/cases/conformance/jsx/file.tsx:39:15: Did you mean to call this expression? +!!! related TS6212 file.tsx:39:15: Did you mean to call this expression? ); } \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.js b/tests/baselines/reference/checkJsxChildrenProperty4.js index 4f37fbdcb4d4a..1c11fbdb15b27 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.js +++ b/tests/baselines/reference/checkJsxChildrenProperty4.js @@ -1,3 +1,5 @@ +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx] //// + //// [file.tsx] import React = require('react'); diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.symbols b/tests/baselines/reference/checkJsxChildrenProperty4.symbols index 6372113ea62d8..271b41b652e27 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.symbols +++ b/tests/baselines/reference/checkJsxChildrenProperty4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx] //// + +=== file.tsx === import React = require('react'); >React : Symbol(React, Decl(file.tsx, 0, 0)) diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.types b/tests/baselines/reference/checkJsxChildrenProperty4.types index 7bbf7d7601d8d..e9883a09b40cf 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.types +++ b/tests/baselines/reference/checkJsxChildrenProperty4.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/file.tsx === +//// [tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx] //// + +=== file.tsx === import React = require('react'); >React : typeof React diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt index aad013f4d8544..a33a925ab34e8 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/jsx/file.tsx(20,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. -tests/cases/conformance/jsx/file.tsx(25,9): error TS2740: Type 'ReactElement' is missing the following properties from type 'Button': render, setState, forceUpdate, state, and 2 more. -tests/cases/conformance/jsx/file.tsx(29,10): error TS2740: Type 'typeof Button' is missing the following properties from type 'Button': render, setState, forceUpdate, props, and 3 more. +file.tsx(20,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. +file.tsx(25,9): error TS2740: Type 'ReactElement' is missing the following properties from type 'Button': render, setState, forceUpdate, state, and 2 more. +file.tsx(29,10): error TS2740: Type 'typeof Button' is missing the following properties from type 'Button': render, setState, forceUpdate, props, and 3 more. -==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== +==== file.tsx (3 errors) ==== import React = require('react'); interface Prop { @@ -26,7 +26,7 @@ tests/cases/conformance/jsx/file.tsx(29,10): error TS2740: Type 'typeof Button' let k = ; ~~~~ !!! error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'. -!!! related TS2728 tests/cases/conformance/jsx/file.tsx:6:5: 'children' is declared here. +!!! related TS2728 file.tsx:6:5: 'children' is declared here. // Error: JSX.element is not the same as JSX.ElementClass let k1 = @@ -34,12 +34,12 @@ tests/cases/conformance/jsx/file.tsx(29,10): error TS2740: Type 'typeof Button'
; >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) -=== tests/cases/conformance/jsx/declaration.d.ts === +=== declaration.d.ts === declare module "classnames"; >"classnames" : Symbol("classnames", Decl(declaration.d.ts, 0, 0)) diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences1.types b/tests/baselines/reference/correctlyMarkAliasAsReferences1.types index 4dd55f7e7c3bc..e8cc3082d3abd 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences1.types +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences1.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/0.tsx === +//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx] //// + +=== 0.tsx === /// import * as cx from 'classnames'; >cx : any @@ -29,7 +31,7 @@ let k = ; >button : any -=== tests/cases/conformance/jsx/declaration.d.ts === +=== declaration.d.ts === declare module "classnames"; >"classnames" : any diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols index c316837d7c13c..24850513fcdc2 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/0.tsx === +//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx] //// + +=== 0.tsx === /// import * as cx from 'classnames'; >cx : Symbol(cx, Decl(0.tsx, 1, 6)) @@ -24,7 +26,7 @@ let k = ; >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) -=== tests/cases/conformance/jsx/declaration.d.ts === +=== declaration.d.ts === declare module "classnames"; >"classnames" : Symbol("classnames", Decl(declaration.d.ts, 0, 0)) diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences2.types b/tests/baselines/reference/correctlyMarkAliasAsReferences2.types index 3880a2002e5eb..8dec30c47b1cd 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences2.types +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences2.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/0.tsx === +//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx] //// + +=== 0.tsx === /// import * as cx from 'classnames'; >cx : any @@ -30,7 +32,7 @@ let k = ; >button : any -=== tests/cases/conformance/jsx/declaration.d.ts === +=== declaration.d.ts === declare module "classnames"; >"classnames" : any diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt index 080d37c28cb37..47a8158859ea4 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/0.tsx(6,21): error TS2698: Spread types may only be created from object types. +0.tsx(6,21): error TS2698: Spread types may only be created from object types. -==== tests/cases/conformance/jsx/0.tsx (1 errors) ==== +==== 0.tsx (1 errors) ==== /// import * as cx from 'classnames'; import * as React from "react"; @@ -13,6 +13,6 @@ tests/cases/conformance/jsx/0.tsx(6,21): error TS2698: Spread types may only be ; -==== tests/cases/conformance/jsx/declaration.d.ts (0 errors) ==== +==== declaration.d.ts (0 errors) ==== declare module "classnames"; \ No newline at end of file diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols index 0c7fe97979fdd..35fdd60bdd447 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/0.tsx === +//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx] //// + +=== 0.tsx === /// import * as cx from 'classnames'; >cx : Symbol(cx, Decl(0.tsx, 1, 6)) @@ -23,7 +25,7 @@ let k = ; >button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43)) -=== tests/cases/conformance/jsx/declaration.d.ts === +=== declaration.d.ts === declare module "classnames"; >"classnames" : Symbol("classnames", Decl(declaration.d.ts, 0, 0)) diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences3.types b/tests/baselines/reference/correctlyMarkAliasAsReferences3.types index fa16d7d814bae..fb8fbdc5a4dc7 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences3.types +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences3.types @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/0.tsx === +//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx] //// + +=== 0.tsx === /// import * as cx from 'classnames'; >cx : any @@ -29,7 +31,7 @@ let k = ; >button : any -=== tests/cases/conformance/jsx/declaration.d.ts === +=== declaration.d.ts === declare module "classnames"; >"classnames" : any diff --git a/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols b/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols index 95a50b0b3d332..c56a152b383f2 100644 --- a/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols +++ b/tests/baselines/reference/correctlyMarkAliasAsReferences4.symbols @@ -1,4 +1,6 @@ -=== tests/cases/conformance/jsx/0.tsx === +//// [tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx] //// + +=== 0.tsx === /// import * as cx from 'classnames'; >cx : Symbol(cx, Decl(0.tsx, 1, 6)) @@ -18,7 +20,7 @@ let k =