From bdcc4eb988786fb80d21b0667b2b68b2de5c6bbc Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 9 Jul 2015 21:44:56 -0700 Subject: [PATCH 001/134] Implementation for weak types --- src/compiler/checker.ts | 24 +++++++++++++++++++ .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++++ src/server/editorServices.ts | 2 +- 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2b57aca48ac..07265cf9462 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4785,9 +4785,14 @@ namespace ts { let result = Ternary.True; let properties = getPropertiesOfObjectType(target); let requireOptionalProperties = relation === subtypeRelation && !(source.flags & TypeFlags.ObjectLiteral); + let foundMatchingProperty = !isWeak(target); for (let targetProp of properties) { let sourceProp = getPropertyOfType(source, targetProp.name); + if (sourceProp) { + foundMatchingProperty = true; + } + if (sourceProp !== targetProp) { if (!sourceProp) { if (!(targetProp.flags & SymbolFlags.Optional) || requireOptionalProperties) { @@ -4859,6 +4864,14 @@ namespace ts { } } } + + if (!foundMatchingProperty && getPropertiesOfType(source).length > 0) { + if (reportErrors) { + reportError(Diagnostics.Weak_type_0_has_no_properties_in_common_with_1, typeToString(target), typeToString(source)); + } + return Ternary.False; + } + return result; } @@ -5121,6 +5134,17 @@ namespace ts { return false; } + // A type is 'weak' if it is an object type with at least one optional property + // and no required properties or index signatures + function isWeak(type: Type) { + let props = getPropertiesOfType(type); + return type.flags & TypeFlags.ObjectType && + props.length > 0 && + !forEach(props, p => !(p.flags & SymbolFlags.Optional)) && + !getIndexTypeOfType(type, IndexKind.String) && + !getIndexTypeOfType(type, IndexKind.Number); + } + function isPropertyIdenticalTo(sourceProp: Symbol, targetProp: Symbol): boolean { return compareProperties(sourceProp, targetProp, compareTypes) !== Ternary.False; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index a17f8857590..12b257eac34 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -414,6 +414,7 @@ namespace ts { The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: DiagnosticCategory.Error, key: "'yield' expressions cannot be used in a parameter initializer." }, await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: DiagnosticCategory.Error, key: "'await' expressions cannot be used in a parameter initializer." }, + Weak_type_0_has_no_properties_in_common_with_1: { code: 2525, category: DiagnosticCategory.Error, key: "Weak type '{0}' has no properties in common with '{1}'." }, JSX_element_attributes_type_0_must_be_an_object_type: { code: 2600, category: DiagnosticCategory.Error, key: "JSX element attributes type '{0}' must be an object type." }, The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: DiagnosticCategory.Error, key: "The return type of a JSX element constructor must return an object type." }, JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: DiagnosticCategory.Error, key: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 94be4f53c97..59c856e87d2 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1645,6 +1645,10 @@ "category": "Error", "code": 2524 }, + "Weak type '{0}' has no properties in common with '{1}'.": { + "category": "Error", + "code": 2525 + }, "JSX element attributes type '{0}' must be an object type.": { "category": "Error", "code": 2600 diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 91d400ff263..04cad877561 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -912,7 +912,7 @@ namespace ts.server { var dirPath = ts.getDirectoryPath(configFilename); var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.readConfigFile(configFilename); if (rawConfig.error) { - return rawConfig.error; + return { errorMsg: ts.flattenDiagnosticMessageText(rawConfig.error.messageText, '\n') }; } else { var parsedCommandLine = ts.parseConfigFile(rawConfig.config, this.host, dirPath); From 3c76c3e474256e6694f843cbb4c67318260b55d5 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 9 Jul 2015 21:46:59 -0700 Subject: [PATCH 002/134] Baselines for weak types --- ...atWithObjectMembersOptionality2.errors.txt | 41 +- .../subtypingWithObjectMembers5.errors.txt | 17 +- .../reference/underscoreTest1.errors.txt | 907 +++ .../reference/underscoreTest1.symbols | 4898 -------------- .../baselines/reference/underscoreTest1.types | 5659 ----------------- tests/baselines/reference/weakType.js | 21 + tests/baselines/reference/weakType.symbols | 27 + tests/baselines/reference/weakType.types | 30 + tests/cases/compiler/weakType.ts | 12 + 9 files changed, 1053 insertions(+), 10559 deletions(-) create mode 100644 tests/baselines/reference/underscoreTest1.errors.txt delete mode 100644 tests/baselines/reference/underscoreTest1.symbols delete mode 100644 tests/baselines/reference/underscoreTest1.types create mode 100644 tests/baselines/reference/weakType.js create mode 100644 tests/baselines/reference/weakType.symbols create mode 100644 tests/baselines/reference/weakType.types create mode 100644 tests/cases/compiler/weakType.ts diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index de2751beaca..e8d6b32d21c 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -1,3 +1,18 @@ +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(33,5): error TS2322: Type 'D' is not assignable to type 'C'. + Weak type 'C' has no properties in common with 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(34,5): error TS2322: Type 'E' is not assignable to type 'C'. + Weak type 'C' has no properties in common with 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(35,5): error TS2322: Type 'F' is not assignable to type 'C'. + Weak type 'C' has no properties in common with 'F'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(38,5): error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. + Weak type '{ opt?: Base; }' has no properties in common with 'D'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(39,5): error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. + Weak type '{ opt?: Base; }' has no properties in common with 'E'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(40,5): error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. + Weak type '{ opt?: Base; }' has no properties in common with 'F'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(43,5): error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(44,5): error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(45,5): error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: Type 'D' is not assignable to type 'C'. Property 'opt' is missing in type 'D'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C'. @@ -18,7 +33,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme Property 'opt' is missing in type 'F'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts (9 errors) ==== +==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/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 @@ -52,18 +67,42 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // all ok c = d; + ~ +!!! error TS2322: Type 'D' is not assignable to type 'C'. +!!! error TS2322: Weak type 'C' has no properties in common with 'D'. c = e; + ~ +!!! error TS2322: Type 'E' is not assignable to type 'C'. +!!! error TS2322: Weak type 'C' has no properties in common with 'E'. c = f; + ~ +!!! error TS2322: Type 'F' is not assignable to type 'C'. +!!! error TS2322: Weak type 'C' has no properties in common with 'F'. c = a; a = d; + ~ +!!! error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. +!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'D'. a = e; + ~ +!!! error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. +!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'E'. a = f; + ~ +!!! error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. +!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'F'. a = c; b = d; + ~ +!!! error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. b = e; + ~ +!!! error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. b = f; + ~ +!!! error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. b = a; b = c; } diff --git a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt index 7fd025721ec..f42947c6eff 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt @@ -4,9 +4,15 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW Property '1' is missing in type 'B2'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(32,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'. Property ''1'' is missing in type 'B3'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(43,11): error TS2420: Class 'B' incorrectly implements interface 'A'. + Weak type 'A' has no properties in common with 'B'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(51,11): error TS2420: Class 'B2' incorrectly implements interface 'A2'. + Weak type 'A2' has no properties in common with 'B2'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(59,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'. + Weak type 'A3' has no properties in common with 'B3'. -==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts (3 errors) ==== +==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts (6 errors) ==== interface Base { foo: string; } @@ -59,6 +65,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW } class B implements A { + ~ +!!! error TS2420: Class 'B' incorrectly implements interface 'A'. +!!! error TS2420: Weak type 'A' has no properties in common with 'B'. fooo: Derived; // ok } @@ -67,6 +76,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW } class B2 implements A2 { + ~~ +!!! error TS2420: Class 'B2' incorrectly implements interface 'A2'. +!!! error TS2420: Weak type 'A2' has no properties in common with 'B2'. 2: Derived; // ok } @@ -75,6 +87,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW } class B3 implements A3 { + ~~ +!!! error TS2420: Class 'B3' incorrectly implements interface 'A3'. +!!! error TS2420: Weak type 'A3' has no properties in common with 'B3'. '1.0': Derived; // ok } } \ No newline at end of file diff --git a/tests/baselines/reference/underscoreTest1.errors.txt b/tests/baselines/reference/underscoreTest1.errors.txt new file mode 100644 index 00000000000..cdb7991a04e --- /dev/null +++ b/tests/baselines/reference/underscoreTest1.errors.txt @@ -0,0 +1,907 @@ +tests/cases/compiler/underscoreTest1_underscoreTests.ts(252,66): error TS2345: Argument of type '{ variable: string; }' is not assignable to parameter of type 'TemplateSettings'. + Weak type 'TemplateSettings' has no properties in common with '{ variable: string; }'. + + +==== tests/cases/compiler/underscoreTest1_underscoreTests.ts (1 errors) ==== + /// + + declare var $; + declare function alert(x: string): void; + + _.each([1, 2, 3], (num) => alert(num.toString())); + _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(value.toString())); + + _.map([1, 2, 3], (num) => num * 3); + _.map({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => value * 3); + + var sum = _.reduce([1, 2, 3], (memo, num) => memo + num, 0); + + var list = [[0, 1], [2, 3], [4, 5]]; + var flat = _.reduceRight(list, (a, b) => a.concat(b), []); + + var even = _.find([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); + + var evens = _.filter([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); + + var listOfPlays = [{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { title: "The Tempest", author: "Shakespeare", year: 1611 }, { title: "Other", author: "Not Shakespeare", year: 2012 }]; + _.where(listOfPlays, { author: "Shakespeare", year: 1611 }); + + var odds = _.reject([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); + + _.all([true, 1, null, 'yes'], _.identity); + + _.any([null, 0, 'yes', false]); + + _.contains([1, 2, 3], 3); + + _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + + var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }]; + _.pluck(stooges, 'name'); + + _.max(stooges, (stooge) => stooge.age); + + var numbers = [10, 5, 100, 2, 1000]; + _.min(numbers); + + _.sortBy([1, 2, 3, 4, 5, 6], (num) => Math.sin(num)); + + + // not sure how this is typechecking at all.. Math.floor(e) is number not string..? + _([1.3, 2.1, 2.4]).groupBy((e: number, i?: number, list?: number[]) => Math.floor(e)); + _.groupBy([1.3, 2.1, 2.4], (num: number) => Math.floor(num)); + _.groupBy(['one', 'two', 'three'], 'length'); + + _.countBy([1, 2, 3, 4, 5], (num) => num % 2 == 0 ? 'even' : 'odd'); + + _.shuffle([1, 2, 3, 4, 5, 6]); + + // (function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + + _.size({ one: 1, two: 2, three: 3 }); + + /////////////////////////////////////////////////////////////////////////////////////// + + _.first([5, 4, 3, 2, 1]); + _.initial([5, 4, 3, 2, 1]); + _.last([5, 4, 3, 2, 1]); + _.rest([5, 4, 3, 2, 1]); + _.compact([0, 1, false, 2, '', 3]); + + _.flatten([1, 2, 3, 4]); + _.flatten([1, [2]]); + + // typescript doesn't like the elements being different + _.flatten([1, [2], [3, [[4]]]]); + _.flatten([1, [2], [3, [[4]]]], true); + _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); + _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); + _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + _.uniq([1, 2, 1, 3, 1, 4]); + _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); + _.object(['moe', 'larry', 'curly'], [30, 40, 50]); + _.object([['moe', 30], ['larry', 40], ['curly', 50]]); + _.indexOf([1, 2, 3], 2); + _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + _.sortedIndex([10, 20, 30, 40, 50], 35); + _.range(10); + _.range(1, 11); + _.range(0, 30, 5); + _.range(0, 30, 5); + _.range(0); + + /////////////////////////////////////////////////////////////////////////////////////// + + var func = function (greeting) { return greeting + ': ' + this.name }; + // need a second var otherwise typescript thinks func signature is the above func type, + // instead of the newly returned _bind => func type. + var func2 = _.bind(func, { name: 'moe' }, 'hi'); + func2(); + + var buttonView = { + label: 'underscore', + onClick: function () { alert('clicked: ' + this.label); }, + onHover: function () { alert('hovering: ' + this.label); } + }; + _.bindAll(buttonView); + $('#underscore_button').bind('click', buttonView.onClick); + + var fibonacci = _.memoize(function (n) { + return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + }); + + var log = _.bind((message?: string, ...rest: string[]) => { }, Date); + _.delay(log, 1000, 'logged later'); + + _.defer(function () { alert('deferred'); }); + + var updatePosition = () => alert('updating position...'); + var throttled = _.throttle(updatePosition, 100); + $(null).scroll(throttled); + + var calculateLayout = () => alert('calculating layout...'); + var lazyLayout = _.debounce(calculateLayout, 300); + $(null).resize(lazyLayout); + + var createApplication = () => alert('creating application...'); + var initialize = _.once(createApplication); + initialize(); + initialize(); + + var notes: any[]; + var render = () => alert("rendering..."); + var renderNotes = _.after(notes.length, render); + _.each(notes, (note) => note.asyncSave({ success: renderNotes })); + + var hello = function (name) { return "hello: " + name; }; + hello = _.wrap(hello, (func, arg) => { return "before, " + func(arg) + ", after"; }); + hello("moe"); + + var greet = function (name) { return "hi: " + name; }; + var exclaim = function (statement) { return statement + "!"; }; + var welcome = _.compose(exclaim, greet); + welcome('moe'); + + /////////////////////////////////////////////////////////////////////////////////////// + + _.keys({ one: 1, two: 2, three: 3 }); + _.values({ one: 1, two: 2, three: 3 }); + _.pairs({ one: 1, two: 2, three: 3 }); + _.invert({ Moe: "Moses", Larry: "Louis", Curly: "Jerome" }); + _.functions(_); + _.extend({ name: 'moe' }, { age: 50 }); + _.pick({ name: 'moe', age: 50, userid: 'moe1' }, 'name', 'age'); + _.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'userid'); + + var iceCream = { flavor: "chocolate" }; + _.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); + + _.clone({ name: 'moe' }); + + _.chain([1, 2, 3, 200]) + .filter(function (num) { return num % 2 == 0; }) + .tap(alert) + .map(function (num) { return num * num }) + .value(); + + _.has({ a: 1, b: 2, c: 3 }, "b"); + + var moe = { name: 'moe', luckyNumbers: [13, 27, 34] }; + var clone = { name: 'moe', luckyNumbers: [13, 27, 34] }; + moe == clone; + _.isEqual(moe, clone); + + _.isEmpty([1, 2, 3]); + _.isEmpty({}); + + _.isElement($('body')[0]); + + (function () { return _.isArray(arguments); })(); + _.isArray([1, 2, 3]); + + _.isObject({}); + _.isObject(1); + + + // (() => { return _.isArguments(arguments); })(1, 2, 3); + _.isArguments([1, 2, 3]); + + _.isFunction(alert); + + _.isString("moe"); + + _.isNumber(8.4 * 5); + + _.isFinite(-101); + + _.isFinite(-Infinity); + + _.isBoolean(null); + + _.isDate(new Date()); + + _.isRegExp(/moe/); + + _.isNaN(NaN); + isNaN(undefined); + _.isNaN(undefined); + + _.isNull(null); + _.isNull(undefined); + + _.isUndefined((null).missingVariable); + + /////////////////////////////////////////////////////////////////////////////////////// + + var underscore = _.noConflict(); + + var moe2 = { name: 'moe' }; + moe2 === _.identity(moe); + + var genie; + + _.times(3, function (n) { genie.grantWishNumber(n); }); + + _.random(0, 100); + + _.mixin({ + capitalize: function (string) { + return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase(); + } + }); + (_("fabio")).capitalize(); + + _.uniqueId('contact_'); + + _.escape('Curly, Larry & Moe'); + + var object = { cheese: 'crumpets', stuff: function () { return 'nonsense'; } }; + _.result(object, 'cheese'); + + _.result(object, 'stuff'); + + var compiled = _.template("hello: <%= name %>"); + compiled({ name: 'moe' }); + var list2 = "<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>"; + _.template(list2, { people: ['moe', 'curly', 'larry'] }); + var template = _.template("<%- value %>"); + template({ value: ' From bc16831ceba5a66f45bd1d1e89bd3e9cc87851af Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 1 Jun 2017 08:30:23 -0700 Subject: [PATCH 083/134] Cleanup from bootstrap attempt --- tests/webTestResults.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/webTestResults.html b/tests/webTestResults.html index a753b08e53b..f747cdfa75c 100644 --- a/tests/webTestResults.html +++ b/tests/webTestResults.html @@ -18,7 +18,7 @@
    -


    +
    From e6bcef7dc59a7bf826783453e08f2e2cf2fc1cb4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 1 Jun 2017 09:19:34 -0700 Subject: [PATCH 084/134] Combining unknown type+value symbol->unknownSymbol Previously, when getExternalModuleMember tried to combine unknownSymbol from a type and unknownSymbol from a value, it combineValueAndTypeSymbol would create a new franken-symbol that was no longer equal to unknownSymbol. --- src/compiler/checker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cfe2c5a6bf2..11bb737e986 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1364,6 +1364,9 @@ namespace ts { // An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point' // property with the type/namespace side interface 'Point'. function combineValueAndTypeSymbols(valueSymbol: Symbol, typeSymbol: Symbol): Symbol { + if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) { + return unknownSymbol; + } if (valueSymbol.flags & (SymbolFlags.Type | SymbolFlags.Namespace)) { return valueSymbol; } From 9bcbeffcc7ab1d96caf9bb01738514171531e056 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 1 Jun 2017 09:21:31 -0700 Subject: [PATCH 085/134] Test reexport of a missing alias --- .../reexportedMissingAlias.errors.txt | 18 ++++++++++ .../reference/reexportedMissingAlias.js | 34 +++++++++++++++++++ .../cases/compiler/reexportedMissingAlias.ts | 9 +++++ 3 files changed, 61 insertions(+) create mode 100644 tests/baselines/reference/reexportedMissingAlias.errors.txt create mode 100644 tests/baselines/reference/reexportedMissingAlias.js create mode 100644 tests/cases/compiler/reexportedMissingAlias.ts diff --git a/tests/baselines/reference/reexportedMissingAlias.errors.txt b/tests/baselines/reference/reexportedMissingAlias.errors.txt new file mode 100644 index 00000000000..c22bf2da9d0 --- /dev/null +++ b/tests/baselines/reference/reexportedMissingAlias.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/second.d.ts(2,27): error TS2304: Cannot find name 'CompletelyMissing'. +tests/cases/compiler/second.d.ts(2,27): error TS2503: Cannot find namespace 'CompletelyMissing'. + + +==== tests/cases/compiler/second.d.ts (2 errors) ==== + // Fixes #15094 + export import Component = CompletelyMissing; + ~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'CompletelyMissing'. + ~~~~~~~~~~~~~~~~~ +!!! error TS2503: Cannot find namespace 'CompletelyMissing'. +==== tests/cases/compiler/first.d.ts (0 errors) ==== + import * as Second from './second'; + export = Second; +==== tests/cases/compiler/crash.ts (0 errors) ==== + import { Component } from './first'; + class C extends Component { } + \ No newline at end of file diff --git a/tests/baselines/reference/reexportedMissingAlias.js b/tests/baselines/reference/reexportedMissingAlias.js new file mode 100644 index 00000000000..792ea3eb5c2 --- /dev/null +++ b/tests/baselines/reference/reexportedMissingAlias.js @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/reexportedMissingAlias.ts] //// + +//// [second.d.ts] +// Fixes #15094 +export import Component = CompletelyMissing; +//// [first.d.ts] +import * as Second from './second'; +export = Second; +//// [crash.ts] +import { Component } from './first'; +class C extends Component { } + + +//// [crash.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var first_1 = require("./first"); +var C = (function (_super) { + __extends(C, _super); + function C() { + return _super !== null && _super.apply(this, arguments) || this; + } + return C; +}(first_1.Component)); diff --git a/tests/cases/compiler/reexportedMissingAlias.ts b/tests/cases/compiler/reexportedMissingAlias.ts new file mode 100644 index 00000000000..b430cd526c8 --- /dev/null +++ b/tests/cases/compiler/reexportedMissingAlias.ts @@ -0,0 +1,9 @@ +// Fixes #15094 +// @Filename: second.d.ts +export import Component = CompletelyMissing; +// @Filename: first.d.ts +import * as Second from './second'; +export = Second; +// @Filename: crash.ts +import { Component } from './first'; +class C extends Component { } From 343572e5cc2eeabf7059d7f1ae8e1c0b05f6ae1c Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 1 Jun 2017 09:30:41 -0700 Subject: [PATCH 086/134] Rename isWeak -> isWeakType --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c25ec01fbff..04b89618216 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8996,7 +8996,7 @@ namespace ts { } function reportAssignmentToWeakIntersection(source: Type, target: IntersectionType, reportErrors: boolean) { - const needsWeakTypeCheck = source !== globalObjectType && getPropertiesOfType(source).length > 0 && every(target.types, isWeak); + const needsWeakTypeCheck = source !== globalObjectType && getPropertiesOfType(source).length > 0 && every(target.types, isWeakType); if (!needsWeakTypeCheck) { return false; } @@ -9296,7 +9296,7 @@ namespace ts { let result = Ternary.True; const properties = getPropertiesOfObjectType(target); const requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & ObjectFlags.ObjectLiteral); - let foundMatchingProperty = !isWeak(target); + let foundMatchingProperty = !isWeakType(target); for (const targetProp of properties) { const sourceProp = getPropertyOfType(source, targetProp.name); if (sourceProp) { @@ -9394,7 +9394,7 @@ namespace ts { * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures */ - function isWeak(type: Type) { + function isWeakType(type: Type) { const props = getPropertiesOfType(type); return type.flags & TypeFlags.Object && props.length > 0 && From 5030d0f468f7dcfd4bbc2f0031e9787e933ef5b6 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 10:49:08 -0700 Subject: [PATCH 087/134] Use factory for all fixes --- src/services/codefixes/fixAddMissingMember.ts | 37 ++++++++++++------- .../fourslash/codeFixAddMissingMember5.ts | 6 ++- .../fourslash/codeFixAddMissingMember7.ts | 6 ++- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 358c2255789..0859500e2d2 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -82,15 +82,19 @@ namespace ts.codefix { const className = classDeclaration.name.getText(); + const staticInitialization = createStatement(createAssignment( + createPropertyAccess(createIdentifier(className), tokenName), + createIdentifier("undefined"))); + + const staticInitializationChangeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); + staticInitializationChangeTracker.insertNodeAfter( + classDeclarationSourceFile, + classDeclaration, + staticInitialization, + { suffix: context.newLineCharacter }); const initializeStaticAction = { description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Initialize_static_property_0), [tokenName]), - changes: [{ - fileName: classDeclarationSourceFile.fileName, - textChanges: [{ - span: { start: classDeclaration.getEnd(), length: 0 }, - newText: `${context.newLineCharacter}${className}.${tokenName} = undefined;${context.newLineCharacter}` - }] - }] + changes: staticInitializationChangeTracker.getChanges() }; (actions || (actions = [])).push(initializeStaticAction); @@ -102,15 +106,20 @@ namespace ts.codefix { return actions; } + const propertyInitialization = createStatement(createAssignment( + createPropertyAccess(createThis(), tokenName), + createIdentifier("undefined"))); + + const propertyInitializationChangeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); + propertyInitializationChangeTracker.insertNodeAt( + classDeclarationSourceFile, + classConstructor.body.getEnd() - 1, + propertyInitialization, + { prefix: context.newLineCharacter, suffix: context.newLineCharacter }); + const initializeAction = { description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Initialize_property_0_in_the_constructor), [tokenName]), - changes: [{ - fileName: classDeclarationSourceFile.fileName, - textChanges: [{ - span: { start: classConstructor.body.getEnd() - 1, length: 0 }, - newText: `this.${tokenName} = undefined;${context.newLineCharacter}` - }] - }] + changes: propertyInitializationChangeTracker.getChanges() }; (actions || (actions = [])).push(initializeAction); diff --git a/tests/cases/fourslash/codeFixAddMissingMember5.ts b/tests/cases/fourslash/codeFixAddMissingMember5.ts index cbabc0ba6c5..53d47e9a8d3 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember5.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember5.ts @@ -11,9 +11,11 @@ ////} ////|] -verify.rangeAfterCodeFix(`class C { +verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 0); +verify.currentFileContentIs(`class C { static method() { ()=>{ this.foo === 10 }; } } -C.foo = undefined;`, /*includeWhiteSpace*/false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +C.foo = undefined; +`); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixAddMissingMember7.ts b/tests/cases/fourslash/codeFixAddMissingMember7.ts index 0e937a3ab6e..04c3efc86b8 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember7.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember7.ts @@ -9,7 +9,9 @@ ////} ////|] -verify.rangeAfterCodeFix(`class C { +verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 2) +verify.currentFileContentIs(`class C { static p = ()=>{ this.foo === 10 }; } -C.foo = undefined;`, /*includeWhiteSpace*/false, /*errorCode*/ undefined, /*index*/ 2); \ No newline at end of file +C.foo = undefined; +`); From f9123aa5cc7a748299877db134da383949d0dd1e Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 11:01:00 -0700 Subject: [PATCH 088/134] rename fourslash method --- src/harness/fourslash.ts | 2 +- tests/cases/fourslash/codeFixAddMissingMember5.ts | 2 +- tests/cases/fourslash/codeFixAddMissingMember7.ts | 2 +- tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts | 8 ++++---- tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts | 8 ++++---- tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts | 8 ++++---- tests/cases/fourslash/codeFixUndeclaredMethod.ts | 6 +++--- tests/cases/fourslash/fourslash.ts | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 0cbf98cebf7..f1146919e49 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -3816,7 +3816,7 @@ namespace FourSlashInterface { this.state.verifyRangeIs(expectedText, includeWhiteSpace); } - public applyCodeFix(errorCode?: number, index?: number): void { + public getAndApplyCodeFix(errorCode?: number, index?: number): void { this.state.getAndApplyCodeActions(errorCode, index); } diff --git a/tests/cases/fourslash/codeFixAddMissingMember5.ts b/tests/cases/fourslash/codeFixAddMissingMember5.ts index 53d47e9a8d3..db893cb61d3 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember5.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember5.ts @@ -11,7 +11,7 @@ ////} ////|] -verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 0); +verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 0); verify.currentFileContentIs(`class C { static method() { ()=>{ this.foo === 10 }; diff --git a/tests/cases/fourslash/codeFixAddMissingMember7.ts b/tests/cases/fourslash/codeFixAddMissingMember7.ts index 04c3efc86b8..8ac7f2b5aff 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember7.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember7.ts @@ -9,7 +9,7 @@ ////} ////|] -verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 2) +verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 2) verify.currentFileContentIs(`class C { static p = ()=>{ this.foo === 10 }; } diff --git a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts index 830259e3ca7..435b78ba3fa 100644 --- a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts +++ b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts @@ -17,10 +17,10 @@ //// static y: string; //// } -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.rangeIs(` y: { [x: string]: any; }; diff --git a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts index 6064ee5ae30..9f40c967658 100644 --- a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts +++ b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts @@ -18,10 +18,10 @@ //// constructor() { } //// }|] -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.rangeIs(` export class C { diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts index 94ad3f77615..0669a9ee462 100644 --- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts @@ -9,10 +9,10 @@ //// } //// } -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.rangeIs(` static prop2: string; diff --git a/tests/cases/fourslash/codeFixUndeclaredMethod.ts b/tests/cases/fourslash/codeFixUndeclaredMethod.ts index 1f842a5bcf1..6a61f8421aa 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethod.ts @@ -10,9 +10,9 @@ //// } //// } -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); -verify.applyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); +verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.rangeIs(` foo3(): any { diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index b0f731dcdea..3e80b005625 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -237,7 +237,7 @@ declare namespace FourSlashInterface { DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean): void; noDocCommentTemplate(): void; rangeAfterCodeFix(expectedText: string, includeWhiteSpace?: boolean, errorCode?: number, index?: number): void - applyCodeFix(errorCode?: number, index?: number): void; + getAndApplyCodeFix(errorCode?: number, index?: number): void; rangeIs(expectedText: string, includeWhiteSpace?: boolean): void; fileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, formattingOptions?: FormatCodeOptions): void; importFixAtPosition(expectedTextArray: string[], errorCode?: number): void; From f2163fecbd2d8b988f1f1897f8646e28af2742ba Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 11:09:08 -0700 Subject: [PATCH 089/134] use length helper --- src/services/codefixes/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index c2c51d5c788..81aae4c0e5e 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -147,7 +147,7 @@ namespace ts.codefix { let typeParameters: TypeParameterDeclaration[]; if (includeTypeScriptSyntax) { - const typeArgCount = callExpression.typeArguments ? callExpression.typeArguments.length : 0; + const typeArgCount = length(callExpression.typeArguments); for (let i = 0; i < typeArgCount; i++) { const name = typeArgCount < 8 ? String.fromCharCode(CharacterCodes.T + i) : `T${i}`; const typeParameter = createTypeParameterDeclaration(name, /*constraint*/ undefined, /*defaultType*/ undefined); From 6742f9dcd8ddabdfbbdb9df98f6ef65a45ba042d Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 11:17:24 -0700 Subject: [PATCH 090/134] remove comment --- .../codeFixUndeclaredInStaticMethod.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts index 0669a9ee462..75be5420e43 100644 --- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts @@ -24,21 +24,3 @@ verify.rangeIs(` throw new Error("Method not implemented."); } `); - -// class A { -// static prop2: string; -// static prop1: number; -// static m2(arg0: any, arg1: any): any { -// throw new Error("Method not implemented."); -// } -// static m1(arg0: any, arg1: any, arg2: any): any { -// throw new Error("Method not implemented."); -// } -// static foo0() { -// this.m1(1,2,3); -// A.m2(1,2); -// this.prop1 = 10; -// A.prop2 = "asdf"; -// } -// } - From 04c26b76cf547ae5f4ae0e32b192b53c9af2815c Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 1 Jun 2017 11:31:50 -0700 Subject: [PATCH 091/134] Improve documentation and naming --- src/compiler/checker.ts | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 04b89618216..62fa4fd5f01 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8701,7 +8701,7 @@ namespace ts { let expandingFlags: number; let depth = 0; let overflow = false; - let disableWeakTypeErrors = false; + let disableWeakTypeCheckingForIntersectionConstituents = false; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); @@ -8981,20 +8981,27 @@ namespace ts { function typeRelatedToEachType(source: Type, target: IntersectionType, reportErrors: boolean): Ternary { let result = Ternary.True; const targetTypes = target.types; - const saveDisableWeakTypeErrors = disableWeakTypeErrors; - disableWeakTypeErrors = true; + const saveDisableWeakTypeCheckingForIntersectionConstituents = disableWeakTypeCheckingForIntersectionConstituents; + disableWeakTypeCheckingForIntersectionConstituents = true; for (const targetType of targetTypes) { const related = isRelatedTo(source, targetType, reportErrors); if (!related) { - disableWeakTypeErrors = saveDisableWeakTypeErrors; + disableWeakTypeCheckingForIntersectionConstituents = saveDisableWeakTypeCheckingForIntersectionConstituents; return Ternary.False; } result &= related; } - disableWeakTypeErrors = saveDisableWeakTypeErrors; + disableWeakTypeCheckingForIntersectionConstituents = saveDisableWeakTypeCheckingForIntersectionConstituents; return reportAssignmentToWeakIntersection(source, target, reportErrors) ? Ternary.False : result; } + /** + * An intersection is weak if all of its constituents are weak. Report an error on assignment to a weak intersection + * of a type that doesn't share any property names with it. + * + * Note: This function could create an anonymous type of the flattened intersection properties and call isRelatedTo, + * but this makes React's already-bad weak type errors even more confusing. + */ function reportAssignmentToWeakIntersection(source: Type, target: IntersectionType, reportErrors: boolean) { const needsWeakTypeCheck = source !== globalObjectType && getPropertiesOfType(source).length > 0 && every(target.types, isWeakType); if (!needsWeakTypeCheck) { @@ -9352,10 +9359,10 @@ namespace ts { } return Ternary.False; } - const saveDisableWeakTypeErrors = disableWeakTypeErrors; - disableWeakTypeErrors = false; + const saveDisableWeakTypeCheckingForIntersectionConstituents = disableWeakTypeCheckingForIntersectionConstituents; + disableWeakTypeCheckingForIntersectionConstituents = false; const related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors); - disableWeakTypeErrors = saveDisableWeakTypeErrors; + disableWeakTypeCheckingForIntersectionConstituents = saveDisableWeakTypeCheckingForIntersectionConstituents; if (!related) { if (reportErrors) { reportError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); @@ -9381,7 +9388,10 @@ namespace ts { } } } - if (!foundMatchingProperty && !disableWeakTypeErrors && source !== globalObjectType && getPropertiesOfType(source).length > 0) { + if (!foundMatchingProperty && + !disableWeakTypeCheckingForIntersectionConstituents && + source !== globalObjectType && + getPropertiesOfType(source).length > 0) { if (reportErrors) { reportError(Diagnostics.Weak_type_0_has_no_properties_in_common_with_1, typeToString(target), typeToString(source)); } From 6e49237d31435c9aea8ac6f8e8aa4fdad353eaab Mon Sep 17 00:00:00 2001 From: t_ Date: Fri, 2 Jun 2017 05:43:44 +0900 Subject: [PATCH 092/134] Remove trailing whitespace from tsconfig.json (#16197) * Remove trailing whitespace from tsconfig.json * Simplify --- src/compiler/commandLineParser.ts | 2 +- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- .../tsconfig.json | 22 +++++++++---------- 9 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index e612378671d..fa0c8140bb6 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1042,7 +1042,7 @@ namespace ts { for (let i = 0; i < nameColumn.length; i++) { const optionName = nameColumn[i]; const description = descriptionColumn[i]; - result.push(tab + tab + optionName + makePadding(marginLength - optionName.length + 2) + description); + result.push(optionName && `${tab}${tab}${optionName}${ description && (makePadding(marginLength - optionName.length + 2) + description)}`); } if (configurations.files && configurations.files.length) { result.push(`${tab}},`); diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 97f59dea8ea..04599005244 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index b90e3fc6c58..2a41e2c4df0 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ "noUnusedLocals": true /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 482cfa6a9d5..e29a2813282 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index c6a26629dab..69831916904 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 72289dd1787..407df036f89 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 97f59dea8ea..04599005244 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 1ac7c8c54da..e4d0b37ae51 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 33a9ecc5cd4..3e3f7a85b34 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Basic Options */ + /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ @@ -17,21 +17,21 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ + + /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ + + /* Additional Checks */ // "noUnusedLocals": true, /* Report errors on unused locals. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ + + /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ @@ -39,14 +39,14 @@ // "typeRoots": [], /* List of folders to include type definitions from. */ "types": ["jquery","mocha"] /* Type declaration files to be included in compilation. */ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - - /* Source Map Options */ + + /* Source Map Options */ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ + + /* Experimental Options */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } From c1d466a716eef632ecbc44a2fb53b6bdc92694bc Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 14:12:25 -0700 Subject: [PATCH 093/134] suppress type annotations in js file --- src/services/codefixes/fixAddMissingMember.ts | 8 ++++---- .../fourslash/codeFixUndeclaredAcrossFiles2.ts | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 0859500e2d2..80dd16c5f58 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -70,7 +70,7 @@ namespace ts.codefix { function getActionsForAddMissingMemberInJavaScriptFile(classDeclaration: ClassLikeDeclaration, makeStatic: boolean): CodeAction[] | undefined { let actions: CodeAction[]; - const methodCodeAction = getActionForMethodDeclaration(); + const methodCodeAction = getActionForMethodDeclaration(/*includeTypeScriptSyntax*/ false); if (methodCodeAction) { actions = [methodCodeAction]; } @@ -130,7 +130,7 @@ namespace ts.codefix { function getActionsForAddMissingMemberInTypeScriptFile(classDeclaration: ClassLikeDeclaration, makeStatic: boolean): CodeAction[] | undefined { let actions: CodeAction[]; - const methodCodeAction = getActionForMethodDeclaration(); + const methodCodeAction = getActionForMethodDeclaration(/*includeTypeScriptSyntax*/ true); if (methodCodeAction) { actions = [methodCodeAction]; } @@ -189,10 +189,10 @@ namespace ts.codefix { return actions; } - function getActionForMethodDeclaration(): CodeAction | undefined { + function getActionForMethodDeclaration(includeTypeScriptSyntax: boolean): CodeAction | undefined { if (token.parent.parent.kind === SyntaxKind.CallExpression) { const callExpression = token.parent.parent; - const methodDeclaration = createMethodFromCallExpression(callExpression, tokenName, /*includeTypeScriptSyntax*/ true, makeStatic); + const methodDeclaration = createMethodFromCallExpression(callExpression, tokenName, includeTypeScriptSyntax, makeStatic); const methodDeclarationChangeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); methodDeclarationChangeTracker.insertNodeAfter(classDeclarationSourceFile, classOpenBrace, methodDeclaration, { suffix: context.newLineCharacter }); diff --git a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts index 9f40c967658..04e2afc667c 100644 --- a/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts +++ b/tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts @@ -13,10 +13,10 @@ // @Filename: f1.js //// [|export class C { -//// x: number; -//// static y: string; //// constructor() { } -//// }|] +//// } +//// +//// |] verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); @@ -25,16 +25,15 @@ verify.getAndApplyCodeFix(/*errorCode*/undefined, 0); verify.rangeIs(` export class C { - m1(): any { + m1() { throw new Error("Method not implemented."); } - static m0(arg0: any, arg1: any, arg2: any): any { + static m0(arg0, arg1, arg2) { throw new Error("Method not implemented."); } - x: number; - static y: string; constructor() { this.y = undefined; } } +C.x = undefined; `); \ No newline at end of file From 2fb9ab798c2c3615bb51dba22b6855fe41eea4bc Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 16:03:11 -0700 Subject: [PATCH 094/134] repond to feedback --- src/compiler/checker.ts | 1 - src/compiler/types.ts | 1 - src/services/codefixes/fixAddMissingMember.ts | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e9b197f2863..f7450bb6da6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -110,7 +110,6 @@ namespace ts { getParameterType: getTypeAtPosition, getReturnTypeOfSignature, getNonNullableType, - getBaseTypeVariableOfClass, typeToTypeNode: nodeBuilder.typeToTypeNode, indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration, signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ee02d37addb..561d84b5d71 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2530,7 +2530,6 @@ namespace ts { */ /* @internal */ getParameterType(signature: Signature, parameterIndex: number): Type; getNonNullableType(type: Type): Type; - /* @internal */ getBaseTypeVariableOfClass(symbol: Symbol): Type | undefined; /** Note that the resulting nodes cannot be checked. */ typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode; diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 80dd16c5f58..1587b47c01b 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -49,7 +49,8 @@ namespace ts.codefix { const symbol = leftExpressionType.symbol; if (symbol.flags & SymbolFlags.Class) { classDeclaration = symbol.declarations && symbol.declarations[0]; - if (getObjectFlags(leftExpressionType) & ObjectFlags.Anonymous && symbol.flags & SymbolFlags.Class && !checker.getBaseTypeVariableOfClass(symbol)) { + if (leftExpressionType !== checker.getDeclaredTypeOfSymbol(symbol)) { + // The expression is a class symbol but the type is not the instance-side. makeStatic = true; } } From 40f22ec6e29323890c834594ead2b63ff30a39b7 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 1 Jun 2017 16:41:46 -0700 Subject: [PATCH 095/134] respond to comment --- src/compiler/checker.ts | 4 ++++ src/compiler/utilities.ts | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f7450bb6da6..cb9c44afdbb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -681,6 +681,10 @@ namespace ts { return nodeLinks[nodeId] || (nodeLinks[nodeId] = { flags: 0 }); } + function getObjectFlags(type: Type): ObjectFlags { + return type.flags & TypeFlags.Object ? (type).objectFlags : 0; + } + function isGlobalSourceFile(node: Node) { return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 187d90559f1..506d2728ffd 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -733,10 +733,6 @@ namespace ts { return false; } - export function getObjectFlags(type: Type): ObjectFlags { - return type.flags & TypeFlags.Object ? (type).objectFlags : 0; - } - export function isChildOfNodeWithKind(node: Node, kind: SyntaxKind): boolean { while (node) { if (node.kind === kind) { From 9d0bbc4e4448408ffb9ca88f205461554c2dbf6a Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Thu, 1 Jun 2017 17:58:31 -0700 Subject: [PATCH 096/134] Apply --checkJs to bind diagnostics as well as check diagnostics --- src/compiler/program.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index e69a89cc618..e9273daea2a 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1069,10 +1069,10 @@ namespace ts { const typeChecker = getDiagnosticsProducingTypeChecker(); Debug.assert(!!sourceFile.bindDiagnostics); - const bindDiagnostics = sourceFile.bindDiagnostics; // For JavaScript files, we don't want to report semantic errors unless explicitly requested. - const includeCheckDiagnostics = !isSourceFileJavaScript(sourceFile) || isCheckJsEnabledForFile(sourceFile, options); - const checkDiagnostics = includeCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : []; + const includeBindAndCheckDiagnostics = !isSourceFileJavaScript(sourceFile) || isCheckJsEnabledForFile(sourceFile, options); + const bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : []; + const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : []; const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName); const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName); From 01d6d489be18ff6d52aa16dd57260450e7e331f5 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Thu, 1 Jun 2017 17:04:42 -0700 Subject: [PATCH 097/134] Add regression tests Report unreachable code in JS files when --checkjs is passed, but not otherwise. --- .../reference/unreachableJavascriptChecked.errors.txt | 10 ++++++++++ .../reference/unreachableJavascriptChecked.js | 11 +++++++++++ .../reference/unreachableJavascriptUnchecked.js | 11 +++++++++++ .../reference/unreachableJavascriptUnchecked.symbols | 7 +++++++ .../reference/unreachableJavascriptUnchecked.types | 10 ++++++++++ tests/cases/compiler/unreachableJavascriptChecked.ts | 8 ++++++++ .../cases/compiler/unreachableJavascriptUnchecked.ts | 8 ++++++++ 7 files changed, 65 insertions(+) create mode 100644 tests/baselines/reference/unreachableJavascriptChecked.errors.txt create mode 100644 tests/baselines/reference/unreachableJavascriptChecked.js create mode 100644 tests/baselines/reference/unreachableJavascriptUnchecked.js create mode 100644 tests/baselines/reference/unreachableJavascriptUnchecked.symbols create mode 100644 tests/baselines/reference/unreachableJavascriptUnchecked.types create mode 100644 tests/cases/compiler/unreachableJavascriptChecked.ts create mode 100644 tests/cases/compiler/unreachableJavascriptUnchecked.ts diff --git a/tests/baselines/reference/unreachableJavascriptChecked.errors.txt b/tests/baselines/reference/unreachableJavascriptChecked.errors.txt new file mode 100644 index 00000000000..c66b342177f --- /dev/null +++ b/tests/baselines/reference/unreachableJavascriptChecked.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/unreachable.js(3,5): error TS7027: Unreachable code detected. + + +==== tests/cases/compiler/unreachable.js (1 errors) ==== + function unreachable() { + return 1; + return 2; + ~~~~~~ +!!! error TS7027: Unreachable code detected. + } \ No newline at end of file diff --git a/tests/baselines/reference/unreachableJavascriptChecked.js b/tests/baselines/reference/unreachableJavascriptChecked.js new file mode 100644 index 00000000000..6bf264bf3d2 --- /dev/null +++ b/tests/baselines/reference/unreachableJavascriptChecked.js @@ -0,0 +1,11 @@ +//// [unreachable.js] +function unreachable() { + return 1; + return 2; +} + +//// [unreachable.js] +function unreachable() { + return 1; + return 2; +} diff --git a/tests/baselines/reference/unreachableJavascriptUnchecked.js b/tests/baselines/reference/unreachableJavascriptUnchecked.js new file mode 100644 index 00000000000..6bf264bf3d2 --- /dev/null +++ b/tests/baselines/reference/unreachableJavascriptUnchecked.js @@ -0,0 +1,11 @@ +//// [unreachable.js] +function unreachable() { + return 1; + return 2; +} + +//// [unreachable.js] +function unreachable() { + return 1; + return 2; +} diff --git a/tests/baselines/reference/unreachableJavascriptUnchecked.symbols b/tests/baselines/reference/unreachableJavascriptUnchecked.symbols new file mode 100644 index 00000000000..f2db6a6a347 --- /dev/null +++ b/tests/baselines/reference/unreachableJavascriptUnchecked.symbols @@ -0,0 +1,7 @@ +=== tests/cases/compiler/unreachable.js === +function unreachable() { +>unreachable : Symbol(unreachable, Decl(unreachable.js, 0, 0)) + + return 1; + return 2; +} diff --git a/tests/baselines/reference/unreachableJavascriptUnchecked.types b/tests/baselines/reference/unreachableJavascriptUnchecked.types new file mode 100644 index 00000000000..266a9038875 --- /dev/null +++ b/tests/baselines/reference/unreachableJavascriptUnchecked.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/unreachable.js === +function unreachable() { +>unreachable : () => 1 | 2 + + return 1; +>1 : 1 + + return 2; +>2 : 2 +} diff --git a/tests/cases/compiler/unreachableJavascriptChecked.ts b/tests/cases/compiler/unreachableJavascriptChecked.ts new file mode 100644 index 00000000000..4db98c4c8c4 --- /dev/null +++ b/tests/cases/compiler/unreachableJavascriptChecked.ts @@ -0,0 +1,8 @@ +// @Filename: unreachable.js +// @allowJs: true +// @checkJs: true +// @outDir: out +function unreachable() { + return 1; + return 2; +} \ No newline at end of file diff --git a/tests/cases/compiler/unreachableJavascriptUnchecked.ts b/tests/cases/compiler/unreachableJavascriptUnchecked.ts new file mode 100644 index 00000000000..d5b1f45e282 --- /dev/null +++ b/tests/cases/compiler/unreachableJavascriptUnchecked.ts @@ -0,0 +1,8 @@ +// @Filename: unreachable.js +// @allowJs: true +// @checkJs: false +// @outDir: out +function unreachable() { + return 1; + return 2; +} \ No newline at end of file From b62e1b57455562da9b8e1d2ab102753400820c87 Mon Sep 17 00:00:00 2001 From: William Orr Date: Thu, 1 Jun 2017 18:27:20 -0700 Subject: [PATCH 098/134] Use unix cache location on the major BSDs (#16187) --- src/server/server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/server.ts b/src/server/server.ts index 390a0f2f6f4..7e1ee683c8c 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -45,6 +45,8 @@ namespace ts.server { os.tmpdir(); return combinePaths(normalizeSlashes(basePath), "Microsoft/TypeScript"); } + case "openbsd": + case "freebsd": case "darwin": case "linux": case "android": { From cd84d2a85a0a1c373d33f18f2e29f3fd26f28482 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Thu, 1 Jun 2017 19:05:07 -0700 Subject: [PATCH 099/134] Use emptyArray, rather than [] --- src/compiler/program.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index e9273daea2a..834122b3584 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1071,8 +1071,8 @@ namespace ts { Debug.assert(!!sourceFile.bindDiagnostics); // For JavaScript files, we don't want to report semantic errors unless explicitly requested. const includeBindAndCheckDiagnostics = !isSourceFileJavaScript(sourceFile) || isCheckJsEnabledForFile(sourceFile, options); - const bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : []; - const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : []; + const bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray; + const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray; const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName); const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName); From a02edb1cd0277ba0a0ac89c27ba6c10dd635ee21 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 1 Jun 2017 22:33:39 -0700 Subject: [PATCH 100/134] Address PR: don't early exit when there are grammar errors --- src/compiler/checker.ts | 15 +++++++++++---- .../importCallExpression5ES2018.errors.txt | 16 ++++++++-------- .../importCallExpression6ES2018.errors.txt | 8 ++++---- .../importCallExpressionGrammarError.errors.txt | 10 ++++++++-- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0da2e311376..cbae09a25a8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16099,15 +16099,22 @@ namespace ts { function checkImportCallExpression(node: ImportCall): Type { // Check grammar of dynamic import - if (checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node)) { + checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node); + + if (node.arguments.length === 0) { return createPromiseReturnType(node, anyType); } - const specifier = node.arguments[0]; - const specifierType = checkNonNullExpression(specifier); - if (!isTypeAssignableTo(specifierType, stringType)) { + const specifierType = checkExpressionCached(specifier); + // Even though multiple arugments is grammatically incorrect, type-check extra arguments for completion + for (let i = 1; i < node.arguments.length; ++i) { + checkExpressionCached(node.arguments[i]); + } + + if (specifierType.flags & TypeFlags.Undefined || specifierType.flags & TypeFlags.Null || !isTypeAssignableTo(specifierType, stringType)) { error(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); } + // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal const moduleSymbol = resolveExternalModuleName(node, specifier); if (moduleSymbol) { diff --git a/tests/baselines/reference/importCallExpression5ES2018.errors.txt b/tests/baselines/reference/importCallExpression5ES2018.errors.txt index 372fda0a685..a7836124184 100644 --- a/tests/baselines/reference/importCallExpression5ES2018.errors.txt +++ b/tests/baselines/reference/importCallExpression5ES2018.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es2018/dynamicImport/2.ts(3,23): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2018/dynamicImport/2.ts(5,24): error TS2531: Object is possibly 'null'. -tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es2018/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. +tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/es2018/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. +tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. ==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== @@ -19,13 +19,13 @@ tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS2531: Object is const specify = bar() ? "./0" : undefined; let myModule = import(specify); ~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. let myModule1 = import(undefined); ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. let myModule2 = import(bar() ? "./1" : null); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2531: Object is possibly 'null'. +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. let myModule3 = import(null); ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpression6ES2018.errors.txt b/tests/baselines/reference/importCallExpression6ES2018.errors.txt index 33f93ef4d39..2e349408569 100644 --- a/tests/baselines/reference/importCallExpression6ES2018.errors.txt +++ b/tests/baselines/reference/importCallExpression6ES2018.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS2531: Object is possibly 'null'. +tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. ==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== @@ -18,8 +18,8 @@ tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS2531: Object is let myModule = import(specify); let myModule1 = import(undefined); ~~~~~~~~~ -!!! error TS2532: Object is possibly 'undefined'. +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. let myModule2 = import(bar() ? "./1" : null); let myModule3 = import(null); ~~~~ -!!! error TS2531: Object is possibly 'null'. \ No newline at end of file +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt index c4c62b8ff8f..c0684edaabe 100644 --- a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt +++ b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt @@ -2,10 +2,12 @@ tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element. tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument. tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS1135: Argument expression expected. +tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1324: Dynamic import must have one specifier as an argument. +tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(10,19): error TS2307: Cannot find module 'pathToModule'. -==== tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts (5 errors) ==== +==== tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts (7 errors) ==== declare function getSpecifier(): string; declare var whatToLoad: boolean; @@ -23,6 +25,10 @@ tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts const p3 = import(,); !!! error TS1135: Argument expression expected. + +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. const p4 = import("pathToModule", "secondModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic import must have one specifier as an argument. \ No newline at end of file +!!! error TS1324: Dynamic import must have one specifier as an argument. + ~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'pathToModule'. \ No newline at end of file From 72ba23c6500ca97df1da49dfd6c01dfcb14fb2c0 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 1 Jun 2017 23:11:43 -0700 Subject: [PATCH 101/134] Address PR: change order of grammar check --- src/compiler/checker.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cbae09a25a8..db2a3c0e066 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24641,24 +24641,24 @@ namespace ts { } function checkGrammarImportCallExpression(node: ImportCall): boolean { - const arguments = node.arguments; - if (arguments.length !== 1) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument); + if (modulekind === ModuleKind.ES2015) { + return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules); } if (node.typeArguments) { return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_have_type_arguments); } + const arguments = node.arguments; + if (arguments.length !== 1) { + return grammarErrorOnNode(node, Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument); + } + // see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import. // parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import. if (isSpreadExpression(arguments[0])) { return grammarErrorOnNode(arguments[0], Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element); } - - if (modulekind === ModuleKind.ES2015) { - grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules); - } } } From e6d7327c3f29106a1a43ee525c09abc4d8d7834b Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 1 Jun 2017 23:21:59 -0700 Subject: [PATCH 102/134] Address PR: error message, fix capitalization, only allow functionLikeDeclaration and ImportCall for create Promise, use fall through comment --- src/compiler/checker.ts | 6 +++--- src/compiler/diagnosticMessages.json | 2 +- src/compiler/parser.ts | 2 +- src/compiler/program.ts | 2 +- src/compiler/types.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index db2a3c0e066..f54e363487c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16332,11 +16332,11 @@ namespace ts { return emptyObjectType; } - function createPromiseReturnType(func: FunctionLikeDeclaration | CallExpression, promisedType: Type) { + function createPromiseReturnType(func: FunctionLikeDeclaration | ImportCall, promisedType: Type) { const promiseType = createPromiseType(promisedType); if (promiseType === emptyObjectType) { error(func, isImportCall(func) ? - Diagnostics.A_dynamic_import_call_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : + Diagnostics.A_dynamic_import_call_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return unknownType; } @@ -17705,7 +17705,7 @@ namespace ts { if ((node).expression.kind === SyntaxKind.ImportKeyword) { return checkImportCallExpression(node); } - /* tslint:disable: no-switch-case-fall-through */ + /* falls through */ case SyntaxKind.NewExpression: return checkCallExpression(node); case SyntaxKind.TaggedTemplateExpression: diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 70a3465a6ee..4a6c2153567 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2172,7 +2172,7 @@ "category": "Error", "code": 2710 }, - "A dynamic import call must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { + "A dynamic import call return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { "category": "Error", "code": 2711 }, diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 58270627d49..2e4de9bdd24 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3700,7 +3700,7 @@ namespace ts { // For example: // var foo3 = require("subfolder // import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression - sourceFile.flags |= NodeFlags.possiblyContainDynamicImport; + sourceFile.flags |= NodeFlags.PossiblyContainDynamicImport; expression = parseTokenNode(); } else { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 61a1e0ba246..c37d07db81a 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1383,7 +1383,7 @@ namespace ts { for (const node of file.statements) { collectModuleReferences(node, /*inAmbientModule*/ false); - if ((file.flags & NodeFlags.possiblyContainDynamicImport) || isJavaScriptFile) { + if ((file.flags & NodeFlags.PossiblyContainDynamicImport) || isJavaScriptFile) { collectDynamicImportOrRequireCalls(node); } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b2d4878a415..756ef4adbac 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -456,7 +456,7 @@ namespace ts { // During editing, if dynamic import is remove, incremental parsing will *NOT* update this flag. This will then causes walking of the tree during module resolution. // However, the removal operation should not occur often and in the case of the removal, it is likely that users will add back the import anyway. // The advantage of this approach is its simplicity. For the case of batch compilation, we garuntee that users won't have to pay the price of walking the tree if dynamic import isn't used. - possiblyContainDynamicImport = 1 << 19, + PossiblyContainDynamicImport = 1 << 19, BlockScoped = Let | Const, From d9e2033dfc7c29eed92f6724b482ab1750f34774 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 1 Jun 2017 23:26:40 -0700 Subject: [PATCH 103/134] Address PR: remove __resolved when emit for commonJs and just do Promise.resolve().then(...) --- src/compiler/transformers/module/module.ts | 27 +++++++--------------- src/compiler/transformers/module/system.ts | 2 +- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index d81265a569f..f776ec23695 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -553,8 +553,8 @@ namespace ts { // ... // new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ // }); - const resolve = createIdentifier("_a"); - const reject = createIdentifier("_b"); + const resolve = createUniqueName("resolve"); + const reject = createUniqueName("reject") return createNew( createIdentifier("Promise"), /*typeArguments*/ undefined, @@ -570,7 +570,7 @@ namespace ts { createCall( createIdentifier("require"), /*typeArguments*/ undefined, - [createArrayLiteral(node.arguments), resolve, reject] + [createArrayLiteral([firstOrUndefined(node.arguments) || createOmittedExpression()]), resolve, reject] ))]) )]); } @@ -578,16 +578,13 @@ namespace ts { function transformImportCallExpressionCommonJS(node: ImportCall): Expression { // import("./blah") // emit as - // var __resolved = new Promise(function (resolve) { resolve(); }); - // .... - // __resolved.then(function () { return require(x); }) /*CommonJs Require*/ - - // Promise.resolve().then(() => require("./blah")); + // Promise.resolve().then(function () { return require(x); }) /*CommonJs Require*/ // We have to wrap require in then callback so that require is done in asynchronously // if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately - context.requestEmitHelper(dynamicImportCreateResolvedHelper); return createCall( - createPropertyAccess(createIdentifier("__resolved"), "then"), + createPropertyAccess( + createCall(createPropertyAccess(createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []), + "then"), /*typeArguments*/ undefined, [createFunctionExpression( /*modifiers*/ undefined, @@ -1609,14 +1606,6 @@ namespace ts { name: "typescript:dynamicimport-sync-require", scoped: true, text: ` - var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - var __resolved = new Promise(function (resolve) { resolve(); });` - }; - - const dynamicImportCreateResolvedHelper: EmitHelper = { - name: "typescript:dynamicimport-create-resolved", - scoped: false, - priority: 1, - text: `var __resolved = new Promise(function (resolve) { resolve(); });` + var __syncRequire = typeof module === "object" && typeof module.exports === "object";` }; } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index 8e7f0ae30d9..6005f381d8b 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -50,7 +50,7 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & TransformFlags.ContainsDynamicImport)) { + if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions)|| node.transformFlags & TransformFlags.ContainsDynamicImport)) { return node; } From 769f6adf29b02b0cfa67d72ebe5de1a31ab1081c Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Jun 2017 06:56:18 -0700 Subject: [PATCH 104/134] Update baselines --- .../importCallExpressionCheckReturntype1.js | 7 +++---- .../importCallExpressionDeclarationEmit1.js | 11 +++++------ .../reference/importCallExpressionES5AMD.js | 6 +++--- .../reference/importCallExpressionES5CJS.js | 7 +++---- .../reference/importCallExpressionES5UMD.js | 7 +++---- .../importCallExpressionGrammarError.js | 11 +++++------ .../reference/importCallExpressionInAMD1.js | 6 +++--- .../reference/importCallExpressionInAMD2.js | 2 +- .../reference/importCallExpressionInAMD3.js | 2 +- .../reference/importCallExpressionInAMD4.js | 4 ++-- .../reference/importCallExpressionInCJS1.js | 7 +++---- .../reference/importCallExpressionInCJS2.js | 5 ++--- .../reference/importCallExpressionInCJS3.js | 3 +-- .../reference/importCallExpressionInCJS4.js | 3 +-- .../reference/importCallExpressionInCJS5.js | 5 ++--- .../importCallExpressionInScriptContext1.js | 3 +-- .../importCallExpressionInScriptContext2.js | 3 +-- .../reference/importCallExpressionInUMD1.js | 7 +++---- .../reference/importCallExpressionInUMD2.js | 3 +-- .../reference/importCallExpressionInUMD3.js | 3 +-- .../reference/importCallExpressionInUMD4.js | 5 ++--- .../importCallExpressionReturnPromiseOfAny.js | 17 ++++++++--------- ...CallExpressionSpecifierNotStringTypeError.js | 11 +++++------ 23 files changed, 60 insertions(+), 78 deletions(-) diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.js b/tests/baselines/reference/importCallExpressionCheckReturntype1.js index a4b564d89dc..f317a799f13 100644 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.js +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.js @@ -29,8 +29,7 @@ class C { exports.C = C; //// [1.js] "use strict"; -var __resolved = new Promise(function (resolve) { resolve(); }); Object.defineProperty(exports, "__esModule", { value: true }); -let p1 = __resolved.then(function () { return require("./defaultPath"); }); -let p2 = __resolved.then(function () { return require("./defaultPath"); }); -let p3 = __resolved.then(function () { return require("./defaultPath"); }); +let p1 = Promise.resolve().then(function () { return require("./defaultPath"); }); +let p2 = Promise.resolve().then(function () { return require("./defaultPath"); }); +let p3 = Promise.resolve().then(function () { return require("./defaultPath"); }); diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js index 4319935bff5..07f95d3b3b2 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js @@ -15,13 +15,12 @@ function returnDynamicLoad(path: string) { } //// [importCallExpressionDeclarationEmit1.js] -var __resolved = new Promise(function (resolve) { resolve(); }); -__resolved.then(function () { return require(getSpecifier()); }); -var p0 = __resolved.then(function () { return require(`${directory}\${moduleFile}`); }); -var p1 = __resolved.then(function () { return require(getSpecifier()); }); -const p2 = __resolved.then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +Promise.resolve().then(function () { return require(getSpecifier()); }); +var p0 = Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); +var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); +const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); function returnDynamicLoad(path) { - return __resolved.then(function () { return require(path); }); + return Promise.resolve().then(function () { return require(path); }); } diff --git a/tests/baselines/reference/importCallExpressionES5AMD.js b/tests/baselines/reference/importCallExpressionES5AMD.js index 0a1aa0deb22..fd402c163e9 100644 --- a/tests/baselines/reference/importCallExpressionES5AMD.js +++ b/tests/baselines/reference/importCallExpressionES5AMD.js @@ -24,12 +24,12 @@ define(["require", "exports"], function (require, exports) { //// [1.js] define(["require", "exports"], function (require, exports) { "use strict"; - new Promise(function (_a, _b) { require(["./0"], _a, _b); }); - var p1 = new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); p1.then(function (zero) { return zero.foo(); }); function foo() { - var p2 = new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + var p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); } }); diff --git a/tests/baselines/reference/importCallExpressionES5CJS.js b/tests/baselines/reference/importCallExpressionES5CJS.js index 77587259a82..c5c4f5933a8 100644 --- a/tests/baselines/reference/importCallExpressionES5CJS.js +++ b/tests/baselines/reference/importCallExpressionES5CJS.js @@ -20,12 +20,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return "foo"; } exports.foo = foo; //// [1.js] -var __resolved = new Promise(function (resolve) { resolve(); }); -__resolved.then(function () { return require("./0"); }); -var p1 = __resolved.then(function () { return require("./0"); }); +Promise.resolve().then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(function () { return require("./0"); }); p1.then(function (zero) { return zero.foo(); }); function foo() { - var p2 = __resolved.then(function () { return require("./0"); }); + var p2 = Promise.resolve().then(function () { return require("./0"); }); } diff --git a/tests/baselines/reference/importCallExpressionES5UMD.js b/tests/baselines/reference/importCallExpressionES5UMD.js index ee96a145854..2952a43cd24 100644 --- a/tests/baselines/reference/importCallExpressionES5UMD.js +++ b/tests/baselines/reference/importCallExpressionES5UMD.js @@ -41,13 +41,12 @@ function foo() { })(function (require, exports) { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - var __resolved = new Promise(function (resolve) { resolve(); }); - __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); - var p1 = __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); p1.then(function (zero) { return zero.foo(); }); function foo() { - var p2 = __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + var p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); } }); diff --git a/tests/baselines/reference/importCallExpressionGrammarError.js b/tests/baselines/reference/importCallExpressionGrammarError.js index f907493a9a8..b30b0c9ddd5 100644 --- a/tests/baselines/reference/importCallExpressionGrammarError.js +++ b/tests/baselines/reference/importCallExpressionGrammarError.js @@ -11,10 +11,9 @@ const p3 = import(,); const p4 = import("pathToModule", "secondModule"); //// [importCallExpressionGrammarError.js] -var __resolved = new Promise(function (resolve) { resolve(); }); var a = ["./0"]; -__resolved.then(function () { return require(...["PathModule"]); }); -var p1 = __resolved.then(function () { return require(...a); }); -const p2 = __resolved.then(function () { return require(); }); -const p3 = __resolved.then(function () { return require(); }); -const p4 = __resolved.then(function () { return require("pathToModule", "secondModule"); }); +Promise.resolve().then(function () { return require(...["PathModule"]); }); +var p1 = Promise.resolve().then(function () { return require(...a); }); +const p2 = Promise.resolve().then(function () { return require(); }); +const p3 = Promise.resolve().then(function () { return require(); }); +const p4 = Promise.resolve().then(function () { return require("pathToModule", "secondModule"); }); diff --git a/tests/baselines/reference/importCallExpressionInAMD1.js b/tests/baselines/reference/importCallExpressionInAMD1.js index 852668f67de..b55066a1b6a 100644 --- a/tests/baselines/reference/importCallExpressionInAMD1.js +++ b/tests/baselines/reference/importCallExpressionInAMD1.js @@ -24,12 +24,12 @@ define(["require", "exports"], function (require, exports) { //// [1.js] define(["require", "exports"], function (require, exports) { "use strict"; - new Promise(function (_a, _b) { require(["./0"], _a, _b); }); - var p1 = new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); p1.then(zero => { return zero.foo(); }); function foo() { - const p2 = new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + const p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); } }); diff --git a/tests/baselines/reference/importCallExpressionInAMD2.js b/tests/baselines/reference/importCallExpressionInAMD2.js index eb2f2795d3d..bac579d0507 100644 --- a/tests/baselines/reference/importCallExpressionInAMD2.js +++ b/tests/baselines/reference/importCallExpressionInAMD2.js @@ -35,5 +35,5 @@ define(["require", "exports"], function (require, exports) { b.print(); }); } - foo(new Promise(function (_a, _b) { require(["./0"], _a, _b); })); + foo(new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); }); diff --git a/tests/baselines/reference/importCallExpressionInAMD3.js b/tests/baselines/reference/importCallExpressionInAMD3.js index 295dbb9b87e..6245f437398 100644 --- a/tests/baselines/reference/importCallExpressionInAMD3.js +++ b/tests/baselines/reference/importCallExpressionInAMD3.js @@ -26,7 +26,7 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; async function foo() { - class C extends (await new Promise(function (_a, _b) { require(["./0"], _a, _b); })).B { + class C extends (await new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })).B { } var c = new C(); c.print(); diff --git a/tests/baselines/reference/importCallExpressionInAMD4.js b/tests/baselines/reference/importCallExpressionInAMD4.js index ce7a0ba9e23..d498b3df080 100644 --- a/tests/baselines/reference/importCallExpressionInAMD4.js +++ b/tests/baselines/reference/importCallExpressionInAMD4.js @@ -48,14 +48,14 @@ define(["require", "exports"], function (require, exports) { "use strict"; class C { constructor() { - this.myModule = new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + this.myModule = new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); } method() { this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await new Promise(function (_a, _b) { require(["./1"], _a, _b); }); + let one = await new Promise(function (resolve_2, reject_2) { require(["./1"], resolve_2, reject_2); }); console.log(one.backup()); }); } diff --git a/tests/baselines/reference/importCallExpressionInCJS1.js b/tests/baselines/reference/importCallExpressionInCJS1.js index a939c78bf49..1b0783fe018 100644 --- a/tests/baselines/reference/importCallExpressionInCJS1.js +++ b/tests/baselines/reference/importCallExpressionInCJS1.js @@ -20,12 +20,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return "foo"; } exports.foo = foo; //// [1.js] -var __resolved = new Promise(function (resolve) { resolve(); }); -__resolved.then(function () { return require("./0"); }); -var p1 = __resolved.then(function () { return require("./0"); }); +Promise.resolve().then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(function () { return require("./0"); }); p1.then(zero => { return zero.foo(); }); function foo() { - const p2 = __resolved.then(function () { return require("./0"); }); + const p2 = Promise.resolve().then(function () { return require("./0"); }); } diff --git a/tests/baselines/reference/importCallExpressionInCJS2.js b/tests/baselines/reference/importCallExpressionInCJS2.js index d21c81b1a15..4a845e2e4e3 100644 --- a/tests/baselines/reference/importCallExpressionInCJS2.js +++ b/tests/baselines/reference/importCallExpressionInCJS2.js @@ -29,13 +29,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); function backup() { return "backup"; } exports.backup = backup; //// [2.js] -var __resolved = new Promise(function (resolve) { resolve(); }); async function compute(promise) { let j = await promise; if (!j) { - j = await __resolved.then(function () { return require("./1"); }); + j = await Promise.resolve().then(function () { return require("./1"); }); return j.backup(); } return j.foo(); } -compute(__resolved.then(function () { return require("./0"); })); +compute(Promise.resolve().then(function () { return require("./0"); })); diff --git a/tests/baselines/reference/importCallExpressionInCJS3.js b/tests/baselines/reference/importCallExpressionInCJS3.js index bce029c4675..a55f57c5674 100644 --- a/tests/baselines/reference/importCallExpressionInCJS3.js +++ b/tests/baselines/reference/importCallExpressionInCJS3.js @@ -24,7 +24,6 @@ class B { } exports.B = B; //// [2.js] -var __resolved = new Promise(function (resolve) { resolve(); }); // We use Promise for now as there is no way to specify shape of module object function foo(x) { x.then(value => { @@ -32,4 +31,4 @@ function foo(x) { b.print(); }); } -foo(__resolved.then(function () { return require("./0"); })); +foo(Promise.resolve().then(function () { return require("./0"); })); diff --git a/tests/baselines/reference/importCallExpressionInCJS4.js b/tests/baselines/reference/importCallExpressionInCJS4.js index aeb537e05bf..0264be113ee 100644 --- a/tests/baselines/reference/importCallExpressionInCJS4.js +++ b/tests/baselines/reference/importCallExpressionInCJS4.js @@ -21,9 +21,8 @@ class B { } exports.B = B; //// [2.js] -var __resolved = new Promise(function (resolve) { resolve(); }); async function foo() { - class C extends (await __resolved.then(function () { return require("./0"); })).B { + class C extends (await Promise.resolve().then(function () { return require("./0"); })).B { } var c = new C(); c.print(); diff --git a/tests/baselines/reference/importCallExpressionInCJS5.js b/tests/baselines/reference/importCallExpressionInCJS5.js index aaa0c0f3d11..196c37e6e72 100644 --- a/tests/baselines/reference/importCallExpressionInCJS5.js +++ b/tests/baselines/reference/importCallExpressionInCJS5.js @@ -40,17 +40,16 @@ Object.defineProperty(exports, "__esModule", { value: true }); function backup() { return "backup"; } exports.backup = backup; //// [2.js] -var __resolved = new Promise(function (resolve) { resolve(); }); class C { constructor() { - this.myModule = __resolved.then(function () { return require("./0"); }); + this.myModule = Promise.resolve().then(function () { return require("./0"); }); } method() { this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await __resolved.then(function () { return require("./1"); }); + let one = await Promise.resolve().then(function () { return require("./1"); }); console.log(one.backup()); }); } diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.js b/tests/baselines/reference/importCallExpressionInScriptContext1.js index 4476fac6c7b..68e51497d14 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.js +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.js @@ -13,6 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return "foo"; } exports.foo = foo; //// [1.js] -var __resolved = new Promise(function (resolve) { resolve(); }); -var p1 = __resolved.then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(function () { return require("./0"); }); function arguments() { } // this is allow as the file doesn't have implicit "use strict" diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.js b/tests/baselines/reference/importCallExpressionInScriptContext2.js index 594b806ee73..f8bf268468c 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext2.js +++ b/tests/baselines/reference/importCallExpressionInScriptContext2.js @@ -15,6 +15,5 @@ function foo() { return "foo"; } exports.foo = foo; //// [1.js] "use strict"; -var __resolved = new Promise(function (resolve) { resolve(); }); -var p1 = __resolved.then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(function () { return require("./0"); }); function arguments() { } diff --git a/tests/baselines/reference/importCallExpressionInUMD1.js b/tests/baselines/reference/importCallExpressionInUMD1.js index 317c6452942..0886da93287 100644 --- a/tests/baselines/reference/importCallExpressionInUMD1.js +++ b/tests/baselines/reference/importCallExpressionInUMD1.js @@ -41,13 +41,12 @@ function foo() { })(function (require, exports) { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - var __resolved = new Promise(function (resolve) { resolve(); }); - __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); - var p1 = __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); p1.then(zero => { return zero.foo(); }); function foo() { - const p2 = __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + const p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); } }); diff --git a/tests/baselines/reference/importCallExpressionInUMD2.js b/tests/baselines/reference/importCallExpressionInUMD2.js index c55b522160f..1e268403088 100644 --- a/tests/baselines/reference/importCallExpressionInUMD2.js +++ b/tests/baselines/reference/importCallExpressionInUMD2.js @@ -45,7 +45,6 @@ foo(import("./0")); })(function (require, exports) { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - var __resolved = new Promise(function (resolve) { resolve(); }); // We use Promise for now as there is no way to specify shape of module object function foo(x) { x.then(value => { @@ -53,5 +52,5 @@ foo(import("./0")); b.print(); }); } - foo(__syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); })); + foo(__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); }); diff --git a/tests/baselines/reference/importCallExpressionInUMD3.js b/tests/baselines/reference/importCallExpressionInUMD3.js index 8b8ddef84d1..228c43fd0a2 100644 --- a/tests/baselines/reference/importCallExpressionInUMD3.js +++ b/tests/baselines/reference/importCallExpressionInUMD3.js @@ -42,9 +42,8 @@ foo(); })(function (require, exports) { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - var __resolved = new Promise(function (resolve) { resolve(); }); async function foo() { - class C extends (await (__syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }))).B { + class C extends (await (__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }))).B { } var c = new C(); c.print(); diff --git a/tests/baselines/reference/importCallExpressionInUMD4.js b/tests/baselines/reference/importCallExpressionInUMD4.js index 36702c55a7f..677ba8c3d27 100644 --- a/tests/baselines/reference/importCallExpressionInUMD4.js +++ b/tests/baselines/reference/importCallExpressionInUMD4.js @@ -71,17 +71,16 @@ class C { })(function (require, exports) { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - var __resolved = new Promise(function (resolve) { resolve(); }); class C { constructor() { - this.myModule = __syncRequire ? __resolved.then(function () { return require("./0"); }) : new Promise(function (_a, _b) { require(["./0"], _a, _b); }); + this.myModule = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); } method() { this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await (__syncRequire ? __resolved.then(function () { return require("./1"); }) : new Promise(function (_a, _b) { require(["./1"], _a, _b); })); + let one = await (__syncRequire ? Promise.resolve().then(function () { return require("./1"); }) : new Promise(function (resolve_2, reject_2) { require(["./1"], resolve_2, reject_2); })); console.log(one.backup()); }); } diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js index 5116da7a3fc..d9dba458296 100644 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js @@ -41,22 +41,21 @@ class C { exports.C = C; //// [1.js] "use strict"; -var __resolved = new Promise(function (resolve) { resolve(); }); Object.defineProperty(exports, "__esModule", { value: true }); -__resolved.then(function () { return require(`${directory}\${moduleFile}`); }); -__resolved.then(function () { return require(getSpecifier()); }); -var p1 = __resolved.then(function () { return require(ValidSomeCondition() ? "./0" : "externalModule"); }); -var p1 = __resolved.then(function () { return require(getSpecifier()); }); -var p11 = __resolved.then(function () { return require(getSpecifier()); }); -const p2 = __resolved.then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); +Promise.resolve().then(function () { return require(getSpecifier()); }); +var p1 = Promise.resolve().then(function () { return require(ValidSomeCondition() ? "./0" : "externalModule"); }); +var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); +var p11 = Promise.resolve().then(function () { return require(getSpecifier()); }); +const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); p1.then(zero => { return zero.foo(); // ok, zero is any }); let j; -var p3 = __resolved.then(function () { return require(j = getSpecifier()); }); +var p3 = Promise.resolve().then(function () { return require(j = getSpecifier()); }); function* loadModule(directories) { for (const directory of directories) { const path = `${directory}\moduleFile`; - __resolved.then(function () { return require(yield path); }); + Promise.resolve().then(function () { return require(yield path); }); } } diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js index ce0b60dd618..dde35d8048b 100644 --- a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js +++ b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js @@ -14,13 +14,12 @@ var p3 = import(["path1", "path2"]); var p4 = import(()=>"PathToModule"); //// [importCallExpressionSpecifierNotStringTypeError.js] -var __resolved = new Promise(function (resolve) { resolve(); }); // Error specifier is not assignable to string -__resolved.then(function () { return require(getSpecifier()); }); -var p1 = __resolved.then(function () { return require(getSpecifier()); }); -const p2 = __resolved.then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +Promise.resolve().then(function () { return require(getSpecifier()); }); +var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); +const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); p1.then(zero => { return zero.foo(); // ok, zero is any }); -var p3 = __resolved.then(function () { return require(["path1", "path2"]); }); -var p4 = __resolved.then(function () { return require(() => "PathToModule"); }); +var p3 = Promise.resolve().then(function () { return require(["path1", "path2"]); }); +var p4 = Promise.resolve().then(function () { return require(() => "PathToModule"); }); From 9203f952eda8132aa4007d5b38de36b4b3d62184 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Jun 2017 09:16:17 -0700 Subject: [PATCH 105/134] Update name change of isSpreadExpression --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c3cd566894a..bd3714537ba 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24680,7 +24680,7 @@ namespace ts { // see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import. // parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import. - if (isSpreadExpression(arguments[0])) { + if (isSpreadElement(arguments[0])) { return grammarErrorOnNode(arguments[0], Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element); } } From 4733f0dcb3cca4d694e696bc196bb9b0216e9e01 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Jun 2017 09:21:15 -0700 Subject: [PATCH 106/134] Fix linting --- src/compiler/transformers/module/module.ts | 2 +- src/compiler/transformers/module/system.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index f776ec23695..b2e1c1c70a9 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -554,7 +554,7 @@ namespace ts { // new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ // }); const resolve = createUniqueName("resolve"); - const reject = createUniqueName("reject") + const reject = createUniqueName("reject"); return createNew( createIdentifier("Promise"), /*typeArguments*/ undefined, diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index 5c0a42ef66a..fa126d1faa7 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -50,7 +50,7 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions)|| node.transformFlags & TransformFlags.ContainsDynamicImport)) { + if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & TransformFlags.ContainsDynamicImport)) { return node; } From e8f42c4a7bf1a7333f8ee62d0496b35d622e5709 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Fri, 2 Jun 2017 19:09:36 +0200 Subject: [PATCH 107/134] Make tokenToString return string|undefined (#16106) --- src/compiler/scanner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 0a072a3b8ac..68a36c40a80 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -286,7 +286,7 @@ namespace ts { const tokenStrings = makeReverseMap(textToToken); - export function tokenToString(t: SyntaxKind): string { + export function tokenToString(t: SyntaxKind): string | undefined { return tokenStrings[t]; } From 87b00fdd8d09b0124d68c21a5e64a9b5f5777d82 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 2 Jun 2017 10:29:53 -0700 Subject: [PATCH 108/134] Add `@checkJs: true` to JS bind error tests --- tests/cases/compiler/jsFileCompilationBindDuplicateIdentifier.ts | 1 + tests/cases/compiler/jsFileCompilationBindErrors.ts | 1 + .../compiler/jsFileCompilationBindMultipleDefaultExports.ts | 1 + tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts | 1 + tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/tests/cases/compiler/jsFileCompilationBindDuplicateIdentifier.ts b/tests/cases/compiler/jsFileCompilationBindDuplicateIdentifier.ts index 3433adc17d5..7659350d489 100644 --- a/tests/cases/compiler/jsFileCompilationBindDuplicateIdentifier.ts +++ b/tests/cases/compiler/jsFileCompilationBindDuplicateIdentifier.ts @@ -1,4 +1,5 @@ // @allowJs: true +// @checkJs: true // @noEmit: true // @filename: a.js var a = 10; diff --git a/tests/cases/compiler/jsFileCompilationBindErrors.ts b/tests/cases/compiler/jsFileCompilationBindErrors.ts index 37bdbc62916..7c43b329a47 100644 --- a/tests/cases/compiler/jsFileCompilationBindErrors.ts +++ b/tests/cases/compiler/jsFileCompilationBindErrors.ts @@ -1,4 +1,5 @@ // @allowJs: true +// @checkJs: true // @noEmit: true // @filename: a.js let C = "sss"; diff --git a/tests/cases/compiler/jsFileCompilationBindMultipleDefaultExports.ts b/tests/cases/compiler/jsFileCompilationBindMultipleDefaultExports.ts index 32a9e77fcc7..e7816f92ad1 100644 --- a/tests/cases/compiler/jsFileCompilationBindMultipleDefaultExports.ts +++ b/tests/cases/compiler/jsFileCompilationBindMultipleDefaultExports.ts @@ -1,4 +1,5 @@ // @allowJs: true +// @checkJs: true // @noEmit: true // @filename: a.js // @target: es6 diff --git a/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts b/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts index b95f85c2139..e9273231316 100644 --- a/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts +++ b/tests/cases/compiler/jsFileCompilationBindReachabilityErrors.ts @@ -1,4 +1,5 @@ // @allowJs: true +// @checkJs: true // @noEmit: true // @filename: a.js // @noFallthroughCasesInSwitch: true diff --git a/tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts b/tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts index 30b43b1990e..527927be6e6 100644 --- a/tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts +++ b/tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts @@ -1,4 +1,5 @@ // @allowJs: true +// @checkJs: true // @noEmit: true // @filename: a.js // @target: es6 From 549485dd8efd55332969098fcb823a0f31d3bb6b Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 2 Jun 2017 10:34:35 -0700 Subject: [PATCH 109/134] Add some new bind errors to a couple of the JS baselines --- ...leCompilationBindMultipleDefaultExports.errors.txt | 10 ++++++++-- .../jsFileCompilationBindStrictModeErrors.errors.txt | 11 ++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt b/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt index 05fecf03d30..9a9a7a12db9 100644 --- a/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt +++ b/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt @@ -1,15 +1,21 @@ tests/cases/compiler/a.js(1,22): error TS2528: A module cannot have multiple default exports. +tests/cases/compiler/a.js(1,22): error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. tests/cases/compiler/a.js(3,1): error TS2528: A module cannot have multiple default exports. tests/cases/compiler/a.js(3,16): error TS1109: Expression expected. +tests/cases/compiler/a.js(3,20): error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. -==== tests/cases/compiler/a.js (3 errors) ==== +==== tests/cases/compiler/a.js (5 errors) ==== export default class a { ~ !!! error TS2528: A module cannot have multiple default exports. + ~ +!!! error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. } export default var a = 10; ~~~~~~~~~~~~~~ !!! error TS2528: A module cannot have multiple default exports. ~~~ -!!! error TS1109: Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. + ~ +!!! error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. \ No newline at end of file diff --git a/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt b/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt index d681cec3775..ed19b5c4a9b 100644 --- a/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt +++ b/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt @@ -1,9 +1,12 @@ tests/cases/compiler/a.js(5,5): error TS1117: An object literal cannot have multiple properties with the same name in strict mode. +tests/cases/compiler/a.js(5,5): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/a.js(7,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/compiler/a.js(8,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. +tests/cases/compiler/a.js(8,8): error TS2703: The operand of a delete operator must be a property reference. tests/cases/compiler/a.js(10,10): error TS1100: Invalid use of 'eval' in strict mode. tests/cases/compiler/a.js(12,10): error TS1100: Invalid use of 'arguments' in strict mode. tests/cases/compiler/a.js(15,1): error TS1101: 'with' statements are not allowed in strict mode. +tests/cases/compiler/a.js(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. tests/cases/compiler/b.js(3,7): error TS1210: Invalid use of 'eval'. Class definitions are automatically in strict mode. tests/cases/compiler/b.js(6,13): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/compiler/c.js(1,12): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. @@ -12,7 +15,7 @@ tests/cases/compiler/d.js(2,9): error TS1121: Octal literals are not allowed in tests/cases/compiler/d.js(2,11): error TS1005: ',' expected. -==== tests/cases/compiler/a.js (6 errors) ==== +==== tests/cases/compiler/a.js (9 errors) ==== "use strict"; var a = { a: "hello", // error @@ -20,6 +23,8 @@ tests/cases/compiler/d.js(2,11): error TS1005: ',' expected. a: 10 // error ~ !!! error TS1117: An object literal cannot have multiple properties with the same name in strict mode. + ~ +!!! error TS2300: Duplicate identifier 'a'. }; var let = 10; // error ~~~ @@ -27,6 +32,8 @@ tests/cases/compiler/d.js(2,11): error TS1005: ',' expected. delete a; // error ~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. + ~ +!!! error TS2703: The operand of a delete operator must be a property reference. try { } catch (eval) { // error ~~~~ @@ -40,6 +47,8 @@ tests/cases/compiler/d.js(2,11): error TS1005: ',' expected. with (a) { ~~~~ !!! error TS1101: 'with' statements are not allowed in strict mode. + ~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. b = 10; } From 2100e40d6ab4c2b108c52cb7b9e691da2b2837cd Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 2 Jun 2017 12:54:23 -0700 Subject: [PATCH 110/134] Centralize weak type checking + improve error message --- src/compiler/checker.ts | 129 +++++++++++---------------- src/compiler/diagnosticMessages.json | 2 +- 2 files changed, 53 insertions(+), 78 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 62fa4fd5f01..aee85c69954 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8701,7 +8701,7 @@ namespace ts { let expandingFlags: number; let depth = 0; let overflow = false; - let disableWeakTypeCheckingForIntersectionConstituents = false; + let isIntersectionConstituent = false; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); @@ -8784,7 +8784,6 @@ namespace ts { * * Ternary.False if they are not related. */ function isRelatedTo(source: Type, target: Type, reportErrors?: boolean, headMessage?: DiagnosticMessage): Ternary { - let result: Ternary; if (source.flags & TypeFlags.StringOrNumberLiteral && source.flags & TypeFlags.FreshLiteral) { source = (source).regularType; } @@ -8816,32 +8815,39 @@ namespace ts { } } + if (!(source.flags & TypeFlags.UnionOrIntersection) && + !(target.flags & TypeFlags.Union) && + !isIntersectionConstituent && + source !== globalObjectType && + getPropertiesOfType(source).length > 0 && + isWeakType(target) && + !hasCommonProperties(source, target)) { + if (reportErrors) { + reportError(Diagnostics.Type_0_has_no_properties_in_common_with_type_1, typeToString(source), typeToString(target)); + } + return Ternary.False; + } + + let result = Ternary.False; const saveErrorInfo = errorInfo; + const saveIsIntersectionConstituent = isIntersectionConstituent; + isIntersectionConstituent = false; // Note that these checks are specifically ordered to produce correct results. In particular, // we need to deconstruct unions before intersections (because unions are always at the top), // and we need to handle "each" relations before "some" relations for the same kind of type. if (source.flags & TypeFlags.Union) { - if (relation === comparableRelation) { - result = someTypeRelatedToType(source as UnionType, target, reportErrors && !(source.flags & TypeFlags.Primitive)); - } - else { - result = eachTypeRelatedToType(source as UnionType, target, reportErrors && !(source.flags & TypeFlags.Primitive)); - } - if (result) { - return result; - } + result = relation === comparableRelation ? + someTypeRelatedToType(source as UnionType, target, reportErrors && !(source.flags & TypeFlags.Primitive)) : + eachTypeRelatedToType(source as UnionType, target, reportErrors && !(source.flags & TypeFlags.Primitive)); } else { if (target.flags & TypeFlags.Union) { - if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & TypeFlags.Primitive) && !(target.flags & TypeFlags.Primitive))) { - return result; - } + result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & TypeFlags.Primitive) && !(target.flags & TypeFlags.Primitive)); } else if (target.flags & TypeFlags.Intersection) { - if (result = typeRelatedToEachType(source, target as IntersectionType, reportErrors)) { - return result; - } + isIntersectionConstituent = true; + result = typeRelatedToEachType(source, target as IntersectionType, reportErrors); } else if (source.flags & TypeFlags.Intersection) { // Check to see if any constituents of the intersection are immediately related to the target. @@ -8857,20 +8863,18 @@ namespace ts { // // - For a primitive type or type parameter (such as 'number = A & B') there is no point in // breaking the intersection apart. - if (result = someTypeRelatedToType(source, target, /*reportErrors*/ false)) { - return result; - } + result = someTypeRelatedToType(source, target, /*reportErrors*/ false); } - - if (source.flags & TypeFlags.StructuredOrTypeVariable || target.flags & TypeFlags.StructuredOrTypeVariable) { + if (!result && (source.flags & TypeFlags.StructuredOrTypeVariable || target.flags & TypeFlags.StructuredOrTypeVariable)) { if (result = recursiveTypeRelatedTo(source, target, reportErrors)) { errorInfo = saveErrorInfo; - return result; } } } - if (reportErrors) { + isIntersectionConstituent = saveIsIntersectionConstituent; + + if (!result && reportErrors) { if (source.flags & TypeFlags.Object && target.flags & TypeFlags.Primitive) { tryElaborateErrorsForPrimitivesAndObjects(source, target); } @@ -8879,7 +8883,7 @@ namespace ts { } reportRelationError(headMessage, source, target); } - return Ternary.False; + return result; } function isIdenticalTo(source: Type, target: Type): Ternary { @@ -8981,39 +8985,14 @@ namespace ts { function typeRelatedToEachType(source: Type, target: IntersectionType, reportErrors: boolean): Ternary { let result = Ternary.True; const targetTypes = target.types; - const saveDisableWeakTypeCheckingForIntersectionConstituents = disableWeakTypeCheckingForIntersectionConstituents; - disableWeakTypeCheckingForIntersectionConstituents = true; for (const targetType of targetTypes) { const related = isRelatedTo(source, targetType, reportErrors); if (!related) { - disableWeakTypeCheckingForIntersectionConstituents = saveDisableWeakTypeCheckingForIntersectionConstituents; return Ternary.False; } result &= related; } - disableWeakTypeCheckingForIntersectionConstituents = saveDisableWeakTypeCheckingForIntersectionConstituents; - return reportAssignmentToWeakIntersection(source, target, reportErrors) ? Ternary.False : result; - } - - /** - * An intersection is weak if all of its constituents are weak. Report an error on assignment to a weak intersection - * of a type that doesn't share any property names with it. - * - * Note: This function could create an anonymous type of the flattened intersection properties and call isRelatedTo, - * but this makes React's already-bad weak type errors even more confusing. - */ - function reportAssignmentToWeakIntersection(source: Type, target: IntersectionType, reportErrors: boolean) { - const needsWeakTypeCheck = source !== globalObjectType && getPropertiesOfType(source).length > 0 && every(target.types, isWeakType); - if (!needsWeakTypeCheck) { - return false; - } - const hasSharedProperty = forEach( - getPropertiesOfType(source), - p => isKnownProperty(target, p.name, /*isComparingJsxAttributes*/ false)); - if (!hasSharedProperty && reportErrors) { - reportError(Diagnostics.Weak_type_0_has_no_properties_in_common_with_1, typeToString(target), typeToString(source)); - } - return !hasSharedProperty; + return result; } function someTypeRelatedToType(source: UnionOrIntersectionType, target: Type, reportErrors: boolean): Ternary { @@ -9303,13 +9282,8 @@ namespace ts { let result = Ternary.True; const properties = getPropertiesOfObjectType(target); const requireOptionalProperties = relation === subtypeRelation && !(getObjectFlags(source) & ObjectFlags.ObjectLiteral); - let foundMatchingProperty = !isWeakType(target); for (const targetProp of properties) { const sourceProp = getPropertyOfType(source, targetProp.name); - if (sourceProp) { - foundMatchingProperty = true; - } - if (sourceProp !== targetProp) { if (!sourceProp) { if (!(targetProp.flags & SymbolFlags.Optional) || requireOptionalProperties) { @@ -9359,10 +9333,7 @@ namespace ts { } return Ternary.False; } - const saveDisableWeakTypeCheckingForIntersectionConstituents = disableWeakTypeCheckingForIntersectionConstituents; - disableWeakTypeCheckingForIntersectionConstituents = false; const related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors); - disableWeakTypeCheckingForIntersectionConstituents = saveDisableWeakTypeCheckingForIntersectionConstituents; if (!related) { if (reportErrors) { reportError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); @@ -9388,15 +9359,6 @@ namespace ts { } } } - if (!foundMatchingProperty && - !disableWeakTypeCheckingForIntersectionConstituents && - source !== globalObjectType && - getPropertiesOfType(source).length > 0) { - if (reportErrors) { - reportError(Diagnostics.Weak_type_0_has_no_properties_in_common_with_1, typeToString(target), typeToString(source)); - } - return Ternary.False; - } return result; } @@ -9404,15 +9366,28 @@ namespace ts { * A type is 'weak' if it is an object type with at least one optional property * and no required properties, call/construct signatures or index signatures */ - function isWeakType(type: Type) { - const props = getPropertiesOfType(type); - return type.flags & TypeFlags.Object && - props.length > 0 && - every(props, p => !!(p.flags & SymbolFlags.Optional)) && - !getSignaturesOfType(type, SignatureKind.Call).length && - !getSignaturesOfType(type, SignatureKind.Construct).length && - !getIndexTypeOfType(type, IndexKind.String) && - !getIndexTypeOfType(type, IndexKind.Number); + function isWeakType(type: Type): boolean { + if (type.flags & TypeFlags.Object) { + const resolved = resolveStructuredTypeMembers(type); + return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 && + !resolved.stringIndexInfo && !resolved.numberIndexInfo && + resolved.properties.length > 0 && + every(resolved.properties, p => !!(p.flags & SymbolFlags.Optional)); + } + if (type.flags & TypeFlags.Intersection) { + return every((type).types, isWeakType); + } + return false; + } + + function hasCommonProperties(source: Type, target: Type) { + const isComparingJsxAttributes = !!(source.flags & TypeFlags.JsxAttributes); + for (const prop of getPropertiesOfType(source)) { + if (isKnownProperty(target, prop.name, isComparingJsxAttributes)) { + return true; + } + } + return false; } function propertiesIdenticalTo(source: Type, target: Type): Ternary { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 1320550d822..e8ad8a033ff 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1879,7 +1879,7 @@ "category": "Error", "code": 2558 }, - "Weak type '{0}' has no properties in common with '{1}'.": { + "Type '{0}' has no properties in common with type '{1}'.": { "category": "Error", "code": 2559 }, From 3e4b83ea3e1e4786ab65087d09c3596eba7613ea Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 2 Jun 2017 12:54:53 -0700 Subject: [PATCH 111/134] Accept new baselines --- ...atWithObjectMembersOptionality2.errors.txt | 48 +++++++------------ .../reference/generatorTypeCheck63.errors.txt | 26 +++++----- .../subtypingWithObjectMembers5.errors.txt | 18 +++---- .../tsxAttributeResolution1.errors.txt | 18 +++---- .../tsxAttributeResolution11.errors.txt | 6 +-- .../tsxAttributeResolution15.errors.txt | 6 +-- .../tsxElementResolution11.errors.txt | 6 +-- .../tsxGenericAttributesType5.errors.txt | 8 ++-- ...ponentWithDefaultTypeParameter3.errors.txt | 12 ++--- .../tsxSpreadAttributesResolution5.errors.txt | 6 +-- ...tsxStatelessFunctionComponents1.errors.txt | 24 ++++------ ...tsxStatelessFunctionComponents2.errors.txt | 6 +-- ...ionComponentsWithTypeArguments4.errors.txt | 12 ++--- .../reference/tsxUnionElementType4.errors.txt | 12 ++--- .../reference/tsxUnionElementType6.errors.txt | 6 +-- tests/baselines/reference/weakType.errors.txt | 12 ++--- 16 files changed, 83 insertions(+), 143 deletions(-) diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 384c338d9c7..0d7fe1071e9 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -1,18 +1,12 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(33,5): error TS2322: Type 'D' is not assignable to type 'C'. - Weak type 'C' has no properties in common with 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(34,5): error TS2322: Type 'E' is not assignable to type 'C'. - Weak type 'C' has no properties in common with 'E'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(35,5): error TS2322: Type 'F' is not assignable to type 'C'. - Weak type 'C' has no properties in common with 'F'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(36,5): error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. - Weak type '{ opt?: Base; }' has no properties in common with 'D'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(37,5): error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. - Weak type '{ opt?: Base; }' has no properties in common with 'E'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(38,5): error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. - Weak type '{ opt?: Base; }' has no properties in common with 'F'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(39,5): error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(40,5): error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(41,5): error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. +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 TS2322: Type 'D' is not assignable to type 'C'. Property 'opt' is missing in type 'D'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C'. @@ -68,37 +62,31 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme // disallowed by weak type checking c = d; ~ -!!! error TS2322: Type 'D' is not assignable to type 'C'. -!!! error TS2322: Weak type 'C' has no properties in common with 'D'. +!!! error TS2559: Type 'D' has no properties in common with type 'C'. c = e; ~ -!!! error TS2322: Type 'E' is not assignable to type 'C'. -!!! error TS2322: Weak type 'C' has no properties in common with 'E'. +!!! error TS2559: Type 'E' has no properties in common with type 'C'. c = f; ~ -!!! error TS2322: Type 'F' is not assignable to type 'C'. -!!! error TS2322: Weak type 'C' has no properties in common with 'F'. +!!! error TS2559: Type 'F' has no properties in common with type 'C'. a = d; ~ -!!! error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. -!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'D'. +!!! error TS2559: Type 'D' has no properties in common with type '{ opt?: Base; }'. a = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. -!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'E'. +!!! error TS2559: Type 'E' has no properties in common with type '{ opt?: Base; }'. a = f; ~ -!!! error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. -!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'F'. +!!! error TS2559: Type 'F' has no properties in common with type '{ opt?: Base; }'. b = d; ~ -!!! error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'. +!!! error TS2559: Type 'D' has no properties in common with type '{ opt?: Base; }'. b = e; ~ -!!! error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'. +!!! error TS2559: Type 'E' has no properties in common with type '{ opt?: Base; }'. b = f; ~ -!!! error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'. +!!! error TS2559: Type 'F' has no properties in common with type '{ opt?: Base; }'. // ok c = a; diff --git a/tests/baselines/reference/generatorTypeCheck63.errors.txt b/tests/baselines/reference/generatorTypeCheck63.errors.txt index bef6a0bfff3..ed2ed36a438 100644 --- a/tests/baselines/reference/generatorTypeCheck63.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck63.errors.txt @@ -1,12 +1,11 @@ -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(24,61): error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: StrategicState) => IterableIterator'. - Type 'IterableIterator' is not assignable to type 'IterableIterator'. - Type 'State | 1' is not assignable to type 'StrategicState'. - Type '1' is not assignable to type 'StrategicState'. +tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(24,14): error TS2322: Type '(a: State | 1) => IterableIterator' is not assignable to type 'Strategy'. + Type 'IterableIterator' is not assignable to type 'IterableIterator'. + Type 'State | 1' is not assignable to type 'State'. + Type '1' is not assignable to type 'State'. tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(29,70): error TS7025: Generator implicitly has type 'IterableIterator' because it does not yield any values. Consider supplying a return type. tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(32,42): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'State' is not a valid type argument because it is not a supertype of candidate '1'. -tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: StrategicState) => IterableIterator'. - Type 'IterableIterator' is not assignable to type 'IterableIterator'. +tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,14): error TS2322: Type '(a: State | 1) => IterableIterator' is not assignable to type 'Strategy'. ==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts (4 errors) ==== @@ -34,11 +33,11 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): err } export const Nothing: Strategy = strategy("Nothing", function* (state: State) { - ~~~~~~~~ -!!! error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: StrategicState) => IterableIterator'. -!!! error TS2345: Type 'IterableIterator' is not assignable to type 'IterableIterator'. -!!! error TS2345: Type 'State | 1' is not assignable to type 'StrategicState'. -!!! error TS2345: Type '1' is not assignable to type 'StrategicState'. + ~~~~~~~ +!!! error TS2322: Type '(a: State | 1) => IterableIterator' is not assignable to type 'Strategy'. +!!! error TS2322: Type 'IterableIterator' is not assignable to type 'IterableIterator'. +!!! error TS2322: Type 'State | 1' is not assignable to type 'State'. +!!! error TS2322: Type '1' is not assignable to type 'State'. yield 1; return state; }); @@ -56,9 +55,8 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): err }); export const Nothing3: Strategy = strategy("Nothing", function* (state: State) { - ~~~~~~~~ -!!! error TS2345: Argument of type '(state: State) => IterableIterator' is not assignable to parameter of type '(a: StrategicState) => IterableIterator'. -!!! error TS2345: Type 'IterableIterator' is not assignable to type 'IterableIterator'. + ~~~~~~~~ +!!! error TS2322: Type '(a: State | 1) => IterableIterator' is not assignable to type 'Strategy'. yield state; return 1; }); \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt index 9cd78e1cf57..022f9138108 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/subtypingWithObjectMembers5.errors.txt @@ -4,12 +4,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW Property '1' is missing in type 'B2'. tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(32,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'. Property ''1'' is missing in type 'B3'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(43,11): error TS2420: Class 'B' incorrectly implements interface 'A'. - Weak type 'A' has no properties in common with 'B'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(51,11): error TS2420: Class 'B2' incorrectly implements interface 'A2'. - Weak type 'A2' has no properties in common with 'B2'. -tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(59,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'. - Weak type 'A3' has no properties in common with 'B3'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(43,11): error TS2559: Type 'B' has no properties in common with type 'A'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(51,11): error TS2559: Type 'B2' has no properties in common with type 'A2'. +tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(59,11): error TS2559: Type 'B3' has no properties in common with type 'A3'. ==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts (6 errors) ==== @@ -66,8 +63,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B implements A { ~ -!!! error TS2420: Class 'B' incorrectly implements interface 'A'. -!!! error TS2420: Weak type 'A' has no properties in common with 'B'. +!!! error TS2559: Type 'B' has no properties in common with type 'A'. fooo: Derived; // weak type error } @@ -77,8 +73,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B2 implements A2 { ~~ -!!! error TS2420: Class 'B2' incorrectly implements interface 'A2'. -!!! error TS2420: Weak type 'A2' has no properties in common with 'B2'. +!!! error TS2559: Type 'B2' has no properties in common with type 'A2'. 2: Derived; // weak type error } @@ -88,8 +83,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW class B3 implements A3 { ~~ -!!! error TS2420: Class 'B3' incorrectly implements interface 'A3'. -!!! error TS2420: Weak type 'A3' has no properties in common with 'B3'. +!!! error TS2559: Type 'B3' has no properties in common with type 'A3'. '1.0': Derived; // weak type error } } diff --git a/tests/baselines/reference/tsxAttributeResolution1.errors.txt b/tests/baselines/reference/tsxAttributeResolution1.errors.txt index 2fd16644f0b..a6fe4154dfe 100644 --- a/tests/baselines/reference/tsxAttributeResolution1.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution1.errors.txt @@ -1,15 +1,12 @@ tests/cases/conformance/jsx/file.tsx(23,8): error TS2322: Type '{ x: "0"; }' is not assignable to type 'Attribs1'. Types of property 'x' are incompatible. Type '"0"' is not assignable to type 'number'. -tests/cases/conformance/jsx/file.tsx(24,8): error TS2322: Type '{ y: 0; }' is not assignable to type 'Attribs1'. - Weak type 'Attribs1' has no properties in common with '{ y: 0; }'. -tests/cases/conformance/jsx/file.tsx(25,8): error TS2322: Type '{ y: "foo"; }' is not assignable to type 'Attribs1'. - Weak type 'Attribs1' has no properties in common with '{ y: "foo"; }'. +tests/cases/conformance/jsx/file.tsx(24,8): error TS2559: Type '{ y: 0; }' has no properties in common with type 'Attribs1'. +tests/cases/conformance/jsx/file.tsx(25,8): error TS2559: Type '{ y: "foo"; }' has no properties in common with type 'Attribs1'. tests/cases/conformance/jsx/file.tsx(26,8): error TS2322: Type '{ x: "32"; }' is not assignable to type 'Attribs1'. Types of property 'x' are incompatible. Type '"32"' is not assignable to type 'number'. -tests/cases/conformance/jsx/file.tsx(27,8): error TS2322: Type '{ var: "10"; }' is not assignable to type 'Attribs1'. - Weak type 'Attribs1' has no properties in common with '{ var: "10"; }'. +tests/cases/conformance/jsx/file.tsx(27,8): error TS2559: Type '{ var: "10"; }' has no properties in common with type 'Attribs1'. tests/cases/conformance/jsx/file.tsx(29,1): error TS2322: Type '{}' is not assignable to type '{ reqd: string; }'. Property 'reqd' is missing in type '{}'. tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type '{ reqd: 10; }' is not assignable to type '{ reqd: string; }'. @@ -47,12 +44,10 @@ tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type '{ reqd: 10; }' i !!! error TS2322: Type '"0"' is not assignable to type 'number'. ; // Error, no property "y" ~~~~~ -!!! error TS2322: Type '{ y: 0; }' is not assignable to type 'Attribs1'. -!!! error TS2322: Weak type 'Attribs1' has no properties in common with '{ y: 0; }'. +!!! error TS2559: Type '{ y: 0; }' has no properties in common with type 'Attribs1'. ; // Error, no property "y" ~~~~~~~ -!!! error TS2322: Type '{ y: "foo"; }' is not assignable to type 'Attribs1'. -!!! error TS2322: Weak type 'Attribs1' has no properties in common with '{ y: "foo"; }'. +!!! error TS2559: Type '{ y: "foo"; }' has no properties in common with type 'Attribs1'. ; // Error, "32" is not number ~~~~~~ !!! error TS2322: Type '{ x: "32"; }' is not assignable to type 'Attribs1'. @@ -60,8 +55,7 @@ tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type '{ reqd: 10; }' i !!! error TS2322: Type '"32"' is not assignable to type 'number'. ; // Error, no 'var' property ~~~~~~~~ -!!! error TS2322: Type '{ var: "10"; }' is not assignable to type 'Attribs1'. -!!! error TS2322: Weak type 'Attribs1' has no properties in common with '{ var: "10"; }'. +!!! error TS2559: Type '{ var: "10"; }' has no properties in common with type 'Attribs1'. ; // Error, missing reqd ~~~~~~~~~ diff --git a/tests/baselines/reference/tsxAttributeResolution11.errors.txt b/tests/baselines/reference/tsxAttributeResolution11.errors.txt index c35ec291e51..a8a62ae656a 100644 --- a/tests/baselines/reference/tsxAttributeResolution11.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution11.errors.txt @@ -1,5 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(11,22): error TS2322: Type '{ bar: "world"; }' is not assignable to type 'IntrinsicAttributes & { ref?: string; }'. - Weak type 'IntrinsicAttributes & { ref?: string; }' has no properties in common with '{ bar: "world"; }'. +tests/cases/conformance/jsx/file.tsx(11,22): error TS2559: Type '{ bar: "world"; }' has no properties in common with type 'IntrinsicAttributes & { ref?: string; }'. ==== tests/cases/conformance/jsx/react.d.ts (0 errors) ==== @@ -28,7 +27,6 @@ tests/cases/conformance/jsx/file.tsx(11,22): error TS2322: Type '{ bar: "world"; // Should be an OK var x = ; ~~~~~~~~~~~ -!!! error TS2322: Type '{ bar: "world"; }' is not assignable to type 'IntrinsicAttributes & { ref?: string; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & { ref?: string; }' has no properties in common with '{ bar: "world"; }'. +!!! error TS2559: Type '{ bar: "world"; }' has no properties in common with type 'IntrinsicAttributes & { ref?: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxAttributeResolution15.errors.txt b/tests/baselines/reference/tsxAttributeResolution15.errors.txt index f4f1a706ac5..07b54411aab 100644 --- a/tests/baselines/reference/tsxAttributeResolution15.errors.txt +++ b/tests/baselines/reference/tsxAttributeResolution15.errors.txt @@ -1,5 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop1: "hello"; }'. +tests/cases/conformance/jsx/file.tsx(11,21): error TS2559: Type '{ prop1: "hello"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. ==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== @@ -15,8 +14,7 @@ tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello // Error let a = ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop1: "hello"; }'. +!!! error TS2559: Type '{ prop1: "hello"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. // OK let b = { this.textInput = input; }} /> diff --git a/tests/baselines/reference/tsxElementResolution11.errors.txt b/tests/baselines/reference/tsxElementResolution11.errors.txt index 54eabef7aed..24ff907f0e0 100644 --- a/tests/baselines/reference/tsxElementResolution11.errors.txt +++ b/tests/baselines/reference/tsxElementResolution11.errors.txt @@ -1,5 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(17,7): error TS2322: Type '{ x: 10; }' is not assignable to type '{ q?: number; }'. - Weak type '{ q?: number; }' has no properties in common with '{ x: 10; }'. +tests/cases/conformance/jsx/file.tsx(17,7): error TS2559: Type '{ x: 10; }' has no properties in common with type '{ q?: number; }'. ==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== @@ -21,8 +20,7 @@ tests/cases/conformance/jsx/file.tsx(17,7): error TS2322: Type '{ x: 10; }' is n var Obj2: Obj2type; ; // Error ~~~~~~ -!!! error TS2322: Type '{ x: 10; }' is not assignable to type '{ q?: number; }'. -!!! error TS2322: Weak type '{ q?: number; }' has no properties in common with '{ x: 10; }'. +!!! error TS2559: Type '{ x: 10; }' has no properties in common with type '{ q?: number; }'. interface Obj3type { new(n: string): { x: number; }; diff --git a/tests/baselines/reference/tsxGenericAttributesType5.errors.txt b/tests/baselines/reference/tsxGenericAttributesType5.errors.txt index 9c67ece048c..83f07326f92 100644 --- a/tests/baselines/reference/tsxGenericAttributesType5.errors.txt +++ b/tests/baselines/reference/tsxGenericAttributesType5.errors.txt @@ -1,5 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(12,20): error TS2322: Type 'U & { x: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with 'U & { x: "hi"; }'. +tests/cases/conformance/jsx/file.tsx(12,36): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. ==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== @@ -15,8 +14,7 @@ tests/cases/conformance/jsx/file.tsx(12,20): error TS2322: Type 'U & { x: "hi"; render() { // Should be an ok but as of 2.3.3 this will be an error as we will instantiate B1.props to be empty object return ; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'U & { x: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with 'U & { x: "hi"; }'. + ~~~~~~ +!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. } } \ No newline at end of file diff --git a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt index 3dda3667ff1..54f36da535b 100644 --- a/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt +++ b/tests/baselines/reference/tsxReactComponentWithDefaultTypeParameter3.errors.txt @@ -1,7 +1,5 @@ -tests/cases/conformance/jsx/file.tsx(16,17): error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: 10; b: "hi"; }'. -tests/cases/conformance/jsx/file.tsx(17,18): error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: "hi"; }'. +tests/cases/conformance/jsx/file.tsx(16,17): error TS2559: Type '{ a: 10; b: "hi"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. +tests/cases/conformance/jsx/file.tsx(17,18): error TS2559: Type '{ a: "hi"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. ==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== @@ -22,9 +20,7 @@ tests/cases/conformance/jsx/file.tsx(17,18): error TS2322: Type '{ a: "hi"; }' i // Error let x = ~~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: 10; b: "hi"; }'. +!!! error TS2559: Type '{ a: 10; b: "hi"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. let x2 = ~~~~~~ -!!! error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }' has no properties in common with '{ a: "hi"; }'. \ No newline at end of file +!!! error TS2559: Type '{ a: "hi"; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes> & { children?: ReactNode; }'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt index 26e67cf5492..5642f06897c 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.errors.txt @@ -2,8 +2,7 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y: Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'. Types of property 'y' are incompatible. Type 'number' is not assignable to type '2'. -tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop1: boolean; }'. +tests/cases/conformance/jsx/file.tsx(33,20): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. ==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== @@ -46,5 +45,4 @@ tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolea // Ok let e = ; ~~~~~~ -!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop1: boolean; }'. \ No newline at end of file +!!! error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt index 38fe85a087c..91d735bb9ed 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponents1.errors.txt @@ -5,18 +5,14 @@ tests/cases/conformance/jsx/file.tsx(27,15): error TS2322: Type '{ name: 42; }' Type '{ name: 42; }' is not assignable to type '{ name?: string; }'. Types of property 'name' are incompatible. Type '42' is not assignable to type 'string'. -tests/cases/conformance/jsx/file.tsx(29,15): error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. - Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ naaaaaaame: "no"; }'. +tests/cases/conformance/jsx/file.tsx(29,15): error TS2559: Type '{ naaaaaaame: "no"; }' has no properties in common with type 'IntrinsicAttributes & { name?: string; }'. tests/cases/conformance/jsx/file.tsx(34,23): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { "prop-name": string; }'. Type '{}' is not assignable to type '{ "prop-name": string; }'. Property '"prop-name"' is missing in type '{}'. -tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'. - Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: true; }'. -tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'. - Weak type 'IntrinsicAttributes' has no properties in common with '{ ref: (x: any) => any; }'. +tests/cases/conformance/jsx/file.tsx(37,23): error TS2559: Type '{ prop1: true; }' has no properties in common with type 'IntrinsicAttributes'. +tests/cases/conformance/jsx/file.tsx(38,24): error TS2559: Type '{ ref: (x: any) => any; }' has no properties in common with type 'IntrinsicAttributes'. tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected. -tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'. - Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: boolean; }'. +tests/cases/conformance/jsx/file.tsx(45,24): error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes'. ==== tests/cases/conformance/jsx/file.tsx (8 errors) ==== @@ -59,8 +55,7 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea // Error let f = ; ~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ naaaaaaame: "no"; }'. +!!! error TS2559: Type '{ naaaaaaame: "no"; }' has no properties in common with type 'IntrinsicAttributes & { name?: string; }'. // OK let g = ; @@ -74,12 +69,10 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea // Error let i = ~~~~~ -!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: true; }'. +!!! error TS2559: Type '{ prop1: true; }' has no properties in common with type 'IntrinsicAttributes'. let i1 = x.greeting.substr(10)} /> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ ref: (x: any) => any; }'. +!!! error TS2559: Type '{ ref: (x: any) => any; }' has no properties in common with type 'IntrinsicAttributes'. let o = { prop1: true; @@ -90,8 +83,7 @@ tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolea // OK as access properties are allow when spread let i2 = ~~~~~~ -!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: boolean; }'. +!!! error TS2559: Type '{ prop1: boolean; }' has no properties in common with type 'IntrinsicAttributes'. let o1: any; // OK diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt index b0c2600532f..1e7a29c3378 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.errors.txt @@ -1,5 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(19,16): error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. - Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ ref: "myRef"; }'. +tests/cases/conformance/jsx/file.tsx(19,16): error TS2559: Type '{ ref: "myRef"; }' has no properties in common with type 'IntrinsicAttributes & { name?: string; }'. tests/cases/conformance/jsx/file.tsx(25,42): error TS2339: Property 'subtr' does not exist on type 'string'. tests/cases/conformance/jsx/file.tsx(27,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'. tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'. @@ -26,8 +25,7 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot // Error - not allowed to specify 'ref' on SFCs let c = ; ~~~~~~~~~~~ -!!! error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ ref: "myRef"; }'. +!!! error TS2559: Type '{ ref: "myRef"; }' has no properties in common with type 'IntrinsicAttributes & { name?: string; }'. // OK - ref is valid for classes diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt index 311cfaed86f..2feed16ac0a 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt @@ -4,9 +4,9 @@ tests/cases/conformance/jsx/file.tsx(9,33): error TS2322: Type '{ a: number; }' tests/cases/conformance/jsx/file.tsx(10,33): error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { b: number; a: {}; }'. Type '{ b: number; }' is not assignable to type 'IntrinsicAttributes & { b: number; a: {}; }'. Type '{ b: number; }' is not assignable to type '{ b: number; a: {}; }'. - Type 'T' is not assignable to type '{ b: number; a: {}; }'. - Type '{ b: number; }' is not assignable to type '{ b: number; a: {}; }'. - Property 'a' is missing in type '{ b: number; }'. + Property 'a' is missing in type '{ b: number; }'. + Type 'T' is not assignable to type 'IntrinsicAttributes'. + Type '{ b: number; }' has no properties in common with type 'IntrinsicAttributes'. ==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== @@ -28,7 +28,7 @@ tests/cases/conformance/jsx/file.tsx(10,33): error TS2322: Type 'T' is not assig !!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { b: number; a: {}; }'. !!! error TS2322: Type '{ b: number; }' is not assignable to type 'IntrinsicAttributes & { b: number; a: {}; }'. !!! error TS2322: Type '{ b: number; }' is not assignable to type '{ b: number; a: {}; }'. -!!! error TS2322: Type 'T' is not assignable to type '{ b: number; a: {}; }'. -!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ b: number; a: {}; }'. -!!! error TS2322: Property 'a' is missing in type '{ b: number; }'. +!!! error TS2322: Property 'a' is missing in type '{ b: number; }'. +!!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2322: Type '{ b: number; }' has no properties in common with type 'IntrinsicAttributes'. } \ No newline at end of file diff --git a/tests/baselines/reference/tsxUnionElementType4.errors.txt b/tests/baselines/reference/tsxUnionElementType4.errors.txt index dc86c847350..3e0f625c4d3 100644 --- a/tests/baselines/reference/tsxUnionElementType4.errors.txt +++ b/tests/baselines/reference/tsxUnionElementType4.errors.txt @@ -3,10 +3,8 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type '{ x: true; }' i Type '{ x: true; }' is not assignable to type '{ x: string; }'. Types of property 'x' are incompatible. Type 'true' is not assignable to type 'string'. -tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ x: 10; }'. -tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. - Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop: true; }'. +tests/cases/conformance/jsx/file.tsx(33,21): error TS2559: Type '{ x: 10; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. +tests/cases/conformance/jsx/file.tsx(34,22): error TS2559: Type '{ prop: true; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. ==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== @@ -50,10 +48,8 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; } !!! error TS2322: Type 'true' is not assignable to type 'string'. let b = ~~~~~~ -!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ x: 10; }'. +!!! error TS2559: Type '{ x: 10; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. let c = ; ~~~~ -!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. -!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }' has no properties in common with '{ prop: true; }'. +!!! error TS2559: Type '{ prop: true; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & { children?: ReactNode; }'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxUnionElementType6.errors.txt b/tests/baselines/reference/tsxUnionElementType6.errors.txt index 98929a838f6..854a84eb85e 100644 --- a/tests/baselines/reference/tsxUnionElementType6.errors.txt +++ b/tests/baselines/reference/tsxUnionElementType6.errors.txt @@ -1,5 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'. - Weak type 'IntrinsicAttributes' has no properties in common with '{ x: true; }'. +tests/cases/conformance/jsx/file.tsx(18,23): error TS2559: Type '{ x: true; }' has no properties in common with type 'IntrinsicAttributes'. tests/cases/conformance/jsx/file.tsx(19,27): error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'. Type '{ x: "hi"; }' is not assignable to type '{ x: boolean; }'. Types of property 'x' are incompatible. @@ -32,8 +31,7 @@ tests/cases/conformance/jsx/file.tsx(21,27): error TS2322: Type '{}' is not assi // Error let a = ; ~ -!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ x: true; }'. +!!! error TS2559: Type '{ x: true; }' has no properties in common with type 'IntrinsicAttributes'. let b = ; ~~~~~~ !!! error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'. diff --git a/tests/baselines/reference/weakType.errors.txt b/tests/baselines/reference/weakType.errors.txt index 432f3dfd8e3..7064ace5daa 100644 --- a/tests/baselines/reference/weakType.errors.txt +++ b/tests/baselines/reference/weakType.errors.txt @@ -1,10 +1,8 @@ -tests/cases/compiler/weakType.ts(31,18): error TS2345: Argument of type '{ error?: number; }' is not assignable to parameter of type 'ChangeOptions'. - Weak type 'ChangeOptions' has no properties in common with '{ error?: number; }'. +tests/cases/compiler/weakType.ts(31,18): error TS2559: Type '{ error?: number; }' has no properties in common with type 'ChangeOptions'. tests/cases/compiler/weakType.ts(56,5): error TS2322: Type '{ properties: { wrong: string; }; }' is not assignable to type 'Weak & Spoiler'. Type '{ properties: { wrong: string; }; }' is not assignable to type 'Weak'. Types of property 'properties' are incompatible. - Type '{ wrong: string; }' is not assignable to type '{ b?: number; }'. - Weak type '{ b?: number; }' has no properties in common with '{ wrong: string; }'. + Type '{ wrong: string; }' has no properties in common with type '{ b?: number; }'. ==== tests/cases/compiler/weakType.ts (2 errors) ==== @@ -40,8 +38,7 @@ tests/cases/compiler/weakType.ts(56,5): error TS2322: Type '{ properties: { wron changes.push(options); changes.push(error); ~~~~~ -!!! error TS2345: Argument of type '{ error?: number; }' is not assignable to parameter of type 'ChangeOptions'. -!!! error TS2345: Weak type 'ChangeOptions' has no properties in common with '{ error?: number; }'. +!!! error TS2559: Type '{ error?: number; }' has no properties in common with type 'ChangeOptions'. } class K { @@ -71,6 +68,5 @@ tests/cases/compiler/weakType.ts(56,5): error TS2322: Type '{ properties: { wron !!! error TS2322: Type '{ properties: { wrong: string; }; }' is not assignable to type 'Weak & Spoiler'. !!! error TS2322: Type '{ properties: { wrong: string; }; }' is not assignable to type 'Weak'. !!! error TS2322: Types of property 'properties' are incompatible. -!!! error TS2322: Type '{ wrong: string; }' is not assignable to type '{ b?: number; }'. -!!! error TS2322: Weak type '{ b?: number; }' has no properties in common with '{ wrong: string; }'. +!!! error TS2322: Type '{ wrong: string; }' has no properties in common with type '{ b?: number; }'. \ No newline at end of file From 2876b3caba382957c864fd84a4195757f9002994 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 2 Jun 2017 13:37:34 -0700 Subject: [PATCH 112/134] No weak type checks with comparable relation --- src/compiler/checker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index aee85c69954..f8d099033f0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8815,7 +8815,8 @@ namespace ts { } } - if (!(source.flags & TypeFlags.UnionOrIntersection) && + if (relation !== comparableRelation && + !(source.flags & TypeFlags.UnionOrIntersection) && !(target.flags & TypeFlags.Union) && !isIntersectionConstituent && source !== globalObjectType && From e81a07e3b5171d0dce91d748a8ad7b7bb59ce13f Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 2 Jun 2017 15:01:38 -0700 Subject: [PATCH 113/134] Delete dead code resulting from 20c11b4f3dc2ee36fd46edbdd6801d5a4298f901 Missed a comment in PR https://github.com/Microsoft/TypeScript/pull/16183 --- Jakefile.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index 286fb98cff5..439fced0720 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -268,7 +268,6 @@ var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename); * @param {boolean} opts.preserveConstEnums: true if compiler should keep const enums in code * @param {boolean} opts.noResolve: true if compiler should not include non-rooted files in compilation * @param {boolean} opts.stripInternal: true if compiler should remove declarations marked as @internal - * @param {boolean} opts.noMapRoot: true if compiler omit mapRoot option * @param {boolean} opts.inlineSourceMap: true if compiler should inline sourceMap * @param {Array} opts.types: array of types to include in compilation * @param callback: a function to execute after the compilation process ends @@ -524,7 +523,7 @@ task("importDefinitelyTypedTests", [importDefinitelyTypedTestsJs], function () { // Local target to build the compiler and services var tscFile = path.join(builtLocalDirectory, compilerFilename); -compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false, { noMapRoot: true }); +compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false); var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js"); var servicesFileInBrowserTest = path.join(builtLocalDirectory, "typescriptServicesInBrowserTest.js"); @@ -579,7 +578,6 @@ compileFile( keepComments: true, noResolve: false, stripInternal: true, - noMapRoot: true, inlineSourceMap: true }); From c2056c0579dbc84f234cc359068e84ab48500518 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Jun 2017 16:13:32 -0700 Subject: [PATCH 114/134] Address minor error messages --- src/compiler/checker.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bd3714537ba..c647a8ad554 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16368,7 +16368,7 @@ namespace ts { const promiseType = createPromiseType(promisedType); if (promiseType === emptyObjectType) { error(func, isImportCall(func) ? - Diagnostics.A_dynamic_import_call_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : + Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return unknownType; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 4a6c2153567..6bcd28811f9 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2172,7 +2172,7 @@ "category": "Error", "code": 2710 }, - "A dynamic import call return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { + "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { "category": "Error", "code": 2711 }, From 029b67856fe70bb3918caa3dfb6d195f35b4bea8 Mon Sep 17 00:00:00 2001 From: Benny Neugebauer Date: Sun, 4 Jun 2017 18:45:55 +0200 Subject: [PATCH 115/134] Sorted rules alphabetically (#16252) --- tslint.json | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/tslint.json b/tslint.json index 9552d193a70..d3178915fe4 100644 --- a/tslint.json +++ b/tslint.json @@ -1,7 +1,7 @@ { "rulesDirectory": "built/local/tslint", "rules": { - "no-bom": true, + "boolean-trivia": true, "class-name": true, "comment-format": [true, "check-space" @@ -9,25 +9,35 @@ "indent": [true, "spaces" ], + "jsdoc-format": true, "linebreak-style": [true, "CRLF"], + "next-line": [true, + "check-catch", + "check-else" + ], + "no-bom": true, + "no-in-operator": true, + "no-increment-decrement": true, + "no-inferrable-types": true, + "no-internal-module": true, + "no-null-keyword": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": [true, "ignore-template-strings"], + "no-type-assertion-whitespace": true, + "no-var-keyword": true, + "object-literal-surrounding-space": true, "one-line": [true, "check-open-brace", "check-whitespace" ], - "no-var-keyword": true, + "prefer-const": true, "quotemark": [true, "double", "avoid-escape" ], "semicolon": [true, "always", "ignore-bound-class-methods"], - "whitespace": [true, - "check-branch", - "check-decl", - "check-operator", - "check-module", - "check-separator", - "check-type" - ], + "triple-equals": true, + "type-operator-spacing": true, "typedef-whitespace": [ true, { @@ -45,23 +55,13 @@ "variable-declaration": "onespace" } ], - "next-line": [true, - "check-catch", - "check-else" - ], - "no-internal-module": true, - "no-trailing-whitespace": [true, "ignore-template-strings"], - "no-inferrable-types": true, - "no-null-keyword": true, - "boolean-trivia": true, - "type-operator-spacing": true, - "prefer-const": true, - "no-increment-decrement": true, - "object-literal-surrounding-space": true, - "no-type-assertion-whitespace": true, - "no-in-operator": true, - "no-switch-case-fall-through": true, - "triple-equals": true, - "jsdoc-format": true - } + "whitespace": [true, + "check-branch", + "check-decl", + "check-operator", + "check-module", + "check-separator", + "check-type" + ] + } } From a76b4b1f28ec4c6af5aaaca092116691af89962e Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 4 Jun 2017 14:26:18 -0700 Subject: [PATCH 116/134] Array cleanup (#16223) * Fix for #13840: Remove map tuple overloads * Coalesce signatures on array that use this args * Remove generic signatures * Add comments to toLocalString * clean up typed array interfaces --- src/lib/es5.d.ts | 497 +++------ tests/baselines/reference/2dArrays.symbols | 4 +- tests/baselines/reference/2dArrays.types | 6 +- .../anyInferenceAnonymousFunctions.symbols | 8 +- .../anyInferenceAnonymousFunctions.types | 12 +- .../reference/argumentsAsPropertyName.symbols | 4 +- .../reference/argumentsAsPropertyName.types | 6 +- .../reference/arrayConcatMap.symbols | 4 +- .../baselines/reference/arrayConcatMap.types | 6 +- tests/baselines/reference/arrayFilter.symbols | 4 +- tests/baselines/reference/arrayFilter.types | 6 +- ...typeIsAssignableToReadonlyArray.errors.txt | 8 +- .../reference/bestChoiceType.symbols | 12 +- .../baselines/reference/bestChoiceType.types | 18 +- ...kSwitchStatementIfCaseTypeIsString.symbols | 4 +- ...eckSwitchStatementIfCaseTypeIsString.types | 6 +- ...assExpressionWithStaticProperties3.symbols | 4 +- ...classExpressionWithStaticProperties3.types | 6 +- ...ExpressionWithStaticPropertiesES63.symbols | 4 +- ...ssExpressionWithStaticPropertiesES63.types | 6 +- ...mmaOperatorInConditionalExpression.symbols | 4 +- ...commaOperatorInConditionalExpression.types | 6 +- .../reference/commentInMethodCall.symbols | 4 +- .../reference/commentInMethodCall.types | 6 +- .../contextualSignatureInstantiation3.symbols | 12 +- .../contextualSignatureInstantiation3.types | 12 +- .../reference/contextuallyTypedIife.symbols | 16 +- .../reference/contextuallyTypedIife.types | 24 +- ...controlFlowDestructuringParameters.symbols | 4 +- .../controlFlowDestructuringParameters.types | 6 +- .../reference/declarationEmitPromise.symbols | 8 +- .../reference/declarationEmitPromise.types | 12 +- tests/baselines/reference/enumIndexer.symbols | 4 +- tests/baselines/reference/enumIndexer.types | 6 +- .../baselines/reference/genericArray1.symbols | 4 +- tests/baselines/reference/genericArray1.types | 6 +- .../reference/genericInference1.symbols | 4 +- .../reference/genericInference1.types | 6 +- .../genericMethodOverspecialization.symbols | 12 +- .../genericMethodOverspecialization.types | 18 +- .../implementArrayInterface.errors.txt | 47 - ...ferFromGenericFunctionReturnTypes2.symbols | 28 +- ...inferFromGenericFunctionReturnTypes2.types | 32 +- .../reference/inferenceLimit.symbols | 4 +- .../baselines/reference/inferenceLimit.types | 4 +- ...inferentialTypingWithFunctionType2.symbols | 4 +- .../inferentialTypingWithFunctionType2.types | 4 +- .../reference/keyofAndIndexedAccess.symbols | 4 +- .../reference/keyofAndIndexedAccess.types | 6 +- .../baselines/reference/mapOnTupleTypes01.js | 14 +- .../reference/mapOnTupleTypes01.symbols | 36 +- .../reference/mapOnTupleTypes01.types | 82 +- .../baselines/reference/mapOnTupleTypes02.js | 2 +- .../reference/mapOnTupleTypes02.symbols | 4 +- .../reference/mapOnTupleTypes02.types | 10 +- tests/baselines/reference/nestedSelf.symbols | 4 +- tests/baselines/reference/nestedSelf.types | 6 +- ...nContextuallyTypesFunctionParamter.symbols | 4 +- ...yInContextuallyTypesFunctionParamter.types | 6 +- .../reference/objectRestForOf.symbols | 4 +- .../baselines/reference/objectRestForOf.types | 6 +- ...arameterReferencedInObjectLiteral1.symbols | 8 +- ...nParameterReferencedInObjectLiteral1.types | 10 +- ...alizationsShouldNotAffectEachOther.symbols | 8 +- ...cializationsShouldNotAffectEachOther.types | 10 +- .../reference/targetTypeArgs.symbols | 24 +- .../baselines/reference/targetTypeArgs.types | 36 +- .../targetTypeObjectLiteralToAny.symbols | 4 +- .../targetTypeObjectLiteralToAny.types | 6 +- ...CallExpressionWithTypeArguments.errors.txt | 4 +- ...nInCallExpressionWithTypeArguments.symbols | 12 + ...ionInCallExpressionWithTypeArguments.types | 18 + ...peInNativeThisAssignableMethods.errors.txt | 409 -------- ...sTypeInNativeThisAssignableMethods.symbols | 404 ++------ ...hisTypeInNativeThisAssignableMethods.types | 946 +++++++++--------- .../reference/tsxSpreadChildren.symbols | 4 +- .../reference/tsxSpreadChildren.types | 6 +- ...ReferencedTypeAliasToTypeLiteral01.symbols | 4 +- ...lyReferencedTypeAliasToTypeLiteral01.types | 6 +- ...ReferencedTypeAliasToTypeLiteral02.symbols | 4 +- ...lyReferencedTypeAliasToTypeLiteral02.types | 6 +- tests/baselines/reference/typedArrays.symbols | 144 +-- tests/baselines/reference/typedArrays.types | 144 +-- .../completionEntryForUnionMethod.ts | 6 +- 84 files changed, 1257 insertions(+), 2076 deletions(-) delete mode 100644 tests/baselines/reference/implementArrayInterface.errors.txt create mode 100644 tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.symbols create mode 100644 tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types delete mode 100644 tests/baselines/reference/thisTypeInNativeThisAssignableMethods.errors.txt diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 3a85f4ddad9..6decc78558a 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -67,8 +67,8 @@ interface PropertyDescriptor { enumerable?: boolean; value?: any; writable?: boolean; - get? (): any; - set? (v: any): void; + get?(): any; + set?(v: any): void; } interface PropertyDescriptorMap { @@ -108,7 +108,7 @@ interface Object { } interface ObjectConstructor { - new (value?: any): Object; + new(value?: any): Object; (): any; (value: any): any; @@ -266,7 +266,7 @@ interface FunctionConstructor { * Creates a new function. * @param args A list of arguments the function accepts. */ - new (...args: string[]): Function; + new(...args: string[]): Function; (...args: string[]): Function; readonly prototype: Function; } @@ -403,7 +403,7 @@ interface String { } interface StringConstructor { - new (value?: any): String; + new(value?: any): String; (value?: any): string; readonly prototype: String; fromCharCode(...codes: number[]): string; @@ -420,7 +420,7 @@ interface Boolean { } interface BooleanConstructor { - new (value?: any): Boolean; + new(value?: any): Boolean; (value?: any): boolean; readonly prototype: Boolean; } @@ -457,7 +457,7 @@ interface Number { } interface NumberConstructor { - new (value?: any): Number; + new(value?: any): Number; (value?: any): number; readonly prototype: Number; @@ -759,10 +759,10 @@ interface Date { } interface DateConstructor { - new (): Date; - new (value: number): Date; - new (value: string): Date; - new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + new(): Date; + new(value: number): Date; + new(value: string): Date; + new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; (): string; readonly prototype: Date; /** @@ -828,8 +828,8 @@ interface RegExp { } interface RegExpConstructor { - new (pattern: RegExp | string): RegExp; - new (pattern: string, flags?: string): RegExp; + new(pattern: RegExp | string): RegExp; + new(pattern: string, flags?: string): RegExp; (pattern: RegExp | string): RegExp; (pattern: string, flags?: string): RegExp; readonly prototype: RegExp; @@ -856,7 +856,7 @@ interface Error { } interface ErrorConstructor { - new (message?: string): Error; + new(message?: string): Error; (message?: string): Error; readonly prototype: Error; } @@ -867,7 +867,7 @@ interface EvalError extends Error { } interface EvalErrorConstructor { - new (message?: string): EvalError; + new(message?: string): EvalError; (message?: string): EvalError; readonly prototype: EvalError; } @@ -878,7 +878,7 @@ interface RangeError extends Error { } interface RangeErrorConstructor { - new (message?: string): RangeError; + new(message?: string): RangeError; (message?: string): RangeError; readonly prototype: RangeError; } @@ -889,7 +889,7 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor { - new (message?: string): ReferenceError; + new(message?: string): ReferenceError; (message?: string): ReferenceError; readonly prototype: ReferenceError; } @@ -900,7 +900,7 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor { - new (message?: string): SyntaxError; + new(message?: string): SyntaxError; (message?: string): SyntaxError; readonly prototype: SyntaxError; } @@ -911,7 +911,7 @@ interface TypeError extends Error { } interface TypeErrorConstructor { - new (message?: string): TypeError; + new(message?: string): TypeError; (message?: string): TypeError; readonly prototype: TypeError; } @@ -922,7 +922,7 @@ interface URIError extends Error { } interface URIErrorConstructor { - new (message?: string): URIError; + new(message?: string): URIError; (message?: string): URIError; readonly prototype: URIError; } @@ -972,12 +972,10 @@ interface ReadonlyArray { * Returns a string representation of an array. */ toString(): string; - toLocaleString(): string; /** - * Combines two or more arrays. - * @param items Additional items to add to the end of array1. + * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods. */ - concat>(...items: U[]): T[]; + toLocaleString(): string; /** * Combines two or more arrays. * @param items Additional items to add to the end of array1. @@ -1005,7 +1003,6 @@ interface ReadonlyArray { * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ indexOf(searchElement: T, fromIndex?: number): number; - /** * Returns the index of the last occurrence of a specified value in an array. * @param searchElement The value to locate in the array. @@ -1017,49 +1014,37 @@ interface ReadonlyArray { * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => boolean): boolean; - every(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean; /** * Determines whether the specified callback function returns true for any element of an array. * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => boolean): boolean; - some(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean; /** * Performs the specified action for each element in an array. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => void): void; - forEach(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => void, thisArg: Z): void; + forEach(callbackfn: (value: T, index: number, array: ReadonlyArray) => void, thisArg?: any): void; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => U): U[]; - map(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => U, thisArg: undefined): U[]; - map(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => U, thisArg: Z): U[]; + map(callbackfn: (value: T, index: number, array: ReadonlyArray) => U, thisArg?: any): U[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => value is S): S[]; - filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => value is S, thisArg: undefined): S[]; - filter(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => value is S, thisArg: Z): S[]; + filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => value is S, thisArg?: any): S[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => any): T[]; - filter(callbackfn: (this: void, value: T, index: number, array: ReadonlyArray) => any, thisArg: undefined): T[]; - filter(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => any, thisArg: Z): T[]; + filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => any, thisArg?: any): T[]; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1097,6 +1082,9 @@ interface Array { * Returns a string representation of an array. */ toString(): string; + /** + * Returns a string representation of an array. The elements are converted to string using thier toLocalString methods. + */ toLocaleString(): string; /** * Appends new elements to an array, and returns the new length of the array. @@ -1176,73 +1164,37 @@ interface Array { * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean; - every(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; /** * Determines whether the specified callback function returns true for any element of an array. * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean): boolean; - some(callbackfn: (this: void, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; /** * Performs the specified action for each element in an array. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void): void; - forEach(callbackfn: (this: void, value: T, index: number, array: T[]) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void; + forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; - map(this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; - map(this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; + map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; - map(this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; - map(this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; - map(this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; - map(this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; - map(this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; - map(this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; - /** - * Calls a defined callback function on each element of an array, and returns an array that contains the results. - * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. - * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. - */ - map(callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; - map(callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; - map(callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; + * Returns the elements of an array that meet the condition specified in a callback function. + * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any): T[]; - filter(callbackfn: (this: void, value: T, index: number, array: T[]) => any, thisArg: undefined): T[]; - filter(callbackfn: (this: Z, value: T, index: number, array: T[]) => any, thisArg: Z): T[]; + filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1272,7 +1224,7 @@ interface Array { } interface ArrayConstructor { - new (arrayLength?: number): any[]; + new(arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; (arrayLength?: number): any[]; @@ -1396,7 +1348,7 @@ type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { readonly prototype: ArrayBuffer; - new (byteLength: number): ArrayBuffer; + new(byteLength: number): ArrayBuffer; isView(arg: any): arg is ArrayBufferView; } declare const ArrayBuffer: ArrayBufferConstructor; @@ -1547,7 +1499,7 @@ interface DataView { } interface DataViewConstructor { - new (buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView; + new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView; } declare const DataView: DataViewConstructor; @@ -1595,9 +1547,7 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -1616,9 +1566,7 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any): Int8Array; - filter(callbackfn: (this: void, value: number, index: number, array: Int8Array) => any, thisArg: undefined): Int8Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => any, thisArg: Z): Int8Array; + filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -1629,9 +1577,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -1642,9 +1588,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -1653,9 +1597,7 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Int8Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -1693,9 +1635,7 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number): Int8Array; - map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg: undefined): Int8Array; - map(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => number, thisArg: Z): Int8Array; + map(callbackfn: (this: void, value: number, index: number, array: Int8Array) => number, thisArg: any): Int8Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -1772,9 +1712,7 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -1805,9 +1743,9 @@ interface Int8Array { } interface Int8ArrayConstructor { readonly prototype: Int8Array; - new (length: number): Int8Array; - new (array: ArrayLike): Int8Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; + new(length: number): Int8Array; + new(array: ArrayLike): Int8Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; /** * The size in bytes of each element in the array. @@ -1826,11 +1764,8 @@ interface Int8ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; - from(arrayLike: ArrayLike): Int8Array; } declare const Int8Array: Int8ArrayConstructor; @@ -1879,9 +1814,7 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -1900,9 +1833,7 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any): Uint8Array; - filter(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => any, thisArg: undefined): Uint8Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => any, thisArg: Z): Uint8Array; + filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -1913,9 +1844,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -1926,9 +1855,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -1937,9 +1864,7 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -1977,9 +1902,7 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number): Uint8Array; - map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg: undefined): Uint8Array; - map(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => number, thisArg: Z): Uint8Array; + map(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => number, thisArg: any): Uint8Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2056,9 +1979,7 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -2090,9 +2011,9 @@ interface Uint8Array { interface Uint8ArrayConstructor { readonly prototype: Uint8Array; - new (length: number): Uint8Array; - new (array: ArrayLike): Uint8Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; + new(length: number): Uint8Array; + new(array: ArrayLike): Uint8Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; /** * The size in bytes of each element in the array. @@ -2111,11 +2032,7 @@ interface Uint8ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; - - from(arrayLike: ArrayLike): Uint8Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } declare const Uint8Array: Uint8ArrayConstructor; @@ -2164,9 +2081,7 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2185,9 +2100,7 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any): Uint8ClampedArray; - filter(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: undefined): Uint8ClampedArray; - filter(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: Z): Uint8ClampedArray; + filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2198,9 +2111,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2211,9 +2122,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -2222,9 +2131,7 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -2262,9 +2169,7 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number): Uint8ClampedArray; - map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: undefined): Uint8ClampedArray; - map(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: Z): Uint8ClampedArray; + map(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: any): Uint8ClampedArray; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2341,9 +2246,7 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -2375,9 +2278,9 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; - new (array: ArrayLike): Uint8ClampedArray; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; + new(length: number): Uint8ClampedArray; + new(array: ArrayLike): Uint8ClampedArray; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; /** * The size in bytes of each element in the array. @@ -2396,11 +2299,7 @@ interface Uint8ClampedArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; - - from(arrayLike: ArrayLike): Uint8ClampedArray; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare const Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -2448,9 +2347,7 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2469,9 +2366,7 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any): Int16Array; - filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any, thisArg: undefined): Int16Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => any, thisArg: Z): Int16Array; + filter(callbackfn: (this: void, value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2482,9 +2377,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2495,9 +2388,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -2506,10 +2397,7 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Int16Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => void, thisArg: Z): void; - + forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. @@ -2546,9 +2434,7 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number): Int16Array; - map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg: undefined): Int16Array; - map(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => number, thisArg: Z): Int16Array; + map(callbackfn: (this: void, value: number, index: number, array: Int16Array) => number, thisArg: any): Int16Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2625,9 +2511,7 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -2659,9 +2543,9 @@ interface Int16Array { interface Int16ArrayConstructor { readonly prototype: Int16Array; - new (length: number): Int16Array; - new (array: ArrayLike): Int16Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; + new(length: number): Int16Array; + new(array: ArrayLike): Int16Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; /** * The size in bytes of each element in the array. @@ -2680,11 +2564,8 @@ interface Int16ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; - from(arrayLike: ArrayLike): Int16Array; } declare const Int16Array: Int16ArrayConstructor; @@ -2733,9 +2614,7 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2754,9 +2633,7 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any): Uint16Array; - filter(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => any, thisArg: undefined): Uint16Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => any, thisArg: Z): Uint16Array; + filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2767,9 +2644,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2780,9 +2655,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -2791,9 +2664,7 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -2831,9 +2702,7 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number): Uint16Array; - map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg: undefined): Uint16Array; - map(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => number, thisArg: Z): Uint16Array; + map(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => number, thisArg: any): Uint16Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2910,9 +2779,7 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -2944,9 +2811,9 @@ interface Uint16Array { interface Uint16ArrayConstructor { readonly prototype: Uint16Array; - new (length: number): Uint16Array; - new (array: ArrayLike): Uint16Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; + new(length: number): Uint16Array; + new(array: ArrayLike): Uint16Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; /** * The size in bytes of each element in the array. @@ -2965,11 +2832,8 @@ interface Uint16ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; - from(arrayLike: ArrayLike): Uint16Array; } declare const Uint16Array: Uint16ArrayConstructor; @@ -3017,9 +2881,7 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3038,9 +2900,7 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any): Int32Array; - filter(callbackfn: (this: void, value: number, index: number, array: Int32Array) => any, thisArg: undefined): Int32Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => any, thisArg: Z): Int32Array; + filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3051,9 +2911,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3064,9 +2922,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3075,9 +2931,7 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Int32Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3115,9 +2969,7 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number): Int32Array; - map(callbackfn: (this: void, value: number, index: number, array: Int32Array) => number, thisArg: undefined): Int32Array; - map(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => number, thisArg: Z): Int32Array; + map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3194,9 +3046,7 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -3228,9 +3078,9 @@ interface Int32Array { interface Int32ArrayConstructor { readonly prototype: Int32Array; - new (length: number): Int32Array; - new (array: ArrayLike): Int32Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; + new(length: number): Int32Array; + new(array: ArrayLike): Int32Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; /** * The size in bytes of each element in the array. @@ -3249,11 +3099,8 @@ interface Int32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; - from(arrayLike: ArrayLike): Int32Array; } declare const Int32Array: Int32ArrayConstructor; @@ -3301,9 +3148,7 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3322,9 +3167,7 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any): Uint32Array; - filter(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => any, thisArg: undefined): Uint32Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => any, thisArg: Z): Uint32Array; + filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3335,9 +3178,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3348,9 +3189,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3359,10 +3198,7 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => void, thisArg: Z): void; - + forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. @@ -3399,9 +3235,7 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number): Uint32Array; - map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg: undefined): Uint32Array; - map(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => number, thisArg: Z): Uint32Array; + map(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => number, thisArg: any): Uint32Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3478,9 +3312,7 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -3512,9 +3344,9 @@ interface Uint32Array { interface Uint32ArrayConstructor { readonly prototype: Uint32Array; - new (length: number): Uint32Array; - new (array: ArrayLike): Uint32Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; + new(length: number): Uint32Array; + new(array: ArrayLike): Uint32Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; /** * The size in bytes of each element in the array. @@ -3533,11 +3365,8 @@ interface Uint32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; - from(arrayLike: ArrayLike): Uint32Array; } declare const Uint32Array: Uint32ArrayConstructor; @@ -3585,9 +3414,7 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3606,9 +3433,7 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any): Float32Array; - filter(callbackfn: (this: void, value: number, index: number, array: Float32Array) => any, thisArg: undefined): Float32Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => any, thisArg: Z): Float32Array; + filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3619,9 +3444,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3632,9 +3455,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3643,9 +3464,7 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Float32Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3683,9 +3502,7 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number): Float32Array; - map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg: undefined): Float32Array; - map(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => number, thisArg: Z): Float32Array; + map(callbackfn: (this: void, value: number, index: number, array: Float32Array) => number, thisArg: any): Float32Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3762,9 +3579,7 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -3796,9 +3611,9 @@ interface Float32Array { interface Float32ArrayConstructor { readonly prototype: Float32Array; - new (length: number): Float32Array; - new (array: ArrayLike): Float32Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; + new(length: number): Float32Array; + new(array: ArrayLike): Float32Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; /** * The size in bytes of each element in the array. @@ -3817,11 +3632,8 @@ interface Float32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; - from(arrayLike: ArrayLike): Float32Array; } declare const Float32Array: Float32ArrayConstructor; @@ -3870,9 +3682,7 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean; - every(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean; - every(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean; + every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3891,9 +3701,7 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any): Float64Array; - filter(callbackfn: (this: void, value: number, index: number, array: Float64Array) => any, thisArg: undefined): Float64Array; - filter(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => any, thisArg: Z): Float64Array; + filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3904,9 +3712,7 @@ 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. */ - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number | undefined; - find(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; - find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; + find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3917,9 +3723,7 @@ 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. */ - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean): number; - findIndex(predicate: (this: void, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; - findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; + findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3928,9 +3732,7 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void): void; - forEach(callbackfn: (this: void, value: number, index: number, array: Float64Array) => void, thisArg: undefined): void; - forEach(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => void, thisArg: Z): void; + forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3968,9 +3770,7 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number): Float64Array; - map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number, thisArg: undefined): Float64Array; - map(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => number, thisArg: Z): Float64Array; + map(callbackfn: (this: void, value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -4047,9 +3847,7 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean): boolean; - some(callbackfn: (this: void, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean; - some(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean; + some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean; /** * Sorts an array. @@ -4081,9 +3879,9 @@ interface Float64Array { interface Float64ArrayConstructor { readonly prototype: Float64Array; - new (length: number): Float64Array; - new (array: ArrayLike): Float64Array; - new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; + new(length: number): Float64Array; + new(array: ArrayLike): Float64Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; /** * The size in bytes of each element in the array. @@ -4102,11 +3900,8 @@ interface Float64ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; - from(arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; - from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; + from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; - from(arrayLike: ArrayLike): Float64Array; } declare const Float64Array: Float64ArrayConstructor; @@ -4139,7 +3934,7 @@ declare namespace Intl { resolvedOptions(): ResolvedCollatorOptions; } var Collator: { - new (locales?: string | string[], options?: CollatorOptions): Collator; + new(locales?: string | string[], options?: CollatorOptions): Collator; (locales?: string | string[], options?: CollatorOptions): Collator; supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; }; @@ -4176,7 +3971,7 @@ declare namespace Intl { resolvedOptions(): ResolvedNumberFormatOptions; } var NumberFormat: { - new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat; (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; }; @@ -4219,7 +4014,7 @@ declare namespace Intl { resolvedOptions(): ResolvedDateTimeFormatOptions; } var DateTimeFormat: { - new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; }; diff --git a/tests/baselines/reference/2dArrays.symbols b/tests/baselines/reference/2dArrays.symbols index 6f02cdcf963..8d6b6b167e6 100644 --- a/tests/baselines/reference/2dArrays.symbols +++ b/tests/baselines/reference/2dArrays.symbols @@ -25,11 +25,11 @@ class Board { >allShipsSunk : Symbol(Board.allShipsSunk, Decl(2dArrays.ts, 9, 18)) return this.ships.every(function (val) { return val.isSunk; }); ->this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >this.ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13)) >this : Symbol(Board, Decl(2dArrays.ts, 5, 1)) >ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >val : Symbol(val, Decl(2dArrays.ts, 12, 42)) >val.isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12)) >val : Symbol(val, Decl(2dArrays.ts, 12, 42)) diff --git a/tests/baselines/reference/2dArrays.types b/tests/baselines/reference/2dArrays.types index 45672187306..00805899294 100644 --- a/tests/baselines/reference/2dArrays.types +++ b/tests/baselines/reference/2dArrays.types @@ -26,12 +26,12 @@ class Board { return this.ships.every(function (val) { return val.isSunk; }); >this.ships.every(function (val) { return val.isSunk; }) : boolean ->this.ships.every : { (callbackfn: (this: void, value: Ship, index: number, array: Ship[]) => boolean): boolean; (callbackfn: (this: void, value: Ship, index: number, array: Ship[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Ship, index: number, array: Ship[]) => boolean, thisArg: Z): boolean; } +>this.ships.every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean >this.ships : Ship[] >this : this >ships : Ship[] ->every : { (callbackfn: (this: void, value: Ship, index: number, array: Ship[]) => boolean): boolean; (callbackfn: (this: void, value: Ship, index: number, array: Ship[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Ship, index: number, array: Ship[]) => boolean, thisArg: Z): boolean; } ->function (val) { return val.isSunk; } : (this: void, val: Ship) => boolean +>every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean +>function (val) { return val.isSunk; } : (val: Ship) => boolean >val : Ship >val.isSunk : boolean >val : Ship diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols index 750c7ba85af..c1b5df88fb0 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols @@ -35,16 +35,16 @@ paired.reduce((b3, b4) => b3.concat({}), []); >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) paired.map((c1) => c1.count); ->paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >c1 : Symbol(c1, Decl(anyInferenceAnonymousFunctions.ts, 15, 12)) >c1 : Symbol(c1, Decl(anyInferenceAnonymousFunctions.ts, 15, 12)) paired.map(function (c2) { return c2.count; }); ->paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >c2 : Symbol(c2, Decl(anyInferenceAnonymousFunctions.ts, 16, 21)) >c2 : Symbol(c2, Decl(anyInferenceAnonymousFunctions.ts, 16, 21)) diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.types b/tests/baselines/reference/anyInferenceAnonymousFunctions.types index b015d350760..8dc7fdcb90f 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.types +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.types @@ -57,10 +57,10 @@ paired.reduce((b3, b4) => b3.concat({}), []); paired.map((c1) => c1.count); >paired.map((c1) => c1.count) : any[] ->paired.map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>paired.map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >paired : any[] ->map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } ->(c1) => c1.count : (this: void, c1: any) => any +>map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>(c1) => c1.count : (c1: any) => any >c1 : any >c1.count : any >c1 : any @@ -68,10 +68,10 @@ paired.map((c1) => c1.count); paired.map(function (c2) { return c2.count; }); >paired.map(function (c2) { return c2.count; }) : any[] ->paired.map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>paired.map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >paired : any[] ->map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } ->function (c2) { return c2.count; } : (this: void, c2: any) => any +>map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>function (c2) { return c2.count; } : (c2: any) => any >c2 : any >c2.count : any >c2 : any diff --git a/tests/baselines/reference/argumentsAsPropertyName.symbols b/tests/baselines/reference/argumentsAsPropertyName.symbols index a17c660374c..1e3e41abb6e 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.symbols +++ b/tests/baselines/reference/argumentsAsPropertyName.symbols @@ -34,8 +34,8 @@ function myFunction(myType: MyType) { >x : Symbol(x, Decl(argumentsAsPropertyName.ts, 11, 13)) [1, 2, 3].forEach(function(j) { use(x); }) ->[1, 2, 3].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >j : Symbol(j, Decl(argumentsAsPropertyName.ts, 12, 35)) >use : Symbol(use, Decl(argumentsAsPropertyName.ts, 3, 1)) >x : Symbol(x, Decl(argumentsAsPropertyName.ts, 11, 13)) diff --git a/tests/baselines/reference/argumentsAsPropertyName.types b/tests/baselines/reference/argumentsAsPropertyName.types index 73397199436..d0aaaa1cc72 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.types +++ b/tests/baselines/reference/argumentsAsPropertyName.types @@ -42,13 +42,13 @@ function myFunction(myType: MyType) { [1, 2, 3].forEach(function(j) { use(x); }) >[1, 2, 3].forEach(function(j) { use(x); }) : void ->[1, 2, 3].forEach : { (callbackfn: (this: void, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: void, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } +>[1, 2, 3].forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->forEach : { (callbackfn: (this: void, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: void, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } ->function(j) { use(x); } : (this: void, j: number) => void +>forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>function(j) { use(x); } : (j: number) => void >j : number >use(x) : any >use : (s: any) => any diff --git a/tests/baselines/reference/arrayConcatMap.symbols b/tests/baselines/reference/arrayConcatMap.symbols index 1b26708ae94..5ef9d811723 100644 --- a/tests/baselines/reference/arrayConcatMap.symbols +++ b/tests/baselines/reference/arrayConcatMap.symbols @@ -1,14 +1,14 @@ === tests/cases/compiler/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.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[].concat([{ a: 1 }], [{ a: 2 }]) .map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >[].concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(arrayConcatMap.ts, 0, 20)) >a : Symbol(a, Decl(arrayConcatMap.ts, 0, 32)) .map(b => b.a); ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(arrayConcatMap.ts, 1, 15)) >b : Symbol(b, Decl(arrayConcatMap.ts, 1, 15)) diff --git a/tests/baselines/reference/arrayConcatMap.types b/tests/baselines/reference/arrayConcatMap.types index b234b7beb26..89289e58d4e 100644 --- a/tests/baselines/reference/arrayConcatMap.types +++ b/tests/baselines/reference/arrayConcatMap.types @@ -2,7 +2,7 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : any[] >[].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a) : any[] ->[].concat([{ a: 1 }], [{ a: 2 }]) .map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>[].concat([{ a: 1 }], [{ a: 2 }]) .map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >[].concat([{ a: 1 }], [{ a: 2 }]) : any[] >[].concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } >[] : undefined[] @@ -17,8 +17,8 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) >2 : 2 .map(b => b.a); ->map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } ->b => b.a : (this: void, b: any) => any +>map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>b => b.a : (b: any) => any >b : any >b.a : any >b : any diff --git a/tests/baselines/reference/arrayFilter.symbols b/tests/baselines/reference/arrayFilter.symbols index 81d92ba04b6..cba8f48c89f 100644 --- a/tests/baselines/reference/arrayFilter.symbols +++ b/tests/baselines/reference/arrayFilter.symbols @@ -14,9 +14,9 @@ var foo = [ ] foo.filter(x => x.name); //should accepted all possible types not only boolean! ->foo.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>foo.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >foo : Symbol(foo, Decl(arrayFilter.ts, 0, 3)) ->filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(arrayFilter.ts, 6, 11)) >x.name : Symbol(name, Decl(arrayFilter.ts, 1, 5)) >x : Symbol(x, Decl(arrayFilter.ts, 6, 11)) diff --git a/tests/baselines/reference/arrayFilter.types b/tests/baselines/reference/arrayFilter.types index 23ab4d915bd..7d91ef4ed32 100644 --- a/tests/baselines/reference/arrayFilter.types +++ b/tests/baselines/reference/arrayFilter.types @@ -22,10 +22,10 @@ var foo = [ foo.filter(x => x.name); //should accepted all possible types not only boolean! >foo.filter(x => x.name) : { name: string; }[] ->foo.filter : { (callbackfn: (this: void, value: { name: string; }, index: number, array: { name: string; }[]) => any): { name: string; }[]; (callbackfn: (this: void, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: undefined): { name: string; }[]; (callbackfn: (this: Z, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: Z): { name: string; }[]; } +>foo.filter : { (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any): { name: string; }[]; } >foo : { name: string; }[] ->filter : { (callbackfn: (this: void, value: { name: string; }, index: number, array: { name: string; }[]) => any): { name: string; }[]; (callbackfn: (this: void, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: undefined): { name: string; }[]; (callbackfn: (this: Z, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: Z): { name: string; }[]; } ->x => x.name : (this: void, x: { name: string; }) => string +>filter : { (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any): { name: string; }[]; } +>x => x.name : (x: { name: string; }) => string >x : { name: string; } >x.name : string >x : { name: string; } diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt index 90dc909b11a..df24be3a020 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 'ReadonlyArray'. Types of property 'concat' are incompatible. - Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ >(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. + Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. Type 'A[]' is not assignable to type 'B[]'. Type 'A' is not assignable to type 'B'. Property 'b' is missing in type 'A'. tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error TS2322: Type 'C' is not assignable to type 'ReadonlyArray'. Types of property 'concat' are incompatible. - Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ >(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. + Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. Type 'A[]' is not assignable to type 'B[]'. @@ -27,7 +27,7 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T ~~~ !!! error TS2322: Type 'A[]' is not assignable to type 'ReadonlyArray'. !!! error TS2322: Types of property 'concat' are incompatible. -!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ >(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. +!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. !!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. !!! error TS2322: Type 'A' is not assignable to type 'B'. !!! error TS2322: Property 'b' is missing in type 'A'. @@ -39,6 +39,6 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T ~~~ !!! error TS2322: Type 'C' is not assignable to type 'ReadonlyArray'. !!! error TS2322: Types of property 'concat' are incompatible. -!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ >(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. +!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. !!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. \ No newline at end of file diff --git a/tests/baselines/reference/bestChoiceType.symbols b/tests/baselines/reference/bestChoiceType.symbols index dc4ea663efc..c65dba1e7c2 100644 --- a/tests/baselines/reference/bestChoiceType.symbols +++ b/tests/baselines/reference/bestChoiceType.symbols @@ -2,10 +2,10 @@ // Repro from #10041 (''.match(/ /) || []).map(s => s.toLowerCase()); ->(''.match(/ /) || []).map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>(''.match(/ /) || []).map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >''.match : Symbol(String.match, Decl(lib.d.ts, --, --)) >match : Symbol(String.match, Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 2, 26)) >s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 2, 26)) @@ -27,9 +27,9 @@ function f1() { let z = y.map(s => s.toLowerCase()); >z : Symbol(z, Decl(bestChoiceType.ts, 9, 7)) ->y.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>y.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(bestChoiceType.ts, 8, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 9, 18)) >s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 9, 18)) @@ -51,9 +51,9 @@ function f2() { let z = y.map(s => s.toLowerCase()); >z : Symbol(z, Decl(bestChoiceType.ts, 15, 7)) ->y.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>y.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(bestChoiceType.ts, 14, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 15, 18)) >s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 15, 18)) diff --git a/tests/baselines/reference/bestChoiceType.types b/tests/baselines/reference/bestChoiceType.types index 15c5ecd4858..49997d1e273 100644 --- a/tests/baselines/reference/bestChoiceType.types +++ b/tests/baselines/reference/bestChoiceType.types @@ -3,7 +3,7 @@ (''.match(/ /) || []).map(s => s.toLowerCase()); >(''.match(/ /) || []).map(s => s.toLowerCase()) : string[] ->(''.match(/ /) || []).map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>(''.match(/ /) || []).map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >(''.match(/ /) || []) : RegExpMatchArray >''.match(/ /) || [] : RegExpMatchArray >''.match(/ /) : RegExpMatchArray | null @@ -12,8 +12,8 @@ >match : (regexp: string | RegExp) => RegExpMatchArray | null >/ / : RegExp >[] : never[] ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->s => s.toLowerCase() : (this: void, s: string) => string +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>s => s.toLowerCase() : (s: string) => string >s : string >s.toLowerCase() : string >s.toLowerCase : () => string @@ -42,10 +42,10 @@ function f1() { let z = y.map(s => s.toLowerCase()); >z : string[] >y.map(s => s.toLowerCase()) : string[] ->y.map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>y.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >y : RegExpMatchArray ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->s => s.toLowerCase() : (this: void, s: string) => string +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>s => s.toLowerCase() : (s: string) => string >s : string >s.toLowerCase() : string >s.toLowerCase : () => string @@ -74,10 +74,10 @@ function f2() { let z = y.map(s => s.toLowerCase()); >z : string[] >y.map(s => s.toLowerCase()) : string[] ->y.map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>y.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >y : RegExpMatchArray ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->s => s.toLowerCase() : (this: void, s: string) => string +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>s => s.toLowerCase() : (s: string) => string >s : string >s.toLowerCase() : string >s.toLowerCase : () => string diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols index 33f8f88f9e0..2a6ba238b4b 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols @@ -12,9 +12,9 @@ class A { >Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x.forEach((v) => { ->x.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>x.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 3, 9)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 4, 19)) switch(v) { diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types index 115930df20a..30f584894fc 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types @@ -13,10 +13,10 @@ class A { x.forEach((v) => { >x.forEach((v) => { switch(v) { case "test": use(this); } }) : void ->x.forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>x.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >x : string[] ->forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->(v) => { switch(v) { case "test": use(this); } } : (this: void, v: string) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>(v) => { switch(v) { case "test": use(this); } } : (v: string) => void >v : string switch(v) { diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3.symbols b/tests/baselines/reference/classExpressionWithStaticProperties3.symbols index cd7cbdba7bd..2cf04ac05d3 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties3.symbols +++ b/tests/baselines/reference/classExpressionWithStaticProperties3.symbols @@ -30,9 +30,9 @@ for (let i = 0; i < 3; i++) { }); } arr.forEach(C => console.log(C.y())); ->arr.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>arr.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >arr : Symbol(arr, Decl(classExpressionWithStaticProperties3.ts, 1, 5)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >C : Symbol(C, Decl(classExpressionWithStaticProperties3.ts, 8, 12)) >console : Symbol(console, Decl(classExpressionWithStaticProperties3.ts, 0, 11)) >C.y : Symbol(y, Decl(classExpressionWithStaticProperties3.ts, 1, 12)) diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3.types b/tests/baselines/reference/classExpressionWithStaticProperties3.types index 6f598e6e42e..67823ea8340 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties3.types +++ b/tests/baselines/reference/classExpressionWithStaticProperties3.types @@ -41,10 +41,10 @@ for (let i = 0; i < 3; i++) { } arr.forEach(C => console.log(C.y())); >arr.forEach(C => console.log(C.y())) : void ->arr.forEach : { (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } +>arr.forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void >arr : { y(): number; }[] ->forEach : { (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } ->C => console.log(C.y()) : (this: void, C: { y(): number; }) => any +>forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>C => console.log(C.y()) : (C: { y(): number; }) => any >C : { y(): number; } >console.log(C.y()) : any >console.log : any diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols index 822dfaf81a0..d39463b228c 100644 --- a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols @@ -30,9 +30,9 @@ for (let i = 0; i < 3; i++) { }); } arr.forEach(C => console.log(C.y())); ->arr.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>arr.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >arr : Symbol(arr, Decl(classExpressionWithStaticPropertiesES63.ts, 1, 5)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >C : Symbol(C, Decl(classExpressionWithStaticPropertiesES63.ts, 8, 12)) >console : Symbol(console, Decl(classExpressionWithStaticPropertiesES63.ts, 0, 11)) >C.y : Symbol(y, Decl(classExpressionWithStaticPropertiesES63.ts, 1, 12)) diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types index b5cd81e8590..5a948f54402 100644 --- a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types @@ -41,10 +41,10 @@ for (let i = 0; i < 3; i++) { } arr.forEach(C => console.log(C.y())); >arr.forEach(C => console.log(C.y())) : void ->arr.forEach : { (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } +>arr.forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void >arr : { y(): number; }[] ->forEach : { (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: void, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } ->C => console.log(C.y()) : (this: void, C: { y(): number; }) => any +>forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>C => console.log(C.y()) : (C: { y(): number; }) => any >C : { y(): number; } >console.log(C.y()) : any >console.log : any diff --git a/tests/baselines/reference/commaOperatorInConditionalExpression.symbols b/tests/baselines/reference/commaOperatorInConditionalExpression.symbols index cb124f21f15..c5734cbbc9b 100644 --- a/tests/baselines/reference/commaOperatorInConditionalExpression.symbols +++ b/tests/baselines/reference/commaOperatorInConditionalExpression.symbols @@ -4,8 +4,8 @@ function f (m: string) { >m : Symbol(m, Decl(commaOperatorInConditionalExpression.ts, 0, 12)) [1, 2, 3].map(i => { ->[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(commaOperatorInConditionalExpression.ts, 1, 18)) return true? { [m]: i } : { [m]: i + 1 } diff --git a/tests/baselines/reference/commaOperatorInConditionalExpression.types b/tests/baselines/reference/commaOperatorInConditionalExpression.types index 7ee2ab72c77..1d1037c1206 100644 --- a/tests/baselines/reference/commaOperatorInConditionalExpression.types +++ b/tests/baselines/reference/commaOperatorInConditionalExpression.types @@ -5,13 +5,13 @@ function f (m: string) { [1, 2, 3].map(i => { >[1, 2, 3].map(i => { return true? { [m]: i } : { [m]: i + 1 } }) : { [x: string]: number; }[] ->[1, 2, 3].map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>[1, 2, 3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->i => { return true? { [m]: i } : { [m]: i + 1 } } : (this: void, i: number) => { [x: string]: number; } +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>i => { return true? { [m]: i } : { [m]: i + 1 } } : (i: number) => { [x: string]: number; } >i : number return true? { [m]: i } : { [m]: i + 1 } diff --git a/tests/baselines/reference/commentInMethodCall.symbols b/tests/baselines/reference/commentInMethodCall.symbols index e082d24daf3..9db0719cf89 100644 --- a/tests/baselines/reference/commentInMethodCall.symbols +++ b/tests/baselines/reference/commentInMethodCall.symbols @@ -4,9 +4,9 @@ var s: string[]; >s : Symbol(s, Decl(commentInMethodCall.ts, 1, 3)) s.map(// do something ->s.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>s.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(commentInMethodCall.ts, 1, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) function () { }); diff --git a/tests/baselines/reference/commentInMethodCall.types b/tests/baselines/reference/commentInMethodCall.types index b74323d1477..e9543a8c6f2 100644 --- a/tests/baselines/reference/commentInMethodCall.types +++ b/tests/baselines/reference/commentInMethodCall.types @@ -5,10 +5,10 @@ var s: string[]; s.map(// do something >s.map(// do something function () { }) : void[] ->s.map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>s.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] function () { }); ->function () { } : (this: void) => void +>function () { } : () => void diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.symbols b/tests/baselines/reference/contextualSignatureInstantiation3.symbols index a9653673ff2..6d480a7aef4 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.symbols +++ b/tests/baselines/reference/contextualSignatureInstantiation3.symbols @@ -12,9 +12,9 @@ function map(items: T[], f: (x: T) => U): U[]{ >U : Symbol(U, Decl(contextualSignatureInstantiation3.ts, 0, 15)) return items.map(f); ->items.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>items.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >items : Symbol(items, Decl(contextualSignatureInstantiation3.ts, 0, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(contextualSignatureInstantiation3.ts, 0, 30)) } @@ -47,9 +47,9 @@ var v1: number[]; var v1 = xs.map(identity); // Error if not number[] >v1 : Symbol(v1, Decl(contextualSignatureInstantiation3.ts, 15, 3), Decl(contextualSignatureInstantiation3.ts, 16, 3), Decl(contextualSignatureInstantiation3.ts, 17, 3)) ->xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >xs : Symbol(xs, Decl(contextualSignatureInstantiation3.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >identity : Symbol(identity, Decl(contextualSignatureInstantiation3.ts, 2, 1)) var v1 = map(xs, identity); // Error if not number[] @@ -63,9 +63,9 @@ var v2: number[][]; var v2 = xs.map(singleton); // Error if not number[][] >v2 : Symbol(v2, Decl(contextualSignatureInstantiation3.ts, 19, 3), Decl(contextualSignatureInstantiation3.ts, 20, 3), Decl(contextualSignatureInstantiation3.ts, 21, 3)) ->xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >xs : Symbol(xs, Decl(contextualSignatureInstantiation3.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >singleton : Symbol(singleton, Decl(contextualSignatureInstantiation3.ts, 6, 1)) var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.types b/tests/baselines/reference/contextualSignatureInstantiation3.types index 60ad7c31bf6..945a4374ad1 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.types +++ b/tests/baselines/reference/contextualSignatureInstantiation3.types @@ -13,9 +13,9 @@ function map(items: T[], f: (x: T) => U): U[]{ return items.map(f); >items.map(f) : U[] ->items.map : { (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } +>items.map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >items : T[] ->map : { (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >f : (x: T) => U } @@ -54,9 +54,9 @@ var v1: number[]; var v1 = xs.map(identity); // Error if not number[] >v1 : number[] >xs.map(identity) : number[] ->xs.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>xs.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >xs : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >identity : (x: T) => T var v1 = map(xs, identity); // Error if not number[] @@ -72,9 +72,9 @@ var v2: number[][]; var v2 = xs.map(singleton); // Error if not number[][] >v2 : number[][] >xs.map(singleton) : number[][] ->xs.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>xs.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >xs : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >singleton : (x: T) => T[] var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/contextuallyTypedIife.symbols b/tests/baselines/reference/contextuallyTypedIife.symbols index 96e57c1f62f..b6a73764352 100644 --- a/tests/baselines/reference/contextuallyTypedIife.symbols +++ b/tests/baselines/reference/contextuallyTypedIife.symbols @@ -47,25 +47,25 @@ // rest parameters ((...numbers) => numbers.every(n => n > 0))(5,6,7); >numbers : Symbol(numbers, Decl(contextuallyTypedIife.ts, 17, 2)) ->numbers.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numbers.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >numbers : Symbol(numbers, Decl(contextuallyTypedIife.ts, 17, 2)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 17, 31)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 17, 31)) ((...mixed) => mixed.every(n => !!n))(5,'oops','oh no'); >mixed : Symbol(mixed, Decl(contextuallyTypedIife.ts, 18, 2)) ->mixed.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>mixed.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >mixed : Symbol(mixed, Decl(contextuallyTypedIife.ts, 18, 2)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 18, 27)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 18, 27)) ((...noNumbers) => noNumbers.some(n => n > 0))(); >noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIife.ts, 19, 2)) ->noNumbers.some : Symbol(Array.some, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>noNumbers.some : Symbol(Array.some, Decl(lib.d.ts, --, --)) >noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIife.ts, 19, 2)) ->some : Symbol(Array.some, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 19, 34)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 19, 34)) @@ -73,9 +73,9 @@ >first : Symbol(first, Decl(contextuallyTypedIife.ts, 20, 2)) >rest : Symbol(rest, Decl(contextuallyTypedIife.ts, 20, 8)) >first : Symbol(first, Decl(contextuallyTypedIife.ts, 20, 2)) ->rest.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>rest.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >rest : Symbol(rest, Decl(contextuallyTypedIife.ts, 20, 8)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 20, 43)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 20, 43)) diff --git a/tests/baselines/reference/contextuallyTypedIife.types b/tests/baselines/reference/contextuallyTypedIife.types index 77bb40df903..7b86fe1f337 100644 --- a/tests/baselines/reference/contextuallyTypedIife.types +++ b/tests/baselines/reference/contextuallyTypedIife.types @@ -105,10 +105,10 @@ >(...numbers) => numbers.every(n => n > 0) : (...numbers: number[]) => boolean >numbers : number[] >numbers.every(n => n > 0) : boolean ->numbers.every : { (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>numbers.every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >numbers : number[] ->every : { (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } ->n => n > 0 : (this: void, n: number) => boolean +>every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>n => n > 0 : (n: number) => boolean >n : number >n > 0 : boolean >n : number @@ -123,10 +123,10 @@ >(...mixed) => mixed.every(n => !!n) : (...mixed: (string | number)[]) => boolean >mixed : (string | number)[] >mixed.every(n => !!n) : boolean ->mixed.every : { (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => boolean): boolean; (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: Z): boolean; } +>mixed.every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean >mixed : (string | number)[] ->every : { (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => boolean): boolean; (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: Z): boolean; } ->n => !!n : (this: void, n: string | number) => boolean +>every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean +>n => !!n : (n: string | number) => boolean >n : string | number >!!n : boolean >!n : boolean @@ -141,10 +141,10 @@ >(...noNumbers) => noNumbers.some(n => n > 0) : (...noNumbers: any[]) => boolean >noNumbers : any[] >noNumbers.some(n => n > 0) : boolean ->noNumbers.some : { (callbackfn: (this: void, value: any, index: number, array: any[]) => boolean): boolean; (callbackfn: (this: void, value: any, index: number, array: any[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: any, index: number, array: any[]) => boolean, thisArg: Z): boolean; } +>noNumbers.some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean >noNumbers : any[] ->some : { (callbackfn: (this: void, value: any, index: number, array: any[]) => boolean): boolean; (callbackfn: (this: void, value: any, index: number, array: any[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: any, index: number, array: any[]) => boolean, thisArg: Z): boolean; } ->n => n > 0 : (this: void, n: any) => boolean +>some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean +>n => n > 0 : (n: any) => boolean >n : any >n > 0 : boolean >n : any @@ -160,10 +160,10 @@ >first : number >[] : undefined[] >rest.map(n => n > 0) : boolean[] ->rest.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>rest.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >rest : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n > 0 : (this: void, n: number) => boolean +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n > 0 : (n: number) => boolean >n : number >n > 0 : boolean >n : number diff --git a/tests/baselines/reference/controlFlowDestructuringParameters.symbols b/tests/baselines/reference/controlFlowDestructuringParameters.symbols index 1874c16c3d3..668d346b929 100644 --- a/tests/baselines/reference/controlFlowDestructuringParameters.symbols +++ b/tests/baselines/reference/controlFlowDestructuringParameters.symbols @@ -3,9 +3,9 @@ [{ x: 1 }].map( ->[{ x: 1 }].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[{ x: 1 }].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(controlFlowDestructuringParameters.ts, 3, 2)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) ({ x }) => x >x : Symbol(x, Decl(controlFlowDestructuringParameters.ts, 4, 4)) diff --git a/tests/baselines/reference/controlFlowDestructuringParameters.types b/tests/baselines/reference/controlFlowDestructuringParameters.types index 44755dca81b..9c6c96de540 100644 --- a/tests/baselines/reference/controlFlowDestructuringParameters.types +++ b/tests/baselines/reference/controlFlowDestructuringParameters.types @@ -4,15 +4,15 @@ [{ x: 1 }].map( >[{ x: 1 }].map( ({ x }) => x) : number[] ->[{ x: 1 }].map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): U[]; (callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): U[]; } +>[{ x: 1 }].map : (callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any) => U[] >[{ x: 1 }] : { x: number; }[] >{ x: 1 } : { x: number; } >x : number >1 : 1 ->map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U): U[]; (callbackfn: (this: void, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any) => U[] ({ x }) => x ->({ x }) => x : (this: void, { x }: { x: number; }) => number +>({ x }) => x : ({ x }: { x: number; }) => number >x : number >x : number diff --git a/tests/baselines/reference/declarationEmitPromise.symbols b/tests/baselines/reference/declarationEmitPromise.symbols index d1333bb060c..2e9185d2e39 100644 --- a/tests/baselines/reference/declarationEmitPromise.symbols +++ b/tests/baselines/reference/declarationEmitPromise.symbols @@ -39,13 +39,13 @@ export async function runSampleWorks( >bluebird.all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 0, 26)) >bluebird : Symbol(bluebird, Decl(declarationEmitPromise.ts, 0, 0)) >all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 0, 26)) ->[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(declarationEmitPromise.ts, 4, 52)) >b : Symbol(b, Decl(declarationEmitPromise.ts, 5, 19)) >c : Symbol(c, Decl(declarationEmitPromise.ts, 5, 36)) >d : Symbol(d, Decl(declarationEmitPromise.ts, 5, 53)) >e : Symbol(e, Decl(declarationEmitPromise.ts, 5, 70)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 6, 68)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 6, 68)) @@ -111,13 +111,13 @@ export async function runSampleBreaks( >bluebird.all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 0, 26)) >bluebird : Symbol(bluebird, Decl(declarationEmitPromise.ts, 0, 0)) >all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 0, 26)) ->[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(declarationEmitPromise.ts, 13, 53)) >b : Symbol(b, Decl(declarationEmitPromise.ts, 14, 19)) >c : Symbol(c, Decl(declarationEmitPromise.ts, 14, 36)) >d : Symbol(d, Decl(declarationEmitPromise.ts, 14, 53)) >e : Symbol(e, Decl(declarationEmitPromise.ts, 14, 70)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 15, 68)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 15, 68)) diff --git a/tests/baselines/reference/declarationEmitPromise.types b/tests/baselines/reference/declarationEmitPromise.types index 9fafbd0cbd6..d3fc75c63ad 100644 --- a/tests/baselines/reference/declarationEmitPromise.types +++ b/tests/baselines/reference/declarationEmitPromise.types @@ -44,15 +44,15 @@ export async function runSampleWorks( >bluebird : typeof bluebird >all : bluebird[] >[a, b, c, d, e].filter(el => !!el) : bluebird[] ->[a, b, c, d, e].filter : { (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } +>[a, b, c, d, e].filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } >[a, b, c, d, e] : bluebird[] >a : bluebird >b : bluebird >c : bluebird >d : bluebird >e : bluebird ->filter : { (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } ->el => !!el : (this: void, el: bluebird) => boolean +>filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } +>el => !!el : (el: bluebird) => boolean >el : bluebird >!!el : boolean >!el : boolean @@ -129,15 +129,15 @@ export async function runSampleBreaks( >bluebird : typeof bluebird >all : bluebird[] >[a, b, c, d, e].filter(el => !!el) : bluebird[] ->[a, b, c, d, e].filter : { (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } +>[a, b, c, d, e].filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } >[a, b, c, d, e] : bluebird[] >a : bluebird >b : bluebird >c : bluebird >d : bluebird >e : bluebird ->filter : { (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: void, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } ->el => !!el : (this: void, el: bluebird) => boolean +>filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } +>el => !!el : (el: bluebird) => boolean >el : bluebird >!!el : boolean >!el : boolean diff --git a/tests/baselines/reference/enumIndexer.symbols b/tests/baselines/reference/enumIndexer.symbols index cf87cb106d1..59191a73276 100644 --- a/tests/baselines/reference/enumIndexer.symbols +++ b/tests/baselines/reference/enumIndexer.symbols @@ -19,9 +19,9 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : Symbol(x, Decl(enumIndexer.ts, 5, 3)) ->_arr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>_arr.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >_arr : Symbol(_arr, Decl(enumIndexer.ts, 3, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >o : Symbol(o, Decl(enumIndexer.ts, 5, 17)) >MyEnumType : Symbol(MyEnumType, Decl(enumIndexer.ts, 0, 0)) >o.key : Symbol(key, Decl(enumIndexer.ts, 3, 13)) diff --git a/tests/baselines/reference/enumIndexer.types b/tests/baselines/reference/enumIndexer.types index eb4b4e18e76..6c6e50822b5 100644 --- a/tests/baselines/reference/enumIndexer.types +++ b/tests/baselines/reference/enumIndexer.types @@ -25,10 +25,10 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : boolean[] >_arr.map(o => MyEnumType[o.key] === enumValue) : boolean[] ->_arr.map : { (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): U[]; (callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): U[]; } +>_arr.map : (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] >_arr : { key: string; }[] ->map : { (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U): U[]; (callbackfn: (this: void, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): U[]; } ->o => MyEnumType[o.key] === enumValue : (this: void, o: { key: string; }) => boolean +>map : (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] +>o => MyEnumType[o.key] === enumValue : (o: { key: string; }) => boolean >o : { key: string; } >MyEnumType[o.key] === enumValue : boolean >MyEnumType[o.key] : any diff --git a/tests/baselines/reference/genericArray1.symbols b/tests/baselines/reference/genericArray1.symbols index f548f34e553..b73872b8d55 100644 --- a/tests/baselines/reference/genericArray1.symbols +++ b/tests/baselines/reference/genericArray1.symbols @@ -13,8 +13,8 @@ interface String{ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : Symbol(lengths, Decl(genericArray1.ts, 12, 3)) ->["a", "b", "c"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b", "c"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericArray1.ts, 12, 34)) >x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericArray1.ts, 12, 34)) diff --git a/tests/baselines/reference/genericArray1.types b/tests/baselines/reference/genericArray1.types index bf5d55eb569..baa2ec8a9cf 100644 --- a/tests/baselines/reference/genericArray1.types +++ b/tests/baselines/reference/genericArray1.types @@ -14,13 +14,13 @@ interface String{ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : number[] >["a", "b", "c"].map(x => x.length) : number[] ->["a", "b", "c"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b", "c"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b", "c"] : string[] >"a" : "a" >"b" : "b" >"c" : "c" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->x => x.length : (this: void, x: string) => number +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>x => x.length : (x: string) => number >x : string >x.length : number >x : string diff --git a/tests/baselines/reference/genericInference1.symbols b/tests/baselines/reference/genericInference1.symbols index ecc9c811d76..8beecf27254 100644 --- a/tests/baselines/reference/genericInference1.symbols +++ b/tests/baselines/reference/genericInference1.symbols @@ -1,7 +1,7 @@ === tests/cases/compiler/genericInference1.ts === ['a', 'b', 'c'].map(x => x.length); ->['a', 'b', 'c'].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>['a', 'b', 'c'].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericInference1.ts, 0, 20)) >x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericInference1.ts, 0, 20)) diff --git a/tests/baselines/reference/genericInference1.types b/tests/baselines/reference/genericInference1.types index 8995e07c825..30b7279ebc0 100644 --- a/tests/baselines/reference/genericInference1.types +++ b/tests/baselines/reference/genericInference1.types @@ -1,13 +1,13 @@ === tests/cases/compiler/genericInference1.ts === ['a', 'b', 'c'].map(x => x.length); >['a', 'b', 'c'].map(x => x.length) : number[] ->['a', 'b', 'c'].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>['a', 'b', 'c'].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >['a', 'b', 'c'] : string[] >'a' : "a" >'b' : "b" >'c' : "c" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->x => x.length : (this: void, x: string) => number +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>x => x.length : (x: string) => number >x : string >x.length : number >x : string diff --git a/tests/baselines/reference/genericMethodOverspecialization.symbols b/tests/baselines/reference/genericMethodOverspecialization.symbols index 55ff9cb5afb..9cf7bb995b1 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.symbols +++ b/tests/baselines/reference/genericMethodOverspecialization.symbols @@ -27,9 +27,9 @@ interface Document { var elements = names.map(function (name) { >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->names.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>names.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >names : Symbol(names, Decl(genericMethodOverspecialization.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(genericMethodOverspecialization.ts, 12, 35)) return document.getElementById(name); @@ -43,9 +43,9 @@ var elements = names.map(function (name) { var xxx = elements.filter(function (e) { >xxx : Symbol(xxx, Decl(genericMethodOverspecialization.ts, 17, 3)) ->elements.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>elements.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(genericMethodOverspecialization.ts, 17, 36)) return !e.isDisabled; @@ -57,9 +57,9 @@ var xxx = elements.filter(function (e) { var widths:number[] = elements.map(function (e) { // should not error >widths : Symbol(widths, Decl(genericMethodOverspecialization.ts, 21, 3)) ->elements.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>elements.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(genericMethodOverspecialization.ts, 21, 45)) return e.clientWidth; diff --git a/tests/baselines/reference/genericMethodOverspecialization.types b/tests/baselines/reference/genericMethodOverspecialization.types index 17f3e0dddd7..40286124f51 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.types +++ b/tests/baselines/reference/genericMethodOverspecialization.types @@ -34,10 +34,10 @@ interface Document { var elements = names.map(function (name) { >elements : HTMLElement[] >names.map(function (name) { return document.getElementById(name);}) : HTMLElement[] ->names.map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>names.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >names : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->function (name) { return document.getElementById(name);} : (this: void, name: string) => HTMLElement +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>function (name) { return document.getElementById(name);} : (name: string) => HTMLElement >name : string return document.getElementById(name); @@ -53,10 +53,10 @@ var elements = names.map(function (name) { var xxx = elements.filter(function (e) { >xxx : HTMLElement[] >elements.filter(function (e) { return !e.isDisabled;}) : HTMLElement[] ->elements.filter : { (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => any): HTMLElement[]; (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: undefined): HTMLElement[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: Z): HTMLElement[]; } +>elements.filter : { (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any): HTMLElement[]; } >elements : HTMLElement[] ->filter : { (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => any): HTMLElement[]; (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: undefined): HTMLElement[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: Z): HTMLElement[]; } ->function (e) { return !e.isDisabled;} : (this: void, e: HTMLElement) => boolean +>filter : { (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any): HTMLElement[]; } +>function (e) { return !e.isDisabled;} : (e: HTMLElement) => boolean >e : HTMLElement return !e.isDisabled; @@ -70,10 +70,10 @@ var xxx = elements.filter(function (e) { var widths:number[] = elements.map(function (e) { // should not error >widths : number[] >elements.map(function (e) { // should not error return e.clientWidth;}) : number[] ->elements.map : { (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): U[]; (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): U[]; } +>elements.map : (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any) => U[] >elements : HTMLElement[] ->map : { (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U): U[]; (callbackfn: (this: void, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): U[]; } ->function (e) { // should not error return e.clientWidth;} : (this: void, e: HTMLElement) => number +>map : (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any) => U[] +>function (e) { // should not error return e.clientWidth;} : (e: HTMLElement) => number >e : HTMLElement return e.clientWidth; diff --git a/tests/baselines/reference/implementArrayInterface.errors.txt b/tests/baselines/reference/implementArrayInterface.errors.txt deleted file mode 100644 index 61c4440fa3a..00000000000 --- a/tests/baselines/reference/implementArrayInterface.errors.txt +++ /dev/null @@ -1,47 +0,0 @@ -tests/cases/compiler/implementArrayInterface.ts(1,15): error TS2420: Class 'MyArray' incorrectly implements interface 'T[]'. - Types of property 'map' are incompatible. - Type '(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]' is not assignable to type '{ (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; }'. - Type 'any[]' is not assignable to type '[any, any, any, any, any]'. - Property '0' is missing in type 'any[]'. - - -==== tests/cases/compiler/implementArrayInterface.ts (1 errors) ==== - declare class MyArray implements Array { - ~~~~~~~ -!!! error TS2420: Class 'MyArray' incorrectly implements interface 'T[]'. -!!! error TS2420: Types of property 'map' are incompatible. -!!! error TS2420: Type '(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]' is not assignable to type '{ (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; }'. -!!! error TS2420: Type 'any[]' is not assignable to type '[any, any, any, any, any]'. -!!! error TS2420: Property '0' is missing in type 'any[]'. - toString(): string; - toLocaleString(): string; - concat(...items: U[]): T[]; - concat(...items: T[]): T[]; - join(separator?: string): string; - pop(): T; - push(...items: T[]): number; - reverse(): T[]; - shift(): T; - slice(start?: number, end?: number): T[]; - sort(compareFn?: (a: T, b: T) => number): this; - splice(start: number): T[]; - splice(start: number, deleteCount: number, ...items: T[]): T[]; - unshift(...items: T[]): number; - - indexOf(searchElement: T, fromIndex?: number): number; - lastIndexOf(searchElement: T, fromIndex?: number): number; - every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; - some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; - filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; - reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; - reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; - - length: number; - - [n: number]: T; - } - \ No newline at end of file diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols index 79a855badb5..7e4fe043b93 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols @@ -103,8 +103,8 @@ foo(wrap(s => s.length)); let a1 = ["a", "b"].map(s => s.length); >a1 : Symbol(a1, Decl(inferFromGenericFunctionReturnTypes2.ts, 17, 3)) ->["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(inferFromGenericFunctionReturnTypes2.ts, 17, 24)) >s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(inferFromGenericFunctionReturnTypes2.ts, 17, 24)) @@ -112,8 +112,8 @@ let a1 = ["a", "b"].map(s => s.length); let a2 = ["a", "b"].map(wrap(s => s.length)); >a2 : Symbol(a2, Decl(inferFromGenericFunctionReturnTypes2.ts, 18, 3)) ->["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >wrap : Symbol(wrap, Decl(inferFromGenericFunctionReturnTypes2.ts, 0, 32)) >s : Symbol(s, Decl(inferFromGenericFunctionReturnTypes2.ts, 18, 29)) >s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) @@ -122,8 +122,8 @@ let a2 = ["a", "b"].map(wrap(s => s.length)); let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); >a3 : Symbol(a3, Decl(inferFromGenericFunctionReturnTypes2.ts, 19, 3)) ->["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >wrap : Symbol(wrap, Decl(inferFromGenericFunctionReturnTypes2.ts, 0, 32)) >arrayize : Symbol(arrayize, Decl(inferFromGenericFunctionReturnTypes2.ts, 2, 60)) >s : Symbol(s, Decl(inferFromGenericFunctionReturnTypes2.ts, 19, 38)) @@ -133,8 +133,8 @@ let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); >a4 : Symbol(a4, Decl(inferFromGenericFunctionReturnTypes2.ts, 20, 3)) ->["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >combine : Symbol(combine, Decl(inferFromGenericFunctionReturnTypes2.ts, 4, 66)) >wrap : Symbol(wrap, Decl(inferFromGenericFunctionReturnTypes2.ts, 0, 32)) >s : Symbol(s, Decl(inferFromGenericFunctionReturnTypes2.ts, 20, 37)) @@ -147,8 +147,8 @@ let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); >a5 : Symbol(a5, Decl(inferFromGenericFunctionReturnTypes2.ts, 21, 3)) ->["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >combine : Symbol(combine, Decl(inferFromGenericFunctionReturnTypes2.ts, 4, 66)) >identity : Symbol(identity, Decl(inferFromGenericFunctionReturnTypes2.ts, 82, 1)) >wrap : Symbol(wrap, Decl(inferFromGenericFunctionReturnTypes2.ts, 0, 32)) @@ -159,8 +159,8 @@ let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); let a6 = ["a", "b"].map(combine(wrap(s => s.length), identity)); >a6 : Symbol(a6, Decl(inferFromGenericFunctionReturnTypes2.ts, 22, 3)) ->["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >combine : Symbol(combine, Decl(inferFromGenericFunctionReturnTypes2.ts, 4, 66)) >wrap : Symbol(wrap, Decl(inferFromGenericFunctionReturnTypes2.ts, 0, 32)) >s : Symbol(s, Decl(inferFromGenericFunctionReturnTypes2.ts, 22, 37)) @@ -217,11 +217,11 @@ class SetOf { >index : Symbol(index, Decl(inferFromGenericFunctionReturnTypes2.ts, 36, 20)) this._store.forEach((a, i) => fn(a, i)); ->this._store.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>this._store.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >this._store : Symbol(SetOf._store, Decl(inferFromGenericFunctionReturnTypes2.ts, 25, 16)) >this : Symbol(SetOf, Decl(inferFromGenericFunctionReturnTypes2.ts, 22, 64)) >_store : Symbol(SetOf._store, Decl(inferFromGenericFunctionReturnTypes2.ts, 25, 16)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(inferFromGenericFunctionReturnTypes2.ts, 37, 27)) >i : Symbol(i, Decl(inferFromGenericFunctionReturnTypes2.ts, 37, 29)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes2.ts, 36, 10)) diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types index a07c5ea4db8..cf7752e237e 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types @@ -120,12 +120,12 @@ foo(wrap(s => s.length)); let a1 = ["a", "b"].map(s => s.length); >a1 : number[] >["a", "b"].map(s => s.length) : number[] ->["a", "b"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->s => s.length : (this: void, s: string) => number +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>s => s.length : (s: string) => number >s : string >s.length : number >s : string @@ -134,11 +134,11 @@ let a1 = ["a", "b"].map(s => s.length); let a2 = ["a", "b"].map(wrap(s => s.length)); >a2 : number[] >["a", "b"].map(wrap(s => s.length)) : number[] ->["a", "b"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >wrap(s => s.length) : Mapper >wrap : (cb: Mapper) => Mapper >s => s.length : (s: string) => number @@ -150,11 +150,11 @@ let a2 = ["a", "b"].map(wrap(s => s.length)); let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); >a3 : number[][] >["a", "b"].map(wrap(arrayize(s => s.length))) : number[][] ->["a", "b"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >wrap(arrayize(s => s.length)) : Mapper >wrap : (cb: Mapper) => Mapper >arrayize(s => s.length) : Mapper @@ -168,11 +168,11 @@ let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); >a4 : boolean[] >["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))) : boolean[] ->["a", "b"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >combine(wrap(s => s.length), wrap(n => n > 10)) : (x: string) => boolean >combine : (f: (x: A) => B, g: (x: B) => C) => (x: A) => C >wrap(s => s.length) : Mapper @@ -193,11 +193,11 @@ let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); >a5 : number[] >["a", "b"].map(combine(identity, wrap(s => s.length))) : number[] ->["a", "b"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >combine(identity, wrap(s => s.length)) : (x: string) => number >combine : (f: (x: A) => B, g: (x: B) => C) => (x: A) => C >identity : (x: T) => T @@ -212,11 +212,11 @@ let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); let a6 = ["a", "b"].map(combine(wrap(s => s.length), identity)); >a6 : number[] >["a", "b"].map(combine(wrap(s => s.length), identity)) : number[] ->["a", "b"].map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >combine(wrap(s => s.length), identity) : (x: string) => number >combine : (f: (x: A) => B, g: (x: B) => C) => (x: A) => C >wrap(s => s.length) : Mapper @@ -279,12 +279,12 @@ class SetOf { this._store.forEach((a, i) => fn(a, i)); >this._store.forEach((a, i) => fn(a, i)) : void ->this._store.forEach : { (callbackfn: (this: void, value: A, index: number, array: A[]) => void): void; (callbackfn: (this: void, value: A, index: number, array: A[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: A, index: number, array: A[]) => void, thisArg: Z): void; } +>this._store.forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >this._store : A[] >this : this >_store : A[] ->forEach : { (callbackfn: (this: void, value: A, index: number, array: A[]) => void): void; (callbackfn: (this: void, value: A, index: number, array: A[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: A, index: number, array: A[]) => void, thisArg: Z): void; } ->(a, i) => fn(a, i) : (this: void, a: A, i: number) => void +>forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void +>(a, i) => fn(a, i) : (a: A, i: number) => void >a : A >i : number >fn(a, i) : void diff --git a/tests/baselines/reference/inferenceLimit.symbols b/tests/baselines/reference/inferenceLimit.symbols index e471856e448..70bbad69b3e 100644 --- a/tests/baselines/reference/inferenceLimit.symbols +++ b/tests/baselines/reference/inferenceLimit.symbols @@ -64,9 +64,9 @@ export class BrokenClass { >Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->result.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>result.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >result : Symbol(result, Decl(file1.ts, 10, 7)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >populateItems : Symbol(populateItems, Decl(file1.ts, 12, 7)) .then((orders: Array) => { diff --git a/tests/baselines/reference/inferenceLimit.types b/tests/baselines/reference/inferenceLimit.types index c7cb6d8333e..667d322f547 100644 --- a/tests/baselines/reference/inferenceLimit.types +++ b/tests/baselines/reference/inferenceLimit.types @@ -84,9 +84,9 @@ export class BrokenClass { >Promise : PromiseConstructor >all : { (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; (values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; (values: (T | PromiseLike)[]): Promise; (values: Iterable>): Promise; } >result.map(populateItems) : Promise<{}>[] ->result.map : { (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): U[]; (callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): U[]; } +>result.map : (callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[] >result : MyModule.MyModel[] ->map : { (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): U[]; (callbackfn: (this: void, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[] >populateItems : (order: any) => Promise<{}> .then((orders: Array) => { diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols b/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols index fe60a8c1581..c6ac17b0ccb 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols @@ -11,7 +11,7 @@ function identity(a: A): A { } var x = [1, 2, 3].map(identity)[0]; >x : Symbol(x, Decl(inferentialTypingWithFunctionType2.ts, 3, 3)) ->[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >identity : Symbol(identity, Decl(inferentialTypingWithFunctionType2.ts, 0, 0)) diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.types b/tests/baselines/reference/inferentialTypingWithFunctionType2.types index 90c84817922..2c4bb2542fb 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.types @@ -13,12 +13,12 @@ var x = [1, 2, 3].map(identity)[0]; >x : number >[1, 2, 3].map(identity)[0] : number >[1, 2, 3].map(identity) : number[] ->[1, 2, 3].map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>[1, 2, 3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >identity : (a: A) => A >0 : 0 diff --git a/tests/baselines/reference/keyofAndIndexedAccess.symbols b/tests/baselines/reference/keyofAndIndexedAccess.symbols index 65cc44fe84b..461652fb725 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.symbols +++ b/tests/baselines/reference/keyofAndIndexedAccess.symbols @@ -453,9 +453,9 @@ function pluck(array: T[], key: K) { >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 131, 17)) return array.map(x => x[key]); ->array.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>array.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >array : Symbol(array, Decl(keyofAndIndexedAccess.ts, 131, 37)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 132, 21)) >x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 132, 21)) >key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 131, 48)) diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index a9698a47bd2..671289527aa 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -522,10 +522,10 @@ function pluck(array: T[], key: K) { return array.map(x => x[key]); >array.map(x => x[key]) : T[K][] ->array.map : { (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } +>array.map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >array : T[] ->map : { (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: void, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } ->x => x[key] : (this: void, x: T) => T[K] +>map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>x => x[key] : (x: T) => T[K] >x : T >x[key] : T[K] >x : T diff --git a/tests/baselines/reference/mapOnTupleTypes01.js b/tests/baselines/reference/mapOnTupleTypes01.js index 565988bfd73..3298190fdee 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.js +++ b/tests/baselines/reference/mapOnTupleTypes01.js @@ -72,10 +72,10 @@ exports.h = numNumNumNumNum.map(function (n) { return n * n; }); //// [mapOnTupleTypes01.d.ts] export declare let mapOnLooseArrayLiteral: number[]; export declare let a: number[]; -export declare let b: [number, number]; -export declare let c: [number, number]; -export declare let d: [string | number, string | number]; -export declare let e: [number, number, number]; -export declare let f: [number, number, number, number]; -export declare let g: [number, number, number, number, number]; -export declare let h: [number, number, number, number, number]; +export declare let b: number[]; +export declare let c: number[]; +export declare let d: (string | number)[]; +export declare let e: number[]; +export declare let f: number[]; +export declare let g: number[]; +export declare let h: number[]; diff --git a/tests/baselines/reference/mapOnTupleTypes01.symbols b/tests/baselines/reference/mapOnTupleTypes01.symbols index 687439199fe..ba21161decc 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.symbols +++ b/tests/baselines/reference/mapOnTupleTypes01.symbols @@ -1,8 +1,8 @@ === tests/cases/compiler/mapOnTupleTypes01.ts === export let mapOnLooseArrayLiteral = [1, 2, 3, 4].map(n => n * n); >mapOnLooseArrayLiteral : Symbol(mapOnLooseArrayLiteral, Decl(mapOnTupleTypes01.ts, 0, 10)) ->[1, 2, 3, 4].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3, 4].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 0, 53)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 0, 53)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 0, 53)) @@ -14,9 +14,9 @@ let numTuple: [number] = [1]; export let a = numTuple.map(x => x * x); >a : Symbol(a, Decl(mapOnTupleTypes01.ts, 5, 10)) ->numTuple.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numTuple.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numTuple : Symbol(numTuple, Decl(mapOnTupleTypes01.ts, 4, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 5, 28)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 5, 28)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 5, 28)) @@ -34,18 +34,18 @@ let numStr: [number, string] = [ 100, "hello"]; export let b = numNum.map(n => n * n); >b : Symbol(b, Decl(mapOnTupleTypes01.ts, 13, 10)) ->numNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numNum : Symbol(numNum, Decl(mapOnTupleTypes01.ts, 9, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 13, 26)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 13, 26)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 13, 26)) export let c = strStr.map(s => s.charCodeAt(0)); >c : Symbol(c, Decl(mapOnTupleTypes01.ts, 14, 10)) ->strStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>strStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >strStr : Symbol(strStr, Decl(mapOnTupleTypes01.ts, 10, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(mapOnTupleTypes01.ts, 14, 26)) >s.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(mapOnTupleTypes01.ts, 14, 26)) @@ -53,9 +53,9 @@ export let c = strStr.map(s => s.charCodeAt(0)); export let d = numStr.map(x => x); >d : Symbol(d, Decl(mapOnTupleTypes01.ts, 15, 10)) ->numStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numStr : Symbol(numStr, Decl(mapOnTupleTypes01.ts, 11, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 15, 26)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 15, 26)) @@ -66,9 +66,9 @@ let numNumNum: [number, number, number] = [1, 2, 3]; export let e = numNumNum.map(n => n * n); >e : Symbol(e, Decl(mapOnTupleTypes01.ts, 21, 10)) ->numNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numNumNum : Symbol(numNumNum, Decl(mapOnTupleTypes01.ts, 19, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 21, 29)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 21, 29)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 21, 29)) @@ -80,9 +80,9 @@ let numNumNumNum: [number, number, number, number] = [1, 2, 3, 4]; export let f = numNumNumNum.map(n => n * n); >f : Symbol(f, Decl(mapOnTupleTypes01.ts, 27, 10)) ->numNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numNumNumNum : Symbol(numNumNumNum, Decl(mapOnTupleTypes01.ts, 25, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 27, 32)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 27, 32)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 27, 32)) @@ -94,9 +94,9 @@ let numNumNumNumNum: [number, number, number, number, number] = [1, 2, 3, 4, 5]; export let g = numNumNumNumNum.map(n => n * n); >g : Symbol(g, Decl(mapOnTupleTypes01.ts, 33, 10)) ->numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numNumNumNumNum : Symbol(numNumNumNumNum, Decl(mapOnTupleTypes01.ts, 31, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 33, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 33, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 33, 35)) @@ -109,9 +109,9 @@ let numNumNumNumNumNum: [number, number, number, number, number, number] = [1, 2 export let h = numNumNumNumNum.map(n => n * n); >h : Symbol(h, Decl(mapOnTupleTypes01.ts, 40, 10)) ->numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >numNumNumNumNum : Symbol(numNumNumNumNum, Decl(mapOnTupleTypes01.ts, 31, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 40, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 40, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 40, 35)) diff --git a/tests/baselines/reference/mapOnTupleTypes01.types b/tests/baselines/reference/mapOnTupleTypes01.types index 72b6a6dbae1..adb8a2e191c 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.types +++ b/tests/baselines/reference/mapOnTupleTypes01.types @@ -2,14 +2,14 @@ export let mapOnLooseArrayLiteral = [1, 2, 3, 4].map(n => n * n); >mapOnLooseArrayLiteral : number[] >[1, 2, 3, 4].map(n => n * n) : number[] ->[1, 2, 3, 4].map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>[1, 2, 3, 4].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3, 4] : number[] >1 : 1 >2 : 2 >3 : 3 >4 : 4 ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n * n : (this: void, n: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n * n : (n: number) => number >n : number >n * n : number >n : number @@ -25,10 +25,10 @@ let numTuple: [number] = [1]; export let a = numTuple.map(x => x * x); >a : number[] >numTuple.map(x => x * x) : number[] ->numTuple.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>numTuple.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numTuple : [number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->x => x * x : (this: void, x: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>x => x * x : (x: number) => number >x : number >x * x : number >x : number @@ -55,24 +55,24 @@ let numStr: [number, string] = [ 100, "hello"]; >"hello" : "hello" export let b = numNum.map(n => n * n); ->b : [number, number] ->numNum.map(n => n * n) : [number, number] ->numNum.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>b : number[] +>numNum.map(n => n * n) : number[] +>numNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNum : [number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n * n : (this: void, n: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n * n : (n: number) => number >n : number >n * n : number >n : number >n : number export let c = strStr.map(s => s.charCodeAt(0)); ->c : [number, number] ->strStr.map(s => s.charCodeAt(0)) : [number, number] ->strStr.map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>c : number[] +>strStr.map(s => s.charCodeAt(0)) : number[] +>strStr.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >strStr : [string, string] ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->s => s.charCodeAt(0) : (this: void, s: string) => number +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>s => s.charCodeAt(0) : (s: string) => number >s : string >s.charCodeAt(0) : number >s.charCodeAt : (index: number) => number @@ -81,12 +81,12 @@ export let c = strStr.map(s => s.charCodeAt(0)); >0 : 0 export let d = numStr.map(x => x); ->d : [string | number, string | number] ->numStr.map(x => x) : [string | number, string | number] ->numStr.map : { (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U]; (this: [string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U]; (this: [string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U]; (this: [string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): U[]; (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): U[]; } +>d : (string | number)[] +>numStr.map(x => x) : (string | number)[] +>numStr.map : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any) => U[] >numStr : [number, string] ->map : { (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U]; (this: [string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): [U, U]; (this: [string | number, string | number], callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U]; (this: [string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U): U[]; (callbackfn: (this: void, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): U[]; } ->x => x : (this: void, x: string | number) => string | number +>map : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any) => U[] +>x => x : (x: string | number) => string | number >x : string | number >x : string | number @@ -100,12 +100,12 @@ let numNumNum: [number, number, number] = [1, 2, 3]; >3 : 3 export let e = numNumNum.map(n => n * n); ->e : [number, number, number] ->numNumNum.map(n => n * n) : [number, number, number] ->numNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>e : number[] +>numNumNum.map(n => n * n) : number[] +>numNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNum : [number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n * n : (this: void, n: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n * n : (n: number) => number >n : number >n * n : number >n : number @@ -122,12 +122,12 @@ let numNumNumNum: [number, number, number, number] = [1, 2, 3, 4]; >4 : 4 export let f = numNumNumNum.map(n => n * n); ->f : [number, number, number, number] ->numNumNumNum.map(n => n * n) : [number, number, number, number] ->numNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>f : number[] +>numNumNumNum.map(n => n * n) : number[] +>numNumNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNumNum : [number, number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n * n : (this: void, n: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n * n : (n: number) => number >n : number >n * n : number >n : number @@ -145,12 +145,12 @@ let numNumNumNumNum: [number, number, number, number, number] = [1, 2, 3, 4, 5]; >5 : 5 export let g = numNumNumNumNum.map(n => n * n); ->g : [number, number, number, number, number] ->numNumNumNumNum.map(n => n * n) : [number, number, number, number, number] ->numNumNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>g : number[] +>numNumNumNumNum.map(n => n * n) : number[] +>numNumNumNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNumNumNum : [number, number, number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n * n : (this: void, n: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n * n : (n: number) => number >n : number >n * n : number >n : number @@ -170,12 +170,12 @@ let numNumNumNumNumNum: [number, number, number, number, number, number] = [1, 2 >6 : 6 export let h = numNumNumNumNum.map(n => n * n); ->h : [number, number, number, number, number] ->numNumNumNumNum.map(n => n * n) : [number, number, number, number, number] ->numNumNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>h : number[] +>numNumNumNumNum.map(n => n * n) : number[] +>numNumNumNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNumNumNum : [number, number, number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->n => n * n : (this: void, n: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>n => n * n : (n: number) => number >n : number >n * n : number >n : number diff --git a/tests/baselines/reference/mapOnTupleTypes02.js b/tests/baselines/reference/mapOnTupleTypes02.js index 2fd4daab16b..8e0a8720a18 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.js +++ b/tests/baselines/reference/mapOnTupleTypes02.js @@ -16,4 +16,4 @@ exports.increment = increment; //// [mapOnTupleTypes02.d.ts] export declare type Point = [number, number]; -export declare function increment(point: Point): [number, number]; +export declare function increment(point: Point): number[]; diff --git a/tests/baselines/reference/mapOnTupleTypes02.symbols b/tests/baselines/reference/mapOnTupleTypes02.symbols index b96b3be3134..e0f37faf8ea 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.symbols +++ b/tests/baselines/reference/mapOnTupleTypes02.symbols @@ -8,9 +8,9 @@ export function increment(point: Point) { >Point : Symbol(Point, Decl(mapOnTupleTypes02.ts, 0, 0)) return point.map(d => d + 1); ->point.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>point.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >point : Symbol(point, Decl(mapOnTupleTypes02.ts, 2, 26)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >d : Symbol(d, Decl(mapOnTupleTypes02.ts, 3, 19)) >d : Symbol(d, Decl(mapOnTupleTypes02.ts, 3, 19)) } diff --git a/tests/baselines/reference/mapOnTupleTypes02.types b/tests/baselines/reference/mapOnTupleTypes02.types index 72fbbf31b11..9a0ccef0285 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.types +++ b/tests/baselines/reference/mapOnTupleTypes02.types @@ -3,16 +3,16 @@ export type Point = [number, number]; >Point : [number, number] export function increment(point: Point) { ->increment : (point: [number, number]) => [number, number] +>increment : (point: [number, number]) => number[] >point : [number, number] >Point : [number, number] return point.map(d => d + 1); ->point.map(d => d + 1) : [number, number] ->point.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>point.map(d => d + 1) : number[] +>point.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >point : [number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->d => d + 1 : (this: void, d: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>d => d + 1 : (d: number) => number >d : number >d + 1 : number >d : number diff --git a/tests/baselines/reference/nestedSelf.symbols b/tests/baselines/reference/nestedSelf.symbols index 6fa6bb1b59f..50bdd9981e2 100644 --- a/tests/baselines/reference/nestedSelf.symbols +++ b/tests/baselines/reference/nestedSelf.symbols @@ -10,8 +10,8 @@ module M { public foo() { [1,2,3].map((x) => { return this.n * x; })} >foo : Symbol(C.foo, Decl(nestedSelf.ts, 2, 17)) ->[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(nestedSelf.ts, 3, 31)) >this.n : Symbol(C.n, Decl(nestedSelf.ts, 1, 17)) >this : Symbol(C, Decl(nestedSelf.ts, 0, 10)) diff --git a/tests/baselines/reference/nestedSelf.types b/tests/baselines/reference/nestedSelf.types index 819a76dc380..9fb4b0bd65d 100644 --- a/tests/baselines/reference/nestedSelf.types +++ b/tests/baselines/reference/nestedSelf.types @@ -12,13 +12,13 @@ module M { public foo() { [1,2,3].map((x) => { return this.n * x; })} >foo : () => void >[1,2,3].map((x) => { return this.n * x; }) : number[] ->[1,2,3].map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>[1,2,3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1,2,3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } ->(x) => { return this.n * x; } : (this: void, x: number) => number +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>(x) => { return this.n * x; } : (x: number) => number >x : number >this.n * x : number >this.n : number diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols index d76ee3019b3..db4148efdf9 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols @@ -3,9 +3,9 @@ var regexMatchList = ['', '']; >regexMatchList : Symbol(regexMatchList, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 0, 3)) regexMatchList.forEach(match => ''.replace(match, '')); ->regexMatchList.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>regexMatchList.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >regexMatchList : Symbol(regexMatchList, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 0, 3)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 1, 23)) >''.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types index cee8cc24e44..93b9020c78c 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types @@ -7,10 +7,10 @@ var regexMatchList = ['', '']; regexMatchList.forEach(match => ''.replace(match, '')); >regexMatchList.forEach(match => ''.replace(match, '')) : void ->regexMatchList.forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>regexMatchList.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >regexMatchList : string[] ->forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->match => ''.replace(match, '') : (this: void, match: string) => string +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>match => ''.replace(match, '') : (match: string) => string >match : string >''.replace(match, '') : string >''.replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } diff --git a/tests/baselines/reference/objectRestForOf.symbols b/tests/baselines/reference/objectRestForOf.symbols index d10b0de4d0e..2d5d6a2bb2d 100644 --- a/tests/baselines/reference/objectRestForOf.symbols +++ b/tests/baselines/reference/objectRestForOf.symbols @@ -32,9 +32,9 @@ for ({ x: xx, ...rrestOff } of array ) { } for (const norest of array.map(a => ({ ...a, x: 'a string' }))) { >norest : Symbol(norest, Decl(objectRestForOf.ts, 9, 10)) ->array.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>array.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >array : Symbol(array, Decl(objectRestForOf.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(objectRestForOf.ts, 9, 31)) >a : Symbol(a, Decl(objectRestForOf.ts, 9, 31)) >x : Symbol(x, Decl(objectRestForOf.ts, 9, 44)) diff --git a/tests/baselines/reference/objectRestForOf.types b/tests/baselines/reference/objectRestForOf.types index ba6febd69c2..43d42a045e1 100644 --- a/tests/baselines/reference/objectRestForOf.types +++ b/tests/baselines/reference/objectRestForOf.types @@ -36,10 +36,10 @@ for ({ x: xx, ...rrestOff } of array ) { for (const norest of array.map(a => ({ ...a, x: 'a string' }))) { >norest : { x: string; y: string; } >array.map(a => ({ ...a, x: 'a string' })) : { x: string; y: string; }[] ->array.map : { (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): U[]; (callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): U[]; } +>array.map : (callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any) => U[] >array : { x: number; y: string; }[] ->map : { (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): U[]; (callbackfn: (this: void, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): U[]; } ->a => ({ ...a, x: 'a string' }) : (this: void, a: { x: number; y: string; }) => { x: string; y: string; } +>map : (callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any) => U[] +>a => ({ ...a, x: 'a string' }) : (a: { x: number; y: string; }) => { x: string; y: string; } >a : { x: number; y: string; } >({ ...a, x: 'a string' }) : { x: string; y: string; } >{ ...a, x: 'a string' } : { x: string; y: string; } diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols index edb2c362fc2..49528257830 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols @@ -1,9 +1,9 @@ === tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts === [].map(() => [].map(p => ({ X: p }))); ->[].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->[].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>[].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 20)) >X : Symbol(X, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 27)) >p : Symbol(p, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 20)) diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types index fa6f2b27fbe..417a51ac4b8 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types @@ -1,15 +1,15 @@ === tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts === [].map(() => [].map(p => ({ X: p }))); >[].map(() => [].map(p => ({ X: p }))) : { X: any; }[][] ->[].map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>[].map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >[] : undefined[] ->map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >() => [].map(p => ({ X: p })) : () => { X: any; }[] >[].map(p => ({ X: p })) : { X: any; }[] ->[].map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>[].map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >[] : undefined[] ->map : { (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: void, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } ->p => ({ X: p }) : (this: void, p: any) => { X: any; } +>map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>p => ({ X: p }) : (p: any) => { X: any; } >p : any >({ X: p }) : { X: any; } >{ X: p } : { X: any; } diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols b/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols index febbd451db7..cf2a3aa41cd 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols @@ -22,9 +22,9 @@ function foo() { >series2 : Symbol(series2, Decl(specializationsShouldNotAffectEachOther.ts, 11, 7)) series2.map(seriesExtent); ->series2.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>series2.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >series2 : Symbol(series2, Decl(specializationsShouldNotAffectEachOther.ts, 11, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >seriesExtent : Symbol(seriesExtent, Decl(specializationsShouldNotAffectEachOther.ts, 9, 7)) return null; @@ -33,11 +33,11 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); >keyExtent2 : Symbol(keyExtent2, Decl(specializationsShouldNotAffectEachOther.ts, 18, 3)) ->series.data.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>series.data.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >series.data : Symbol(Series.data, Decl(specializationsShouldNotAffectEachOther.ts, 0, 19)) >series : Symbol(series, Decl(specializationsShouldNotAffectEachOther.ts, 4, 3)) >data : Symbol(Series.data, Decl(specializationsShouldNotAffectEachOther.ts, 0, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >d : Symbol(d, Decl(specializationsShouldNotAffectEachOther.ts, 18, 50)) >d : Symbol(d, Decl(specializationsShouldNotAffectEachOther.ts, 18, 50)) diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types index b7dea45c6eb..6bf7c299a1f 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types @@ -25,9 +25,9 @@ function foo() { series2.map(seriesExtent); >series2.map(seriesExtent) : any[] ->series2.map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>series2.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >series2 : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >seriesExtent : (series: any) => any return null; @@ -38,12 +38,12 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); >keyExtent2 : any[] >series.data.map(function (d: string) { return d; }) : string[] ->series.data.map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>series.data.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >series.data : string[] >series : Series >data : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->function (d: string) { return d; } : (this: void, d: string) => string +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>function (d: string) { return d; } : (d: string) => string >d : string >d : string diff --git a/tests/baselines/reference/targetTypeArgs.symbols b/tests/baselines/reference/targetTypeArgs.symbols index d7c40a6a609..b0d825ddd50 100644 --- a/tests/baselines/reference/targetTypeArgs.symbols +++ b/tests/baselines/reference/targetTypeArgs.symbols @@ -14,44 +14,44 @@ foo(function(x) { x }); >x : Symbol(x, Decl(targetTypeArgs.ts, 4, 13)) [1].forEach(function(v,i,a) { v }); ->[1].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 6, 21)) >i : Symbol(i, Decl(targetTypeArgs.ts, 6, 23)) >a : Symbol(a, Decl(targetTypeArgs.ts, 6, 25)) >v : Symbol(v, Decl(targetTypeArgs.ts, 6, 21)) ["hello"].every(function(v,i,a) {return true;}); ->["hello"].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["hello"].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 7, 25)) >i : Symbol(i, Decl(targetTypeArgs.ts, 7, 27)) >a : Symbol(a, Decl(targetTypeArgs.ts, 7, 29)) [1].every(function(v,i,a) {return true;}); ->[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 8, 19)) >i : Symbol(i, Decl(targetTypeArgs.ts, 8, 21)) >a : Symbol(a, Decl(targetTypeArgs.ts, 8, 23)) [1].every(function(v,i,a) {return true;}); ->[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 9, 19)) >i : Symbol(i, Decl(targetTypeArgs.ts, 9, 21)) >a : Symbol(a, Decl(targetTypeArgs.ts, 9, 23)) ["s"].every(function(v,i,a) {return true;}); ->["s"].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["s"].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 10, 21)) >i : Symbol(i, Decl(targetTypeArgs.ts, 10, 23)) >a : Symbol(a, Decl(targetTypeArgs.ts, 10, 25)) ["s"].forEach(function(v,i,a) { v }); ->["s"].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["s"].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 11, 23)) >i : Symbol(i, Decl(targetTypeArgs.ts, 11, 25)) >a : Symbol(a, Decl(targetTypeArgs.ts, 11, 27)) diff --git a/tests/baselines/reference/targetTypeArgs.types b/tests/baselines/reference/targetTypeArgs.types index ae09b5185a9..84985316aa2 100644 --- a/tests/baselines/reference/targetTypeArgs.types +++ b/tests/baselines/reference/targetTypeArgs.types @@ -19,11 +19,11 @@ foo(function(x) { x }); [1].forEach(function(v,i,a) { v }); >[1].forEach(function(v,i,a) { v }) : void ->[1].forEach : { (callbackfn: (this: void, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: void, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } +>[1].forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void >[1] : number[] >1 : 1 ->forEach : { (callbackfn: (this: void, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: void, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } ->function(v,i,a) { v } : (this: void, v: number, i: number, a: number[]) => void +>forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>function(v,i,a) { v } : (v: number, i: number, a: number[]) => void >v : number >i : number >a : number[] @@ -31,11 +31,11 @@ foo(function(x) { x }); ["hello"].every(function(v,i,a) {return true;}); >["hello"].every(function(v,i,a) {return true;}) : boolean ->["hello"].every : { (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>["hello"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >["hello"] : string[] >"hello" : "hello" ->every : { (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } ->function(v,i,a) {return true;} : (this: void, v: string, i: number, a: string[]) => true +>every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => true >v : string >i : number >a : string[] @@ -43,11 +43,11 @@ foo(function(x) { x }); [1].every(function(v,i,a) {return true;}); >[1].every(function(v,i,a) {return true;}) : boolean ->[1].every : { (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>[1].every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >[1] : number[] >1 : 1 ->every : { (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } ->function(v,i,a) {return true;} : (this: void, v: number, i: number, a: number[]) => true +>every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>function(v,i,a) {return true;} : (v: number, i: number, a: number[]) => true >v : number >i : number >a : number[] @@ -55,11 +55,11 @@ foo(function(x) { x }); [1].every(function(v,i,a) {return true;}); >[1].every(function(v,i,a) {return true;}) : boolean ->[1].every : { (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>[1].every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >[1] : number[] >1 : 1 ->every : { (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: void, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } ->function(v,i,a) {return true;} : (this: void, v: number, i: number, a: number[]) => true +>every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>function(v,i,a) {return true;} : (v: number, i: number, a: number[]) => true >v : number >i : number >a : number[] @@ -67,11 +67,11 @@ foo(function(x) { x }); ["s"].every(function(v,i,a) {return true;}); >["s"].every(function(v,i,a) {return true;}) : boolean ->["s"].every : { (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>["s"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >["s"] : string[] >"s" : "s" ->every : { (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: void, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } ->function(v,i,a) {return true;} : (this: void, v: string, i: number, a: string[]) => true +>every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => true >v : string >i : number >a : string[] @@ -79,11 +79,11 @@ foo(function(x) { x }); ["s"].forEach(function(v,i,a) { v }); >["s"].forEach(function(v,i,a) { v }) : void ->["s"].forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>["s"].forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >["s"] : string[] >"s" : "s" ->forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function(v,i,a) { v } : (this: void, v: string, i: number, a: string[]) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function(v,i,a) { v } : (v: string, i: number, a: string[]) => void >v : string >i : number >a : string[] diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols b/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols index d7903e3328a..6df8d8ac2ad 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols @@ -9,9 +9,9 @@ function suggest(){ >result : Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4)) TypeScriptKeywords.forEach(function(keyword) { ->TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >TypeScriptKeywords : Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >keyword : Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37)) result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.types b/tests/baselines/reference/targetTypeObjectLiteralToAny.types index b8802638728..1dd81b33603 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.types +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.types @@ -10,10 +10,10 @@ function suggest(){ TypeScriptKeywords.forEach(function(keyword) { >TypeScriptKeywords.forEach(function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any }) : void ->TypeScriptKeywords.forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>TypeScriptKeywords.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >TypeScriptKeywords : string[] ->forEach : { (callbackfn: (this: void, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: void, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any } : (this: void, keyword: string) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any } : (keyword: string) => void >keyword : string result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.errors.txt b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.errors.txt index 5288875b0ce..1dac3478c63 100644 --- a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.errors.txt +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/thisExpressionInCallExpressionWithTypeArguments.ts(2,20): error TS2554: Expected 1-2 arguments, but got 1. +tests/cases/compiler/thisExpressionInCallExpressionWithTypeArguments.ts(2,20): error TS2558: Expected 1 type arguments, but got 2. ==== tests/cases/compiler/thisExpressionInCallExpressionWithTypeArguments.ts (1 errors) ==== class C { public foo() { [1,2,3].map((x) => { return this; })} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2554: Expected 1-2 arguments, but got 1. +!!! error TS2558: Expected 1 type arguments, but got 2. } \ No newline at end of file diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.symbols b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.symbols new file mode 100644 index 00000000000..c7f2b7c78a7 --- /dev/null +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/thisExpressionInCallExpressionWithTypeArguments.ts === +class C { +>C : Symbol(C, Decl(thisExpressionInCallExpressionWithTypeArguments.ts, 0, 0)) + + public foo() { [1,2,3].map((x) => { return this; })} +>foo : Symbol(C.foo, Decl(thisExpressionInCallExpressionWithTypeArguments.ts, 0, 9)) +>[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(thisExpressionInCallExpressionWithTypeArguments.ts, 1, 41)) +>this : Symbol(C, Decl(thisExpressionInCallExpressionWithTypeArguments.ts, 0, 0)) +} + diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types new file mode 100644 index 00000000000..91b9c8bb74a --- /dev/null +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/thisExpressionInCallExpressionWithTypeArguments.ts === +class C { +>C : C + + public foo() { [1,2,3].map((x) => { return this; })} +>foo : () => void +>[1,2,3].map((x) => { return this; }) : any[] +>[1,2,3].map : (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg?: Z) => U[] +>[1,2,3] : number[] +>1 : 1 +>2 : 2 +>3 : 3 +>map : (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg?: Z) => U[] +>(x) => { return this; } : (this: any, x: number) => this +>x : number +>this : this +} + diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.errors.txt b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.errors.txt deleted file mode 100644 index 817478aa68e..00000000000 --- a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.errors.txt +++ /dev/null @@ -1,409 +0,0 @@ -tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts(17,31): error TS2345: Argument of type 'void' is not assignable to parameter of type 'undefined'. -tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts(20,31): error TS2345: Argument of type 'void' is not assignable to parameter of type 'undefined'. -tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts(23,31): error TS2345: Argument of type 'void' is not assignable to parameter of type 'undefined'. - - -==== tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts (3 errors) ==== - class A { - options: string[]; - - addOptions(options: string[]) { - if (!this.options) { - this.options = []; - } - options.forEach(function (item) { - this.options.push(item); - }, this); - return this; - } - - testUndefined(options: string[]) { - const undefinedArr: Array = [] - options.forEach(function () { - undefinedArr.push(this); - ~~~~ -!!! error TS2345: Argument of type 'void' is not assignable to parameter of type 'undefined'. - }); // case1 - options.forEach(function () { - undefinedArr.push(this); - ~~~~ -!!! error TS2345: Argument of type 'void' is not assignable to parameter of type 'undefined'. - }, undefined); // case2 - options.forEach(function () { - undefinedArr.push(this); - ~~~~ -!!! error TS2345: Argument of type 'void' is not assignable to parameter of type 'undefined'. - }, null); // case3 - - const arrLike = {} as ArrayLike - Array.from(arrLike, function (item) { - return this === undefined ? 2 : 1; - }, undefined) - - const iterLike = [] as Iterable - Array.from(iterLike, function (item) { - return this === undefined ? 2 : 1; - }, undefined) - } - - test(options: string[]) { - const thisObject = { - options: [] as string[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - - const arrLike = {} as ArrayLike - Array.from(arrLike, function (item) { - return this.options[item].length - }, thisObject) - - const iterLike = [] as Iterable - Array.from(iterLike, function (item) { - return this.options[item].length - }, thisObject) - } - - test1(options: string[]) { - const thisObject = { - options: [] as ReadonlyArray - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test2(options: Int8Array[]) { - const thisObject = { - options: [] as Int8Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test3(options: Uint8Array[]) { - const thisObject = { - options: [] as Uint8Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test4(options: Float32Array[]) { - const thisObject = { - options: [] as Float32Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test5(options: Uint8ClampedArray[]) { - const thisObject = { - options: [] as Uint8ClampedArray[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test6(options: Int16Array[]) { - const thisObject = { - options: [] as Int16Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test7(options: Uint16Array[]) { - const thisObject = { - options: [] as Uint16Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test8(options: Uint32Array[]) { - const thisObject = { - options: [] as Uint32Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - - test9(options: Float64Array[]) { - const thisObject = { - options: [] as Float64Array[] - }; - - options.find(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.findIndex(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.forEach(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.map(function (val, index) { - if (val === this.options[index]) - return this.options[index]; - }, thisObject); - - options.some(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.filter(function (val, index) { - return val === this.options[index]; - }, thisObject); - - options.every(function (val, index) { - return val === this.options[index]; - }, thisObject); - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols index bf1e8c8d1b5..2099b98c8b5 100644 --- a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols +++ b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols @@ -20,17 +20,12 @@ class A { >options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 9)) } options.forEach(function (item) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 3, 15)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 7, 34)) this.options.push(item); ->this.options.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->this.options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 9)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 9)) ->push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) >item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 7, 34)) }, this); @@ -49,41 +44,38 @@ class A { >Array : Symbol(Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) options.forEach(function () { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 13, 18)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) undefinedArr.push(this); >undefinedArr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) >undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 13)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) }); // case1 options.forEach(function () { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 13, 18)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) undefinedArr.push(this); >undefinedArr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) >undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 13)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) }, undefined); // case2 >undefined : Symbol(undefined) options.forEach(function () { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 13, 18)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) undefinedArr.push(this); >undefinedArr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) >undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 13)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) }, null); // case3 @@ -171,91 +163,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 36, 9)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 49, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 49, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 49, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 49, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 36, 9)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 53, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 53, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 53, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 53, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 53, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 36, 9)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 58, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 58, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 58, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 58, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 36, 9)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 62, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 62, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 62, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 62, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 36, 9)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 66, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 66, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 66, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 66, 36)) }, thisObject); @@ -354,91 +328,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 81, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 94, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 94, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 94, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 94, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 81, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 98, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 98, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 98, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 98, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 98, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 81, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 103, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 103, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 103, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 103, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 81, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 107, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 107, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 107, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 107, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 81, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 111, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 111, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 111, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 111, 36)) }, thisObject); @@ -494,91 +450,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 116, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 129, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 129, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 129, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 129, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 116, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 133, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 133, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 133, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 133, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 133, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 116, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 138, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 138, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 138, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 138, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 116, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 142, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 142, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 142, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 142, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 116, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 146, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 146, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 146, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 146, 36)) }, thisObject); @@ -634,91 +572,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 151, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 164, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 164, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 164, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 164, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 151, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 168, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 168, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 168, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 168, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 168, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 151, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 173, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 173, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 173, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 173, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 151, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 177, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 177, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 177, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 177, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 151, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 181, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 181, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 181, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 181, 36)) }, thisObject); @@ -774,91 +694,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 186, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 199, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 199, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 199, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 199, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 186, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 203, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 203, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 203, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 203, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 203, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 186, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 208, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 208, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 208, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 208, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 186, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 212, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 212, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 212, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 212, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 186, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 216, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 216, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 216, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 216, 36)) }, thisObject); @@ -914,91 +816,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 221, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 234, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 234, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 234, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 234, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 221, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 238, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 238, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 238, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 238, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 238, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 221, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 243, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 243, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 243, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 243, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 221, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 247, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 247, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 247, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 247, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 221, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 251, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 251, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 251, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 251, 36)) }, thisObject); @@ -1054,91 +938,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 256, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 269, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 269, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 269, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 269, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 256, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 273, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 273, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 273, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 273, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 273, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 256, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 278, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 278, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 278, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 278, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 256, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 282, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 282, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 282, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 282, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 256, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 286, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 286, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 286, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 286, 36)) }, thisObject); @@ -1194,91 +1060,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 291, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 304, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 304, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 304, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 304, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 291, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 308, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 308, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 308, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 308, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 308, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 291, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 313, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 313, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 313, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 313, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 291, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 317, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 317, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 317, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 317, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 291, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 321, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 321, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 321, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 321, 36)) }, thisObject); @@ -1334,91 +1182,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 326, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 339, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 339, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 339, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 339, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 326, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 343, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 343, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 343, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 343, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 343, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 326, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 348, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 348, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 348, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 348, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 326, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 352, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 352, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 352, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 352, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 326, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 356, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 356, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 356, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 356, 36)) }, thisObject); @@ -1474,91 +1304,73 @@ class A { >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 13)) options.forEach(function (val, index) { ->options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 361, 10)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 374, 34)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 374, 38)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 374, 34)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 374, 38)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 13)) options.map(function (val, index) { ->options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 361, 10)) ->map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 378, 30)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 378, 34)) if (val === this.options[index]) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 378, 30)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 378, 34)) return this.options[index]; ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 378, 34)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 13)) options.some(function (val, index) { ->options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 361, 10)) ->some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 383, 31)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 383, 35)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 383, 31)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 383, 35)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 13)) options.filter(function (val, index) { ->options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 361, 10)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 387, 33)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 387, 37)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 387, 33)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 387, 37)) }, thisObject); >thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 13)) options.every(function (val, index) { ->options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 361, 10)) ->every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --)) >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 391, 32)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 391, 36)) return val === this.options[index]; >val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 391, 32)) ->this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) ->this : Symbol(this, Decl(lib.es5.d.ts, --, --)) ->options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 28)) >index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 391, 36)) }, thisObject); diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types index d2ec6344af0..fecae87d4b1 100644 --- a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types +++ b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types @@ -24,19 +24,19 @@ class A { } options.forEach(function (item) { >options.forEach(function (item) { this.options.push(item); }, this) : void ->options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function (item) { this.options.push(item); } : (this: this, item: string) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function (item) { this.options.push(item); } : (item: string) => void >item : string this.options.push(item); ->this.options.push(item) : number ->this.options.push : (...items: string[]) => number ->this.options : string[] ->this : this ->options : string[] ->push : (...items: string[]) => number +>this.options.push(item) : any +>this.options.push : any +>this.options : any +>this : any +>options : any +>push : any >item : string }, this); @@ -57,49 +57,49 @@ class A { options.forEach(function () { >options.forEach(function () { undefinedArr.push(this); }) : void ->options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function () { undefinedArr.push(this); } : (this: undefined) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function () { undefinedArr.push(this); } : () => void undefinedArr.push(this); >undefinedArr.push(this) : number >undefinedArr.push : (...items: undefined[]) => number >undefinedArr : undefined[] >push : (...items: undefined[]) => number ->this : undefined +>this : any }); // case1 options.forEach(function () { >options.forEach(function () { undefinedArr.push(this); }, undefined) : void ->options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function () { undefinedArr.push(this); } : (this: undefined) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function () { undefinedArr.push(this); } : () => void undefinedArr.push(this); >undefinedArr.push(this) : number >undefinedArr.push : (...items: undefined[]) => number >undefinedArr : undefined[] >push : (...items: undefined[]) => number ->this : undefined +>this : any }, undefined); // case2 >undefined : undefined options.forEach(function () { >options.forEach(function () { undefinedArr.push(this); }, null) : void ->options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function () { undefinedArr.push(this); } : (this: undefined) => void +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function () { undefinedArr.push(this); } : () => void undefinedArr.push(this); >undefinedArr.push(this) : number >undefinedArr.push : (...items: undefined[]) => number >undefinedArr : undefined[] >push : (...items: undefined[]) => number ->this : undefined +>this : any }, null); // case3 >null : null @@ -112,17 +112,17 @@ class A { Array.from(arrLike, function (item) { >Array.from(arrLike, function (item) { return this === undefined ? 2 : 1; }, undefined) : (2 | 1)[] ->Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arrLike : ArrayLike ->function (item) { return this === undefined ? 2 : 1; } : (this: undefined, item: number) => 2 | 1 +>function (item) { return this === undefined ? 2 : 1; } : (this: void, item: number) => 2 | 1 >item : number return this === undefined ? 2 : 1; >this === undefined ? 2 : 1 : 2 | 1 >this === undefined : boolean ->this : undefined +>this : void >undefined : undefined >2 : 2 >1 : 1 @@ -138,17 +138,17 @@ class A { Array.from(iterLike, function (item) { >Array.from(iterLike, function (item) { return this === undefined ? 2 : 1; }, undefined) : (2 | 1)[] ->Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >iterLike : Iterable ->function (item) { return this === undefined ? 2 : 1; } : (this: undefined, item: number) => 2 | 1 +>function (item) { return this === undefined ? 2 : 1; } : (this: void, item: number) => 2 | 1 >item : number return this === undefined ? 2 : 1; >this === undefined ? 2 : 1 : 2 | 1 >this === undefined : boolean ->this : undefined +>this : void >undefined : undefined >2 : 2 >1 : 1 @@ -174,9 +174,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : string ->options.find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>options.find : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } >options : string[] ->find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>find : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } >function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean >val : string >index : number @@ -195,9 +195,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } >options : string[] ->findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean >val : string >index : number @@ -216,48 +216,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : string[] ->this : { options: string[]; } ->options : string[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: string[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : string[] ->options.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >options : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => string +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: string, index: number) => any >val : string >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : string[] ->this : { options: string[]; } ->options : string[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : string ->this.options : string[] ->this : { options: string[]; } ->options : string[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -265,20 +265,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : string[] ->this : { options: string[]; } ->options : string[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -286,20 +286,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : string[] ->options.filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } +>options.filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } >options : string[] ->filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : string[] ->this : { options: string[]; } ->options : string[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -307,20 +307,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : string[] ->this : { options: string[]; } ->options : string[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -334,9 +334,9 @@ class A { Array.from(arrLike, function (item) { >Array.from(arrLike, function (item) { return this.options[item].length }, thisObject) : number[] ->Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arrLike : ArrayLike >function (item) { return this.options[item].length } : (this: { options: string[]; }, item: number) => number >item : number @@ -361,9 +361,9 @@ class A { Array.from(iterLike, function (item) { >Array.from(iterLike, function (item) { return this.options[item].length }, thisObject) : number[] ->Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: void, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >iterLike : Iterable >function (item) { return this.options[item].length } : (this: { options: string[]; }, item: number) => number >item : number @@ -399,9 +399,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : string ->options.find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>options.find : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } >options : string[] ->find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>find : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } >function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean >val : string >index : number @@ -420,9 +420,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } >options : string[] ->findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: void, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean >val : string >index : number @@ -441,48 +441,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : ReadonlyArray ->this : { options: ReadonlyArray; } ->options : ReadonlyArray +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: ReadonlyArray; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : string[] ->options.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >options : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => string +>map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: string, index: number) => any >val : string >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : ReadonlyArray ->this : { options: ReadonlyArray; } ->options : ReadonlyArray +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : string ->this.options : ReadonlyArray ->this : { options: ReadonlyArray; } ->options : ReadonlyArray +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -490,20 +490,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : ReadonlyArray ->this : { options: ReadonlyArray; } ->options : ReadonlyArray +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -511,20 +511,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : string[] ->options.filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } +>options.filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } >options : string[] ->filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : ReadonlyArray ->this : { options: ReadonlyArray; } ->options : ReadonlyArray +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -532,20 +532,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : string ->this.options[index] : string ->this.options : ReadonlyArray ->this : { options: ReadonlyArray; } ->options : ReadonlyArray +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -571,9 +571,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Int8Array ->options.find : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): Int8Array; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): Int8Array; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): Int8Array; } +>options.find : { (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean): Int8Array; (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): Int8Array; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): Int8Array; } >options : Int8Array[] ->find : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): Int8Array; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): Int8Array; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): Int8Array; } +>find : { (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean): Int8Array; (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): Int8Array; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): Int8Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean >val : Int8Array >index : number @@ -592,9 +592,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): number; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean): number; (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): number; } >options : Int8Array[] ->findIndex : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): number; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean): number; (predicate: (this: void, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean >val : Int8Array >index : number @@ -613,48 +613,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void): void; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => void, thisArg?: any) => void >options : Int8Array[] ->forEach : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void): void; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>forEach : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int8Array ->this.options[index] : Int8Array ->this.options : Int8Array[] ->this : { options: Int8Array[]; } ->options : Int8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Int8Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Int8Array[] ->options.map : { (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => U, thisArg?: any) => U[] >options : Int8Array[] ->map : { (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => Int8Array +>map : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Int8Array, index: number) => any >val : Int8Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Int8Array ->this.options[index] : Int8Array ->this.options : Int8Array[] ->this : { options: Int8Array[]; } ->options : Int8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Int8Array ->this.options : Int8Array[] ->this : { options: Int8Array[]; } ->options : Int8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -662,20 +662,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean >options : Int8Array[] ->some : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>some : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int8Array ->this.options[index] : Int8Array ->this.options : Int8Array[] ->this : { options: Int8Array[]; } ->options : Int8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -683,20 +683,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Int8Array[] ->options.filter : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any): Int8Array[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: undefined): Int8Array[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: Z): Int8Array[]; } +>options.filter : { (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => any, thisArg?: any): Int8Array[]; } >options : Int8Array[] ->filter : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any): Int8Array[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: undefined): Int8Array[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: Z): Int8Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>filter : { (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => any, thisArg?: any): Int8Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int8Array ->this.options[index] : Int8Array ->this.options : Int8Array[] ->this : { options: Int8Array[]; } ->options : Int8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -704,20 +704,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean >options : Int8Array[] ->every : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>every : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int8Array ->this.options[index] : Int8Array ->this.options : Int8Array[] ->this : { options: Int8Array[]; } ->options : Int8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -743,9 +743,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8Array ->options.find : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): Uint8Array; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): Uint8Array; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): Uint8Array; } +>options.find : { (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): Uint8Array; (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): Uint8Array; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): Uint8Array; } >options : Uint8Array[] ->find : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): Uint8Array; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): Uint8Array; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): Uint8Array; } +>find : { (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): Uint8Array; (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): Uint8Array; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): Uint8Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number @@ -764,9 +764,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): number; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): number; (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): number; } >options : Uint8Array[] ->findIndex : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): number; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): number; (predicate: (this: void, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number @@ -785,48 +785,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void): void; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg?: any) => void >options : Uint8Array[] ->forEach : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void): void; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>forEach : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8Array ->this.options[index] : Uint8Array ->this.options : Uint8Array[] ->this : { options: Uint8Array[]; } ->options : Uint8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Uint8Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint8Array[] ->options.map : { (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg?: any) => U[] >options : Uint8Array[] ->map : { (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => Uint8Array +>map : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint8Array, index: number) => any >val : Uint8Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Uint8Array ->this.options[index] : Uint8Array ->this.options : Uint8Array[] ->this : { options: Uint8Array[]; } ->options : Uint8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Uint8Array ->this.options : Uint8Array[] ->this : { options: Uint8Array[]; } ->options : Uint8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -834,20 +834,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean >options : Uint8Array[] ->some : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>some : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8Array ->this.options[index] : Uint8Array ->this.options : Uint8Array[] ->this : { options: Uint8Array[]; } ->options : Uint8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -855,20 +855,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8Array[] ->options.filter : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any): Uint8Array[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: undefined): Uint8Array[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: Z): Uint8Array[]; } +>options.filter : { (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg?: any): Uint8Array[]; } >options : Uint8Array[] ->filter : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any): Uint8Array[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: undefined): Uint8Array[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: Z): Uint8Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>filter : { (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg?: any): Uint8Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8Array ->this.options[index] : Uint8Array ->this.options : Uint8Array[] ->this : { options: Uint8Array[]; } ->options : Uint8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -876,20 +876,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean >options : Uint8Array[] ->every : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>every : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8Array ->this.options[index] : Uint8Array ->this.options : Uint8Array[] ->this : { options: Uint8Array[]; } ->options : Uint8Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -915,9 +915,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Float32Array ->options.find : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): Float32Array; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): Float32Array; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): Float32Array; } +>options.find : { (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean): Float32Array; (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): Float32Array; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): Float32Array; } >options : Float32Array[] ->find : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): Float32Array; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): Float32Array; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): Float32Array; } +>find : { (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean): Float32Array; (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): Float32Array; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): Float32Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean >val : Float32Array >index : number @@ -936,9 +936,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): number; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean): number; (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): number; } >options : Float32Array[] ->findIndex : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): number; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean): number; (predicate: (this: void, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean >val : Float32Array >index : number @@ -957,48 +957,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void): void; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => void, thisArg?: any) => void >options : Float32Array[] ->forEach : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void): void; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>forEach : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float32Array ->this.options[index] : Float32Array ->this.options : Float32Array[] ->this : { options: Float32Array[]; } ->options : Float32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Float32Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Float32Array[] ->options.map : { (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => U, thisArg?: any) => U[] >options : Float32Array[] ->map : { (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => Float32Array +>map : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Float32Array, index: number) => any >val : Float32Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Float32Array ->this.options[index] : Float32Array ->this.options : Float32Array[] ->this : { options: Float32Array[]; } ->options : Float32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Float32Array ->this.options : Float32Array[] ->this : { options: Float32Array[]; } ->options : Float32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1006,20 +1006,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean >options : Float32Array[] ->some : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>some : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float32Array ->this.options[index] : Float32Array ->this.options : Float32Array[] ->this : { options: Float32Array[]; } ->options : Float32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1027,20 +1027,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Float32Array[] ->options.filter : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any): Float32Array[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: undefined): Float32Array[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: Z): Float32Array[]; } +>options.filter : { (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => any, thisArg?: any): Float32Array[]; } >options : Float32Array[] ->filter : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any): Float32Array[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: undefined): Float32Array[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: Z): Float32Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>filter : { (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => any, thisArg?: any): Float32Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float32Array ->this.options[index] : Float32Array ->this.options : Float32Array[] ->this : { options: Float32Array[]; } ->options : Float32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1048,20 +1048,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean >options : Float32Array[] ->every : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>every : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float32Array ->this.options[index] : Float32Array ->this.options : Float32Array[] ->this : { options: Float32Array[]; } ->options : Float32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1087,9 +1087,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8ClampedArray ->options.find : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): Uint8ClampedArray; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): Uint8ClampedArray; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): Uint8ClampedArray; } +>options.find : { (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): Uint8ClampedArray; (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): Uint8ClampedArray; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): Uint8ClampedArray; } >options : Uint8ClampedArray[] ->find : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): Uint8ClampedArray; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): Uint8ClampedArray; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): Uint8ClampedArray; } +>find : { (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): Uint8ClampedArray; (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): Uint8ClampedArray; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): Uint8ClampedArray; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number @@ -1108,9 +1108,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): number; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): number; (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): number; } >options : Uint8ClampedArray[] ->findIndex : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): number; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): number; (predicate: (this: void, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number @@ -1129,48 +1129,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void): void; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg?: any) => void >options : Uint8ClampedArray[] ->forEach : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void): void; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>forEach : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8ClampedArray ->this.options[index] : Uint8ClampedArray ->this.options : Uint8ClampedArray[] ->this : { options: Uint8ClampedArray[]; } ->options : Uint8ClampedArray[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Uint8ClampedArray[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint8ClampedArray[] ->options.map : { (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg?: any) => U[] >options : Uint8ClampedArray[] ->map : { (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => Uint8ClampedArray +>map : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint8ClampedArray, index: number) => any >val : Uint8ClampedArray >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Uint8ClampedArray ->this.options[index] : Uint8ClampedArray ->this.options : Uint8ClampedArray[] ->this : { options: Uint8ClampedArray[]; } ->options : Uint8ClampedArray[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Uint8ClampedArray ->this.options : Uint8ClampedArray[] ->this : { options: Uint8ClampedArray[]; } ->options : Uint8ClampedArray[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1178,20 +1178,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean >options : Uint8ClampedArray[] ->some : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>some : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8ClampedArray ->this.options[index] : Uint8ClampedArray ->this.options : Uint8ClampedArray[] ->this : { options: Uint8ClampedArray[]; } ->options : Uint8ClampedArray[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1199,20 +1199,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8ClampedArray[] ->options.filter : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any): Uint8ClampedArray[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: undefined): Uint8ClampedArray[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: Z): Uint8ClampedArray[]; } +>options.filter : { (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg?: any): Uint8ClampedArray[]; } >options : Uint8ClampedArray[] ->filter : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any): Uint8ClampedArray[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: undefined): Uint8ClampedArray[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: Z): Uint8ClampedArray[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>filter : { (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg?: any): Uint8ClampedArray[]; } +>function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8ClampedArray ->this.options[index] : Uint8ClampedArray ->this.options : Uint8ClampedArray[] ->this : { options: Uint8ClampedArray[]; } ->options : Uint8ClampedArray[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1220,20 +1220,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean >options : Uint8ClampedArray[] ->every : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>every : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint8ClampedArray ->this.options[index] : Uint8ClampedArray ->this.options : Uint8ClampedArray[] ->this : { options: Uint8ClampedArray[]; } ->options : Uint8ClampedArray[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1259,9 +1259,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Int16Array ->options.find : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): Int16Array; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): Int16Array; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): Int16Array; } +>options.find : { (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean): Int16Array; (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): Int16Array; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): Int16Array; } >options : Int16Array[] ->find : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): Int16Array; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): Int16Array; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): Int16Array; } +>find : { (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean): Int16Array; (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): Int16Array; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): Int16Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean >val : Int16Array >index : number @@ -1280,9 +1280,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): number; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean): number; (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): number; } >options : Int16Array[] ->findIndex : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): number; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean): number; (predicate: (this: void, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean >val : Int16Array >index : number @@ -1301,48 +1301,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void): void; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => void, thisArg?: any) => void >options : Int16Array[] ->forEach : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void): void; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>forEach : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int16Array ->this.options[index] : Int16Array ->this.options : Int16Array[] ->this : { options: Int16Array[]; } ->options : Int16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Int16Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Int16Array[] ->options.map : { (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => U, thisArg?: any) => U[] >options : Int16Array[] ->map : { (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => Int16Array +>map : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Int16Array, index: number) => any >val : Int16Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Int16Array ->this.options[index] : Int16Array ->this.options : Int16Array[] ->this : { options: Int16Array[]; } ->options : Int16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Int16Array ->this.options : Int16Array[] ->this : { options: Int16Array[]; } ->options : Int16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1350,20 +1350,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean >options : Int16Array[] ->some : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>some : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int16Array ->this.options[index] : Int16Array ->this.options : Int16Array[] ->this : { options: Int16Array[]; } ->options : Int16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1371,20 +1371,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Int16Array[] ->options.filter : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any): Int16Array[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: undefined): Int16Array[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: Z): Int16Array[]; } +>options.filter : { (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => any, thisArg?: any): Int16Array[]; } >options : Int16Array[] ->filter : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any): Int16Array[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: undefined): Int16Array[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: Z): Int16Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>filter : { (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => any, thisArg?: any): Int16Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int16Array ->this.options[index] : Int16Array ->this.options : Int16Array[] ->this : { options: Int16Array[]; } ->options : Int16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1392,20 +1392,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean >options : Int16Array[] ->every : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>every : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Int16Array ->this.options[index] : Int16Array ->this.options : Int16Array[] ->this : { options: Int16Array[]; } ->options : Int16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1431,9 +1431,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint16Array ->options.find : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): Uint16Array; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): Uint16Array; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): Uint16Array; } +>options.find : { (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): Uint16Array; (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): Uint16Array; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): Uint16Array; } >options : Uint16Array[] ->find : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): Uint16Array; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): Uint16Array; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): Uint16Array; } +>find : { (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): Uint16Array; (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): Uint16Array; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): Uint16Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number @@ -1452,9 +1452,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): number; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): number; (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): number; } >options : Uint16Array[] ->findIndex : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): number; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): number; (predicate: (this: void, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number @@ -1473,48 +1473,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void): void; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg?: any) => void >options : Uint16Array[] ->forEach : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void): void; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>forEach : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint16Array ->this.options[index] : Uint16Array ->this.options : Uint16Array[] ->this : { options: Uint16Array[]; } ->options : Uint16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Uint16Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint16Array[] ->options.map : { (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg?: any) => U[] >options : Uint16Array[] ->map : { (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => Uint16Array +>map : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint16Array, index: number) => any >val : Uint16Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Uint16Array ->this.options[index] : Uint16Array ->this.options : Uint16Array[] ->this : { options: Uint16Array[]; } ->options : Uint16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Uint16Array ->this.options : Uint16Array[] ->this : { options: Uint16Array[]; } ->options : Uint16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1522,20 +1522,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean >options : Uint16Array[] ->some : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>some : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint16Array ->this.options[index] : Uint16Array ->this.options : Uint16Array[] ->this : { options: Uint16Array[]; } ->options : Uint16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1543,20 +1543,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint16Array[] ->options.filter : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any): Uint16Array[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: undefined): Uint16Array[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: Z): Uint16Array[]; } +>options.filter : { (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg?: any): Uint16Array[]; } >options : Uint16Array[] ->filter : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any): Uint16Array[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: undefined): Uint16Array[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: Z): Uint16Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>filter : { (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg?: any): Uint16Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint16Array ->this.options[index] : Uint16Array ->this.options : Uint16Array[] ->this : { options: Uint16Array[]; } ->options : Uint16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1564,20 +1564,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean >options : Uint16Array[] ->every : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>every : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint16Array ->this.options[index] : Uint16Array ->this.options : Uint16Array[] ->this : { options: Uint16Array[]; } ->options : Uint16Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1603,9 +1603,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint32Array ->options.find : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): Uint32Array; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): Uint32Array; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): Uint32Array; } +>options.find : { (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): Uint32Array; (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): Uint32Array; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): Uint32Array; } >options : Uint32Array[] ->find : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): Uint32Array; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): Uint32Array; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): Uint32Array; } +>find : { (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): Uint32Array; (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): Uint32Array; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): Uint32Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number @@ -1624,9 +1624,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): number; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): number; (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): number; } >options : Uint32Array[] ->findIndex : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): number; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): number; (predicate: (this: void, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number @@ -1645,48 +1645,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void): void; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg?: any) => void >options : Uint32Array[] ->forEach : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void): void; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>forEach : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint32Array ->this.options[index] : Uint32Array ->this.options : Uint32Array[] ->this : { options: Uint32Array[]; } ->options : Uint32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Uint32Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint32Array[] ->options.map : { (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg?: any) => U[] >options : Uint32Array[] ->map : { (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => Uint32Array +>map : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint32Array, index: number) => any >val : Uint32Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Uint32Array ->this.options[index] : Uint32Array ->this.options : Uint32Array[] ->this : { options: Uint32Array[]; } ->options : Uint32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Uint32Array ->this.options : Uint32Array[] ->this : { options: Uint32Array[]; } ->options : Uint32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1694,20 +1694,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean >options : Uint32Array[] ->some : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>some : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint32Array ->this.options[index] : Uint32Array ->this.options : Uint32Array[] ->this : { options: Uint32Array[]; } ->options : Uint32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1715,20 +1715,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint32Array[] ->options.filter : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any): Uint32Array[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: undefined): Uint32Array[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: Z): Uint32Array[]; } +>options.filter : { (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg?: any): Uint32Array[]; } >options : Uint32Array[] ->filter : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any): Uint32Array[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: undefined): Uint32Array[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: Z): Uint32Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>filter : { (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg?: any): Uint32Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint32Array ->this.options[index] : Uint32Array ->this.options : Uint32Array[] ->this : { options: Uint32Array[]; } ->options : Uint32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1736,20 +1736,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean >options : Uint32Array[] ->every : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>every : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Uint32Array ->this.options[index] : Uint32Array ->this.options : Uint32Array[] ->this : { options: Uint32Array[]; } ->options : Uint32Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1775,9 +1775,9 @@ class A { options.find(function (val, index) { >options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Float64Array ->options.find : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): Float64Array; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): Float64Array; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): Float64Array; } +>options.find : { (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean): Float64Array; (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): Float64Array; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): Float64Array; } >options : Float64Array[] ->find : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): Float64Array; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): Float64Array; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): Float64Array; } +>find : { (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean): Float64Array; (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): Float64Array; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): Float64Array; } >function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean >val : Float64Array >index : number @@ -1796,9 +1796,9 @@ class A { options.findIndex(function (val, index) { >options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number ->options.findIndex : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): number; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): number; } +>options.findIndex : { (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean): number; (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): number; } >options : Float64Array[] ->findIndex : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): number; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): number; } +>findIndex : { (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean): number; (predicate: (this: void, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): number; } >function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean >val : Float64Array >index : number @@ -1817,48 +1817,48 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void): void; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: Z): void; } +>options.forEach : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => void, thisArg?: any) => void >options : Float64Array[] ->forEach : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void): void; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: Z): void; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>forEach : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => void, thisArg?: any) => void +>function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float64Array ->this.options[index] : Float64Array ->this.options : Float64Array[] ->this : { options: Float64Array[]; } ->options : Float64Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); >thisObject : { options: Float64Array[]; } options.map(function (val, index) { ->options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Float64Array[] ->options.map : { (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): U[]; } +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] +>options.map : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => U, thisArg?: any) => U[] >options : Float64Array[] ->map : { (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): U[]; } ->function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => Float64Array +>map : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => U, thisArg?: any) => U[] +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Float64Array, index: number) => any >val : Float64Array >index : number if (val === this.options[index]) >val === this.options[index] : boolean >val : Float64Array ->this.options[index] : Float64Array ->this.options : Float64Array[] ->this : { options: Float64Array[]; } ->options : Float64Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number return this.options[index]; ->this.options[index] : Float64Array ->this.options : Float64Array[] ->this : { options: Float64Array[]; } ->options : Float64Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1866,20 +1866,20 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } +>options.some : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean >options : Float64Array[] ->some : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>some : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float64Array ->this.options[index] : Float64Array ->this.options : Float64Array[] ->this : { options: Float64Array[]; } ->options : Float64Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1887,20 +1887,20 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Float64Array[] ->options.filter : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any): Float64Array[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: undefined): Float64Array[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: Z): Float64Array[]; } +>options.filter : { (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => any, thisArg?: any): Float64Array[]; } >options : Float64Array[] ->filter : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any): Float64Array[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: undefined): Float64Array[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: Z): Float64Array[]; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>filter : { (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => any, thisArg?: any): Float64Array[]; } +>function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float64Array ->this.options[index] : Float64Array ->this.options : Float64Array[] ->this : { options: Float64Array[]; } ->options : Float64Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); @@ -1908,20 +1908,20 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } +>options.every : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean >options : Float64Array[] ->every : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } ->function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>every : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean +>function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number return val === this.options[index]; >val === this.options[index] : boolean >val : Float64Array ->this.options[index] : Float64Array ->this.options : Float64Array[] ->this : { options: Float64Array[]; } ->options : Float64Array[] +>this.options[index] : any +>this.options : any +>this : any +>options : any >index : number }, thisObject); diff --git a/tests/baselines/reference/tsxSpreadChildren.symbols b/tests/baselines/reference/tsxSpreadChildren.symbols index 06009e3ca07..b74c28634c3 100644 --- a/tests/baselines/reference/tsxSpreadChildren.symbols +++ b/tests/baselines/reference/tsxSpreadChildren.symbols @@ -58,9 +58,9 @@ function TodoList({ todos }: TodoListProps) { >div : Symbol(JSX.IntrinsicElements, Decl(tsxSpreadChildren.tsx, 1, 22)) {...todos.map(todo => )} ->todos.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>todos.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >todos : Symbol(todos, Decl(tsxSpreadChildren.tsx, 18, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 20, 22)) >Todo : Symbol(Todo, Decl(tsxSpreadChildren.tsx, 14, 1)) >key : Symbol(key, Decl(tsxSpreadChildren.tsx, 20, 35)) diff --git a/tests/baselines/reference/tsxSpreadChildren.types b/tests/baselines/reference/tsxSpreadChildren.types index c762e45b593..4a66e908c49 100644 --- a/tests/baselines/reference/tsxSpreadChildren.types +++ b/tests/baselines/reference/tsxSpreadChildren.types @@ -63,10 +63,10 @@ function TodoList({ todos }: TodoListProps) { {...todos.map(todo => )} >todos.map(todo => ) : JSX.Element[] ->todos.map : { (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): U[]; (callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): U[]; } +>todos.map : (callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any) => U[] >todos : TodoProp[] ->map : { (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U): U[]; (callbackfn: (this: void, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): U[]; } ->todo => : (this: void, todo: TodoProp) => JSX.Element +>map : (callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any) => U[] +>todo => : (todo: TodoProp) => JSX.Element >todo : TodoProp > : JSX.Element >Todo : (prop: { key: number; todo: string; }) => JSX.Element diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols index d294a9c28cf..b73bd8882d2 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols @@ -15,9 +15,9 @@ var nodes: TreeNode[]; >TreeNode : Symbol(TreeNode, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 0, 0)) nodes.map(n => n.name); ->nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >nodes : Symbol(nodes, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 5, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 6, 10)) >n.name : Symbol(name, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 0, 17)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 6, 10)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types index 518bf14d010..5269bd9b518 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types @@ -16,10 +16,10 @@ var nodes: TreeNode[]; nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : { (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): U[]; (callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): U[]; } +>nodes.map : (callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any) => U[] >nodes : TreeNode[] ->map : { (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U): U[]; (callbackfn: (this: void, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): U[]; } ->n => n.name : (this: void, n: TreeNode) => string +>map : (callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any) => U[] +>n => n.name : (n: TreeNode) => string >n : TreeNode >n.name : string >n : TreeNode diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols index 3761994619c..7cec46cb4b6 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols @@ -26,9 +26,9 @@ var nodes: TreeNodeMiddleman[]; >TreeNodeMiddleman : Symbol(TreeNodeMiddleman, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 3, 1)) nodes.map(n => n.name); ->nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >nodes : Symbol(nodes, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 10, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 11, 10)) >n.name : Symbol(name, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 5, 26)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 11, 10)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types index 45054ed6aa0..59244850849 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types @@ -27,10 +27,10 @@ var nodes: TreeNodeMiddleman[]; nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): U[]; (callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): U[]; } +>nodes.map : (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any) => U[] >nodes : TreeNodeMiddleman[] ->map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): U[]; (callbackfn: (this: void, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): U[]; } ->n => n.name : (this: void, n: TreeNodeMiddleman) => string +>map : (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any) => U[] +>n => n.name : (n: TreeNodeMiddleman) => string >n : TreeNodeMiddleman >n.name : string >n : TreeNodeMiddleman diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index a5f51ffda9c..f3f0aca48c3 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -166,65 +166,65 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 46, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 45, 44)) return typedArrays; @@ -241,65 +241,65 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) return typedArrays; @@ -457,73 +457,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 106, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 58)) @@ -545,81 +545,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 121, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 120, 98)) diff --git a/tests/baselines/reference/typedArrays.types b/tests/baselines/reference/typedArrays.types index 259d601d426..99c7e433ea5 100644 --- a/tests/baselines/reference/typedArrays.types +++ b/tests/baselines/reference/typedArrays.types @@ -273,9 +273,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >0 : 0 >Int8Array.from(obj) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : number[] typedArrays[1] = Uint8Array.from(obj); @@ -284,9 +284,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >1 : 1 >Uint8Array.from(obj) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : number[] typedArrays[2] = Int16Array.from(obj); @@ -295,9 +295,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >2 : 2 >Int16Array.from(obj) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : number[] typedArrays[3] = Uint16Array.from(obj); @@ -306,9 +306,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >3 : 3 >Uint16Array.from(obj) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : number[] typedArrays[4] = Int32Array.from(obj); @@ -317,9 +317,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >4 : 4 >Int32Array.from(obj) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : number[] typedArrays[5] = Uint32Array.from(obj); @@ -328,9 +328,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >5 : 5 >Uint32Array.from(obj) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : number[] typedArrays[6] = Float32Array.from(obj); @@ -339,9 +339,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >6 : 6 >Float32Array.from(obj) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : number[] typedArrays[7] = Float64Array.from(obj); @@ -350,9 +350,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >7 : 7 >Float64Array.from(obj) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : number[] typedArrays[8] = Uint8ClampedArray.from(obj); @@ -361,9 +361,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : number[] return typedArrays; @@ -385,9 +385,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >0 : 0 >Int8Array.from(obj) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : ArrayLike typedArrays[1] = Uint8Array.from(obj); @@ -396,9 +396,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >1 : 1 >Uint8Array.from(obj) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : ArrayLike typedArrays[2] = Int16Array.from(obj); @@ -407,9 +407,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >2 : 2 >Int16Array.from(obj) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : ArrayLike typedArrays[3] = Uint16Array.from(obj); @@ -418,9 +418,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >3 : 3 >Uint16Array.from(obj) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : ArrayLike typedArrays[4] = Int32Array.from(obj); @@ -429,9 +429,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >4 : 4 >Int32Array.from(obj) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : ArrayLike typedArrays[5] = Uint32Array.from(obj); @@ -440,9 +440,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >5 : 5 >Uint32Array.from(obj) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : ArrayLike typedArrays[6] = Float32Array.from(obj); @@ -451,9 +451,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >6 : 6 >Float32Array.from(obj) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : ArrayLike typedArrays[7] = Float64Array.from(obj); @@ -462,9 +462,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >7 : 7 >Float64Array.from(obj) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : ArrayLike typedArrays[8] = Uint8ClampedArray.from(obj); @@ -473,9 +473,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : ArrayLike return typedArrays; @@ -757,9 +757,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -769,9 +769,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -781,9 +781,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -793,9 +793,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -805,9 +805,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -817,9 +817,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -829,9 +829,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -841,9 +841,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -853,9 +853,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -882,9 +882,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn, thisArg) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -895,9 +895,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn, thisArg) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -908,9 +908,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn, thisArg) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -921,9 +921,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn, thisArg) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -934,9 +934,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn, thisArg) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -947,9 +947,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn, thisArg) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -960,9 +960,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn, thisArg) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -973,9 +973,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn, thisArg) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -986,9 +986,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: void, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} diff --git a/tests/cases/fourslash/completionEntryForUnionMethod.ts b/tests/cases/fourslash/completionEntryForUnionMethod.ts index 8c112a6d52e..f8fd9ad9dc9 100644 --- a/tests/cases/fourslash/completionEntryForUnionMethod.ts +++ b/tests/cases/fourslash/completionEntryForUnionMethod.ts @@ -5,7 +5,7 @@ goTo.marker(); verify.quickInfoIs( - "(property) map: {\n (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U];\n (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U];\n (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U];\n (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U];\n (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U];\n (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U];\n (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[];\n (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[];\n} | {\n (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U];\n (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U];\n (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U];\n (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U];\n (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U];\n (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U];\n (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[];\n (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[];\n}", - "Calls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results."); + "(property) map: ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[])", + "Calls a defined callback function on each element of an array, and returns an array that contains the results."); -verify.completionListContains('map', "(property) map: {\n (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U];\n (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U, U];\n (this: [string, string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U];\n (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U];\n (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U): [U, U];\n (this: [string, string], callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U];\n (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: void, value: string, index: number, array: string[]) => U): U[];\n (callbackfn: (this: void, value: string, index: number, array: string[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[];\n} | {\n (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U];\n (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U, U];\n (this: [number, number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U];\n (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U];\n (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U): [U, U];\n (this: [number, number], callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U];\n (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: void, value: number, index: number, array: number[]) => U): U[];\n (callbackfn: (this: void, value: number, index: number, array: number[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[];\n}"); +verify.completionListContains('map', "(property) map: ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[])"); \ No newline at end of file From e386d65ed62e3596573af0482de858bb08f1ee95 Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 4 Jun 2017 19:58:24 -0700 Subject: [PATCH 117/134] Use ESNext instead of ES2018 --- src/compiler/commandLineParser.ts | 4 ++-- src/compiler/diagnosticMessages.json | 2 +- src/compiler/transformer.ts | 2 +- src/compiler/types.ts | 2 +- .../tsConfig/Default initialized TSConfig/tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../Initialized TSConfig with files options/tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 033f6b5ab59..adb6a0df189 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -100,12 +100,12 @@ namespace ts { "umd": ModuleKind.UMD, "es6": ModuleKind.ES2015, "es2015": ModuleKind.ES2015, - "es2018": ModuleKind.ES2018 + "es2018": ModuleKind.ESNext }), paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Basic_Options, - description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_es2018, + description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext, }, { name: "lib", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 6bcd28811f9..a74d41ff473 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2646,7 +2646,7 @@ "category": "Message", "code": 6015 }, - "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'.": { + "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.": { "category": "Message", "code": 6016 }, diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index cd5cc95e2e1..f0c827d8396 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -15,7 +15,7 @@ namespace ts { function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory { switch (moduleKind) { - case ModuleKind.ES2018: + case ModuleKind.ESNext: case ModuleKind.ES2015: return transformES2015Module; case ModuleKind.System: diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 57c193297bc..8fb3d98fca8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3579,7 +3579,7 @@ namespace ts { UMD = 3, System = 4, ES2015 = 5, - ES2018 = 6 + ESNext = 6 } export const enum JsxEmit { diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 0ef3acb7c06..772c218eb4e 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index bffdc71b254..7a9b895636c 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 8ab4a03a9ca..70d5ed9d738 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index 914e7432f14..914b9d99d1b 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 4797ea79f57..50bd28442bb 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 0ef3acb7c06..772c218eb4e 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 8f6aeadad34..afae7193d58 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index e5b684c9863..a87fe9c5206 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ From 3118afe9bcb4fc365d19c0d84fb9acb1907c2081 Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 4 Jun 2017 20:32:12 -0700 Subject: [PATCH 118/134] Remove ES2018 folder --- .../importCallExpression1ESNext.ts} | 2 +- .../importCallExpression2ESNext.ts} | 2 +- .../importCallExpression3ESNext.ts} | 2 +- .../importCallExpression4ESNext.ts} | 2 +- .../importCallExpression5ESNext.ts} | 2 +- .../importCallExpression6ESNext.ts} | 2 +- .../dynamicImport/importCallExpressionCheckReturntype1.ts | 0 .../dynamicImport/importCallExpressionDeclarationEmit1.ts | 0 .../dynamicImport/importCallExpressionDeclarationEmit2.ts | 2 +- .../dynamicImport/importCallExpressionDeclarationEmit3.ts | 2 +- .../{es2018 => }/dynamicImport/importCallExpressionES5AMD.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionES5CJS.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionES5System.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionES5UMD.ts | 0 .../dynamicImport/importCallExpressionErrorInES2015.ts | 0 .../dynamicImport/importCallExpressionGrammarError.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInAMD1.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInAMD2.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInAMD3.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInAMD4.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInCJS1.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInCJS2.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInCJS3.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInCJS4.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInCJS5.ts | 0 .../dynamicImport/importCallExpressionInScriptContext1.ts | 0 .../dynamicImport/importCallExpressionInScriptContext2.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInSystem1.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInSystem2.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInSystem3.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInSystem4.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInUMD1.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInUMD2.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInUMD3.ts | 0 .../{es2018 => }/dynamicImport/importCallExpressionInUMD4.ts | 0 .../dynamicImport/importCallExpressionReturnPromiseOfAny.ts | 0 .../importCallExpressionSpecifierNotStringTypeError.ts | 0 .../dynamicImport/importCallExpressionWithTypeArgument.ts | 0 38 files changed, 8 insertions(+), 8 deletions(-) rename tests/cases/conformance/{es2018/dynamicImport/importCallExpression1ES2018.ts => dynamicImport/importCallExpression1ESNext.ts} (86%) rename tests/cases/conformance/{es2018/dynamicImport/importCallExpression2ES2018.ts => dynamicImport/importCallExpression2ESNext.ts} (86%) rename tests/cases/conformance/{es2018/dynamicImport/importCallExpression3ES2018.ts => dynamicImport/importCallExpression3ESNext.ts} (86%) rename tests/cases/conformance/{es2018/dynamicImport/importCallExpression4ES2018.ts => dynamicImport/importCallExpression4ESNext.ts} (91%) rename tests/cases/conformance/{es2018/dynamicImport/importCallExpression5ES2018.ts => dynamicImport/importCallExpression5ESNext.ts} (91%) rename tests/cases/conformance/{es2018/dynamicImport/importCallExpression6ES2018.ts => dynamicImport/importCallExpression6ESNext.ts} (91%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionCheckReturntype1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionDeclarationEmit1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionDeclarationEmit2.ts (84%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionDeclarationEmit3.ts (91%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionES5AMD.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionES5CJS.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionES5System.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionES5UMD.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionErrorInES2015.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionGrammarError.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInAMD1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInAMD2.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInAMD3.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInAMD4.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInCJS1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInCJS2.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInCJS3.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInCJS4.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInCJS5.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInScriptContext1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInScriptContext2.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInSystem1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInSystem2.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInSystem3.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInSystem4.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInUMD1.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInUMD2.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInUMD3.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionInUMD4.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionReturnPromiseOfAny.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts (100%) rename tests/cases/conformance/{es2018 => }/dynamicImport/importCallExpressionWithTypeArgument.ts (100%) diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression1ES2018.ts b/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts similarity index 86% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpression1ES2018.ts rename to tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts index f7abb325d99..295b6470301 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpression1ES2018.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @filename: 0.ts export function foo() { return "foo"; } diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression2ES2018.ts b/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts similarity index 86% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpression2ES2018.ts rename to tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts index 994e6f9e776..f0e9b358854 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpression2ES2018.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @filename: 0.ts export class B { diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression3ES2018.ts b/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts similarity index 86% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpression3ES2018.ts rename to tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts index 6b2fc219d24..ee7264b8c7e 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpression3ES2018.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @filename: 0.ts export class B { diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression4ES2018.ts b/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts similarity index 91% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpression4ES2018.ts rename to tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts index 03e72bb6d4d..91342770d7d 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpression4ES2018.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @filename: 0.ts export class B { diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression5ES2018.ts b/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts similarity index 91% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpression5ES2018.ts rename to tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts index 254e99f3907..173b606a50c 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpression5ES2018.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @strictNullChecks: true // @filename: 0.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression6ES2018.ts b/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts similarity index 91% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpression6ES2018.ts rename to tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts index 8c1a1071fbc..f09521186e8 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpression6ES2018.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @filename: 0.ts export class B { diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionCheckReturntype1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionCheckReturntype1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts similarity index 84% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit2.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts index 7d9b5fec1d0..4b9196dea20 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit2.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @declaration: true diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts similarity index 91% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit3.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts index cde7ad0a42f..6d17d624190 100644 --- a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit3.ts +++ b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts @@ -1,4 +1,4 @@ -// @module: es2018 +// @module: esnext // @target: esnext // @declaration: true diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5AMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5AMD.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5CJS.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5CJS.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5System.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5System.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5UMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5UMD.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionErrorInES2015.ts b/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionErrorInES2015.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts b/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD2.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD3.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD4.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS2.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS3.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS4.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS5.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS5.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext2.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem2.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem3.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem4.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD1.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD2.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD3.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD4.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionReturnPromiseOfAny.ts b/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionReturnPromiseOfAny.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts b/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpressionWithTypeArgument.ts b/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts similarity index 100% rename from tests/cases/conformance/es2018/dynamicImport/importCallExpressionWithTypeArgument.ts rename to tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts From 75aa4bdbccde8745c8dbeeea395f83b293c60a5e Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 4 Jun 2017 21:08:05 -0700 Subject: [PATCH 119/134] Rename test file with ES2018 to ESNext --- .../importCallExpression1ES2018.types | 39 ------------------- ...2018.js => importCallExpression1ESNext.js} | 2 +- ...ls => importCallExpression1ESNext.symbols} | 4 +- .../importCallExpression1ESNext.types | 39 +++++++++++++++++++ ...2018.js => importCallExpression2ESNext.js} | 2 +- ...ls => importCallExpression2ESNext.symbols} | 4 +- ...ypes => importCallExpression2ESNext.types} | 6 +-- ...2018.js => importCallExpression3ESNext.js} | 2 +- ...ls => importCallExpression3ESNext.symbols} | 4 +- ...ypes => importCallExpression3ESNext.types} | 10 ++--- ...2018.js => importCallExpression4ESNext.js} | 2 +- ...ls => importCallExpression4ESNext.symbols} | 6 +-- ...ypes => importCallExpression4ESNext.types} | 32 +++++++-------- ...=> importCallExpression5ESNext.errors.txt} | 14 +++---- ...2018.js => importCallExpression5ESNext.js} | 2 +- ...=> importCallExpression6ESNext.errors.txt} | 10 ++--- ...2018.js => importCallExpression6ESNext.js} | 2 +- 17 files changed, 90 insertions(+), 90 deletions(-) delete mode 100644 tests/baselines/reference/importCallExpression1ES2018.types rename tests/baselines/reference/{importCallExpression1ES2018.js => importCallExpression1ESNext.js} (78%) rename tests/baselines/reference/{importCallExpression1ES2018.symbols => importCallExpression1ESNext.symbols} (81%) create mode 100644 tests/baselines/reference/importCallExpression1ESNext.types rename tests/baselines/reference/{importCallExpression2ES2018.js => importCallExpression2ESNext.js} (79%) rename tests/baselines/reference/{importCallExpression2ES2018.symbols => importCallExpression2ESNext.symbols} (85%) rename tests/baselines/reference/{importCallExpression2ES2018.types => importCallExpression2ESNext.types} (82%) rename tests/baselines/reference/{importCallExpression3ES2018.js => importCallExpression3ESNext.js} (78%) rename tests/baselines/reference/{importCallExpression3ES2018.symbols => importCallExpression3ESNext.symbols} (81%) rename tests/baselines/reference/{importCallExpression3ES2018.types => importCallExpression3ESNext.types} (54%) rename tests/baselines/reference/{importCallExpression4ES2018.js => importCallExpression4ESNext.js} (89%) rename tests/baselines/reference/{importCallExpression4ES2018.symbols => importCallExpression4ESNext.symbols} (87%) rename tests/baselines/reference/{importCallExpression4ES2018.types => importCallExpression4ESNext.types} (53%) rename tests/baselines/reference/{importCallExpression5ES2018.errors.txt => importCallExpression5ESNext.errors.txt} (52%) rename tests/baselines/reference/{importCallExpression5ES2018.js => importCallExpression5ESNext.js} (87%) rename tests/baselines/reference/{importCallExpression6ES2018.errors.txt => importCallExpression6ESNext.errors.txt} (55%) rename tests/baselines/reference/{importCallExpression6ES2018.js => importCallExpression6ESNext.js} (87%) diff --git a/tests/baselines/reference/importCallExpression1ES2018.types b/tests/baselines/reference/importCallExpression1ES2018.types deleted file mode 100644 index 6d67b0f20b4..00000000000 --- a/tests/baselines/reference/importCallExpression1ES2018.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/es2018/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->foo : () => string - -}) - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpression1ES2018.js b/tests/baselines/reference/importCallExpression1ESNext.js similarity index 78% rename from tests/baselines/reference/importCallExpression1ES2018.js rename to tests/baselines/reference/importCallExpression1ESNext.js index e98562ba360..39b779c921f 100644 --- a/tests/baselines/reference/importCallExpression1ES2018.js +++ b/tests/baselines/reference/importCallExpression1ESNext.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression1ES2018.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpression1ES2018.symbols b/tests/baselines/reference/importCallExpression1ESNext.symbols similarity index 81% rename from tests/baselines/reference/importCallExpression1ES2018.symbols rename to tests/baselines/reference/importCallExpression1ESNext.symbols index 93f0d8f6deb..28b5ba13e99 100644 --- a/tests/baselines/reference/importCallExpression1ES2018.symbols +++ b/tests/baselines/reference/importCallExpression1ESNext.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpression1ESNext.types b/tests/baselines/reference/importCallExpression1ESNext.types new file mode 100644 index 00000000000..53a1b3d08fa --- /dev/null +++ b/tests/baselines/reference/importCallExpression1ESNext.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}) + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpression2ES2018.js b/tests/baselines/reference/importCallExpression2ESNext.js similarity index 79% rename from tests/baselines/reference/importCallExpression2ES2018.js rename to tests/baselines/reference/importCallExpression2ESNext.js index 293fa4e49d2..662f57f07ff 100644 --- a/tests/baselines/reference/importCallExpression2ES2018.js +++ b/tests/baselines/reference/importCallExpression2ESNext.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression2ES2018.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpression2ES2018.symbols b/tests/baselines/reference/importCallExpression2ESNext.symbols similarity index 85% rename from tests/baselines/reference/importCallExpression2ES2018.symbols rename to tests/baselines/reference/importCallExpression2ESNext.symbols index 4e8931cb729..2002398aeb9 100644 --- a/tests/baselines/reference/importCallExpression2ES2018.symbols +++ b/tests/baselines/reference/importCallExpression2ESNext.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === function foo(x: Promise) { >foo : Symbol(foo, Decl(2.ts, 0, 0)) >x : Symbol(x, Decl(2.ts, 0, 13)) diff --git a/tests/baselines/reference/importCallExpression2ES2018.types b/tests/baselines/reference/importCallExpression2ESNext.types similarity index 82% rename from tests/baselines/reference/importCallExpression2ES2018.types rename to tests/baselines/reference/importCallExpression2ESNext.types index 01e3c0d99bd..084eb33dde9 100644 --- a/tests/baselines/reference/importCallExpression2ES2018.types +++ b/tests/baselines/reference/importCallExpression2ESNext.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,7 +7,7 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === function foo(x: Promise) { >foo : (x: Promise) => void >x : Promise @@ -40,6 +40,6 @@ function foo(x: Promise) { foo(import("./0")); >foo(import("./0")) : void >foo : (x: Promise) => void ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" diff --git a/tests/baselines/reference/importCallExpression3ES2018.js b/tests/baselines/reference/importCallExpression3ESNext.js similarity index 78% rename from tests/baselines/reference/importCallExpression3ES2018.js rename to tests/baselines/reference/importCallExpression3ESNext.js index 247e78bb46c..0cd41388616 100644 --- a/tests/baselines/reference/importCallExpression3ES2018.js +++ b/tests/baselines/reference/importCallExpression3ESNext.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression3ES2018.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpression3ES2018.symbols b/tests/baselines/reference/importCallExpression3ESNext.symbols similarity index 81% rename from tests/baselines/reference/importCallExpression3ES2018.symbols rename to tests/baselines/reference/importCallExpression3ESNext.symbols index 06b328f5745..5ca85d6e693 100644 --- a/tests/baselines/reference/importCallExpression3ES2018.symbols +++ b/tests/baselines/reference/importCallExpression3ESNext.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpression3ES2018.types b/tests/baselines/reference/importCallExpression3ESNext.types similarity index 54% rename from tests/baselines/reference/importCallExpression3ES2018.types rename to tests/baselines/reference/importCallExpression3ESNext.types index e88ddd04431..e517be6e722 100644 --- a/tests/baselines/reference/importCallExpression3ES2018.types +++ b/tests/baselines/reference/importCallExpression3ESNext.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,16 +7,16 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : () => Promise class C extends (await import("./0")).B {} >C : C >(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->import("./0") : Promise +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise >"./0" : "./0" >B : typeof B diff --git a/tests/baselines/reference/importCallExpression4ES2018.js b/tests/baselines/reference/importCallExpression4ESNext.js similarity index 89% rename from tests/baselines/reference/importCallExpression4ES2018.js rename to tests/baselines/reference/importCallExpression4ESNext.js index a132bd8ac65..e148d5c1e51 100644 --- a/tests/baselines/reference/importCallExpression4ES2018.js +++ b/tests/baselines/reference/importCallExpression4ESNext.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression4ES2018.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpression4ES2018.symbols b/tests/baselines/reference/importCallExpression4ESNext.symbols similarity index 87% rename from tests/baselines/reference/importCallExpression4ES2018.symbols rename to tests/baselines/reference/importCallExpression4ESNext.symbols index 1d2a9aec25c..34a1dcf4d7b 100644 --- a/tests/baselines/reference/importCallExpression4ES2018.symbols +++ b/tests/baselines/reference/importCallExpression4ESNext.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -9,11 +9,11 @@ export class B { export function foo() { return "foo" } >foo : Symbol(foo, Decl(0.ts, 2, 1)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : Symbol(backup, Decl(1.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : Symbol(console, Decl(2.ts, 0, 11)) diff --git a/tests/baselines/reference/importCallExpression4ES2018.types b/tests/baselines/reference/importCallExpression4ESNext.types similarity index 53% rename from tests/baselines/reference/importCallExpression4ES2018.types rename to tests/baselines/reference/importCallExpression4ESNext.types index 6da36879f64..2ea666ba672 100644 --- a/tests/baselines/reference/importCallExpression4ES2018.types +++ b/tests/baselines/reference/importCallExpression4ESNext.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -11,12 +11,12 @@ export function foo() { return "foo" } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : () => string >"backup" : "backup" -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : any @@ -24,8 +24,8 @@ class C { >C : C private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise +>myModule : Promise +>import("./0") : Promise >"./0" : "./0" method() { @@ -33,13 +33,13 @@ class C { this.myModule.then(Zero => { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise >this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" console.log(Zero.foo()); >console.log(Zero.foo()) : any @@ -48,7 +48,7 @@ class C { >log : any >Zero.foo() : string >Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>Zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }, async err => { @@ -63,9 +63,9 @@ class C { >err : any let one = await import("./1"); ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->import("./1") : Promise +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise >"./1" : "./1" console.log(one.backup()); @@ -75,7 +75,7 @@ class C { >log : any >one.backup() : string >one.backup : () => string ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" +>one : typeof "tests/cases/conformance/dynamicImport/1" >backup : () => string }); diff --git a/tests/baselines/reference/importCallExpression5ES2018.errors.txt b/tests/baselines/reference/importCallExpression5ESNext.errors.txt similarity index 52% rename from tests/baselines/reference/importCallExpression5ES2018.errors.txt rename to tests/baselines/reference/importCallExpression5ESNext.errors.txt index a7836124184..ed5900c2a03 100644 --- a/tests/baselines/reference/importCallExpression5ES2018.errors.txt +++ b/tests/baselines/reference/importCallExpression5ESNext.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/es2018/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. -tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. -tests/cases/conformance/es2018/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. -tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. +tests/cases/conformance/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. +tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. +tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. -==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== export class B { print() { return "I am B"} } export function foo() { return "foo" } -==== tests/cases/conformance/es2018/dynamicImport/1.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ==== export function backup() { return "backup"; } -==== tests/cases/conformance/es2018/dynamicImport/2.ts (4 errors) ==== +==== tests/cases/conformance/dynamicImport/2.ts (4 errors) ==== declare function bar(): boolean; const specify = bar() ? "./0" : undefined; let myModule = import(specify); diff --git a/tests/baselines/reference/importCallExpression5ES2018.js b/tests/baselines/reference/importCallExpression5ESNext.js similarity index 87% rename from tests/baselines/reference/importCallExpression5ES2018.js rename to tests/baselines/reference/importCallExpression5ESNext.js index 802988cedbc..1f4c789120b 100644 --- a/tests/baselines/reference/importCallExpression5ES2018.js +++ b/tests/baselines/reference/importCallExpression5ESNext.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression5ES2018.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpression6ES2018.errors.txt b/tests/baselines/reference/importCallExpression6ESNext.errors.txt similarity index 55% rename from tests/baselines/reference/importCallExpression6ES2018.errors.txt rename to tests/baselines/reference/importCallExpression6ESNext.errors.txt index 2e349408569..1703e0913d1 100644 --- a/tests/baselines/reference/importCallExpression6ES2018.errors.txt +++ b/tests/baselines/reference/importCallExpression6ESNext.errors.txt @@ -1,18 +1,18 @@ -tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. -tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. +tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. -==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== export class B { print() { return "I am B"} } export function foo() { return "foo" } -==== tests/cases/conformance/es2018/dynamicImport/1.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ==== export function backup() { return "backup"; } -==== tests/cases/conformance/es2018/dynamicImport/2.ts (2 errors) ==== +==== tests/cases/conformance/dynamicImport/2.ts (2 errors) ==== declare function bar(): boolean; const specify = bar() ? "./0" : undefined; let myModule = import(specify); diff --git a/tests/baselines/reference/importCallExpression6ES2018.js b/tests/baselines/reference/importCallExpression6ESNext.js similarity index 87% rename from tests/baselines/reference/importCallExpression6ES2018.js rename to tests/baselines/reference/importCallExpression6ESNext.js index cde74278f33..bdac7328f69 100644 --- a/tests/baselines/reference/importCallExpression6ES2018.js +++ b/tests/baselines/reference/importCallExpression6ESNext.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression6ES2018.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts] //// //// [0.ts] export class B { From 7d64ec94a0ec9e656b70cadc9532d15093ab719d Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 4 Jun 2017 21:18:42 -0700 Subject: [PATCH 120/134] Update baselines from moving out of es2018 --- src/harness/unittests/commandLineParsing.ts | 2 +- .../convertCompilerOptionsFromJson.ts | 2 +- ...tCallExpressionCheckReturntype1.errors.txt | 30 ++++++++--------- .../importCallExpressionCheckReturntype1.js | 2 +- ...portCallExpressionDeclarationEmit1.symbols | 2 +- ...importCallExpressionDeclarationEmit1.types | 2 +- ...tCallExpressionDeclarationEmit2.errors.txt | 8 ++--- .../importCallExpressionDeclarationEmit2.js | 2 +- .../importCallExpressionDeclarationEmit3.js | 2 +- ...portCallExpressionDeclarationEmit3.symbols | 4 +-- ...importCallExpressionDeclarationEmit3.types | 4 +-- .../reference/importCallExpressionES5AMD.js | 2 +- .../importCallExpressionES5AMD.symbols | 4 +-- .../importCallExpressionES5AMD.types | 26 +++++++-------- .../reference/importCallExpressionES5CJS.js | 2 +- .../importCallExpressionES5CJS.symbols | 4 +-- .../importCallExpressionES5CJS.types | 26 +++++++-------- .../importCallExpressionES5System.js | 2 +- .../importCallExpressionES5System.symbols | 4 +-- .../importCallExpressionES5System.types | 26 +++++++-------- .../reference/importCallExpressionES5UMD.js | 2 +- .../importCallExpressionES5UMD.symbols | 4 +-- .../importCallExpressionES5UMD.types | 26 +++++++-------- ...portCallExpressionErrorInES2015.errors.txt | 10 +++--- .../importCallExpressionErrorInES2015.js | 2 +- ...mportCallExpressionGrammarError.errors.txt | 16 +++++----- .../reference/importCallExpressionInAMD1.js | 2 +- .../importCallExpressionInAMD1.symbols | 4 +-- .../importCallExpressionInAMD1.types | 26 +++++++-------- .../reference/importCallExpressionInAMD2.js | 2 +- .../importCallExpressionInAMD2.symbols | 4 +-- .../importCallExpressionInAMD2.types | 6 ++-- .../reference/importCallExpressionInAMD3.js | 2 +- .../importCallExpressionInAMD3.symbols | 4 +-- .../importCallExpressionInAMD3.types | 10 +++--- .../reference/importCallExpressionInAMD4.js | 2 +- .../importCallExpressionInAMD4.symbols | 6 ++-- .../importCallExpressionInAMD4.types | 32 +++++++++---------- .../reference/importCallExpressionInCJS1.js | 2 +- .../importCallExpressionInCJS1.symbols | 4 +-- .../importCallExpressionInCJS1.types | 26 +++++++-------- .../reference/importCallExpressionInCJS2.js | 2 +- .../importCallExpressionInCJS2.symbols | 6 ++-- .../importCallExpressionInCJS2.types | 14 ++++---- .../reference/importCallExpressionInCJS3.js | 2 +- .../importCallExpressionInCJS3.symbols | 4 +-- .../importCallExpressionInCJS3.types | 6 ++-- .../reference/importCallExpressionInCJS4.js | 2 +- .../importCallExpressionInCJS4.symbols | 4 +-- .../importCallExpressionInCJS4.types | 10 +++--- .../reference/importCallExpressionInCJS5.js | 2 +- .../importCallExpressionInCJS5.symbols | 6 ++-- .../importCallExpressionInCJS5.types | 32 +++++++++---------- .../importCallExpressionInScriptContext1.js | 2 +- ...portCallExpressionInScriptContext1.symbols | 4 +-- ...importCallExpressionInScriptContext1.types | 8 ++--- ...tCallExpressionInScriptContext2.errors.txt | 6 ++-- .../importCallExpressionInScriptContext2.js | 2 +- .../importCallExpressionInSystem1.js | 2 +- .../importCallExpressionInSystem1.symbols | 4 +-- .../importCallExpressionInSystem1.types | 26 +++++++-------- .../importCallExpressionInSystem2.js | 2 +- .../importCallExpressionInSystem2.symbols | 4 +-- .../importCallExpressionInSystem2.types | 6 ++-- .../importCallExpressionInSystem3.js | 2 +- .../importCallExpressionInSystem3.symbols | 4 +-- .../importCallExpressionInSystem3.types | 10 +++--- .../importCallExpressionInSystem4.js | 2 +- .../importCallExpressionInSystem4.symbols | 6 ++-- .../importCallExpressionInSystem4.types | 32 +++++++++---------- .../reference/importCallExpressionInUMD1.js | 2 +- .../importCallExpressionInUMD1.symbols | 4 +-- .../importCallExpressionInUMD1.types | 26 +++++++-------- .../reference/importCallExpressionInUMD2.js | 2 +- .../importCallExpressionInUMD2.symbols | 4 +-- .../importCallExpressionInUMD2.types | 6 ++-- .../reference/importCallExpressionInUMD3.js | 2 +- .../importCallExpressionInUMD3.symbols | 4 +-- .../importCallExpressionInUMD3.types | 10 +++--- .../reference/importCallExpressionInUMD4.js | 2 +- .../importCallExpressionInUMD4.symbols | 6 ++-- .../importCallExpressionInUMD4.types | 32 +++++++++---------- .../importCallExpressionReturnPromiseOfAny.js | 2 +- ...rtCallExpressionReturnPromiseOfAny.symbols | 4 +-- ...portCallExpressionReturnPromiseOfAny.types | 4 +-- ...sionSpecifierNotStringTypeError.errors.txt | 12 +++---- ...tCallExpressionWithTypeArgument.errors.txt | 8 ++--- .../importCallExpressionWithTypeArgument.js | 2 +- ...ons module-kind is out-of-range.errors.txt | 4 +-- ...s target-script is out-of-range.errors.txt | 4 +-- 90 files changed, 350 insertions(+), 350 deletions(-) diff --git a/src/harness/unittests/commandLineParsing.ts b/src/harness/unittests/commandLineParsing.ts index fc600bb55b4..01a208aa330 100644 --- a/src/harness/unittests/commandLineParsing.ts +++ b/src/harness/unittests/commandLineParsing.ts @@ -113,7 +113,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2018'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, diff --git a/src/harness/unittests/convertCompilerOptionsFromJson.ts b/src/harness/unittests/convertCompilerOptionsFromJson.ts index 2fe4ba83aff..798f8c6a76b 100644 --- a/src/harness/unittests/convertCompilerOptionsFromJson.ts +++ b/src/harness/unittests/convertCompilerOptionsFromJson.ts @@ -122,7 +122,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2018'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt index adb904ce7fa..39622f39b3f 100644 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt @@ -1,30 +1,30 @@ -tests/cases/conformance/es2018/dynamicImport/1.ts(4,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. - Type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/es2018/dynamicImport/anotherModule"'. - Property 'D' is missing in type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"'. -tests/cases/conformance/es2018/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise' cannot be converted to type 'Promise'. - Type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/es2018/dynamicImport/anotherModule"'. - Property 'D' is missing in type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"'. +tests/cases/conformance/dynamicImport/1.ts(4,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. + Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. + Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. +tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise' cannot be converted to type 'Promise'. + Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. + Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. -==== tests/cases/conformance/es2018/dynamicImport/anotherModule.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/anotherModule.ts (0 errors) ==== export class D{} -==== tests/cases/conformance/es2018/dynamicImport/defaultPath.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/defaultPath.ts (0 errors) ==== export class C {} -==== tests/cases/conformance/es2018/dynamicImport/1.ts (2 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (2 errors) ==== import * as defaultModule from "./defaultPath"; import * as anotherModule from "./anotherModule"; let p1: Promise = import("./defaultPath"); ~~ -!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2322: Type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/es2018/dynamicImport/anotherModule"'. -!!! error TS2322: Property 'D' is missing in type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"'. +!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2322: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. +!!! error TS2322: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. let p2 = import("./defaultPath") as Promise; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Type 'Promise' cannot be converted to type 'Promise'. -!!! error TS2352: Type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/es2018/dynamicImport/anotherModule"'. -!!! error TS2352: Property 'D' is missing in type 'typeof "tests/cases/conformance/es2018/dynamicImport/defaultPath"'. +!!! error TS2352: Type 'Promise' cannot be converted to type 'Promise'. +!!! error TS2352: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. +!!! error TS2352: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. let p3: Promise = import("./defaultPath"); \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.js b/tests/baselines/reference/importCallExpressionCheckReturntype1.js index f317a799f13..facb6913388 100644 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.js +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionCheckReturntype1.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts] //// //// [anotherModule.ts] export class D{} diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols b/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols index 997911b9481..d2266cc768b 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit1.ts === +=== tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts === declare function getSpecifier(): string; >getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types index c45d3b3775e..db5400818c8 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit1.ts === +=== tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts === declare function getSpecifier(): string; >getSpecifier : () => string diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt b/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt index f397ee1e95f..6c394c98bdf 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es2018/dynamicImport/1.ts(1,5): error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/es2018/dynamicImport/0"' from external module "tests/cases/conformance/es2018/dynamicImport/0" but cannot be named. +tests/cases/conformance/dynamicImport/1.ts(1,5): error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. -==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== export function foo() { return "foo"; } -==== tests/cases/conformance/es2018/dynamicImport/1.ts (1 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== var p1 = import("./0"); ~~ -!!! error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/es2018/dynamicImport/0"' from external module "tests/cases/conformance/es2018/dynamicImport/0" but cannot be named. \ No newline at end of file +!!! error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js index 49dee5c9f99..7659e94ee81 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit2.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.js b/tests/baselines/reference/importCallExpressionDeclarationEmit3.js index 32775b00500..d38c2309a33 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit3.js +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit3.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionDeclarationEmit3.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols b/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols index 1e9e3ca9184..1491e05db55 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === declare function getPath(): string; >getPath : Symbol(getPath, Decl(1.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.types b/tests/baselines/reference/importCallExpressionDeclarationEmit3.types index a3e2b58157f..fe4552b708f 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit3.types +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit3.types @@ -1,9 +1,9 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === declare function getPath(): string; >getPath : () => string diff --git a/tests/baselines/reference/importCallExpressionES5AMD.js b/tests/baselines/reference/importCallExpressionES5AMD.js index fd402c163e9..cce61a5a3f9 100644 --- a/tests/baselines/reference/importCallExpressionES5AMD.js +++ b/tests/baselines/reference/importCallExpressionES5AMD.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5AMD.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionES5AMD.symbols b/tests/baselines/reference/importCallExpressionES5AMD.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionES5AMD.symbols +++ b/tests/baselines/reference/importCallExpressionES5AMD.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionES5AMD.types b/tests/baselines/reference/importCallExpressionES5AMD.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionES5AMD.types +++ b/tests/baselines/reference/importCallExpressionES5AMD.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionES5CJS.js b/tests/baselines/reference/importCallExpressionES5CJS.js index c5c4f5933a8..11d1bf46319 100644 --- a/tests/baselines/reference/importCallExpressionES5CJS.js +++ b/tests/baselines/reference/importCallExpressionES5CJS.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5CJS.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionES5CJS.symbols b/tests/baselines/reference/importCallExpressionES5CJS.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionES5CJS.symbols +++ b/tests/baselines/reference/importCallExpressionES5CJS.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionES5CJS.types b/tests/baselines/reference/importCallExpressionES5CJS.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionES5CJS.types +++ b/tests/baselines/reference/importCallExpressionES5CJS.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionES5System.js b/tests/baselines/reference/importCallExpressionES5System.js index e0b017370a0..1842fc6e60a 100644 --- a/tests/baselines/reference/importCallExpressionES5System.js +++ b/tests/baselines/reference/importCallExpressionES5System.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5System.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionES5System.symbols b/tests/baselines/reference/importCallExpressionES5System.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionES5System.symbols +++ b/tests/baselines/reference/importCallExpressionES5System.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionES5System.types b/tests/baselines/reference/importCallExpressionES5System.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionES5System.types +++ b/tests/baselines/reference/importCallExpressionES5System.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionES5UMD.js b/tests/baselines/reference/importCallExpressionES5UMD.js index 2952a43cd24..dfe6813839c 100644 --- a/tests/baselines/reference/importCallExpressionES5UMD.js +++ b/tests/baselines/reference/importCallExpressionES5UMD.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionES5UMD.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionES5UMD.symbols b/tests/baselines/reference/importCallExpressionES5UMD.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionES5UMD.symbols +++ b/tests/baselines/reference/importCallExpressionES5UMD.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionES5UMD.types b/tests/baselines/reference/importCallExpressionES5UMD.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionES5UMD.types +++ b/tests/baselines/reference/importCallExpressionES5UMD.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt index 0c31a0f434c..d47980d1312 100644 --- a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt +++ b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/es2018/dynamicImport/1.ts(1,1): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. -tests/cases/conformance/es2018/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. -tests/cases/conformance/es2018/dynamicImport/1.ts(8,16): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. -==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== export function foo() { return "foo"; } -==== tests/cases/conformance/es2018/dynamicImport/1.ts (3 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (3 errors) ==== import("./0"); ~~~~~~~~~~~~~ !!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.js b/tests/baselines/reference/importCallExpressionErrorInES2015.js index afe29bbe9ca..f07486504ee 100644 --- a/tests/baselines/reference/importCallExpressionErrorInES2015.js +++ b/tests/baselines/reference/importCallExpressionErrorInES2015.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionErrorInES2015.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt index c0684edaabe..6d64808e111 100644 --- a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt +++ b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1325: Specifier of dynamic import cannot be spread element. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS1135: Argument expression expected. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1324: Dynamic import must have one specifier as an argument. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(10,19): error TS2307: Cannot find module 'pathToModule'. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1325: Specifier of dynamic import cannot be spread element. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS1135: Argument expression expected. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1324: Dynamic import must have one specifier as an argument. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(10,19): error TS2307: Cannot find module 'pathToModule'. -==== tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts (7 errors) ==== +==== tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts (7 errors) ==== declare function getSpecifier(): string; declare var whatToLoad: boolean; diff --git a/tests/baselines/reference/importCallExpressionInAMD1.js b/tests/baselines/reference/importCallExpressionInAMD1.js index b55066a1b6a..e1758173646 100644 --- a/tests/baselines/reference/importCallExpressionInAMD1.js +++ b/tests/baselines/reference/importCallExpressionInAMD1.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD1.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInAMD1.symbols b/tests/baselines/reference/importCallExpressionInAMD1.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionInAMD1.symbols +++ b/tests/baselines/reference/importCallExpressionInAMD1.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionInAMD1.types b/tests/baselines/reference/importCallExpressionInAMD1.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionInAMD1.types +++ b/tests/baselines/reference/importCallExpressionInAMD1.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionInAMD2.js b/tests/baselines/reference/importCallExpressionInAMD2.js index bac579d0507..7347e2f8105 100644 --- a/tests/baselines/reference/importCallExpressionInAMD2.js +++ b/tests/baselines/reference/importCallExpressionInAMD2.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD2.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInAMD2.symbols b/tests/baselines/reference/importCallExpressionInAMD2.symbols index 7db47944520..16fc79c774f 100644 --- a/tests/baselines/reference/importCallExpressionInAMD2.symbols +++ b/tests/baselines/reference/importCallExpressionInAMD2.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInAMD2.types b/tests/baselines/reference/importCallExpressionInAMD2.types index 2db06142911..44b17eb51fd 100644 --- a/tests/baselines/reference/importCallExpressionInAMD2.types +++ b/tests/baselines/reference/importCallExpressionInAMD2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,7 +7,7 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : (x: Promise) => void @@ -41,6 +41,6 @@ function foo(x: Promise) { foo(import("./0")); >foo(import("./0")) : void >foo : (x: Promise) => void ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" diff --git a/tests/baselines/reference/importCallExpressionInAMD3.js b/tests/baselines/reference/importCallExpressionInAMD3.js index 6245f437398..471f35a6415 100644 --- a/tests/baselines/reference/importCallExpressionInAMD3.js +++ b/tests/baselines/reference/importCallExpressionInAMD3.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD3.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInAMD3.symbols b/tests/baselines/reference/importCallExpressionInAMD3.symbols index 06b328f5745..5ca85d6e693 100644 --- a/tests/baselines/reference/importCallExpressionInAMD3.symbols +++ b/tests/baselines/reference/importCallExpressionInAMD3.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInAMD3.types b/tests/baselines/reference/importCallExpressionInAMD3.types index e88ddd04431..e517be6e722 100644 --- a/tests/baselines/reference/importCallExpressionInAMD3.types +++ b/tests/baselines/reference/importCallExpressionInAMD3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,16 +7,16 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : () => Promise class C extends (await import("./0")).B {} >C : C >(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->import("./0") : Promise +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise >"./0" : "./0" >B : typeof B diff --git a/tests/baselines/reference/importCallExpressionInAMD4.js b/tests/baselines/reference/importCallExpressionInAMD4.js index d498b3df080..6e50e139116 100644 --- a/tests/baselines/reference/importCallExpressionInAMD4.js +++ b/tests/baselines/reference/importCallExpressionInAMD4.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInAMD4.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInAMD4.symbols b/tests/baselines/reference/importCallExpressionInAMD4.symbols index 1d2a9aec25c..34a1dcf4d7b 100644 --- a/tests/baselines/reference/importCallExpressionInAMD4.symbols +++ b/tests/baselines/reference/importCallExpressionInAMD4.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -9,11 +9,11 @@ export class B { export function foo() { return "foo" } >foo : Symbol(foo, Decl(0.ts, 2, 1)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : Symbol(backup, Decl(1.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : Symbol(console, Decl(2.ts, 0, 11)) diff --git a/tests/baselines/reference/importCallExpressionInAMD4.types b/tests/baselines/reference/importCallExpressionInAMD4.types index 6da36879f64..2ea666ba672 100644 --- a/tests/baselines/reference/importCallExpressionInAMD4.types +++ b/tests/baselines/reference/importCallExpressionInAMD4.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -11,12 +11,12 @@ export function foo() { return "foo" } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : () => string >"backup" : "backup" -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : any @@ -24,8 +24,8 @@ class C { >C : C private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise +>myModule : Promise +>import("./0") : Promise >"./0" : "./0" method() { @@ -33,13 +33,13 @@ class C { this.myModule.then(Zero => { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise >this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" console.log(Zero.foo()); >console.log(Zero.foo()) : any @@ -48,7 +48,7 @@ class C { >log : any >Zero.foo() : string >Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>Zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }, async err => { @@ -63,9 +63,9 @@ class C { >err : any let one = await import("./1"); ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->import("./1") : Promise +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise >"./1" : "./1" console.log(one.backup()); @@ -75,7 +75,7 @@ class C { >log : any >one.backup() : string >one.backup : () => string ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" +>one : typeof "tests/cases/conformance/dynamicImport/1" >backup : () => string }); diff --git a/tests/baselines/reference/importCallExpressionInCJS1.js b/tests/baselines/reference/importCallExpressionInCJS1.js index 1b0783fe018..3fb298b5bde 100644 --- a/tests/baselines/reference/importCallExpressionInCJS1.js +++ b/tests/baselines/reference/importCallExpressionInCJS1.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS1.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInCJS1.symbols b/tests/baselines/reference/importCallExpressionInCJS1.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionInCJS1.symbols +++ b/tests/baselines/reference/importCallExpressionInCJS1.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionInCJS1.types b/tests/baselines/reference/importCallExpressionInCJS1.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionInCJS1.types +++ b/tests/baselines/reference/importCallExpressionInCJS1.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionInCJS2.js b/tests/baselines/reference/importCallExpressionInCJS2.js index 4a845e2e4e3..aa983a7a2fe 100644 --- a/tests/baselines/reference/importCallExpressionInCJS2.js +++ b/tests/baselines/reference/importCallExpressionInCJS2.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS2.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInCJS2.symbols b/tests/baselines/reference/importCallExpressionInCJS2.symbols index 8a62908868c..24f7a5cdb48 100644 --- a/tests/baselines/reference/importCallExpressionInCJS2.symbols +++ b/tests/baselines/reference/importCallExpressionInCJS2.symbols @@ -1,12 +1,12 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : Symbol(backup, Decl(1.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function compute(promise: Promise) { >compute : Symbol(compute, Decl(2.ts, 0, 0)) >promise : Symbol(promise, Decl(2.ts, 0, 23)) diff --git a/tests/baselines/reference/importCallExpressionInCJS2.types b/tests/baselines/reference/importCallExpressionInCJS2.types index 88317f387fe..063a5224539 100644 --- a/tests/baselines/reference/importCallExpressionInCJS2.types +++ b/tests/baselines/reference/importCallExpressionInCJS2.types @@ -1,14 +1,14 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : () => string >"backup" : "backup" -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function compute(promise: Promise) { >compute : (promise: Promise) => Promise >promise : Promise @@ -24,10 +24,10 @@ async function compute(promise: Promise) { >j : any j = await import("./1"); ->j = await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" +>j = await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" >j : any ->await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->import("./1") : Promise +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise >"./1" : "./1" return j.backup(); @@ -46,6 +46,6 @@ async function compute(promise: Promise) { compute(import("./0")); >compute(import("./0")) : Promise >compute : (promise: Promise) => Promise ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" diff --git a/tests/baselines/reference/importCallExpressionInCJS3.js b/tests/baselines/reference/importCallExpressionInCJS3.js index a55f57c5674..2f956d9ac3a 100644 --- a/tests/baselines/reference/importCallExpressionInCJS3.js +++ b/tests/baselines/reference/importCallExpressionInCJS3.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS3.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInCJS3.symbols b/tests/baselines/reference/importCallExpressionInCJS3.symbols index 7db47944520..16fc79c774f 100644 --- a/tests/baselines/reference/importCallExpressionInCJS3.symbols +++ b/tests/baselines/reference/importCallExpressionInCJS3.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInCJS3.types b/tests/baselines/reference/importCallExpressionInCJS3.types index 2db06142911..44b17eb51fd 100644 --- a/tests/baselines/reference/importCallExpressionInCJS3.types +++ b/tests/baselines/reference/importCallExpressionInCJS3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,7 +7,7 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : (x: Promise) => void @@ -41,6 +41,6 @@ function foo(x: Promise) { foo(import("./0")); >foo(import("./0")) : void >foo : (x: Promise) => void ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" diff --git a/tests/baselines/reference/importCallExpressionInCJS4.js b/tests/baselines/reference/importCallExpressionInCJS4.js index 0264be113ee..554a0b222ab 100644 --- a/tests/baselines/reference/importCallExpressionInCJS4.js +++ b/tests/baselines/reference/importCallExpressionInCJS4.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS4.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInCJS4.symbols b/tests/baselines/reference/importCallExpressionInCJS4.symbols index 06b328f5745..5ca85d6e693 100644 --- a/tests/baselines/reference/importCallExpressionInCJS4.symbols +++ b/tests/baselines/reference/importCallExpressionInCJS4.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInCJS4.types b/tests/baselines/reference/importCallExpressionInCJS4.types index e88ddd04431..e517be6e722 100644 --- a/tests/baselines/reference/importCallExpressionInCJS4.types +++ b/tests/baselines/reference/importCallExpressionInCJS4.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,16 +7,16 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : () => Promise class C extends (await import("./0")).B {} >C : C >(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->import("./0") : Promise +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise >"./0" : "./0" >B : typeof B diff --git a/tests/baselines/reference/importCallExpressionInCJS5.js b/tests/baselines/reference/importCallExpressionInCJS5.js index 196c37e6e72..762da592827 100644 --- a/tests/baselines/reference/importCallExpressionInCJS5.js +++ b/tests/baselines/reference/importCallExpressionInCJS5.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInCJS5.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInCJS5.symbols b/tests/baselines/reference/importCallExpressionInCJS5.symbols index 1d2a9aec25c..34a1dcf4d7b 100644 --- a/tests/baselines/reference/importCallExpressionInCJS5.symbols +++ b/tests/baselines/reference/importCallExpressionInCJS5.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -9,11 +9,11 @@ export class B { export function foo() { return "foo" } >foo : Symbol(foo, Decl(0.ts, 2, 1)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : Symbol(backup, Decl(1.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : Symbol(console, Decl(2.ts, 0, 11)) diff --git a/tests/baselines/reference/importCallExpressionInCJS5.types b/tests/baselines/reference/importCallExpressionInCJS5.types index 6da36879f64..2ea666ba672 100644 --- a/tests/baselines/reference/importCallExpressionInCJS5.types +++ b/tests/baselines/reference/importCallExpressionInCJS5.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -11,12 +11,12 @@ export function foo() { return "foo" } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : () => string >"backup" : "backup" -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : any @@ -24,8 +24,8 @@ class C { >C : C private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise +>myModule : Promise +>import("./0") : Promise >"./0" : "./0" method() { @@ -33,13 +33,13 @@ class C { this.myModule.then(Zero => { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise >this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" console.log(Zero.foo()); >console.log(Zero.foo()) : any @@ -48,7 +48,7 @@ class C { >log : any >Zero.foo() : string >Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>Zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }, async err => { @@ -63,9 +63,9 @@ class C { >err : any let one = await import("./1"); ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->import("./1") : Promise +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise >"./1" : "./1" console.log(one.backup()); @@ -75,7 +75,7 @@ class C { >log : any >one.backup() : string >one.backup : () => string ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" +>one : typeof "tests/cases/conformance/dynamicImport/1" >backup : () => string }); diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.js b/tests/baselines/reference/importCallExpressionInScriptContext1.js index 68e51497d14..2c2d2f904d5 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.js +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext1.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.symbols b/tests/baselines/reference/importCallExpressionInScriptContext1.symbols index 21e63635ed4..513612056a8 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.symbols +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 0, 3)) diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.types b/tests/baselines/reference/importCallExpressionInScriptContext1.types index 82e00221e33..c318667c7d8 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.types +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.types @@ -1,12 +1,12 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" function arguments() { } // this is allow as the file doesn't have implicit "use strict" diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt b/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt index d87798eb0c9..9020963f68f 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt +++ b/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/es2018/dynamicImport/1.ts(3,10): error TS1100: Invalid use of 'arguments' in strict mode. +tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1100: Invalid use of 'arguments' in strict mode. -==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== export function foo() { return "foo"; } -==== tests/cases/conformance/es2018/dynamicImport/1.ts (1 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== "use strict" var p1 = import("./0"); function arguments() { } diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.js b/tests/baselines/reference/importCallExpressionInScriptContext2.js index f8bf268468c..6b6e0109fda 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext2.js +++ b/tests/baselines/reference/importCallExpressionInScriptContext2.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext2.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInSystem1.js b/tests/baselines/reference/importCallExpressionInSystem1.js index d200111c70c..d74eb6ffc76 100644 --- a/tests/baselines/reference/importCallExpressionInSystem1.js +++ b/tests/baselines/reference/importCallExpressionInSystem1.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem1.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInSystem1.symbols b/tests/baselines/reference/importCallExpressionInSystem1.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionInSystem1.symbols +++ b/tests/baselines/reference/importCallExpressionInSystem1.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionInSystem1.types b/tests/baselines/reference/importCallExpressionInSystem1.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionInSystem1.types +++ b/tests/baselines/reference/importCallExpressionInSystem1.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionInSystem2.js b/tests/baselines/reference/importCallExpressionInSystem2.js index 704af5822b3..ea84e47e63c 100644 --- a/tests/baselines/reference/importCallExpressionInSystem2.js +++ b/tests/baselines/reference/importCallExpressionInSystem2.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem2.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInSystem2.symbols b/tests/baselines/reference/importCallExpressionInSystem2.symbols index 7db47944520..16fc79c774f 100644 --- a/tests/baselines/reference/importCallExpressionInSystem2.symbols +++ b/tests/baselines/reference/importCallExpressionInSystem2.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInSystem2.types b/tests/baselines/reference/importCallExpressionInSystem2.types index 2db06142911..44b17eb51fd 100644 --- a/tests/baselines/reference/importCallExpressionInSystem2.types +++ b/tests/baselines/reference/importCallExpressionInSystem2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,7 +7,7 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : (x: Promise) => void @@ -41,6 +41,6 @@ function foo(x: Promise) { foo(import("./0")); >foo(import("./0")) : void >foo : (x: Promise) => void ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" diff --git a/tests/baselines/reference/importCallExpressionInSystem3.js b/tests/baselines/reference/importCallExpressionInSystem3.js index cdc6856d96b..309be9114fe 100644 --- a/tests/baselines/reference/importCallExpressionInSystem3.js +++ b/tests/baselines/reference/importCallExpressionInSystem3.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem3.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInSystem3.symbols b/tests/baselines/reference/importCallExpressionInSystem3.symbols index 06b328f5745..5ca85d6e693 100644 --- a/tests/baselines/reference/importCallExpressionInSystem3.symbols +++ b/tests/baselines/reference/importCallExpressionInSystem3.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInSystem3.types b/tests/baselines/reference/importCallExpressionInSystem3.types index e88ddd04431..e517be6e722 100644 --- a/tests/baselines/reference/importCallExpressionInSystem3.types +++ b/tests/baselines/reference/importCallExpressionInSystem3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,16 +7,16 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : () => Promise class C extends (await import("./0")).B {} >C : C >(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->import("./0") : Promise +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise >"./0" : "./0" >B : typeof B diff --git a/tests/baselines/reference/importCallExpressionInSystem4.js b/tests/baselines/reference/importCallExpressionInSystem4.js index 81562b65212..ac01a0439e8 100644 --- a/tests/baselines/reference/importCallExpressionInSystem4.js +++ b/tests/baselines/reference/importCallExpressionInSystem4.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInSystem4.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInSystem4.symbols b/tests/baselines/reference/importCallExpressionInSystem4.symbols index 1d2a9aec25c..34a1dcf4d7b 100644 --- a/tests/baselines/reference/importCallExpressionInSystem4.symbols +++ b/tests/baselines/reference/importCallExpressionInSystem4.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -9,11 +9,11 @@ export class B { export function foo() { return "foo" } >foo : Symbol(foo, Decl(0.ts, 2, 1)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : Symbol(backup, Decl(1.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : Symbol(console, Decl(2.ts, 0, 11)) diff --git a/tests/baselines/reference/importCallExpressionInSystem4.types b/tests/baselines/reference/importCallExpressionInSystem4.types index 6da36879f64..2ea666ba672 100644 --- a/tests/baselines/reference/importCallExpressionInSystem4.types +++ b/tests/baselines/reference/importCallExpressionInSystem4.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -11,12 +11,12 @@ export function foo() { return "foo" } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : () => string >"backup" : "backup" -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : any @@ -24,8 +24,8 @@ class C { >C : C private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise +>myModule : Promise +>import("./0") : Promise >"./0" : "./0" method() { @@ -33,13 +33,13 @@ class C { this.myModule.then(Zero => { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise >this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" console.log(Zero.foo()); >console.log(Zero.foo()) : any @@ -48,7 +48,7 @@ class C { >log : any >Zero.foo() : string >Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>Zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }, async err => { @@ -63,9 +63,9 @@ class C { >err : any let one = await import("./1"); ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->import("./1") : Promise +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise >"./1" : "./1" console.log(one.backup()); @@ -75,7 +75,7 @@ class C { >log : any >one.backup() : string >one.backup : () => string ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" +>one : typeof "tests/cases/conformance/dynamicImport/1" >backup : () => string }); diff --git a/tests/baselines/reference/importCallExpressionInUMD1.js b/tests/baselines/reference/importCallExpressionInUMD1.js index 0886da93287..f1bfcd3cc71 100644 --- a/tests/baselines/reference/importCallExpressionInUMD1.js +++ b/tests/baselines/reference/importCallExpressionInUMD1.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD1.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/importCallExpressionInUMD1.symbols b/tests/baselines/reference/importCallExpressionInUMD1.symbols index 15356c694ed..333251da662 100644 --- a/tests/baselines/reference/importCallExpressionInUMD1.symbols +++ b/tests/baselines/reference/importCallExpressionInUMD1.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : Symbol(foo, Decl(0.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); var p1 = import("./0"); >p1 : Symbol(p1, Decl(1.ts, 1, 3)) diff --git a/tests/baselines/reference/importCallExpressionInUMD1.types b/tests/baselines/reference/importCallExpressionInUMD1.types index 2733f3ff14a..59da055ee01 100644 --- a/tests/baselines/reference/importCallExpressionInUMD1.types +++ b/tests/baselines/reference/importCallExpressionInUMD1.types @@ -1,30 +1,30 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export function foo() { return "foo"; } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import("./0"); ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise +>p1 : Promise +>import("./0") : Promise >"./0" : "./0" p1.then(zero => { >p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" return zero.foo(); >zero.foo() : string >zero.foo : () => string ->zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }); @@ -33,7 +33,7 @@ function foo() { >foo : () => void const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise +>p2 : Promise +>import("./0") : Promise >"./0" : "./0" } diff --git a/tests/baselines/reference/importCallExpressionInUMD2.js b/tests/baselines/reference/importCallExpressionInUMD2.js index 1e268403088..db8b87a2f79 100644 --- a/tests/baselines/reference/importCallExpressionInUMD2.js +++ b/tests/baselines/reference/importCallExpressionInUMD2.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD2.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInUMD2.symbols b/tests/baselines/reference/importCallExpressionInUMD2.symbols index 7db47944520..16fc79c774f 100644 --- a/tests/baselines/reference/importCallExpressionInUMD2.symbols +++ b/tests/baselines/reference/importCallExpressionInUMD2.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInUMD2.types b/tests/baselines/reference/importCallExpressionInUMD2.types index 2db06142911..44b17eb51fd 100644 --- a/tests/baselines/reference/importCallExpressionInUMD2.types +++ b/tests/baselines/reference/importCallExpressionInUMD2.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,7 +7,7 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === // We use Promise for now as there is no way to specify shape of module object function foo(x: Promise) { >foo : (x: Promise) => void @@ -41,6 +41,6 @@ function foo(x: Promise) { foo(import("./0")); >foo(import("./0")) : void >foo : (x: Promise) => void ->import("./0") : Promise +>import("./0") : Promise >"./0" : "./0" diff --git a/tests/baselines/reference/importCallExpressionInUMD3.js b/tests/baselines/reference/importCallExpressionInUMD3.js index 228c43fd0a2..41106e3ab78 100644 --- a/tests/baselines/reference/importCallExpressionInUMD3.js +++ b/tests/baselines/reference/importCallExpressionInUMD3.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD3.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInUMD3.symbols b/tests/baselines/reference/importCallExpressionInUMD3.symbols index 06b328f5745..5ca85d6e693 100644 --- a/tests/baselines/reference/importCallExpressionInUMD3.symbols +++ b/tests/baselines/reference/importCallExpressionInUMD3.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -6,7 +6,7 @@ export class B { >print : Symbol(B.print, Decl(0.ts, 0, 16)) } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : Symbol(foo, Decl(2.ts, 0, 0)) diff --git a/tests/baselines/reference/importCallExpressionInUMD3.types b/tests/baselines/reference/importCallExpressionInUMD3.types index e88ddd04431..e517be6e722 100644 --- a/tests/baselines/reference/importCallExpressionInUMD3.types +++ b/tests/baselines/reference/importCallExpressionInUMD3.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -7,16 +7,16 @@ export class B { >"I am B" : "I am B" } -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === async function foo() { >foo : () => Promise class C extends (await import("./0")).B {} >C : C >(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/es2018/dynamicImport/0" ->import("./0") : Promise +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise >"./0" : "./0" >B : typeof B diff --git a/tests/baselines/reference/importCallExpressionInUMD4.js b/tests/baselines/reference/importCallExpressionInUMD4.js index 677ba8c3d27..47ba83b1718 100644 --- a/tests/baselines/reference/importCallExpressionInUMD4.js +++ b/tests/baselines/reference/importCallExpressionInUMD4.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInUMD4.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts] //// //// [0.ts] export class B { diff --git a/tests/baselines/reference/importCallExpressionInUMD4.symbols b/tests/baselines/reference/importCallExpressionInUMD4.symbols index 1d2a9aec25c..34a1dcf4d7b 100644 --- a/tests/baselines/reference/importCallExpressionInUMD4.symbols +++ b/tests/baselines/reference/importCallExpressionInUMD4.symbols @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : Symbol(B, Decl(0.ts, 0, 0)) @@ -9,11 +9,11 @@ export class B { export function foo() { return "foo" } >foo : Symbol(foo, Decl(0.ts, 2, 1)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : Symbol(backup, Decl(1.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : Symbol(console, Decl(2.ts, 0, 11)) diff --git a/tests/baselines/reference/importCallExpressionInUMD4.types b/tests/baselines/reference/importCallExpressionInUMD4.types index 6da36879f64..2ea666ba672 100644 --- a/tests/baselines/reference/importCallExpressionInUMD4.types +++ b/tests/baselines/reference/importCallExpressionInUMD4.types @@ -1,4 +1,4 @@ -=== tests/cases/conformance/es2018/dynamicImport/0.ts === +=== tests/cases/conformance/dynamicImport/0.ts === export class B { >B : B @@ -11,12 +11,12 @@ export function foo() { return "foo" } >foo : () => string >"foo" : "foo" -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === export function backup() { return "backup"; } >backup : () => string >"backup" : "backup" -=== tests/cases/conformance/es2018/dynamicImport/2.ts === +=== tests/cases/conformance/dynamicImport/2.ts === declare var console: any; >console : any @@ -24,8 +24,8 @@ class C { >C : C private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise +>myModule : Promise +>import("./0") : Promise >"./0" : "./0" method() { @@ -33,13 +33,13 @@ class C { this.myModule.then(Zero => { >this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise >this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" console.log(Zero.foo()); >console.log(Zero.foo()) : any @@ -48,7 +48,7 @@ class C { >log : any >Zero.foo() : string >Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0" +>Zero : typeof "tests/cases/conformance/dynamicImport/0" >foo : () => string }, async err => { @@ -63,9 +63,9 @@ class C { >err : any let one = await import("./1"); ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1" ->import("./1") : Promise +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise >"./1" : "./1" console.log(one.backup()); @@ -75,7 +75,7 @@ class C { >log : any >one.backup() : string >one.backup : () => string ->one : typeof "tests/cases/conformance/es2018/dynamicImport/1" +>one : typeof "tests/cases/conformance/dynamicImport/1" >backup : () => string }); diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js index d9dba458296..728d6636953 100644 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionReturnPromiseOfAny.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts] //// //// [defaultPath.ts] export class C {} diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols index 275bedd4c93..0d46961475f 100644 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/defaultPath.ts === +=== tests/cases/conformance/dynamicImport/defaultPath.ts === export class C {} >C : Symbol(C, Decl(defaultPath.ts, 0, 0)) -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import * as defaultModule from "./defaultPath"; >defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types index 4337e970bd1..fc52b38c1fb 100644 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types @@ -1,8 +1,8 @@ -=== tests/cases/conformance/es2018/dynamicImport/defaultPath.ts === +=== tests/cases/conformance/dynamicImport/defaultPath.ts === export class C {} >C : C -=== tests/cases/conformance/es2018/dynamicImport/1.ts === +=== tests/cases/conformance/dynamicImport/1.ts === import * as defaultModule from "./defaultPath"; >defaultModule : typeof defaultModule diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt index dd705582827..a1159a31ebd 100644 --- a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt +++ b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(5,8): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(6,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(7,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(12,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'. -tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(13,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(5,8): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(6,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(7,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(12,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(13,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'. -==== tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts (5 errors) ==== +==== tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts (5 errors) ==== declare function getSpecifier(): boolean; declare var whatToLoad: boolean; diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt index f9375ec695f..8adf2789585 100644 --- a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt +++ b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es2018/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments -tests/cases/conformance/es2018/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments +tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments +tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments -==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ==== +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== export function foo() { return "foo"; } -==== tests/cases/conformance/es2018/dynamicImport/1.ts (2 errors) ==== +==== tests/cases/conformance/dynamicImport/1.ts (2 errors) ==== "use strict" var p1 = import>("./0"); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.js b/tests/baselines/reference/importCallExpressionWithTypeArgument.js index de487bc45cc..d8690cf5d75 100644 --- a/tests/baselines/reference/importCallExpressionWithTypeArgument.js +++ b/tests/baselines/reference/importCallExpressionWithTypeArgument.js @@ -1,4 +1,4 @@ -//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionWithTypeArgument.ts] //// +//// [tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts] //// //// [0.ts] export function foo() { return "foo"; } diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt index 16fb5e7b205..f746915da7d 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2018'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2018'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt index 16fb5e7b205..f746915da7d 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2018'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2018'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. ==== file.ts (0 errors) ==== \ No newline at end of file From 1729ea860925485616de87e751eccdd7c81a2f5e Mon Sep 17 00:00:00 2001 From: Yui T Date: Sun, 4 Jun 2017 21:18:52 -0700 Subject: [PATCH 121/134] Update command line --- src/compiler/commandLineParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index adb6a0df189..23efd047e46 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -100,7 +100,7 @@ namespace ts { "umd": ModuleKind.UMD, "es6": ModuleKind.ES2015, "es2015": ModuleKind.ES2015, - "es2018": ModuleKind.ESNext + "esnext": ModuleKind.ESNext }), paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, From ccc60c8b3b75476c4b11abb6ab4d2e6f06214f8f Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 5 Jun 2017 10:49:20 -0700 Subject: [PATCH 122/134] Revert "[Master] wip-dynamic import" (#16264) --- src/compiler/binder.ts | 6 +- src/compiler/checker.ts | 70 +-------- src/compiler/commandLineParser.ts | 3 +- src/compiler/diagnosticMessages.json | 36 +---- src/compiler/emitter.ts | 1 - src/compiler/parser.ts | 67 ++++----- src/compiler/program.ts | 13 +- src/compiler/transformer.ts | 1 - src/compiler/transformers/module/module.ts | 137 ++---------------- src/compiler/transformers/module/system.ts | 74 ++++------ src/compiler/types.ts | 43 ++---- src/compiler/utilities.ts | 4 - src/harness/harness.ts | 1 - src/harness/unittests/commandLineParsing.ts | 2 +- .../convertCompilerOptionsFromJson.ts | 2 +- src/services/services.ts | 3 +- .../reference/importCallExpression1ESNext.js | 27 ---- .../importCallExpression1ESNext.symbols | 28 ---- .../importCallExpression1ESNext.types | 39 ----- .../reference/importCallExpression2ESNext.js | 29 ---- .../importCallExpression2ESNext.symbols | 33 ----- .../importCallExpression2ESNext.types | 45 ------ .../reference/importCallExpression3ESNext.js | 27 ---- .../importCallExpression3ESNext.symbols | 29 ---- .../importCallExpression3ESNext.types | 37 ----- .../reference/importCallExpression4ESNext.js | 49 ------- .../importCallExpression4ESNext.symbols | 61 -------- .../importCallExpression4ESNext.types | 83 ----------- .../importCallExpression5ESNext.errors.txt | 31 ---- .../reference/importCallExpression5ESNext.js | 33 ----- .../importCallExpression6ESNext.errors.txt | 25 ---- .../reference/importCallExpression6ESNext.js | 33 ----- ...tCallExpressionCheckReturntype1.errors.txt | 30 ---- .../importCallExpressionCheckReturntype1.js | 35 ----- .../importCallExpressionDeclarationEmit1.js | 35 ----- ...portCallExpressionDeclarationEmit1.symbols | 36 ----- ...importCallExpressionDeclarationEmit1.types | 47 ------ ...tCallExpressionDeclarationEmit2.errors.txt | 10 -- .../importCallExpressionDeclarationEmit2.js | 16 -- .../importCallExpressionDeclarationEmit3.js | 31 ---- ...portCallExpressionDeclarationEmit3.symbols | 28 ---- ...importCallExpressionDeclarationEmit3.types | 37 ----- .../reference/importCallExpressionES5AMD.js | 35 ----- .../importCallExpressionES5AMD.symbols | 28 ---- .../importCallExpressionES5AMD.types | 39 ----- .../reference/importCallExpressionES5CJS.js | 30 ---- .../importCallExpressionES5CJS.symbols | 28 ---- .../importCallExpressionES5CJS.types | 39 ----- .../importCallExpressionES5System.js | 46 ------ .../importCallExpressionES5System.symbols | 28 ---- .../importCallExpressionES5System.types | 39 ----- .../reference/importCallExpressionES5UMD.js | 52 ------- .../importCallExpressionES5UMD.symbols | 28 ---- .../importCallExpressionES5UMD.types | 39 ----- ...portCallExpressionErrorInES2015.errors.txt | 24 --- .../importCallExpressionErrorInES2015.js | 27 ---- ...mportCallExpressionGrammarError.errors.txt | 34 ----- .../importCallExpressionGrammarError.js | 19 --- .../reference/importCallExpressionInAMD1.js | 35 ----- .../importCallExpressionInAMD1.symbols | 28 ---- .../importCallExpressionInAMD1.types | 39 ----- .../reference/importCallExpressionInAMD2.js | 39 ----- .../importCallExpressionInAMD2.symbols | 34 ----- .../importCallExpressionInAMD2.types | 46 ------ .../reference/importCallExpressionInAMD3.js | 35 ----- .../importCallExpressionInAMD3.symbols | 29 ---- .../importCallExpressionInAMD3.types | 37 ----- .../reference/importCallExpressionInAMD4.js | 63 -------- .../importCallExpressionInAMD4.symbols | 61 -------- .../importCallExpressionInAMD4.types | 83 ----------- .../reference/importCallExpressionInCJS1.js | 30 ---- .../importCallExpressionInCJS1.symbols | 28 ---- .../importCallExpressionInCJS1.types | 39 ----- .../reference/importCallExpressionInCJS2.js | 40 ----- .../importCallExpressionInCJS2.symbols | 34 ----- .../importCallExpressionInCJS2.types | 51 ------- .../reference/importCallExpressionInCJS3.js | 34 ----- .../importCallExpressionInCJS3.symbols | 34 ----- .../importCallExpressionInCJS3.types | 46 ------ .../reference/importCallExpressionInCJS4.js | 30 ---- .../importCallExpressionInCJS4.symbols | 29 ---- .../importCallExpressionInCJS4.types | 37 ----- .../reference/importCallExpressionInCJS5.js | 56 ------- .../importCallExpressionInCJS5.symbols | 61 -------- .../importCallExpressionInCJS5.types | 83 ----------- .../importCallExpressionInScriptContext1.js | 17 --- ...portCallExpressionInScriptContext1.symbols | 11 -- ...importCallExpressionInScriptContext1.types | 14 -- ...tCallExpressionInScriptContext2.errors.txt | 12 -- .../importCallExpressionInScriptContext2.js | 19 --- .../importCallExpressionInSystem1.js | 46 ------ .../importCallExpressionInSystem1.symbols | 28 ---- .../importCallExpressionInSystem1.types | 39 ----- .../importCallExpressionInSystem2.js | 50 ------- .../importCallExpressionInSystem2.symbols | 34 ----- .../importCallExpressionInSystem2.types | 46 ------ .../importCallExpressionInSystem3.js | 46 ------ .../importCallExpressionInSystem3.symbols | 29 ---- .../importCallExpressionInSystem3.types | 37 ----- .../importCallExpressionInSystem4.js | 80 ---------- .../importCallExpressionInSystem4.symbols | 61 -------- .../importCallExpressionInSystem4.types | 83 ----------- .../reference/importCallExpressionInUMD1.js | 52 ------- .../importCallExpressionInUMD1.symbols | 28 ---- .../importCallExpressionInUMD1.types | 39 ----- .../reference/importCallExpressionInUMD2.js | 56 ------- .../importCallExpressionInUMD2.symbols | 34 ----- .../importCallExpressionInUMD2.types | 46 ------ .../reference/importCallExpressionInUMD3.js | 52 ------- .../importCallExpressionInUMD3.symbols | 29 ---- .../importCallExpressionInUMD3.types | 37 ----- .../reference/importCallExpressionInUMD4.js | 88 ----------- .../importCallExpressionInUMD4.symbols | 61 -------- .../importCallExpressionInUMD4.types | 83 ----------- .../importCallExpressionReturnPromiseOfAny.js | 61 -------- ...rtCallExpressionReturnPromiseOfAny.symbols | 89 ------------ ...portCallExpressionReturnPromiseOfAny.types | 118 --------------- ...sionSpecifierNotStringTypeError.errors.txt | 31 ---- ...llExpressionSpecifierNotStringTypeError.js | 25 ---- ...tCallExpressionWithTypeArgument.errors.txt | 18 --- .../importCallExpressionWithTypeArgument.js | 22 --- ...ons module-kind is out-of-range.errors.txt | 4 +- ...s target-script is out-of-range.errors.txt | 4 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../importCallExpression1ESNext.ts | 15 -- .../importCallExpression2ESNext.ts | 16 -- .../importCallExpression3ESNext.ts | 14 -- .../importCallExpression4ESNext.ts | 26 ---- .../importCallExpression5ESNext.ts | 20 --- .../importCallExpression6ESNext.ts | 19 --- .../importCallExpressionCheckReturntype1.ts | 17 --- .../importCallExpressionDeclarationEmit1.ts | 19 --- .../importCallExpressionDeclarationEmit2.ts | 9 -- .../importCallExpressionDeclarationEmit3.ts | 15 -- .../importCallExpressionES5AMD.ts | 16 -- .../importCallExpressionES5CJS.ts | 16 -- .../importCallExpressionES5System.ts | 16 -- .../importCallExpressionES5UMD.ts | 16 -- .../importCallExpressionErrorInES2015.ts | 15 -- .../importCallExpressionGrammarError.ts | 14 -- .../importCallExpressionInAMD1.ts | 15 -- .../importCallExpressionInAMD2.ts | 17 --- .../importCallExpressionInAMD3.ts | 14 -- .../importCallExpressionInAMD4.ts | 26 ---- .../importCallExpressionInCJS1.ts | 15 -- .../importCallExpressionInCJS2.ts | 19 --- .../importCallExpressionInCJS3.ts | 17 --- .../importCallExpressionInCJS4.ts | 14 -- .../importCallExpressionInCJS5.ts | 26 ---- .../importCallExpressionInScriptContext1.ts | 10 -- .../importCallExpressionInScriptContext2.ts | 11 -- .../importCallExpressionInSystem1.ts | 15 -- .../importCallExpressionInSystem2.ts | 17 --- .../importCallExpressionInSystem3.ts | 14 -- .../importCallExpressionInSystem4.ts | 26 ---- .../importCallExpressionInUMD1.ts | 15 -- .../importCallExpressionInUMD2.ts | 17 --- .../importCallExpressionInUMD3.ts | 14 -- .../importCallExpressionInUMD4.ts | 26 ---- .../importCallExpressionReturnPromiseOfAny.ts | 34 ----- ...llExpressionSpecifierNotStringTypeError.ts | 17 --- .../importCallExpressionWithTypeArgument.ts | 14 -- 169 files changed, 103 insertions(+), 5271 deletions(-) delete mode 100644 tests/baselines/reference/importCallExpression1ESNext.js delete mode 100644 tests/baselines/reference/importCallExpression1ESNext.symbols delete mode 100644 tests/baselines/reference/importCallExpression1ESNext.types delete mode 100644 tests/baselines/reference/importCallExpression2ESNext.js delete mode 100644 tests/baselines/reference/importCallExpression2ESNext.symbols delete mode 100644 tests/baselines/reference/importCallExpression2ESNext.types delete mode 100644 tests/baselines/reference/importCallExpression3ESNext.js delete mode 100644 tests/baselines/reference/importCallExpression3ESNext.symbols delete mode 100644 tests/baselines/reference/importCallExpression3ESNext.types delete mode 100644 tests/baselines/reference/importCallExpression4ESNext.js delete mode 100644 tests/baselines/reference/importCallExpression4ESNext.symbols delete mode 100644 tests/baselines/reference/importCallExpression4ESNext.types delete mode 100644 tests/baselines/reference/importCallExpression5ESNext.errors.txt delete mode 100644 tests/baselines/reference/importCallExpression5ESNext.js delete mode 100644 tests/baselines/reference/importCallExpression6ESNext.errors.txt delete mode 100644 tests/baselines/reference/importCallExpression6ESNext.js delete mode 100644 tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionCheckReturntype1.js delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit1.js delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit1.types delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit2.js delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit3.js delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols delete mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit3.types delete mode 100644 tests/baselines/reference/importCallExpressionES5AMD.js delete mode 100644 tests/baselines/reference/importCallExpressionES5AMD.symbols delete mode 100644 tests/baselines/reference/importCallExpressionES5AMD.types delete mode 100644 tests/baselines/reference/importCallExpressionES5CJS.js delete mode 100644 tests/baselines/reference/importCallExpressionES5CJS.symbols delete mode 100644 tests/baselines/reference/importCallExpressionES5CJS.types delete mode 100644 tests/baselines/reference/importCallExpressionES5System.js delete mode 100644 tests/baselines/reference/importCallExpressionES5System.symbols delete mode 100644 tests/baselines/reference/importCallExpressionES5System.types delete mode 100644 tests/baselines/reference/importCallExpressionES5UMD.js delete mode 100644 tests/baselines/reference/importCallExpressionES5UMD.symbols delete mode 100644 tests/baselines/reference/importCallExpressionES5UMD.types delete mode 100644 tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionErrorInES2015.js delete mode 100644 tests/baselines/reference/importCallExpressionGrammarError.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionGrammarError.js delete mode 100644 tests/baselines/reference/importCallExpressionInAMD1.js delete mode 100644 tests/baselines/reference/importCallExpressionInAMD1.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInAMD1.types delete mode 100644 tests/baselines/reference/importCallExpressionInAMD2.js delete mode 100644 tests/baselines/reference/importCallExpressionInAMD2.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInAMD2.types delete mode 100644 tests/baselines/reference/importCallExpressionInAMD3.js delete mode 100644 tests/baselines/reference/importCallExpressionInAMD3.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInAMD3.types delete mode 100644 tests/baselines/reference/importCallExpressionInAMD4.js delete mode 100644 tests/baselines/reference/importCallExpressionInAMD4.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInAMD4.types delete mode 100644 tests/baselines/reference/importCallExpressionInCJS1.js delete mode 100644 tests/baselines/reference/importCallExpressionInCJS1.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInCJS1.types delete mode 100644 tests/baselines/reference/importCallExpressionInCJS2.js delete mode 100644 tests/baselines/reference/importCallExpressionInCJS2.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInCJS2.types delete mode 100644 tests/baselines/reference/importCallExpressionInCJS3.js delete mode 100644 tests/baselines/reference/importCallExpressionInCJS3.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInCJS3.types delete mode 100644 tests/baselines/reference/importCallExpressionInCJS4.js delete mode 100644 tests/baselines/reference/importCallExpressionInCJS4.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInCJS4.types delete mode 100644 tests/baselines/reference/importCallExpressionInCJS5.js delete mode 100644 tests/baselines/reference/importCallExpressionInCJS5.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInCJS5.types delete mode 100644 tests/baselines/reference/importCallExpressionInScriptContext1.js delete mode 100644 tests/baselines/reference/importCallExpressionInScriptContext1.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInScriptContext1.types delete mode 100644 tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionInScriptContext2.js delete mode 100644 tests/baselines/reference/importCallExpressionInSystem1.js delete mode 100644 tests/baselines/reference/importCallExpressionInSystem1.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInSystem1.types delete mode 100644 tests/baselines/reference/importCallExpressionInSystem2.js delete mode 100644 tests/baselines/reference/importCallExpressionInSystem2.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInSystem2.types delete mode 100644 tests/baselines/reference/importCallExpressionInSystem3.js delete mode 100644 tests/baselines/reference/importCallExpressionInSystem3.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInSystem3.types delete mode 100644 tests/baselines/reference/importCallExpressionInSystem4.js delete mode 100644 tests/baselines/reference/importCallExpressionInSystem4.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInSystem4.types delete mode 100644 tests/baselines/reference/importCallExpressionInUMD1.js delete mode 100644 tests/baselines/reference/importCallExpressionInUMD1.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInUMD1.types delete mode 100644 tests/baselines/reference/importCallExpressionInUMD2.js delete mode 100644 tests/baselines/reference/importCallExpressionInUMD2.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInUMD2.types delete mode 100644 tests/baselines/reference/importCallExpressionInUMD3.js delete mode 100644 tests/baselines/reference/importCallExpressionInUMD3.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInUMD3.types delete mode 100644 tests/baselines/reference/importCallExpressionInUMD4.js delete mode 100644 tests/baselines/reference/importCallExpressionInUMD4.symbols delete mode 100644 tests/baselines/reference/importCallExpressionInUMD4.types delete mode 100644 tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js delete mode 100644 tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols delete mode 100644 tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types delete mode 100644 tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js delete mode 100644 tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt delete mode 100644 tests/baselines/reference/importCallExpressionWithTypeArgument.js delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts delete mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 22209e2e41e..d55f3650c10 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2333,7 +2333,7 @@ namespace ts { // A common practice in node modules is to set 'export = module.exports = {}', this ensures that 'exports' // is still pointing to 'module.exports'. // We do not want to consider this as 'export=' since a module can have only one of these. - // Similarly we do not want to treat 'module.exports = exports' as an 'export='. + // Similarlly we do not want to treat 'module.exports = exports' as an 'export='. const assignedExpression = getRightMostAssignedExpression(node.right); if (isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) { // Mark it as a module in case there are no other exports in the file @@ -2741,10 +2741,6 @@ namespace ts { transformFlags |= TransformFlags.AssertES2015; } - if (expression.kind === SyntaxKind.ImportKeyword) { - transformFlags |= TransformFlags.ContainsDynamicImport; - } - node.transformFlags = transformFlags | TransformFlags.HasComputedFlags; return transformFlags & ~TransformFlags.ArrayLiteralOrCallOrNewExcludes; } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7bcdc419b5b..1b3084f9cbd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8356,12 +8356,6 @@ namespace ts { /** * This is *not* a bi-directional relationship. * If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'. - * - * A type S is comparable to a type T if some (but not necessarily all) of the possible values of S are also possible values of T. - * It is used to check following cases: - * - the types of the left and right sides of equality/inequality operators (`===`, `!==`, `==`, `!=`). - * - the types of `case` clause expressions and their respective `switch` expressions. - * - the type of an expression in a type assertion with the type being asserted. */ function isTypeComparableTo(source: Type, target: Type): boolean { return isTypeRelatedTo(source, target, comparableRelation); @@ -16164,35 +16158,6 @@ namespace ts { return getReturnTypeOfSignature(signature); } - function checkImportCallExpression(node: ImportCall): Type { - // Check grammar of dynamic import - checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node); - - if (node.arguments.length === 0) { - return createPromiseReturnType(node, anyType); - } - const specifier = node.arguments[0]; - const specifierType = checkExpressionCached(specifier); - // Even though multiple arugments is grammatically incorrect, type-check extra arguments for completion - for (let i = 1; i < node.arguments.length; ++i) { - checkExpressionCached(node.arguments[i]); - } - - if (specifierType.flags & TypeFlags.Undefined || specifierType.flags & TypeFlags.Null || !isTypeAssignableTo(specifierType, stringType)) { - error(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); - } - - // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal - const moduleSymbol = resolveExternalModuleName(node, specifier); - if (moduleSymbol) { - const esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, /*dontRecursivelyResolve*/ true); - if (esModuleSymbol) { - return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol)); - } - } - return createPromiseReturnType(node, anyType); - } - function isCommonJsRequire(node: Node) { if (!isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { return false; @@ -16399,18 +16364,14 @@ namespace ts { return emptyObjectType; } - function createPromiseReturnType(func: FunctionLikeDeclaration | ImportCall, promisedType: Type) { + function createPromiseReturnType(func: FunctionLikeDeclaration, promisedType: Type) { const promiseType = createPromiseType(promisedType); if (promiseType === emptyObjectType) { - error(func, isImportCall(func) ? - Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : - Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error(func, Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return unknownType; } else if (!getGlobalPromiseConstructorSymbol(/*reportErrors*/ true)) { - error(func, isImportCall(func) ? - Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : - 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(func, 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); } return promiseType; @@ -17769,10 +17730,6 @@ namespace ts { case SyntaxKind.ElementAccessExpression: return checkIndexedAccess(node); case SyntaxKind.CallExpression: - if ((node).expression.kind === SyntaxKind.ImportKeyword) { - return checkImportCallExpression(node); - } - /* falls through */ case SyntaxKind.NewExpression: return checkCallExpression(node); case SyntaxKind.TaggedTemplateExpression: @@ -24698,27 +24655,6 @@ namespace ts { }); return result; } - - function checkGrammarImportCallExpression(node: ImportCall): boolean { - if (modulekind === ModuleKind.ES2015) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules); - } - - if (node.typeArguments) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_have_type_arguments); - } - - const arguments = node.arguments; - if (arguments.length !== 1) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument); - } - - // see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import. - // parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import. - if (isSpreadElement(arguments[0])) { - return grammarErrorOnNode(arguments[0], Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element); - } - } } /** Like 'isDeclarationName', but returns true for LHS of `import { x as y }` or `export { x as y }`. */ diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 23efd047e46..fa0c8140bb6 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -100,12 +100,11 @@ namespace ts { "umd": ModuleKind.UMD, "es6": ModuleKind.ES2015, "es2015": ModuleKind.ES2015, - "esnext": ModuleKind.ESNext }), paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Basic_Options, - description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext, + description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015, }, { name: "lib", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 34f25009190..e8ad8a033ff 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -883,23 +883,6 @@ "category": "Error", "code": 1322 }, - "Dynamic import cannot be used when targeting ECMAScript 2015 modules.": { - "category": "Error", - "code": 1323 - }, - "Dynamic import must have one specifier as an argument.": { - "category": "Error", - "code": 1324 - }, - "Specifier of dynamic import cannot be spread element.": { - "category": "Error", - "code": 1325 - }, - "Dynamic import cannot have type arguments": { - "category": "Error", - "code": 1326 - }, - "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 @@ -1944,6 +1927,10 @@ "category": "Error", "code": 2649 }, + "Cannot emit namespaced JSX elements in React.": { + "category": "Error", + "code": 2650 + }, "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.": { "category": "Error", "code": 2651 @@ -2176,14 +2163,6 @@ "category": "Error", "code": 2710 }, - "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { - "category": "Error", - "code": 2711 - }, - "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": { - "category": "Error", - "code": 2712 - }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -2650,7 +2629,7 @@ "category": "Message", "code": 6015 }, - "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.": { + "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'.": { "category": "Message", "code": 6016 }, @@ -3386,11 +3365,6 @@ "category": "Error", "code": 7035 }, - "Dynamic import's specifier must be of type 'string', but here has type '{0}'.": { - "category": "Error", - "code": 7036 - }, - "You cannot rename this element.": { "category": "Error", "code": 8000 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 1e6cc3b12db..1d2f75fcd60 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -676,7 +676,6 @@ namespace ts { case SyntaxKind.SuperKeyword: case SyntaxKind.TrueKeyword: case SyntaxKind.ThisKeyword: - case SyntaxKind.ImportKeyword: writeTokenNode(node); return; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a3f440fd6c0..849f97bbbaf 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -46,16 +46,10 @@ namespace ts { } } - /** - * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes - * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, - * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns - * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. - * - * @param node a given node to visit its children - * @param cbNode a callback to be invoked for all child nodes - * @param cbNodeArray a callback to be invoked for embedded array - */ + // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, + // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns + // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. export function forEachChild(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined { if (!node) { return; @@ -2415,7 +2409,7 @@ namespace ts { if (token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken) { return parseSignatureMember(SyntaxKind.CallSignature); } - if (token() === SyntaxKind.NewKeyword && lookAhead(nextTokenIsOpenParenOrLessThan)) { + if (token() === SyntaxKind.NewKeyword && lookAhead(isStartOfConstructSignature)) { return parseSignatureMember(SyntaxKind.ConstructSignature); } const fullStart = getNodePos(); @@ -2426,7 +2420,7 @@ namespace ts { return parsePropertyOrMethodSignature(fullStart, modifiers); } - function nextTokenIsOpenParenOrLessThan() { + function isStartOfConstructSignature() { nextToken(); return token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken; } @@ -2782,7 +2776,6 @@ namespace ts { case SyntaxKind.SlashToken: case SyntaxKind.SlashEqualsToken: case SyntaxKind.Identifier: - case SyntaxKind.ImportKeyword: return true; default: return isIdentifier(); @@ -3516,10 +3509,10 @@ namespace ts { * 5) --UnaryExpression[?Yield] */ if (isUpdateExpression()) { - const updateExpression = parseUpdateExpression(); + const incrementExpression = parseIncrementExpression(); return token() === SyntaxKind.AsteriskAsteriskToken ? - parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) : - updateExpression; + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : + incrementExpression; } /** @@ -3585,7 +3578,7 @@ namespace ts { } // falls through default: - return parseUpdateExpression(); + return parseIncrementExpression(); } } @@ -3601,7 +3594,7 @@ namespace ts { */ function isUpdateExpression(): boolean { // This function is called inside parseUnaryExpression to decide - // whether to call parseSimpleUnaryExpression or call parseUpdateExpression directly + // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly switch (token()) { case SyntaxKind.PlusToken: case SyntaxKind.MinusToken: @@ -3625,9 +3618,9 @@ namespace ts { } /** - * Parse ES7 UpdateExpression. UpdateExpression is used instead of ES6's PostFixExpression. + * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. * - * ES7 UpdateExpression[yield]: + * ES7 IncrementExpression[yield]: * 1) LeftHandSideExpression[?yield] * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- @@ -3635,7 +3628,7 @@ namespace ts { * 5) --LeftHandSideExpression[?yield] * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ - function parseUpdateExpression(): UpdateExpression { + function parseIncrementExpression(): IncrementExpression { if (token() === SyntaxKind.PlusPlusToken || token() === SyntaxKind.MinusMinusToken) { const node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token(); @@ -3685,27 +3678,17 @@ namespace ts { // CallExpression Arguments // CallExpression[Expression] // CallExpression.IdentifierName - // import (AssignmentExpression) - // super Arguments + // super ( ArgumentListopt ) // super.IdentifierName // - // Because of the recursion in these calls, we need to bottom out first. There are three - // bottom out states we can run into: 1) We see 'super' which must start either of - // the last two CallExpression productions. 2) We see 'import' which must start import call. - // 3)we have a MemberExpression which either completes the LeftHandSideExpression, - // or starts the beginning of the first four CallExpression productions. - let expression: MemberExpression; - if (token() === SyntaxKind.ImportKeyword && lookAhead(nextTokenIsOpenParenOrLessThan)) { - // We don't want to eagerly consume all import keyword as import call expression so we look a head to find "(" - // For example: - // var foo3 = require("subfolder - // import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression - sourceFile.flags |= NodeFlags.PossiblyContainDynamicImport; - expression = parseTokenNode(); - } - else { - expression = token() === SyntaxKind.SuperKeyword ? parseSuperExpression() : parseMemberExpressionOrHigher(); - } + // Because of the recursion in these calls, we need to bottom out first. There are two + // bottom out states we can run into. Either we see 'super' which must start either of + // the last two CallExpression productions. Or we have a MemberExpression which either + // completes the LeftHandSideExpression, or starts the beginning of the first four + // CallExpression productions. + const expression = token() === SyntaxKind.SuperKeyword + ? parseSuperExpression() + : parseMemberExpressionOrHigher(); // Now, we *may* be complete. However, we might have consumed the start of a // CallExpression. As such, we need to consume the rest of it here to be complete. @@ -3713,7 +3696,7 @@ namespace ts { } function parseMemberExpressionOrHigher(): MemberExpression { - // Note: to make our lives simpler, we decompose the NewExpression productions and + // Note: to make our lives simpler, we decompose the the NewExpression productions and // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. // like so: // @@ -4807,11 +4790,11 @@ namespace ts { // however, we say they are here so that we may gracefully parse them and error later. case SyntaxKind.CatchKeyword: case SyntaxKind.FinallyKeyword: - case SyntaxKind.ImportKeyword: return true; case SyntaxKind.ConstKeyword: case SyntaxKind.ExportKeyword: + case SyntaxKind.ImportKeyword: return isStartOfDeclaration(); case SyntaxKind.AsyncKeyword: diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 4b9c81d4239..834122b3584 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1366,7 +1366,6 @@ namespace ts { const isJavaScriptFile = isSourceFileJavaScript(file); const isExternalModuleFile = isExternalModule(file); - // file.imports may not be undefined if there exists dynamic import let imports: LiteralExpression[]; let moduleAugmentations: LiteralExpression[]; let ambientModules: string[]; @@ -1386,8 +1385,8 @@ namespace ts { for (const node of file.statements) { collectModuleReferences(node, /*inAmbientModule*/ false); - if ((file.flags & NodeFlags.PossiblyContainDynamicImport) || isJavaScriptFile) { - collectDynamicImportOrRequireCalls(node); + if (isJavaScriptFile) { + collectRequireCalls(node); } } @@ -1450,16 +1449,12 @@ namespace ts { } } - function collectDynamicImportOrRequireCalls(node: Node): void { + function collectRequireCalls(node: Node): void { if (isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { (imports || (imports = [])).push((node).arguments[0]); } - // we have to check the argument list has length of 1. We will still have to process these even though we have parsing error. - else if (isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === SyntaxKind.StringLiteral) { - (imports || (imports = [])).push((node).arguments[0]); - } else { - forEachChild(node, collectDynamicImportOrRequireCalls); + forEachChild(node, collectRequireCalls); } } } diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index f0c827d8396..75f9c43c6fe 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -15,7 +15,6 @@ namespace ts { function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory { switch (moduleKind) { - case ModuleKind.ESNext: case ModuleKind.ES2015: return transformES2015Module; case ModuleKind.System: diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index b2e1c1c70a9..b3e544a3f8b 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -46,7 +46,6 @@ namespace ts { let currentSourceFile: SourceFile; // The current file. let currentModuleInfo: ExternalModuleInfo; // The ExternalModuleInfo for the current file. let noSubstitution: boolean[]; // Set of nodes for which substitution rules should be ignored. - let needUMDDynamicImportHelper: boolean; return transformSourceFile; @@ -56,7 +55,7 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & TransformFlags.ContainsDynamicImport)) { + if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules)) { return node; } @@ -67,9 +66,9 @@ namespace ts { // Perform the transformation. const transformModule = getTransformModuleDelegate(moduleKind); const updated = transformModule(node); + currentSourceFile = undefined; currentModuleInfo = undefined; - needUMDDynamicImportHelper = false; return aggregateTransformFlags(updated); } @@ -108,7 +107,6 @@ namespace ts { // we need to inform the emitter to add the __export helper. addEmitHelper(updated, exportStarHelper); } - addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -413,9 +411,6 @@ namespace ts { // we need to inform the emitter to add the __export helper. addEmitHelper(body, exportStarHelper); } - if (needUMDDynamicImportHelper) { - addEmitHelper(body, dynamicImportUMDHelper); - } return body; } @@ -493,110 +488,12 @@ namespace ts { return visitEndOfDeclarationMarker(node); default: - return visitEachChild(node, importCallExpressionVisitor, context); + // This visitor does not descend into the tree, as export/import statements + // are only transformed at the top level of a file. + return node; } } - function importCallExpressionVisitor(node: Node): VisitResult { - // This visitor does not need to descend into the tree if there is no dynamic import, - // as export/import statements are only transformed at the top level of a file. - if (!(node.transformFlags & TransformFlags.ContainsDynamicImport)) { - return node; - } - - if (isImportCall(node)) { - return visitImportCallExpression(node); - } - else { - return visitEachChild(node, importCallExpressionVisitor, context); - } - } - - function visitImportCallExpression(node: ImportCall): Expression { - switch (compilerOptions.module) { - case ModuleKind.CommonJS: - return transformImportCallExpressionCommonJS(node); - case ModuleKind.AMD: - return transformImportCallExpressionAMD(node); - case ModuleKind.UMD: - return transformImportCallExpressionUMD(node); - } - Debug.fail("All supported module kind in this transformation step should have been handled"); - } - - function transformImportCallExpressionUMD(node: ImportCall): Expression { - // (function (factory) { - // ... (regular UMD) - // } - // })(function (require, exports, useSyncRequire) { - // "use strict"; - // Object.defineProperty(exports, "__esModule", { value: true }); - // var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - // var __resolved = new Promise(function (resolve) { resolve(); }); - // ..... - // __syncRequire - // ? __resolved.then(function () { return require(x); }) /*CommonJs Require*/ - // : new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ - // }); - needUMDDynamicImportHelper = true; - return createConditional( - /*condition*/ createIdentifier("__syncRequire"), - /*whenTrue*/ transformImportCallExpressionCommonJS(node), - /*whenFalse*/ transformImportCallExpressionAMD(node) - ); - } - - function transformImportCallExpressionAMD(node: ImportCall): Expression { - // improt("./blah") - // emit as - // define(["require", "exports", "blah"], function (require, exports) { - // ... - // new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ - // }); - const resolve = createUniqueName("resolve"); - const reject = createUniqueName("reject"); - return createNew( - createIdentifier("Promise"), - /*typeArguments*/ undefined, - [createFunctionExpression( - /*modifiers*/ undefined, - /*asteriskToken*/ undefined, - /*name*/ undefined, - /*typeParameters*/ undefined, - [createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ resolve), - createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject)], - /*type*/ undefined, - createBlock([createStatement( - createCall( - createIdentifier("require"), - /*typeArguments*/ undefined, - [createArrayLiteral([firstOrUndefined(node.arguments) || createOmittedExpression()]), resolve, reject] - ))]) - )]); - } - - function transformImportCallExpressionCommonJS(node: ImportCall): Expression { - // import("./blah") - // emit as - // Promise.resolve().then(function () { return require(x); }) /*CommonJs Require*/ - // We have to wrap require in then callback so that require is done in asynchronously - // if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately - return createCall( - createPropertyAccess( - createCall(createPropertyAccess(createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []), - "then"), - /*typeArguments*/ undefined, - [createFunctionExpression( - /*modifiers*/ undefined, - /*asteriskToken*/ undefined, - /*name*/ undefined, - /*typeParameters*/ undefined, - /*parameters*/ undefined, - /*type*/ undefined, - createBlock([createReturn(createCall(createIdentifier("require"), /*typeArguments*/ undefined, node.arguments))]) - )]); - } - /** * Visits an ImportDeclaration node. * @@ -889,9 +786,9 @@ namespace ts { node.asteriskToken, getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, - visitNodes(node.parameters, importCallExpressionVisitor), + node.parameters, /*type*/ undefined, - visitEachChild(node.body, importCallExpressionVisitor, context) + node.body ), /*location*/ node ), @@ -900,7 +797,7 @@ namespace ts { ); } else { - statements = append(statements, visitEachChild(node, importCallExpressionVisitor, context)); + statements = append(statements, node); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -931,7 +828,7 @@ namespace ts { visitNodes(node.modifiers, modifierVisitor, isModifier), getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, importCallExpressionVisitor), + node.heritageClauses, node.members ), node @@ -941,7 +838,7 @@ namespace ts { ); } else { - statements = append(statements, visitEachChild(node, importCallExpressionVisitor, context)); + statements = append(statements, node); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -993,7 +890,7 @@ namespace ts { } } else { - statements = append(statements, visitEachChild(node, importCallExpressionVisitor, context)); + statements = append(statements, node); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -1016,7 +913,7 @@ namespace ts { function transformInitializedVariable(node: VariableDeclaration): Expression { if (isBindingPattern(node.name)) { return flattenDestructuringAssignment( - visitNode(node, importCallExpressionVisitor), + node, /*visitor*/ undefined, context, FlattenLevel.All, @@ -1033,7 +930,7 @@ namespace ts { ), /*location*/ node.name ), - visitNode(node.initializer, importCallExpressionVisitor) + node.initializer ); } } @@ -1600,12 +1497,4 @@ namespace ts { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; }` }; - - // emit helper for dynamic import - const dynamicImportUMDHelper: EmitHelper = { - name: "typescript:dynamicimport-sync-require", - scoped: true, - text: ` - var __syncRequire = typeof module === "object" && typeof module.exports === "object";` - }; } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index fa126d1faa7..e6351c0965e 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -50,7 +50,7 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & TransformFlags.ContainsDynamicImport)) { + if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules)) { return node; } @@ -646,7 +646,7 @@ namespace ts { return undefined; } - const expression = visitNode(node.expression, destructuringAndImportCallVisitor, isExpression); + const expression = visitNode(node.expression, destructuringVisitor, isExpression); const original = node.original; if (original && hasAssociatedEndOfDeclarationMarker(original)) { // Defer exports until we encounter an EndOfDeclarationMarker node @@ -673,12 +673,12 @@ namespace ts { node.asteriskToken, getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, - visitNodes(node.parameters, destructuringAndImportCallVisitor, isParameterDeclaration), + visitNodes(node.parameters, destructuringVisitor, isParameterDeclaration), /*type*/ undefined, - visitNode(node.body, destructuringAndImportCallVisitor, isBlock))); + visitNode(node.body, destructuringVisitor, isBlock))); } else { - hoistedStatements = append(hoistedStatements, visitEachChild(node, destructuringAndImportCallVisitor, context)); + hoistedStatements = append(hoistedStatements, node); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -716,8 +716,8 @@ namespace ts { /*modifiers*/ undefined, node.name, /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, isHeritageClause), - visitNodes(node.members, destructuringAndImportCallVisitor, isClassElement) + visitNodes(node.heritageClauses, destructuringVisitor, isHeritageClause), + visitNodes(node.members, destructuringVisitor, isClassElement) ), node ) @@ -747,7 +747,7 @@ namespace ts { */ function visitVariableStatement(node: VariableStatement): VisitResult { if (!shouldHoistVariableDeclarationList(node.declarationList)) { - return visitNode(node, destructuringAndImportCallVisitor, isStatement); + return visitNode(node, destructuringVisitor, isStatement); } let expressions: Expression[]; @@ -820,13 +820,13 @@ namespace ts { return isBindingPattern(node.name) ? flattenDestructuringAssignment( node, - destructuringAndImportCallVisitor, + destructuringVisitor, context, FlattenLevel.All, /*needsValue*/ false, createAssignment ) - : createAssignment(node.name, visitNode(node.initializer, destructuringAndImportCallVisitor, isExpression)); + : createAssignment(node.name, visitNode(node.initializer, destructuringVisitor, isExpression)); } /** @@ -1204,7 +1204,7 @@ namespace ts { return visitEndOfDeclarationMarker(node); default: - return destructuringAndImportCallVisitor(node); + return destructuringVisitor(node); } } @@ -1220,8 +1220,8 @@ namespace ts { node = updateFor( node, visitForInitializer(node.initializer), - visitNode(node.condition, destructuringAndImportCallVisitor, isExpression), - visitNode(node.incrementor, destructuringAndImportCallVisitor, isExpression), + visitNode(node.condition, destructuringVisitor, isExpression), + visitNode(node.incrementor, destructuringVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement) ); @@ -1241,7 +1241,7 @@ namespace ts { node = updateForIn( node, visitForInitializer(node.initializer), - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), + visitNode(node.expression, destructuringVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); @@ -1262,7 +1262,7 @@ namespace ts { node, node.awaitModifier, visitForInitializer(node.initializer), - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), + visitNode(node.expression, destructuringVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); @@ -1313,7 +1313,7 @@ namespace ts { return updateDo( node, visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock), - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression) + visitNode(node.expression, destructuringVisitor, isExpression) ); } @@ -1325,7 +1325,7 @@ namespace ts { function visitWhileStatement(node: WhileStatement): VisitResult { return updateWhile( node, - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), + visitNode(node.expression, destructuringVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); } @@ -1351,7 +1351,7 @@ namespace ts { function visitWithStatement(node: WithStatement): VisitResult { return updateWith( node, - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), + visitNode(node.expression, destructuringVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); } @@ -1364,7 +1364,7 @@ namespace ts { function visitSwitchStatement(node: SwitchStatement): VisitResult { return updateSwitch( node, - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), + visitNode(node.expression, destructuringVisitor, isExpression), visitNode(node.caseBlock, nestedElementVisitor, isCaseBlock) ); } @@ -1395,7 +1395,7 @@ namespace ts { function visitCaseClause(node: CaseClause): VisitResult { return updateCaseClause( node, - visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), + visitNode(node.expression, destructuringVisitor, isExpression), visitNodes(node.statements, nestedElementVisitor, isStatement) ); } @@ -1461,43 +1461,19 @@ namespace ts { * * @param node The node to visit. */ - function destructuringAndImportCallVisitor(node: Node): VisitResult { + function destructuringVisitor(node: Node): VisitResult { if (node.transformFlags & TransformFlags.DestructuringAssignment && node.kind === SyntaxKind.BinaryExpression) { return visitDestructuringAssignment(node); } - else if (isImportCall(node)) { - return visitImportCallExpression(node); - } - else if ((node.transformFlags & TransformFlags.ContainsDestructuringAssignment) || (node.transformFlags & TransformFlags.ContainsDynamicImport)) { - return visitEachChild(node, destructuringAndImportCallVisitor, context); + else if (node.transformFlags & TransformFlags.ContainsDestructuringAssignment) { + return visitEachChild(node, destructuringVisitor, context); } else { return node; } } - function visitImportCallExpression(node: ImportCall): Expression { - // import("./blah") - // emit as - // System.register([], function (_export, _context) { - // return { - // setters: [], - // execute: () => { - // _context.import('./blah'); - // } - // }; - // }); - return createCall( - createPropertyAccess( - contextObject, - createIdentifier("import") - ), - /*typeArguments*/ undefined, - node.arguments - ); - } - /** * Visits a DestructuringAssignment to flatten destructuring to exported symbols. * @@ -1507,14 +1483,14 @@ namespace ts { if (hasExportedReferenceInDestructuringTarget(node.left)) { return flattenDestructuringAssignment( node, - destructuringAndImportCallVisitor, + destructuringVisitor, context, FlattenLevel.All, /*needsValue*/ true ); } - return visitEachChild(node, destructuringAndImportCallVisitor, context); + return visitEachChild(node, destructuringVisitor, context); } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 8fb3d98fca8..ed1d5dcbe23 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -395,7 +395,6 @@ namespace ts { // Enum value count Count, - // Markers FirstAssignment = EqualsToken, LastAssignment = CaretEqualsToken, @@ -450,14 +449,6 @@ namespace ts { ThisNodeOrAnySubNodesHasError = 1 << 17, // If this node or any of its children had an error HasAggregatedChildData = 1 << 18, // If we've computed data from children and cached it in this node - // This flag will be set to true when the parse encounter dynamic import so that post-parsing process of module resolution - // will not walk the tree if the flag is not set. However, this flag is just a approximation because once it is set, the flag never get reset. - // (hence it is named "possiblyContainDynamicImport"). - // During editing, if dynamic import is remove, incremental parsing will *NOT* update this flag. This will then causes walking of the tree during module resolution. - // However, the removal operation should not occur often and in the case of the removal, it is likely that users will add back the import anyway. - // The advantage of this approach is its simplicity. For the case of batch compilation, we garuntee that users won't have to pay the price of walking the tree if dynamic import isn't used. - PossiblyContainDynamicImport = 1 << 19, - BlockScoped = Let | Const, ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, @@ -1010,10 +1001,8 @@ namespace ts { _unaryExpressionBrand: any; } - /** Deprecated, please use UpdateExpression */ - export type IncrementExpression = UpdateExpression; - export interface UpdateExpression extends UnaryExpression { - _updateExpressionBrand: any; + export interface IncrementExpression extends UnaryExpression { + _incrementExpressionBrand: any; } // see: https://tc39.github.io/ecma262/#prod-UpdateExpression @@ -1024,9 +1013,10 @@ namespace ts { | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken - | SyntaxKind.ExclamationToken; + | SyntaxKind.ExclamationToken + ; - export interface PrefixUnaryExpression extends UpdateExpression { + export interface PrefixUnaryExpression extends IncrementExpression { kind: SyntaxKind.PrefixUnaryExpression; operator: PrefixUnaryOperator; operand: UnaryExpression; @@ -1038,13 +1028,13 @@ namespace ts { | SyntaxKind.MinusMinusToken ; - export interface PostfixUnaryExpression extends UpdateExpression { + export interface PostfixUnaryExpression extends IncrementExpression { kind: SyntaxKind.PostfixUnaryExpression; operand: LeftHandSideExpression; operator: PostfixUnaryOperator; } - export interface LeftHandSideExpression extends UpdateExpression { + export interface LeftHandSideExpression extends IncrementExpression { _leftHandSideExpressionBrand: any; } @@ -1072,10 +1062,6 @@ namespace ts { kind: SyntaxKind.SuperKeyword; } - export interface ImportExpression extends PrimaryExpression { - kind: SyntaxKind.ImportKeyword; - } - export interface DeleteExpression extends UnaryExpression { kind: SyntaxKind.DeleteExpression; expression: UnaryExpression; @@ -1468,7 +1454,10 @@ namespace ts { } // see: https://tc39.github.io/ecma262/#prod-SuperProperty - export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; + export type SuperProperty + = SuperPropertyAccessExpression + | SuperElementAccessExpression + ; export interface CallExpression extends LeftHandSideExpression, Declaration { kind: SyntaxKind.CallExpression; @@ -1482,10 +1471,6 @@ namespace ts { expression: SuperExpression; } - export interface ImportCall extends CallExpression { - expression: ImportExpression; - } - export interface ExpressionWithTypeArguments extends TypeNode { kind: SyntaxKind.ExpressionWithTypeArguments; parent?: HeritageClause; @@ -3579,7 +3564,6 @@ namespace ts { UMD = 3, System = 4, ES2015 = 5, - ESNext = 6 } export const enum JsxEmit { @@ -3964,11 +3948,6 @@ namespace ts { ContainsYield = 1 << 24, ContainsHoistedDeclarationOrCompletion = 1 << 25, - ContainsDynamicImport = 1 << 26, - - // Please leave this as 1 << 29. - // It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system. - // It is a good reminder of how much room we have left HasComputedFlags = 1 << 29, // Transform flags have been computed. // Assertions diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 96aae0e3888..b52ace78615 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -596,10 +596,6 @@ namespace ts { return n.kind === SyntaxKind.CallExpression && (n).expression.kind === SyntaxKind.SuperKeyword; } - export function isImportCall(n: Node): n is ImportCall { - return n.kind === SyntaxKind.CallExpression && (n).expression.kind === SyntaxKind.ImportKeyword; - } - export function isPrologueDirective(node: Node): node is PrologueDirective { return node.kind === SyntaxKind.ExpressionStatement && (node).expression.kind === SyntaxKind.StringLiteral; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 9bf4591112d..49dbdbf2102 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -857,7 +857,6 @@ namespace Harness { export function getDefaultLibFileName(options: ts.CompilerOptions): string { switch (options.target) { - case ts.ScriptTarget.ESNext: case ts.ScriptTarget.ES2017: return "lib.es2017.d.ts"; case ts.ScriptTarget.ES2016: diff --git a/src/harness/unittests/commandLineParsing.ts b/src/harness/unittests/commandLineParsing.ts index 01a208aa330..19ccc919d4c 100644 --- a/src/harness/unittests/commandLineParsing.ts +++ b/src/harness/unittests/commandLineParsing.ts @@ -113,7 +113,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, diff --git a/src/harness/unittests/convertCompilerOptionsFromJson.ts b/src/harness/unittests/convertCompilerOptionsFromJson.ts index 798f8c6a76b..3aa1a4c9b8e 100644 --- a/src/harness/unittests/convertCompilerOptionsFromJson.ts +++ b/src/harness/unittests/convertCompilerOptionsFromJson.ts @@ -122,7 +122,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] diff --git a/src/services/services.ts b/src/services/services.ts index 21c756a9acc..05fe59084b4 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -368,7 +368,7 @@ namespace ts { _primaryExpressionBrand: any; _memberExpressionBrand: any; _leftHandSideExpressionBrand: any; - _updateExpressionBrand: any; + _incrementExpressionBrand: any; _unaryExpressionBrand: any; _expressionBrand: any; /*@internal*/typeArguments: NodeArray; @@ -521,7 +521,6 @@ namespace ts { private namedDeclarations: Map; public ambientModuleNames: string[]; public checkJsDirective: CheckJsDirective | undefined; - public possiblyContainDynamicImport: boolean; constructor(kind: SyntaxKind, pos: number, end: number) { super(kind, pos, end); diff --git a/tests/baselines/reference/importCallExpression1ESNext.js b/tests/baselines/reference/importCallExpression1ESNext.js deleted file mode 100644 index 39b779c921f..00000000000 --- a/tests/baselines/reference/importCallExpression1ESNext.js +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}) - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -export function foo() { return "foo"; } -//// [1.js] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); -function foo() { - const p2 = import("./0"); -} diff --git a/tests/baselines/reference/importCallExpression1ESNext.symbols b/tests/baselines/reference/importCallExpression1ESNext.symbols deleted file mode 100644 index 28b5ba13e99..00000000000 --- a/tests/baselines/reference/importCallExpression1ESNext.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}) - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 2)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpression1ESNext.types b/tests/baselines/reference/importCallExpression1ESNext.types deleted file mode 100644 index 53a1b3d08fa..00000000000 --- a/tests/baselines/reference/importCallExpression1ESNext.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}) - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpression2ESNext.js b/tests/baselines/reference/importCallExpression2ESNext.js deleted file mode 100644 index 662f57f07ff..00000000000 --- a/tests/baselines/reference/importCallExpression2ESNext.js +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); - -//// [0.js] -export class B { - print() { return "I am B"; } -} -//// [2.js] -function foo(x) { - x.then(value => { - let b = new value.B(); - b.print(); - }); -} -foo(import("./0")); diff --git a/tests/baselines/reference/importCallExpression2ESNext.symbols b/tests/baselines/reference/importCallExpression2ESNext.symbols deleted file mode 100644 index 2002398aeb9..00000000000 --- a/tests/baselines/reference/importCallExpression2ESNext.symbols +++ /dev/null @@ -1,33 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -function foo(x: Promise) { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) ->x : Symbol(x, Decl(2.ts, 0, 13)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - - x.then(value => { ->x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(2.ts, 0, 13)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->value : Symbol(value, Decl(2.ts, 1, 11)) - - let b = new value.B(); ->b : Symbol(b, Decl(2.ts, 2, 11)) ->value : Symbol(value, Decl(2.ts, 1, 11)) - - b.print(); ->b : Symbol(b, Decl(2.ts, 2, 11)) - - }) -} - -foo(import("./0")); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpression2ESNext.types b/tests/baselines/reference/importCallExpression2ESNext.types deleted file mode 100644 index 084eb33dde9..00000000000 --- a/tests/baselines/reference/importCallExpression2ESNext.types +++ /dev/null @@ -1,45 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -function foo(x: Promise) { ->foo : (x: Promise) => void ->x : Promise ->Promise : Promise - - x.then(value => { ->x.then(value => { let b = new value.B(); b.print(); }) : Promise ->x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->x : Promise ->then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->value => { let b = new value.B(); b.print(); } : (value: any) => void ->value : any - - let b = new value.B(); ->b : any ->new value.B() : any ->value.B : any ->value : any ->B : any - - b.print(); ->b.print() : any ->b.print : any ->b : any ->print : any - - }) -} - -foo(import("./0")); ->foo(import("./0")) : void ->foo : (x: Promise) => void ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpression3ESNext.js b/tests/baselines/reference/importCallExpression3ESNext.js deleted file mode 100644 index 0cd41388616..00000000000 --- a/tests/baselines/reference/importCallExpression3ESNext.js +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); - -//// [0.js] -export class B { - print() { return "I am B"; } -} -//// [2.js] -async function foo() { - class C extends (await import("./0")).B { - } - var c = new C(); - c.print(); -} -foo(); diff --git a/tests/baselines/reference/importCallExpression3ESNext.symbols b/tests/baselines/reference/importCallExpression3ESNext.symbols deleted file mode 100644 index 5ca85d6e693..00000000000 --- a/tests/baselines/reference/importCallExpression3ESNext.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - - class C extends (await import("./0")).B {} ->C : Symbol(C, Decl(2.ts, 0, 22)) ->(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) ->B : Symbol(B, Decl(0.ts, 0, 0)) - - var c = new C(); ->c : Symbol(c, Decl(2.ts, 2, 7)) ->C : Symbol(C, Decl(2.ts, 0, 22)) - - c.print(); ->c.print : Symbol(B.print, Decl(0.ts, 0, 16)) ->c : Symbol(c, Decl(2.ts, 2, 7)) ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} -foo(); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpression3ESNext.types b/tests/baselines/reference/importCallExpression3ESNext.types deleted file mode 100644 index e517be6e722..00000000000 --- a/tests/baselines/reference/importCallExpression3ESNext.types +++ /dev/null @@ -1,37 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : () => Promise - - class C extends (await import("./0")).B {} ->C : C ->(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" ->import("./0") : Promise ->"./0" : "./0" ->B : typeof B - - var c = new C(); ->c : C ->new C() : C ->C : typeof C - - c.print(); ->c.print() : string ->c.print : () => string ->c : C ->print : () => string -} -foo(); ->foo() : Promise ->foo : () => Promise - diff --git a/tests/baselines/reference/importCallExpression4ESNext.js b/tests/baselines/reference/importCallExpression4ESNext.js deleted file mode 100644 index e148d5c1e51..00000000000 --- a/tests/baselines/reference/importCallExpression4ESNext.js +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} - -//// [0.js] -export class B { - print() { return "I am B"; } -} -export function foo() { return "foo"; } -//// [1.js] -export function backup() { return "backup"; } -//// [2.js] -class C { - constructor() { - this.myModule = import("./0"); - } - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async (err) => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} diff --git a/tests/baselines/reference/importCallExpression4ESNext.symbols b/tests/baselines/reference/importCallExpression4ESNext.symbols deleted file mode 100644 index 34a1dcf4d7b..00000000000 --- a/tests/baselines/reference/importCallExpression4ESNext.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -export function foo() { return "foo" } ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : Symbol(console, Decl(2.ts, 0, 11)) - -class C { ->C : Symbol(C, Decl(2.ts, 0, 25)) - - private myModule = import("./0"); ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) - - method() { ->method : Symbol(C.method, Decl(2.ts, 2, 37)) - - this.myModule.then(Zero => { ->this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->this : Symbol(C, Decl(2.ts, 0, 25)) ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) - - console.log(Zero.foo()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - - }, async err => { ->err : Symbol(err, Decl(2.ts, 6, 16)) - - console.log(err); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->err : Symbol(err, Decl(2.ts, 6, 16)) - - let one = await import("./1"); ->one : Symbol(one, Decl(2.ts, 8, 15)) - - console.log(one.backup()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->one.backup : Symbol(backup, Decl(1.ts, 0, 0)) ->one : Symbol(one, Decl(2.ts, 8, 15)) ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - - }); - } -} diff --git a/tests/baselines/reference/importCallExpression4ESNext.types b/tests/baselines/reference/importCallExpression4ESNext.types deleted file mode 100644 index 2ea666ba672..00000000000 --- a/tests/baselines/reference/importCallExpression4ESNext.types +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -export function foo() { return "foo" } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : () => string ->"backup" : "backup" - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : any - -class C { ->C : C - - private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise ->"./0" : "./0" - - method() { ->method : () => void - - this.myModule.then(Zero => { ->this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise ->this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/dynamicImport/0" - - console.log(Zero.foo()); ->console.log(Zero.foo()) : any ->console.log : any ->console : any ->log : any ->Zero.foo() : string ->Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - - }, async err => { ->async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise ->err : any - - console.log(err); ->console.log(err) : any ->console.log : any ->console : any ->log : any ->err : any - - let one = await import("./1"); ->one : typeof "tests/cases/conformance/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->import("./1") : Promise ->"./1" : "./1" - - console.log(one.backup()); ->console.log(one.backup()) : any ->console.log : any ->console : any ->log : any ->one.backup() : string ->one.backup : () => string ->one : typeof "tests/cases/conformance/dynamicImport/1" ->backup : () => string - - }); - } -} diff --git a/tests/baselines/reference/importCallExpression5ESNext.errors.txt b/tests/baselines/reference/importCallExpression5ESNext.errors.txt deleted file mode 100644 index ed5900c2a03..00000000000 --- a/tests/baselines/reference/importCallExpression5ESNext.errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -tests/cases/conformance/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. -tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. -tests/cases/conformance/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. -tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export class B { - print() { return "I am B"} - } - - export function foo() { return "foo" } - -==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ==== - export function backup() { return "backup"; } - -==== tests/cases/conformance/dynamicImport/2.ts (4 errors) ==== - declare function bar(): boolean; - const specify = bar() ? "./0" : undefined; - let myModule = import(specify); - ~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. - let myModule1 = import(undefined); - ~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. - let myModule2 = import(bar() ? "./1" : null); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. - let myModule3 = import(null); - ~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpression5ESNext.js b/tests/baselines/reference/importCallExpression5ESNext.js deleted file mode 100644 index 1f4c789120b..00000000000 --- a/tests/baselines/reference/importCallExpression5ESNext.js +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare function bar(): boolean; -const specify = bar() ? "./0" : undefined; -let myModule = import(specify); -let myModule1 = import(undefined); -let myModule2 = import(bar() ? "./1" : null); -let myModule3 = import(null); - -//// [0.js] -export class B { - print() { return "I am B"; } -} -export function foo() { return "foo"; } -//// [1.js] -export function backup() { return "backup"; } -//// [2.js] -const specify = bar() ? "./0" : undefined; -let myModule = import(specify); -let myModule1 = import(undefined); -let myModule2 = import(bar() ? "./1" : null); -let myModule3 = import(null); diff --git a/tests/baselines/reference/importCallExpression6ESNext.errors.txt b/tests/baselines/reference/importCallExpression6ESNext.errors.txt deleted file mode 100644 index 1703e0913d1..00000000000 --- a/tests/baselines/reference/importCallExpression6ESNext.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. -tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export class B { - print() { return "I am B"} - } - - export function foo() { return "foo" } - -==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ==== - export function backup() { return "backup"; } - -==== tests/cases/conformance/dynamicImport/2.ts (2 errors) ==== - declare function bar(): boolean; - const specify = bar() ? "./0" : undefined; - let myModule = import(specify); - let myModule1 = import(undefined); - ~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. - let myModule2 = import(bar() ? "./1" : null); - let myModule3 = import(null); - ~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpression6ESNext.js b/tests/baselines/reference/importCallExpression6ESNext.js deleted file mode 100644 index bdac7328f69..00000000000 --- a/tests/baselines/reference/importCallExpression6ESNext.js +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare function bar(): boolean; -const specify = bar() ? "./0" : undefined; -let myModule = import(specify); -let myModule1 = import(undefined); -let myModule2 = import(bar() ? "./1" : null); -let myModule3 = import(null); - -//// [0.js] -export class B { - print() { return "I am B"; } -} -export function foo() { return "foo"; } -//// [1.js] -export function backup() { return "backup"; } -//// [2.js] -const specify = bar() ? "./0" : undefined; -let myModule = import(specify); -let myModule1 = import(undefined); -let myModule2 = import(bar() ? "./1" : null); -let myModule3 = import(null); diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt deleted file mode 100644 index 39622f39b3f..00000000000 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -tests/cases/conformance/dynamicImport/1.ts(4,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. - Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. - Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. -tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise' cannot be converted to type 'Promise'. - Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. - Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. - - -==== tests/cases/conformance/dynamicImport/anotherModule.ts (0 errors) ==== - export class D{} - -==== tests/cases/conformance/dynamicImport/defaultPath.ts (0 errors) ==== - export class C {} - -==== tests/cases/conformance/dynamicImport/1.ts (2 errors) ==== - import * as defaultModule from "./defaultPath"; - import * as anotherModule from "./anotherModule"; - - let p1: Promise = import("./defaultPath"); - ~~ -!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2322: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. -!!! error TS2322: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. - let p2 = import("./defaultPath") as Promise; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Type 'Promise' cannot be converted to type 'Promise'. -!!! error TS2352: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. -!!! error TS2352: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. - let p3: Promise = import("./defaultPath"); - \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.js b/tests/baselines/reference/importCallExpressionCheckReturntype1.js deleted file mode 100644 index facb6913388..00000000000 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.js +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts] //// - -//// [anotherModule.ts] -export class D{} - -//// [defaultPath.ts] -export class C {} - -//// [1.ts] -import * as defaultModule from "./defaultPath"; -import * as anotherModule from "./anotherModule"; - -let p1: Promise = import("./defaultPath"); -let p2 = import("./defaultPath") as Promise; -let p3: Promise = import("./defaultPath"); - - -//// [anotherModule.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class D { -} -exports.D = D; -//// [defaultPath.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class C { -} -exports.C = C; -//// [1.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -let p1 = Promise.resolve().then(function () { return require("./defaultPath"); }); -let p2 = Promise.resolve().then(function () { return require("./defaultPath"); }); -let p3 = Promise.resolve().then(function () { return require("./defaultPath"); }); diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js deleted file mode 100644 index 07f95d3b3b2..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js +++ /dev/null @@ -1,35 +0,0 @@ -//// [importCallExpressionDeclarationEmit1.ts] -declare function getSpecifier(): string; -declare var whatToLoad: boolean; -declare const directory: string; -declare const moduleFile: number; - -import(getSpecifier()); - -var p0 = import(`${directory}\${moduleFile}`); -var p1 = import(getSpecifier()); -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") - -function returnDynamicLoad(path: string) { - return import(path); -} - -//// [importCallExpressionDeclarationEmit1.js] -Promise.resolve().then(function () { return require(getSpecifier()); }); -var p0 = Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); -var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); -const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); -function returnDynamicLoad(path) { - return Promise.resolve().then(function () { return require(path); }); -} - - -//// [importCallExpressionDeclarationEmit1.d.ts] -declare function getSpecifier(): string; -declare var whatToLoad: boolean; -declare const directory: string; -declare const moduleFile: number; -declare var p0: Promise; -declare var p1: Promise; -declare const p2: Promise; -declare function returnDynamicLoad(path: string): Promise; diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols b/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols deleted file mode 100644 index d2266cc768b..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols +++ /dev/null @@ -1,36 +0,0 @@ -=== tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts === -declare function getSpecifier(): string; ->getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) - -declare var whatToLoad: boolean; ->whatToLoad : Symbol(whatToLoad, Decl(importCallExpressionDeclarationEmit1.ts, 1, 11)) - -declare const directory: string; ->directory : Symbol(directory, Decl(importCallExpressionDeclarationEmit1.ts, 2, 13)) - -declare const moduleFile: number; ->moduleFile : Symbol(moduleFile, Decl(importCallExpressionDeclarationEmit1.ts, 3, 13)) - -import(getSpecifier()); ->getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) - -var p0 = import(`${directory}\${moduleFile}`); ->p0 : Symbol(p0, Decl(importCallExpressionDeclarationEmit1.ts, 7, 3)) ->directory : Symbol(directory, Decl(importCallExpressionDeclarationEmit1.ts, 2, 13)) - -var p1 = import(getSpecifier()); ->p1 : Symbol(p1, Decl(importCallExpressionDeclarationEmit1.ts, 8, 3)) ->getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) - -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") ->p2 : Symbol(p2, Decl(importCallExpressionDeclarationEmit1.ts, 9, 5)) ->whatToLoad : Symbol(whatToLoad, Decl(importCallExpressionDeclarationEmit1.ts, 1, 11)) ->getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) - -function returnDynamicLoad(path: string) { ->returnDynamicLoad : Symbol(returnDynamicLoad, Decl(importCallExpressionDeclarationEmit1.ts, 9, 61)) ->path : Symbol(path, Decl(importCallExpressionDeclarationEmit1.ts, 11, 27)) - - return import(path); ->path : Symbol(path, Decl(importCallExpressionDeclarationEmit1.ts, 11, 27)) -} diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types deleted file mode 100644 index db5400818c8..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types +++ /dev/null @@ -1,47 +0,0 @@ -=== tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts === -declare function getSpecifier(): string; ->getSpecifier : () => string - -declare var whatToLoad: boolean; ->whatToLoad : boolean - -declare const directory: string; ->directory : string - -declare const moduleFile: number; ->moduleFile : number - -import(getSpecifier()); ->import(getSpecifier()) : Promise ->getSpecifier() : string ->getSpecifier : () => string - -var p0 = import(`${directory}\${moduleFile}`); ->p0 : Promise ->import(`${directory}\${moduleFile}`) : Promise ->`${directory}\${moduleFile}` : string ->directory : string - -var p1 = import(getSpecifier()); ->p1 : Promise ->import(getSpecifier()) : Promise ->getSpecifier() : string ->getSpecifier : () => string - -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") ->p2 : Promise ->import(whatToLoad ? getSpecifier() : "defaulPath") : Promise ->whatToLoad ? getSpecifier() : "defaulPath" : string ->whatToLoad : boolean ->getSpecifier() : string ->getSpecifier : () => string ->"defaulPath" : "defaulPath" - -function returnDynamicLoad(path: string) { ->returnDynamicLoad : (path: string) => Promise ->path : string - - return import(path); ->import(path) : Promise ->path : string -} diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt b/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt deleted file mode 100644 index 6c394c98bdf..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -tests/cases/conformance/dynamicImport/1.ts(1,5): error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export function foo() { return "foo"; } - -==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== - var p1 = import("./0"); - ~~ -!!! error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js deleted file mode 100644 index 7659e94ee81..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js +++ /dev/null @@ -1,16 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -var p1 = import("./0"); - -//// [0.js] -export function foo() { return "foo"; } -//// [1.js] -var p1 = import("./0"); - - -//// [0.d.ts] -export declare function foo(): string; diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.js b/tests/baselines/reference/importCallExpressionDeclarationEmit3.js deleted file mode 100644 index d38c2309a33..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit3.js +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -declare function getPath(): string; -import * as Zero from "./0"; -import("./0"); - -export var p0: Promise = import(getPath()); -export var p1: Promise = import("./0"); -export var p2: Promise = import("./0"); - - -//// [0.js] -export function foo() { return "foo"; } -//// [1.js] -import("./0"); -export var p0 = import(getPath()); -export var p1 = import("./0"); -export var p2 = import("./0"); - - -//// [0.d.ts] -export declare function foo(): string; -//// [1.d.ts] -import * as Zero from "./0"; -export declare var p0: Promise; -export declare var p1: Promise; -export declare var p2: Promise; diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols b/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols deleted file mode 100644 index 1491e05db55..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -declare function getPath(): string; ->getPath : Symbol(getPath, Decl(1.ts, 0, 0)) - -import * as Zero from "./0"; ->Zero : Symbol(Zero, Decl(1.ts, 1, 6)) - -import("./0"); - -export var p0: Promise = import(getPath()); ->p0 : Symbol(p0, Decl(1.ts, 4, 10)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(1.ts, 1, 6)) ->getPath : Symbol(getPath, Decl(1.ts, 0, 0)) - -export var p1: Promise = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 5, 10)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(1.ts, 1, 6)) - -export var p2: Promise = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 6, 10)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.types b/tests/baselines/reference/importCallExpressionDeclarationEmit3.types deleted file mode 100644 index fe4552b708f..00000000000 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit3.types +++ /dev/null @@ -1,37 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -declare function getPath(): string; ->getPath : () => string - -import * as Zero from "./0"; ->Zero : typeof Zero - -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -export var p0: Promise = import(getPath()); ->p0 : Promise ->Promise : Promise ->Zero : typeof Zero ->import(getPath()) : Promise ->getPath() : string ->getPath : () => string - -export var p1: Promise = import("./0"); ->p1 : Promise ->Promise : Promise ->Zero : typeof Zero ->import("./0") : Promise ->"./0" : "./0" - -export var p2: Promise = import("./0"); ->p2 : Promise ->Promise : Promise ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpressionES5AMD.js b/tests/baselines/reference/importCallExpressionES5AMD.js deleted file mode 100644 index cce61a5a3f9..00000000000 --- a/tests/baselines/reference/importCallExpressionES5AMD.js +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function foo() { return "foo"; } - exports.foo = foo; -}); -//// [1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); - p1.then(function (zero) { - return zero.foo(); - }); - function foo() { - var p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); - } -}); diff --git a/tests/baselines/reference/importCallExpressionES5AMD.symbols b/tests/baselines/reference/importCallExpressionES5AMD.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionES5AMD.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionES5AMD.types b/tests/baselines/reference/importCallExpressionES5AMD.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionES5AMD.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionES5CJS.js b/tests/baselines/reference/importCallExpressionES5CJS.js deleted file mode 100644 index 11d1bf46319..00000000000 --- a/tests/baselines/reference/importCallExpressionES5CJS.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -Promise.resolve().then(function () { return require("./0"); }); -var p1 = Promise.resolve().then(function () { return require("./0"); }); -p1.then(function (zero) { - return zero.foo(); -}); -function foo() { - var p2 = Promise.resolve().then(function () { return require("./0"); }); -} diff --git a/tests/baselines/reference/importCallExpressionES5CJS.symbols b/tests/baselines/reference/importCallExpressionES5CJS.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionES5CJS.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionES5CJS.types b/tests/baselines/reference/importCallExpressionES5CJS.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionES5CJS.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionES5System.js b/tests/baselines/reference/importCallExpressionES5System.js deleted file mode 100644 index 1842fc6e60a..00000000000 --- a/tests/baselines/reference/importCallExpressionES5System.js +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - function foo() { return "foo"; } - exports_1("foo", foo); - return { - setters: [], - execute: function () { - } - }; -}); -//// [1.js] -System.register([], function (exports_1, context_1) { - var __moduleName = context_1 && context_1.id; - function foo() { - var p2 = context_1.import("./0"); - } - var p1; - return { - setters: [], - execute: function () { - context_1.import("./0"); - p1 = context_1.import("./0"); - p1.then(function (zero) { - return zero.foo(); - }); - } - }; -}); diff --git a/tests/baselines/reference/importCallExpressionES5System.symbols b/tests/baselines/reference/importCallExpressionES5System.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionES5System.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionES5System.types b/tests/baselines/reference/importCallExpressionES5System.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionES5System.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionES5UMD.js b/tests/baselines/reference/importCallExpressionES5UMD.js deleted file mode 100644 index dfe6813839c..00000000000 --- a/tests/baselines/reference/importCallExpressionES5UMD.js +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function foo() { return "foo"; } - exports.foo = foo; -}); -//// [1.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); - p1.then(function (zero) { - return zero.foo(); - }); - function foo() { - var p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); - } -}); diff --git a/tests/baselines/reference/importCallExpressionES5UMD.symbols b/tests/baselines/reference/importCallExpressionES5UMD.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionES5UMD.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionES5UMD.types b/tests/baselines/reference/importCallExpressionES5UMD.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionES5UMD.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt deleted file mode 100644 index d47980d1312..00000000000 --- a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. -tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. -tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export function foo() { return "foo"; } - -==== tests/cases/conformance/dynamicImport/1.ts (3 errors) ==== - import("./0"); - ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. - var p1 = import("./0"); - ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. - p1.then(zero => { - return zero.foo(); - }) - - function foo() { - const p2 = import("./0"); - ~~~~~~~~~~~~~ -!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. - } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.js b/tests/baselines/reference/importCallExpressionErrorInES2015.js deleted file mode 100644 index f07486504ee..00000000000 --- a/tests/baselines/reference/importCallExpressionErrorInES2015.js +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}) - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -export function foo() { return "foo"; } -//// [1.js] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); -function foo() { - const p2 = import("./0"); -} diff --git a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt deleted file mode 100644 index 6d64808e111..00000000000 --- a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1325: Specifier of dynamic import cannot be spread element. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS1135: Argument expression expected. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1324: Dynamic import must have one specifier as an argument. -tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(10,19): error TS2307: Cannot find module 'pathToModule'. - - -==== tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts (7 errors) ==== - declare function getSpecifier(): string; - declare var whatToLoad: boolean; - - var a = ["./0"]; - import(...["PathModule"]); - ~~~~~~~~~~~~~~~~~ -!!! error TS1325: Specifier of dynamic import cannot be spread element. - - var p1 = import(...a); - ~~~~ -!!! error TS1325: Specifier of dynamic import cannot be spread element. - const p2 = import(); - ~~~~~~~~ -!!! error TS1324: Dynamic import must have one specifier as an argument. - const p3 = import(,); - -!!! error TS1135: Argument expression expected. - -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. - const p4 = import("pathToModule", "secondModule"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1324: Dynamic import must have one specifier as an argument. - ~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'pathToModule'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionGrammarError.js b/tests/baselines/reference/importCallExpressionGrammarError.js deleted file mode 100644 index b30b0c9ddd5..00000000000 --- a/tests/baselines/reference/importCallExpressionGrammarError.js +++ /dev/null @@ -1,19 +0,0 @@ -//// [importCallExpressionGrammarError.ts] -declare function getSpecifier(): string; -declare var whatToLoad: boolean; - -var a = ["./0"]; -import(...["PathModule"]); - -var p1 = import(...a); -const p2 = import(); -const p3 = import(,); -const p4 = import("pathToModule", "secondModule"); - -//// [importCallExpressionGrammarError.js] -var a = ["./0"]; -Promise.resolve().then(function () { return require(...["PathModule"]); }); -var p1 = Promise.resolve().then(function () { return require(...a); }); -const p2 = Promise.resolve().then(function () { return require(); }); -const p3 = Promise.resolve().then(function () { return require(); }); -const p4 = Promise.resolve().then(function () { return require("pathToModule", "secondModule"); }); diff --git a/tests/baselines/reference/importCallExpressionInAMD1.js b/tests/baselines/reference/importCallExpressionInAMD1.js deleted file mode 100644 index e1758173646..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD1.js +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function foo() { return "foo"; } - exports.foo = foo; -}); -//// [1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); - p1.then(zero => { - return zero.foo(); - }); - function foo() { - const p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); - } -}); diff --git a/tests/baselines/reference/importCallExpressionInAMD1.symbols b/tests/baselines/reference/importCallExpressionInAMD1.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD1.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionInAMD1.types b/tests/baselines/reference/importCallExpressionInAMD1.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD1.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionInAMD2.js b/tests/baselines/reference/importCallExpressionInAMD2.js deleted file mode 100644 index 7347e2f8105..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD2.js +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); - -//// [0.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - class B { - print() { return "I am B"; } - } - exports.B = B; -}); -//// [2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - // We use Promise for now as there is no way to specify shape of module object - function foo(x) { - x.then(value => { - let b = new value.B(); - b.print(); - }); - } - foo(new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); -}); diff --git a/tests/baselines/reference/importCallExpressionInAMD2.symbols b/tests/baselines/reference/importCallExpressionInAMD2.symbols deleted file mode 100644 index 16fc79c774f..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD2.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - - x.then(value => { ->x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - let b = new value.B(); ->b : Symbol(b, Decl(2.ts, 3, 11)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - b.print(); ->b : Symbol(b, Decl(2.ts, 3, 11)) - - }) -} - -foo(import("./0")); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInAMD2.types b/tests/baselines/reference/importCallExpressionInAMD2.types deleted file mode 100644 index 44b17eb51fd..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD2.types +++ /dev/null @@ -1,46 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : (x: Promise) => void ->x : Promise ->Promise : Promise - - x.then(value => { ->x.then(value => { let b = new value.B(); b.print(); }) : Promise ->x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->x : Promise ->then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->value => { let b = new value.B(); b.print(); } : (value: any) => void ->value : any - - let b = new value.B(); ->b : any ->new value.B() : any ->value.B : any ->value : any ->B : any - - b.print(); ->b.print() : any ->b.print : any ->b : any ->print : any - - }) -} - -foo(import("./0")); ->foo(import("./0")) : void ->foo : (x: Promise) => void ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpressionInAMD3.js b/tests/baselines/reference/importCallExpressionInAMD3.js deleted file mode 100644 index 471f35a6415..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD3.js +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); - -//// [0.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - class B { - print() { return "I am B"; } - } - exports.B = B; -}); -//// [2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - async function foo() { - class C extends (await new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })).B { - } - var c = new C(); - c.print(); - } - foo(); -}); diff --git a/tests/baselines/reference/importCallExpressionInAMD3.symbols b/tests/baselines/reference/importCallExpressionInAMD3.symbols deleted file mode 100644 index 5ca85d6e693..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD3.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - - class C extends (await import("./0")).B {} ->C : Symbol(C, Decl(2.ts, 0, 22)) ->(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) ->B : Symbol(B, Decl(0.ts, 0, 0)) - - var c = new C(); ->c : Symbol(c, Decl(2.ts, 2, 7)) ->C : Symbol(C, Decl(2.ts, 0, 22)) - - c.print(); ->c.print : Symbol(B.print, Decl(0.ts, 0, 16)) ->c : Symbol(c, Decl(2.ts, 2, 7)) ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} -foo(); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInAMD3.types b/tests/baselines/reference/importCallExpressionInAMD3.types deleted file mode 100644 index e517be6e722..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD3.types +++ /dev/null @@ -1,37 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : () => Promise - - class C extends (await import("./0")).B {} ->C : C ->(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" ->import("./0") : Promise ->"./0" : "./0" ->B : typeof B - - var c = new C(); ->c : C ->new C() : C ->C : typeof C - - c.print(); ->c.print() : string ->c.print : () => string ->c : C ->print : () => string -} -foo(); ->foo() : Promise ->foo : () => Promise - diff --git a/tests/baselines/reference/importCallExpressionInAMD4.js b/tests/baselines/reference/importCallExpressionInAMD4.js deleted file mode 100644 index 6e50e139116..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD4.js +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} - -//// [0.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - class B { - print() { return "I am B"; } - } - exports.B = B; - function foo() { return "foo"; } - exports.foo = foo; -}); -//// [1.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function backup() { return "backup"; } - exports.backup = backup; -}); -//// [2.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - class C { - constructor() { - this.myModule = new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - } - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async (err) => { - console.log(err); - let one = await new Promise(function (resolve_2, reject_2) { require(["./1"], resolve_2, reject_2); }); - console.log(one.backup()); - }); - } - } -}); diff --git a/tests/baselines/reference/importCallExpressionInAMD4.symbols b/tests/baselines/reference/importCallExpressionInAMD4.symbols deleted file mode 100644 index 34a1dcf4d7b..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD4.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -export function foo() { return "foo" } ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : Symbol(console, Decl(2.ts, 0, 11)) - -class C { ->C : Symbol(C, Decl(2.ts, 0, 25)) - - private myModule = import("./0"); ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) - - method() { ->method : Symbol(C.method, Decl(2.ts, 2, 37)) - - this.myModule.then(Zero => { ->this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->this : Symbol(C, Decl(2.ts, 0, 25)) ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) - - console.log(Zero.foo()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - - }, async err => { ->err : Symbol(err, Decl(2.ts, 6, 16)) - - console.log(err); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->err : Symbol(err, Decl(2.ts, 6, 16)) - - let one = await import("./1"); ->one : Symbol(one, Decl(2.ts, 8, 15)) - - console.log(one.backup()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->one.backup : Symbol(backup, Decl(1.ts, 0, 0)) ->one : Symbol(one, Decl(2.ts, 8, 15)) ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInAMD4.types b/tests/baselines/reference/importCallExpressionInAMD4.types deleted file mode 100644 index 2ea666ba672..00000000000 --- a/tests/baselines/reference/importCallExpressionInAMD4.types +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -export function foo() { return "foo" } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : () => string ->"backup" : "backup" - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : any - -class C { ->C : C - - private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise ->"./0" : "./0" - - method() { ->method : () => void - - this.myModule.then(Zero => { ->this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise ->this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/dynamicImport/0" - - console.log(Zero.foo()); ->console.log(Zero.foo()) : any ->console.log : any ->console : any ->log : any ->Zero.foo() : string ->Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - - }, async err => { ->async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise ->err : any - - console.log(err); ->console.log(err) : any ->console.log : any ->console : any ->log : any ->err : any - - let one = await import("./1"); ->one : typeof "tests/cases/conformance/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->import("./1") : Promise ->"./1" : "./1" - - console.log(one.backup()); ->console.log(one.backup()) : any ->console.log : any ->console : any ->log : any ->one.backup() : string ->one.backup : () => string ->one : typeof "tests/cases/conformance/dynamicImport/1" ->backup : () => string - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInCJS1.js b/tests/baselines/reference/importCallExpressionInCJS1.js deleted file mode 100644 index 3fb298b5bde..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS1.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -Promise.resolve().then(function () { return require("./0"); }); -var p1 = Promise.resolve().then(function () { return require("./0"); }); -p1.then(zero => { - return zero.foo(); -}); -function foo() { - const p2 = Promise.resolve().then(function () { return require("./0"); }); -} diff --git a/tests/baselines/reference/importCallExpressionInCJS1.symbols b/tests/baselines/reference/importCallExpressionInCJS1.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS1.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionInCJS1.types b/tests/baselines/reference/importCallExpressionInCJS1.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS1.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionInCJS2.js b/tests/baselines/reference/importCallExpressionInCJS2.js deleted file mode 100644 index aa983a7a2fe..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS2.js +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -async function compute(promise: Promise) { - let j = await promise; - if (!j) { - j = await import("./1"); - return j.backup(); - } - return j.foo(); -} - -compute(import("./0")); - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function backup() { return "backup"; } -exports.backup = backup; -//// [2.js] -async function compute(promise) { - let j = await promise; - if (!j) { - j = await Promise.resolve().then(function () { return require("./1"); }); - return j.backup(); - } - return j.foo(); -} -compute(Promise.resolve().then(function () { return require("./0"); })); diff --git a/tests/baselines/reference/importCallExpressionInCJS2.symbols b/tests/baselines/reference/importCallExpressionInCJS2.symbols deleted file mode 100644 index 24f7a5cdb48..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS2.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/2.ts === -async function compute(promise: Promise) { ->compute : Symbol(compute, Decl(2.ts, 0, 0)) ->promise : Symbol(promise, Decl(2.ts, 0, 23)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - - let j = await promise; ->j : Symbol(j, Decl(2.ts, 1, 7)) ->promise : Symbol(promise, Decl(2.ts, 0, 23)) - - if (!j) { ->j : Symbol(j, Decl(2.ts, 1, 7)) - - j = await import("./1"); ->j : Symbol(j, Decl(2.ts, 1, 7)) - - return j.backup(); ->j : Symbol(j, Decl(2.ts, 1, 7)) - } - return j.foo(); ->j : Symbol(j, Decl(2.ts, 1, 7)) -} - -compute(import("./0")); ->compute : Symbol(compute, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInCJS2.types b/tests/baselines/reference/importCallExpressionInCJS2.types deleted file mode 100644 index 063a5224539..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS2.types +++ /dev/null @@ -1,51 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : () => string ->"backup" : "backup" - -=== tests/cases/conformance/dynamicImport/2.ts === -async function compute(promise: Promise) { ->compute : (promise: Promise) => Promise ->promise : Promise ->Promise : Promise - - let j = await promise; ->j : any ->await promise : any ->promise : Promise - - if (!j) { ->!j : boolean ->j : any - - j = await import("./1"); ->j = await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->j : any ->await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->import("./1") : Promise ->"./1" : "./1" - - return j.backup(); ->j.backup() : any ->j.backup : any ->j : any ->backup : any - } - return j.foo(); ->j.foo() : any ->j.foo : any ->j : any ->foo : any -} - -compute(import("./0")); ->compute(import("./0")) : Promise ->compute : (promise: Promise) => Promise ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpressionInCJS3.js b/tests/baselines/reference/importCallExpressionInCJS3.js deleted file mode 100644 index 2f956d9ac3a..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS3.js +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class B { - print() { return "I am B"; } -} -exports.B = B; -//// [2.js] -// We use Promise for now as there is no way to specify shape of module object -function foo(x) { - x.then(value => { - let b = new value.B(); - b.print(); - }); -} -foo(Promise.resolve().then(function () { return require("./0"); })); diff --git a/tests/baselines/reference/importCallExpressionInCJS3.symbols b/tests/baselines/reference/importCallExpressionInCJS3.symbols deleted file mode 100644 index 16fc79c774f..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS3.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - - x.then(value => { ->x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - let b = new value.B(); ->b : Symbol(b, Decl(2.ts, 3, 11)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - b.print(); ->b : Symbol(b, Decl(2.ts, 3, 11)) - - }) -} - -foo(import("./0")); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInCJS3.types b/tests/baselines/reference/importCallExpressionInCJS3.types deleted file mode 100644 index 44b17eb51fd..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS3.types +++ /dev/null @@ -1,46 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : (x: Promise) => void ->x : Promise ->Promise : Promise - - x.then(value => { ->x.then(value => { let b = new value.B(); b.print(); }) : Promise ->x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->x : Promise ->then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->value => { let b = new value.B(); b.print(); } : (value: any) => void ->value : any - - let b = new value.B(); ->b : any ->new value.B() : any ->value.B : any ->value : any ->B : any - - b.print(); ->b.print() : any ->b.print : any ->b : any ->print : any - - }) -} - -foo(import("./0")); ->foo(import("./0")) : void ->foo : (x: Promise) => void ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpressionInCJS4.js b/tests/baselines/reference/importCallExpressionInCJS4.js deleted file mode 100644 index 554a0b222ab..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS4.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class B { - print() { return "I am B"; } -} -exports.B = B; -//// [2.js] -async function foo() { - class C extends (await Promise.resolve().then(function () { return require("./0"); })).B { - } - var c = new C(); - c.print(); -} -foo(); diff --git a/tests/baselines/reference/importCallExpressionInCJS4.symbols b/tests/baselines/reference/importCallExpressionInCJS4.symbols deleted file mode 100644 index 5ca85d6e693..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS4.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - - class C extends (await import("./0")).B {} ->C : Symbol(C, Decl(2.ts, 0, 22)) ->(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) ->B : Symbol(B, Decl(0.ts, 0, 0)) - - var c = new C(); ->c : Symbol(c, Decl(2.ts, 2, 7)) ->C : Symbol(C, Decl(2.ts, 0, 22)) - - c.print(); ->c.print : Symbol(B.print, Decl(0.ts, 0, 16)) ->c : Symbol(c, Decl(2.ts, 2, 7)) ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} -foo(); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInCJS4.types b/tests/baselines/reference/importCallExpressionInCJS4.types deleted file mode 100644 index e517be6e722..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS4.types +++ /dev/null @@ -1,37 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : () => Promise - - class C extends (await import("./0")).B {} ->C : C ->(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" ->import("./0") : Promise ->"./0" : "./0" ->B : typeof B - - var c = new C(); ->c : C ->new C() : C ->C : typeof C - - c.print(); ->c.print() : string ->c.print : () => string ->c : C ->print : () => string -} -foo(); ->foo() : Promise ->foo : () => Promise - diff --git a/tests/baselines/reference/importCallExpressionInCJS5.js b/tests/baselines/reference/importCallExpressionInCJS5.js deleted file mode 100644 index 762da592827..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS5.js +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class B { - print() { return "I am B"; } -} -exports.B = B; -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function backup() { return "backup"; } -exports.backup = backup; -//// [2.js] -class C { - constructor() { - this.myModule = Promise.resolve().then(function () { return require("./0"); }); - } - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async (err) => { - console.log(err); - let one = await Promise.resolve().then(function () { return require("./1"); }); - console.log(one.backup()); - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInCJS5.symbols b/tests/baselines/reference/importCallExpressionInCJS5.symbols deleted file mode 100644 index 34a1dcf4d7b..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS5.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -export function foo() { return "foo" } ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : Symbol(console, Decl(2.ts, 0, 11)) - -class C { ->C : Symbol(C, Decl(2.ts, 0, 25)) - - private myModule = import("./0"); ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) - - method() { ->method : Symbol(C.method, Decl(2.ts, 2, 37)) - - this.myModule.then(Zero => { ->this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->this : Symbol(C, Decl(2.ts, 0, 25)) ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) - - console.log(Zero.foo()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - - }, async err => { ->err : Symbol(err, Decl(2.ts, 6, 16)) - - console.log(err); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->err : Symbol(err, Decl(2.ts, 6, 16)) - - let one = await import("./1"); ->one : Symbol(one, Decl(2.ts, 8, 15)) - - console.log(one.backup()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->one.backup : Symbol(backup, Decl(1.ts, 0, 0)) ->one : Symbol(one, Decl(2.ts, 8, 15)) ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInCJS5.types b/tests/baselines/reference/importCallExpressionInCJS5.types deleted file mode 100644 index 2ea666ba672..00000000000 --- a/tests/baselines/reference/importCallExpressionInCJS5.types +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -export function foo() { return "foo" } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : () => string ->"backup" : "backup" - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : any - -class C { ->C : C - - private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise ->"./0" : "./0" - - method() { ->method : () => void - - this.myModule.then(Zero => { ->this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise ->this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/dynamicImport/0" - - console.log(Zero.foo()); ->console.log(Zero.foo()) : any ->console.log : any ->console : any ->log : any ->Zero.foo() : string ->Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - - }, async err => { ->async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise ->err : any - - console.log(err); ->console.log(err) : any ->console.log : any ->console : any ->log : any ->err : any - - let one = await import("./1"); ->one : typeof "tests/cases/conformance/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->import("./1") : Promise ->"./1" : "./1" - - console.log(one.backup()); ->console.log(one.backup()) : any ->console.log : any ->console : any ->log : any ->one.backup() : string ->one.backup : () => string ->one : typeof "tests/cases/conformance/dynamicImport/1" ->backup : () => string - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.js b/tests/baselines/reference/importCallExpressionInScriptContext1.js deleted file mode 100644 index 2c2d2f904d5..00000000000 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.js +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -var p1 = import("./0"); -function arguments() { } // this is allow as the file doesn't have implicit "use strict" - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -var p1 = Promise.resolve().then(function () { return require("./0"); }); -function arguments() { } // this is allow as the file doesn't have implicit "use strict" diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.symbols b/tests/baselines/reference/importCallExpressionInScriptContext1.symbols deleted file mode 100644 index 513612056a8..00000000000 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.symbols +++ /dev/null @@ -1,11 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 0, 3)) - -function arguments() { } // this is allow as the file doesn't have implicit "use strict" ->arguments : Symbol(arguments, Decl(1.ts, 0, 23)) - diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.types b/tests/baselines/reference/importCallExpressionInScriptContext1.types deleted file mode 100644 index c318667c7d8..00000000000 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.types +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -function arguments() { } // this is allow as the file doesn't have implicit "use strict" ->arguments : () => void - diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt b/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt deleted file mode 100644 index 9020963f68f..00000000000 --- a/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1100: Invalid use of 'arguments' in strict mode. - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export function foo() { return "foo"; } - -==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== - "use strict" - var p1 = import("./0"); - function arguments() { } - ~~~~~~~~~ -!!! error TS1100: Invalid use of 'arguments' in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.js b/tests/baselines/reference/importCallExpressionInScriptContext2.js deleted file mode 100644 index 6b6e0109fda..00000000000 --- a/tests/baselines/reference/importCallExpressionInScriptContext2.js +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -"use strict" -var p1 = import("./0"); -function arguments() { } - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -"use strict"; -var p1 = Promise.resolve().then(function () { return require("./0"); }); -function arguments() { } diff --git a/tests/baselines/reference/importCallExpressionInSystem1.js b/tests/baselines/reference/importCallExpressionInSystem1.js deleted file mode 100644 index d74eb6ffc76..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem1.js +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - function foo() { return "foo"; } - exports_1("foo", foo); - return { - setters: [], - execute: function () { - } - }; -}); -//// [1.js] -System.register([], function (exports_1, context_1) { - var __moduleName = context_1 && context_1.id; - function foo() { - const p2 = context_1.import("./0"); - } - var p1; - return { - setters: [], - execute: function () { - context_1.import("./0"); - p1 = context_1.import("./0"); - p1.then(zero => { - return zero.foo(); - }); - } - }; -}); diff --git a/tests/baselines/reference/importCallExpressionInSystem1.symbols b/tests/baselines/reference/importCallExpressionInSystem1.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem1.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionInSystem1.types b/tests/baselines/reference/importCallExpressionInSystem1.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem1.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionInSystem2.js b/tests/baselines/reference/importCallExpressionInSystem2.js deleted file mode 100644 index ea84e47e63c..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem2.js +++ /dev/null @@ -1,50 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); - -//// [0.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var B; - return { - setters: [], - execute: function () { - B = class B { - print() { return "I am B"; } - }; - exports_1("B", B); - } - }; -}); -//// [2.js] -System.register([], function (exports_1, context_1) { - var __moduleName = context_1 && context_1.id; - // We use Promise for now as there is no way to specify shape of module object - function foo(x) { - x.then(value => { - let b = new value.B(); - b.print(); - }); - } - return { - setters: [], - execute: function () { - foo(context_1.import("./0")); - } - }; -}); diff --git a/tests/baselines/reference/importCallExpressionInSystem2.symbols b/tests/baselines/reference/importCallExpressionInSystem2.symbols deleted file mode 100644 index 16fc79c774f..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem2.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - - x.then(value => { ->x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - let b = new value.B(); ->b : Symbol(b, Decl(2.ts, 3, 11)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - b.print(); ->b : Symbol(b, Decl(2.ts, 3, 11)) - - }) -} - -foo(import("./0")); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInSystem2.types b/tests/baselines/reference/importCallExpressionInSystem2.types deleted file mode 100644 index 44b17eb51fd..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem2.types +++ /dev/null @@ -1,46 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : (x: Promise) => void ->x : Promise ->Promise : Promise - - x.then(value => { ->x.then(value => { let b = new value.B(); b.print(); }) : Promise ->x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->x : Promise ->then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->value => { let b = new value.B(); b.print(); } : (value: any) => void ->value : any - - let b = new value.B(); ->b : any ->new value.B() : any ->value.B : any ->value : any ->B : any - - b.print(); ->b.print() : any ->b.print : any ->b : any ->print : any - - }) -} - -foo(import("./0")); ->foo(import("./0")) : void ->foo : (x: Promise) => void ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpressionInSystem3.js b/tests/baselines/reference/importCallExpressionInSystem3.js deleted file mode 100644 index 309be9114fe..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem3.js +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); - -//// [0.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - var B; - return { - setters: [], - execute: function () { - B = class B { - print() { return "I am B"; } - }; - exports_1("B", B); - } - }; -}); -//// [2.js] -System.register([], function (exports_1, context_1) { - var __moduleName = context_1 && context_1.id; - async function foo() { - class C extends (await context_1.import("./0")).B { - } - var c = new C(); - c.print(); - } - return { - setters: [], - execute: function () { - foo(); - } - }; -}); diff --git a/tests/baselines/reference/importCallExpressionInSystem3.symbols b/tests/baselines/reference/importCallExpressionInSystem3.symbols deleted file mode 100644 index 5ca85d6e693..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem3.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - - class C extends (await import("./0")).B {} ->C : Symbol(C, Decl(2.ts, 0, 22)) ->(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) ->B : Symbol(B, Decl(0.ts, 0, 0)) - - var c = new C(); ->c : Symbol(c, Decl(2.ts, 2, 7)) ->C : Symbol(C, Decl(2.ts, 0, 22)) - - c.print(); ->c.print : Symbol(B.print, Decl(0.ts, 0, 16)) ->c : Symbol(c, Decl(2.ts, 2, 7)) ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} -foo(); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInSystem3.types b/tests/baselines/reference/importCallExpressionInSystem3.types deleted file mode 100644 index e517be6e722..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem3.types +++ /dev/null @@ -1,37 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : () => Promise - - class C extends (await import("./0")).B {} ->C : C ->(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" ->import("./0") : Promise ->"./0" : "./0" ->B : typeof B - - var c = new C(); ->c : C ->new C() : C ->C : typeof C - - c.print(); ->c.print() : string ->c.print : () => string ->c : C ->print : () => string -} -foo(); ->foo() : Promise ->foo : () => Promise - diff --git a/tests/baselines/reference/importCallExpressionInSystem4.js b/tests/baselines/reference/importCallExpressionInSystem4.js deleted file mode 100644 index ac01a0439e8..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem4.js +++ /dev/null @@ -1,80 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} - -//// [0.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - function foo() { return "foo"; } - exports_1("foo", foo); - var B; - return { - setters: [], - execute: function () { - B = class B { - print() { return "I am B"; } - }; - exports_1("B", B); - } - }; -}); -//// [1.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - function backup() { return "backup"; } - exports_1("backup", backup); - return { - setters: [], - execute: function () { - } - }; -}); -//// [2.js] -System.register([], function (exports_1, context_1) { - var __moduleName = context_1 && context_1.id; - var C; - return { - setters: [], - execute: function () { - C = class C { - constructor() { - this.myModule = context_1.import("./0"); - } - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async (err) => { - console.log(err); - let one = await context_1.import("./1"); - console.log(one.backup()); - }); - } - }; - } - }; -}); diff --git a/tests/baselines/reference/importCallExpressionInSystem4.symbols b/tests/baselines/reference/importCallExpressionInSystem4.symbols deleted file mode 100644 index 34a1dcf4d7b..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem4.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -export function foo() { return "foo" } ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : Symbol(console, Decl(2.ts, 0, 11)) - -class C { ->C : Symbol(C, Decl(2.ts, 0, 25)) - - private myModule = import("./0"); ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) - - method() { ->method : Symbol(C.method, Decl(2.ts, 2, 37)) - - this.myModule.then(Zero => { ->this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->this : Symbol(C, Decl(2.ts, 0, 25)) ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) - - console.log(Zero.foo()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - - }, async err => { ->err : Symbol(err, Decl(2.ts, 6, 16)) - - console.log(err); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->err : Symbol(err, Decl(2.ts, 6, 16)) - - let one = await import("./1"); ->one : Symbol(one, Decl(2.ts, 8, 15)) - - console.log(one.backup()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->one.backup : Symbol(backup, Decl(1.ts, 0, 0)) ->one : Symbol(one, Decl(2.ts, 8, 15)) ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInSystem4.types b/tests/baselines/reference/importCallExpressionInSystem4.types deleted file mode 100644 index 2ea666ba672..00000000000 --- a/tests/baselines/reference/importCallExpressionInSystem4.types +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -export function foo() { return "foo" } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : () => string ->"backup" : "backup" - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : any - -class C { ->C : C - - private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise ->"./0" : "./0" - - method() { ->method : () => void - - this.myModule.then(Zero => { ->this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise ->this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/dynamicImport/0" - - console.log(Zero.foo()); ->console.log(Zero.foo()) : any ->console.log : any ->console : any ->log : any ->Zero.foo() : string ->Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - - }, async err => { ->async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise ->err : any - - console.log(err); ->console.log(err) : any ->console.log : any ->console : any ->log : any ->err : any - - let one = await import("./1"); ->one : typeof "tests/cases/conformance/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->import("./1") : Promise ->"./1" : "./1" - - console.log(one.backup()); ->console.log(one.backup()) : any ->console.log : any ->console : any ->log : any ->one.backup() : string ->one.backup : () => string ->one : typeof "tests/cases/conformance/dynamicImport/1" ->backup : () => string - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInUMD1.js b/tests/baselines/reference/importCallExpressionInUMD1.js deleted file mode 100644 index f1bfcd3cc71..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD1.js +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} - -//// [0.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function foo() { return "foo"; } - exports.foo = foo; -}); -//// [1.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); - p1.then(zero => { - return zero.foo(); - }); - function foo() { - const p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); - } -}); diff --git a/tests/baselines/reference/importCallExpressionInUMD1.symbols b/tests/baselines/reference/importCallExpressionInUMD1.symbols deleted file mode 100644 index 333251da662..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD1.symbols +++ /dev/null @@ -1,28 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); -var p1 = import("./0"); ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 1, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) - - return zero.foo(); ->zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) ->zero : Symbol(zero, Decl(1.ts, 2, 8)) ->foo : Symbol(foo, Decl(0.ts, 0, 0)) - -}); - -function foo() { ->foo : Symbol(foo, Decl(1.ts, 4, 3)) - - const p2 = import("./0"); ->p2 : Symbol(p2, Decl(1.ts, 7, 9)) -} diff --git a/tests/baselines/reference/importCallExpressionInUMD1.types b/tests/baselines/reference/importCallExpressionInUMD1.types deleted file mode 100644 index 59da055ee01..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD1.types +++ /dev/null @@ -1,39 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export function foo() { return "foo"; } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -import("./0"); ->import("./0") : Promise ->"./0" : "./0" - -var p1 = import("./0"); ->p1 : Promise ->import("./0") : Promise ->"./0" : "./0" - -p1.then(zero => { ->p1.then(zero => { return zero.foo();}) : Promise ->p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" - - return zero.foo(); ->zero.foo() : string ->zero.foo : () => string ->zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - -}); - -function foo() { ->foo : () => void - - const p2 = import("./0"); ->p2 : Promise ->import("./0") : Promise ->"./0" : "./0" -} diff --git a/tests/baselines/reference/importCallExpressionInUMD2.js b/tests/baselines/reference/importCallExpressionInUMD2.js deleted file mode 100644 index db8b87a2f79..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD2.js +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); - -//// [0.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - class B { - print() { return "I am B"; } - } - exports.B = B; -}); -//// [2.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - // We use Promise for now as there is no way to specify shape of module object - function foo(x) { - x.then(value => { - let b = new value.B(); - b.print(); - }); - } - foo(__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); -}); diff --git a/tests/baselines/reference/importCallExpressionInUMD2.symbols b/tests/baselines/reference/importCallExpressionInUMD2.symbols deleted file mode 100644 index 16fc79c774f..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD2.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) - - x.then(value => { ->x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(2.ts, 1, 13)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - let b = new value.B(); ->b : Symbol(b, Decl(2.ts, 3, 11)) ->value : Symbol(value, Decl(2.ts, 2, 11)) - - b.print(); ->b : Symbol(b, Decl(2.ts, 3, 11)) - - }) -} - -foo(import("./0")); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInUMD2.types b/tests/baselines/reference/importCallExpressionInUMD2.types deleted file mode 100644 index 44b17eb51fd..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD2.types +++ /dev/null @@ -1,46 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { ->foo : (x: Promise) => void ->x : Promise ->Promise : Promise - - x.then(value => { ->x.then(value => { let b = new value.B(); b.print(); }) : Promise ->x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->x : Promise ->then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->value => { let b = new value.B(); b.print(); } : (value: any) => void ->value : any - - let b = new value.B(); ->b : any ->new value.B() : any ->value.B : any ->value : any ->B : any - - b.print(); ->b.print() : any ->b.print : any ->b : any ->print : any - - }) -} - -foo(import("./0")); ->foo(import("./0")) : void ->foo : (x: Promise) => void ->import("./0") : Promise ->"./0" : "./0" - diff --git a/tests/baselines/reference/importCallExpressionInUMD3.js b/tests/baselines/reference/importCallExpressionInUMD3.js deleted file mode 100644 index 41106e3ab78..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD3.js +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -//// [2.ts] -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); - -//// [0.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - class B { - print() { return "I am B"; } - } - exports.B = B; -}); -//// [2.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - async function foo() { - class C extends (await (__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }))).B { - } - var c = new C(); - c.print(); - } - foo(); -}); diff --git a/tests/baselines/reference/importCallExpressionInUMD3.symbols b/tests/baselines/reference/importCallExpressionInUMD3.symbols deleted file mode 100644 index 5ca85d6e693..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD3.symbols +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - - class C extends (await import("./0")).B {} ->C : Symbol(C, Decl(2.ts, 0, 22)) ->(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) ->B : Symbol(B, Decl(0.ts, 0, 0)) - - var c = new C(); ->c : Symbol(c, Decl(2.ts, 2, 7)) ->C : Symbol(C, Decl(2.ts, 0, 22)) - - c.print(); ->c.print : Symbol(B.print, Decl(0.ts, 0, 16)) ->c : Symbol(c, Decl(2.ts, 2, 7)) ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} -foo(); ->foo : Symbol(foo, Decl(2.ts, 0, 0)) - diff --git a/tests/baselines/reference/importCallExpressionInUMD3.types b/tests/baselines/reference/importCallExpressionInUMD3.types deleted file mode 100644 index e517be6e722..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD3.types +++ /dev/null @@ -1,37 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -=== tests/cases/conformance/dynamicImport/2.ts === -async function foo() { ->foo : () => Promise - - class C extends (await import("./0")).B {} ->C : C ->(await import("./0")).B : B ->(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" ->await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" ->import("./0") : Promise ->"./0" : "./0" ->B : typeof B - - var c = new C(); ->c : C ->new C() : C ->C : typeof C - - c.print(); ->c.print() : string ->c.print : () => string ->c : C ->print : () => string -} -foo(); ->foo() : Promise ->foo : () => Promise - diff --git a/tests/baselines/reference/importCallExpressionInUMD4.js b/tests/baselines/reference/importCallExpressionInUMD4.js deleted file mode 100644 index 47ba83b1718..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD4.js +++ /dev/null @@ -1,88 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts] //// - -//// [0.ts] -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -//// [1.ts] -export function backup() { return "backup"; } - -//// [2.ts] -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} - -//// [0.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - class B { - print() { return "I am B"; } - } - exports.B = B; - function foo() { return "foo"; } - exports.foo = foo; -}); -//// [1.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - function backup() { return "backup"; } - exports.backup = backup; -}); -//// [2.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - var __syncRequire = typeof module === "object" && typeof module.exports === "object"; - class C { - constructor() { - this.myModule = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - } - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async (err) => { - console.log(err); - let one = await (__syncRequire ? Promise.resolve().then(function () { return require("./1"); }) : new Promise(function (resolve_2, reject_2) { require(["./1"], resolve_2, reject_2); })); - console.log(one.backup()); - }); - } - } -}); diff --git a/tests/baselines/reference/importCallExpressionInUMD4.symbols b/tests/baselines/reference/importCallExpressionInUMD4.symbols deleted file mode 100644 index 34a1dcf4d7b..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD4.symbols +++ /dev/null @@ -1,61 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : Symbol(B, Decl(0.ts, 0, 0)) - - print() { return "I am B"} ->print : Symbol(B.print, Decl(0.ts, 0, 16)) -} - -export function foo() { return "foo" } ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : Symbol(console, Decl(2.ts, 0, 11)) - -class C { ->C : Symbol(C, Decl(2.ts, 0, 25)) - - private myModule = import("./0"); ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) - - method() { ->method : Symbol(C.method, Decl(2.ts, 2, 37)) - - this.myModule.then(Zero => { ->this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->this : Symbol(C, Decl(2.ts, 0, 25)) ->myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) - - console.log(Zero.foo()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) ->Zero : Symbol(Zero, Decl(2.ts, 4, 27)) ->foo : Symbol(foo, Decl(0.ts, 2, 1)) - - }, async err => { ->err : Symbol(err, Decl(2.ts, 6, 16)) - - console.log(err); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->err : Symbol(err, Decl(2.ts, 6, 16)) - - let one = await import("./1"); ->one : Symbol(one, Decl(2.ts, 8, 15)) - - console.log(one.backup()); ->console : Symbol(console, Decl(2.ts, 0, 11)) ->one.backup : Symbol(backup, Decl(1.ts, 0, 0)) ->one : Symbol(one, Decl(2.ts, 8, 15)) ->backup : Symbol(backup, Decl(1.ts, 0, 0)) - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionInUMD4.types b/tests/baselines/reference/importCallExpressionInUMD4.types deleted file mode 100644 index 2ea666ba672..00000000000 --- a/tests/baselines/reference/importCallExpressionInUMD4.types +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/dynamicImport/0.ts === -export class B { ->B : B - - print() { return "I am B"} ->print : () => string ->"I am B" : "I am B" -} - -export function foo() { return "foo" } ->foo : () => string ->"foo" : "foo" - -=== tests/cases/conformance/dynamicImport/1.ts === -export function backup() { return "backup"; } ->backup : () => string ->"backup" : "backup" - -=== tests/cases/conformance/dynamicImport/2.ts === -declare var console: any; ->console : any - -class C { ->C : C - - private myModule = import("./0"); ->myModule : Promise ->import("./0") : Promise ->"./0" : "./0" - - method() { ->method : () => void - - this.myModule.then(Zero => { ->this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise ->this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->this.myModule : Promise ->this : this ->myModule : Promise ->then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void ->Zero : typeof "tests/cases/conformance/dynamicImport/0" - - console.log(Zero.foo()); ->console.log(Zero.foo()) : any ->console.log : any ->console : any ->log : any ->Zero.foo() : string ->Zero.foo : () => string ->Zero : typeof "tests/cases/conformance/dynamicImport/0" ->foo : () => string - - }, async err => { ->async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise ->err : any - - console.log(err); ->console.log(err) : any ->console.log : any ->console : any ->log : any ->err : any - - let one = await import("./1"); ->one : typeof "tests/cases/conformance/dynamicImport/1" ->await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" ->import("./1") : Promise ->"./1" : "./1" - - console.log(one.backup()); ->console.log(one.backup()) : any ->console.log : any ->console : any ->log : any ->one.backup() : string ->one.backup : () => string ->one : typeof "tests/cases/conformance/dynamicImport/1" ->backup : () => string - - }); - } -} diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js deleted file mode 100644 index 728d6636953..00000000000 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts] //// - -//// [defaultPath.ts] -export class C {} - -//// [1.ts] -import * as defaultModule from "./defaultPath"; -declare function getSpecifier(): string; -declare function ValidSomeCondition(): boolean; -declare var whatToLoad: boolean; -declare const directory: string; -declare const moduleFile: number; - -import(`${directory}\${moduleFile}`); -import(getSpecifier()); - -var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); -var p1: Promise = import(getSpecifier()); -var p11: Promise = import(getSpecifier()); -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; -p1.then(zero => { - return zero.foo(); // ok, zero is any -}); - -let j: string; -var p3: Promise = import(j=getSpecifier()); - -function * loadModule(directories: string[]) { - for (const directory of directories) { - const path = `${directory}\moduleFile`; - import(yield path); - } -} - - -//// [defaultPath.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class C { -} -exports.C = C; -//// [1.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); -Promise.resolve().then(function () { return require(getSpecifier()); }); -var p1 = Promise.resolve().then(function () { return require(ValidSomeCondition() ? "./0" : "externalModule"); }); -var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); -var p11 = Promise.resolve().then(function () { return require(getSpecifier()); }); -const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); -p1.then(zero => { - return zero.foo(); // ok, zero is any -}); -let j; -var p3 = Promise.resolve().then(function () { return require(j = getSpecifier()); }); -function* loadModule(directories) { - for (const directory of directories) { - const path = `${directory}\moduleFile`; - Promise.resolve().then(function () { return require(yield path); }); - } -} diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols deleted file mode 100644 index 0d46961475f..00000000000 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols +++ /dev/null @@ -1,89 +0,0 @@ -=== tests/cases/conformance/dynamicImport/defaultPath.ts === -export class C {} ->C : Symbol(C, Decl(defaultPath.ts, 0, 0)) - -=== tests/cases/conformance/dynamicImport/1.ts === -import * as defaultModule from "./defaultPath"; ->defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) - -declare function getSpecifier(): string; ->getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) - -declare function ValidSomeCondition(): boolean; ->ValidSomeCondition : Symbol(ValidSomeCondition, Decl(1.ts, 1, 40)) - -declare var whatToLoad: boolean; ->whatToLoad : Symbol(whatToLoad, Decl(1.ts, 3, 11)) - -declare const directory: string; ->directory : Symbol(directory, Decl(1.ts, 4, 13)) - -declare const moduleFile: number; ->moduleFile : Symbol(moduleFile, Decl(1.ts, 5, 13)) - -import(`${directory}\${moduleFile}`); ->directory : Symbol(directory, Decl(1.ts, 4, 13)) - -import(getSpecifier()); ->getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) - -var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); ->p1 : Symbol(p1, Decl(1.ts, 10, 3), Decl(1.ts, 11, 3)) ->ValidSomeCondition : Symbol(ValidSomeCondition, Decl(1.ts, 1, 40)) - -var p1: Promise = import(getSpecifier()); ->p1 : Symbol(p1, Decl(1.ts, 10, 3), Decl(1.ts, 11, 3)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) - -var p11: Promise = import(getSpecifier()); ->p11 : Symbol(p11, Decl(1.ts, 12, 3)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) ->getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) - -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; ->p2 : Symbol(p2, Decl(1.ts, 13, 5)) ->whatToLoad : Symbol(whatToLoad, Decl(1.ts, 3, 11)) ->getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) - -p1.then(zero => { ->p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->p1 : Symbol(p1, Decl(1.ts, 10, 3), Decl(1.ts, 11, 3)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) ->zero : Symbol(zero, Decl(1.ts, 14, 8)) - - return zero.foo(); // ok, zero is any ->zero : Symbol(zero, Decl(1.ts, 14, 8)) - -}); - -let j: string; ->j : Symbol(j, Decl(1.ts, 18, 3)) - -var p3: Promise = import(j=getSpecifier()); ->p3 : Symbol(p3, Decl(1.ts, 19, 3)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) ->j : Symbol(j, Decl(1.ts, 18, 3)) ->getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) - -function * loadModule(directories: string[]) { ->loadModule : Symbol(loadModule, Decl(1.ts, 19, 65)) ->directories : Symbol(directories, Decl(1.ts, 21, 22)) - - for (const directory of directories) { ->directory : Symbol(directory, Decl(1.ts, 22, 14)) ->directories : Symbol(directories, Decl(1.ts, 21, 22)) - - const path = `${directory}\moduleFile`; ->path : Symbol(path, Decl(1.ts, 23, 13)) ->directory : Symbol(directory, Decl(1.ts, 22, 14)) - - import(yield path); ->path : Symbol(path, Decl(1.ts, 23, 13)) - } -} - diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types deleted file mode 100644 index fc52b38c1fb..00000000000 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types +++ /dev/null @@ -1,118 +0,0 @@ -=== tests/cases/conformance/dynamicImport/defaultPath.ts === -export class C {} ->C : C - -=== tests/cases/conformance/dynamicImport/1.ts === -import * as defaultModule from "./defaultPath"; ->defaultModule : typeof defaultModule - -declare function getSpecifier(): string; ->getSpecifier : () => string - -declare function ValidSomeCondition(): boolean; ->ValidSomeCondition : () => boolean - -declare var whatToLoad: boolean; ->whatToLoad : boolean - -declare const directory: string; ->directory : string - -declare const moduleFile: number; ->moduleFile : number - -import(`${directory}\${moduleFile}`); ->import(`${directory}\${moduleFile}`) : Promise ->`${directory}\${moduleFile}` : string ->directory : string - -import(getSpecifier()); ->import(getSpecifier()) : Promise ->getSpecifier() : string ->getSpecifier : () => string - -var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); ->p1 : Promise ->import(ValidSomeCondition() ? "./0" : "externalModule") : Promise ->ValidSomeCondition() ? "./0" : "externalModule" : "./0" | "externalModule" ->ValidSomeCondition() : boolean ->ValidSomeCondition : () => boolean ->"./0" : "./0" ->"externalModule" : "externalModule" - -var p1: Promise = import(getSpecifier()); ->p1 : Promise ->Promise : Promise ->import(getSpecifier()) : Promise ->getSpecifier() : string ->getSpecifier : () => string - -var p11: Promise = import(getSpecifier()); ->p11 : Promise ->Promise : Promise ->defaultModule : typeof defaultModule ->import(getSpecifier()) : Promise ->getSpecifier() : string ->getSpecifier : () => string - -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; ->p2 : Promise ->import(whatToLoad ? getSpecifier() : "defaulPath") as Promise : Promise ->import(whatToLoad ? getSpecifier() : "defaulPath") : Promise ->whatToLoad ? getSpecifier() : "defaulPath" : string ->whatToLoad : boolean ->getSpecifier() : string ->getSpecifier : () => string ->"defaulPath" : "defaulPath" ->Promise : Promise ->defaultModule : typeof defaultModule - -p1.then(zero => { ->p1.then(zero => { return zero.foo(); // ok, zero is any}) : Promise ->p1.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->p1 : Promise ->then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise ->zero => { return zero.foo(); // ok, zero is any} : (zero: any) => any ->zero : any - - return zero.foo(); // ok, zero is any ->zero.foo() : any ->zero.foo : any ->zero : any ->foo : any - -}); - -let j: string; ->j : string - -var p3: Promise = import(j=getSpecifier()); ->p3 : Promise ->Promise : Promise ->defaultModule : typeof defaultModule ->import(j=getSpecifier()) : Promise ->j=getSpecifier() : string ->j : string ->getSpecifier() : string ->getSpecifier : () => string - -function * loadModule(directories: string[]) { ->loadModule : (directories: string[]) => IterableIterator ->directories : string[] - - for (const directory of directories) { ->directory : string ->directories : string[] - - const path = `${directory}\moduleFile`; ->path : string ->`${directory}\moduleFile` : string ->directory : string - - import(yield path); ->import(yield path) : Promise ->yield path : any ->path : string - } -} - diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt deleted file mode 100644 index a1159a31ebd..00000000000 --- a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(5,8): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. -tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(6,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. -tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(7,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'. -tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(12,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'. -tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(13,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'. - - -==== tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts (5 errors) ==== - declare function getSpecifier(): boolean; - declare var whatToLoad: boolean; - - // Error specifier is not assignable to string - import(getSpecifier()); - ~~~~~~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. - var p1 = import(getSpecifier()); - ~~~~~~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. - const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'. - p1.then(zero => { - return zero.foo(); // ok, zero is any - }); - - var p3 = import(["path1", "path2"]); - ~~~~~~~~~~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'. - var p4 = import(()=>"PathToModule"); - ~~~~~~~~~~~~~~~~~~ -!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js deleted file mode 100644 index dde35d8048b..00000000000 --- a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js +++ /dev/null @@ -1,25 +0,0 @@ -//// [importCallExpressionSpecifierNotStringTypeError.ts] -declare function getSpecifier(): boolean; -declare var whatToLoad: boolean; - -// Error specifier is not assignable to string -import(getSpecifier()); -var p1 = import(getSpecifier()); -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") -p1.then(zero => { - return zero.foo(); // ok, zero is any -}); - -var p3 = import(["path1", "path2"]); -var p4 = import(()=>"PathToModule"); - -//// [importCallExpressionSpecifierNotStringTypeError.js] -// Error specifier is not assignable to string -Promise.resolve().then(function () { return require(getSpecifier()); }); -var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); -const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); -p1.then(zero => { - return zero.foo(); // ok, zero is any -}); -var p3 = Promise.resolve().then(function () { return require(["path1", "path2"]); }); -var p4 = Promise.resolve().then(function () { return require(() => "PathToModule"); }); diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt deleted file mode 100644 index 8adf2789585..00000000000 --- a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments -tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments - - -==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== - export function foo() { return "foo"; } - -==== tests/cases/conformance/dynamicImport/1.ts (2 errors) ==== - "use strict" - var p1 = import>("./0"); // error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1326: Dynamic import cannot have type arguments - var p2 = import<>("./0"); // error - ~~~~~~~~~~~~~~~ -!!! error TS1326: Dynamic import cannot have type arguments - // p1.then(value => { - // value.anyFunction(); - // }) \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.js b/tests/baselines/reference/importCallExpressionWithTypeArgument.js deleted file mode 100644 index d8690cf5d75..00000000000 --- a/tests/baselines/reference/importCallExpressionWithTypeArgument.js +++ /dev/null @@ -1,22 +0,0 @@ -//// [tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts] //// - -//// [0.ts] -export function foo() { return "foo"; } - -//// [1.ts] -"use strict" -var p1 = import>("./0"); // error -var p2 = import<>("./0"); // error -// p1.then(value => { -// value.anyFunction(); -// }) - -//// [0.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function foo() { return "foo"; } -exports.foo = foo; -//// [1.js] -"use strict"; -var p1 = (import)("./0"); // error -var p2 = (import)("./0"); // error diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt index f746915da7d..d746f35cbe7 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt index f746915da7d..d746f35cbe7 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 772c218eb4e..04599005244 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 7a9b895636c..2a41e2c4df0 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 70d5ed9d738..e29a2813282 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index 914b9d99d1b..69831916904 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 50bd28442bb..407df036f89 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 772c218eb4e..04599005244 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index afae7193d58..e4d0b37ae51 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index a87fe9c5206..3e3f7a85b34 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts deleted file mode 100644 index 295b6470301..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: esnext -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}) - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts deleted file mode 100644 index f0e9b358854..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @module: esnext -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts deleted file mode 100644 index ee7264b8c7e..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: esnext -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts deleted file mode 100644 index 91342770d7d..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @module: esnext -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts deleted file mode 100644 index 173b606a50c..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts +++ /dev/null @@ -1,20 +0,0 @@ -// @module: esnext -// @target: esnext -// @strictNullChecks: true -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare function bar(): boolean; -const specify = bar() ? "./0" : undefined; -let myModule = import(specify); -let myModule1 = import(undefined); -let myModule2 = import(bar() ? "./1" : null); -let myModule3 = import(null); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts deleted file mode 100644 index f09521186e8..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @module: esnext -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare function bar(): boolean; -const specify = bar() ? "./0" : undefined; -let myModule = import(specify); -let myModule1 = import(undefined); -let myModule2 = import(bar() ? "./1" : null); -let myModule3 = import(null); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts deleted file mode 100644 index 1218565fa54..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: true - -// @filename: anotherModule.ts -export class D{} - -// @filename: defaultPath.ts -export class C {} - -// @filename: 1.ts -import * as defaultModule from "./defaultPath"; -import * as anotherModule from "./anotherModule"; - -let p1: Promise = import("./defaultPath"); -let p2 = import("./defaultPath") as Promise; -let p3: Promise = import("./defaultPath"); diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts deleted file mode 100644 index fb299951148..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: false -// @declaration: true - -declare function getSpecifier(): string; -declare var whatToLoad: boolean; -declare const directory: string; -declare const moduleFile: number; - -import(getSpecifier()); - -var p0 = import(`${directory}\${moduleFile}`); -var p1 = import(getSpecifier()); -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") - -function returnDynamicLoad(path: string) { - return import(path); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts deleted file mode 100644 index 4b9196dea20..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @module: esnext -// @target: esnext -// @declaration: true - -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -var p1 = import("./0"); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts deleted file mode 100644 index 6d17d624190..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: esnext -// @target: esnext -// @declaration: true - -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -declare function getPath(): string; -import * as Zero from "./0"; -import("./0"); - -export var p0: Promise = import(getPath()); -export var p1: Promise = import("./0"); -export var p2: Promise = import("./0"); diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts deleted file mode 100644 index 33c31283ea0..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @module: amd -// @target: es5 -// @lib: es6 -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts deleted file mode 100644 index 900ddbdba0c..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @module: commonjs -// @target: es5 -// @lib: es6 -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts deleted file mode 100644 index c00ab6899c6..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @module: system -// @target: es5 -// @lib: es6 -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts deleted file mode 100644 index 699b0ffc342..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @module: umd -// @target: es5 -// @lib: es6 -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts b/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts deleted file mode 100644 index a7fcd8533a3..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: es2015 -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}) - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts b/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts deleted file mode 100644 index 38dc47f3207..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: false - -declare function getSpecifier(): string; -declare var whatToLoad: boolean; - -var a = ["./0"]; -import(...["PathModule"]); - -var p1 = import(...a); -const p2 = import(); -const p3 = import(,); -const p4 = import("pathToModule", "secondModule"); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts deleted file mode 100644 index 63cfc54c732..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: amd -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts deleted file mode 100644 index 96b2fd4ceff..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @module: amd -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts deleted file mode 100644 index a2b287b4d95..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: amd -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts deleted file mode 100644 index 10044ab674c..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @module: amd -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts deleted file mode 100644 index e1457017552..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: commonjs -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts deleted file mode 100644 index e42a58a290c..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @module: commonjs -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -async function compute(promise: Promise) { - let j = await promise; - if (!j) { - j = await import("./1"); - return j.backup(); - } - return j.foo(); -} - -compute(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts deleted file mode 100644 index 5990eb3a5a2..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @module: commonjs -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts deleted file mode 100644 index fba246c0b8b..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: commonjs -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts deleted file mode 100644 index db86764802b..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @module: commonjs -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts deleted file mode 100644 index 166513321a3..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: false - -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -var p1 = import("./0"); -function arguments() { } // this is allow as the file doesn't have implicit "use strict" \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts deleted file mode 100644 index 754f7e865bb..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: false - -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -"use strict" -var p1 = import("./0"); -function arguments() { } \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts deleted file mode 100644 index a69e844c7a7..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: system -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts deleted file mode 100644 index c6fac3683ee..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @module: system -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts deleted file mode 100644 index 7f4485d8962..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: system -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts deleted file mode 100644 index 1ab3040862c..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @module: system -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts deleted file mode 100644 index 05c4d699104..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @module: umd -// @target: esnext -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -import("./0"); -var p1 = import("./0"); -p1.then(zero => { - return zero.foo(); -}); - -function foo() { - const p2 = import("./0"); -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts deleted file mode 100644 index 2f76d0aa267..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @module: umd -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -// We use Promise for now as there is no way to specify shape of module object -function foo(x: Promise) { - x.then(value => { - let b = new value.B(); - b.print(); - }) -} - -foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts deleted file mode 100644 index 58d21ee52d0..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: umd -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -// @filename: 2.ts -async function foo() { - class C extends (await import("./0")).B {} - var c = new C(); - c.print(); -} -foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts deleted file mode 100644 index ef0f0999407..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @module: umd -// @target: esnext -// @filename: 0.ts -export class B { - print() { return "I am B"} -} - -export function foo() { return "foo" } - -// @filename: 1.ts -export function backup() { return "backup"; } - -// @filename: 2.ts -declare var console: any; -class C { - private myModule = import("./0"); - method() { - this.myModule.then(Zero => { - console.log(Zero.foo()); - }, async err => { - console.log(err); - let one = await import("./1"); - console.log(one.backup()); - }); - } -} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts b/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts deleted file mode 100644 index 34f0b63be6f..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts +++ /dev/null @@ -1,34 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: true -// @filename: defaultPath.ts -export class C {} - -// @filename: 1.ts -import * as defaultModule from "./defaultPath"; -declare function getSpecifier(): string; -declare function ValidSomeCondition(): boolean; -declare var whatToLoad: boolean; -declare const directory: string; -declare const moduleFile: number; - -import(`${directory}\${moduleFile}`); -import(getSpecifier()); - -var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); -var p1: Promise = import(getSpecifier()); -var p11: Promise = import(getSpecifier()); -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; -p1.then(zero => { - return zero.foo(); // ok, zero is any -}); - -let j: string; -var p3: Promise = import(j=getSpecifier()); - -function * loadModule(directories: string[]) { - for (const directory of directories) { - const path = `${directory}\moduleFile`; - import(yield path); - } -} diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts b/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts deleted file mode 100644 index 3af0ec89ac2..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: false - -declare function getSpecifier(): boolean; -declare var whatToLoad: boolean; - -// Error specifier is not assignable to string -import(getSpecifier()); -var p1 = import(getSpecifier()); -const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") -p1.then(zero => { - return zero.foo(); // ok, zero is any -}); - -var p3 = import(["path1", "path2"]); -var p4 = import(()=>"PathToModule"); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts b/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts deleted file mode 100644 index 895b61af6ff..00000000000 --- a/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @module: commonjs -// @target: es6 -// @noImplicitAny: false - -// @filename: 0.ts -export function foo() { return "foo"; } - -// @filename: 1.ts -"use strict" -var p1 = import>("./0"); // error -var p2 = import<>("./0"); // error -// p1.then(value => { -// value.anyFunction(); -// }) \ No newline at end of file From 1d8f57e7b3206ea64cf5df7ce3bf8fcae2a5f9be Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Mon, 5 Jun 2017 11:17:44 -0700 Subject: [PATCH 123/134] Favour exact-match spelling suggestions Previously, the first match that was close enough was returned as the spelling suggestion. Now, if there is a candidate that differs only by case, it will always be the suggestion. --- src/compiler/checker.ts | 7 +++++- .../exactSpellingSuggestion.errors.txt | 16 ++++++++++++++ .../reference/exactSpellingSuggestion.js | 22 +++++++++++++++++++ .../cases/compiler/exactSpellingSuggestion.ts | 9 ++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/exactSpellingSuggestion.errors.txt create mode 100644 tests/baselines/reference/exactSpellingSuggestion.js create mode 100644 tests/cases/compiler/exactSpellingSuggestion.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1b3084f9cbd..1cc91550dc0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14522,6 +14522,7 @@ namespace ts { const maximumLengthDifference = Math.min(3, name.length * 0.34); let bestDistance = Number.MAX_VALUE; let bestCandidate = undefined; + let justCheckExactMatches = false; if (name.length > 30) { return undefined; } @@ -14534,6 +14535,9 @@ namespace ts { if (candidateName === name) { return candidate; } + if (justCheckExactMatches) { + continue; + } if (candidateName.length < 3 || name.length < 3 || candidateName === "eval" || @@ -14549,7 +14553,8 @@ namespace ts { continue; } if (distance < 3) { - return candidate; + justCheckExactMatches = true; + bestCandidate = candidate; } else if (distance < bestDistance) { bestDistance = distance; diff --git a/tests/baselines/reference/exactSpellingSuggestion.errors.txt b/tests/baselines/reference/exactSpellingSuggestion.errors.txt new file mode 100644 index 00000000000..dbe611590d4 --- /dev/null +++ b/tests/baselines/reference/exactSpellingSuggestion.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? + + +==== tests/cases/compiler/exactSpellingSuggestion.ts (1 errors) ==== + // Fixes #16245 -- always suggest the exact match, even when + // other options are very close + enum U8 { + BIT_0 = 1 << 0, + BIT_1 = 1 << 1, + BIT_2 = 1 << 2 + } + + U8.bit_2 + ~~~~~ +!!! error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? + \ No newline at end of file diff --git a/tests/baselines/reference/exactSpellingSuggestion.js b/tests/baselines/reference/exactSpellingSuggestion.js new file mode 100644 index 00000000000..7b71065061d --- /dev/null +++ b/tests/baselines/reference/exactSpellingSuggestion.js @@ -0,0 +1,22 @@ +//// [exactSpellingSuggestion.ts] +// Fixes #16245 -- always suggest the exact match, even when +// other options are very close +enum U8 { + BIT_0 = 1 << 0, + BIT_1 = 1 << 1, + BIT_2 = 1 << 2 +} + +U8.bit_2 + + +//// [exactSpellingSuggestion.js] +// Fixes #16245 -- always suggest the exact match, even when +// other options are very close +var U8; +(function (U8) { + U8[U8["BIT_0"] = 1] = "BIT_0"; + U8[U8["BIT_1"] = 2] = "BIT_1"; + U8[U8["BIT_2"] = 4] = "BIT_2"; +})(U8 || (U8 = {})); +U8.bit_2; diff --git a/tests/cases/compiler/exactSpellingSuggestion.ts b/tests/cases/compiler/exactSpellingSuggestion.ts new file mode 100644 index 00000000000..99aec9a0199 --- /dev/null +++ b/tests/cases/compiler/exactSpellingSuggestion.ts @@ -0,0 +1,9 @@ +// Fixes #16245 -- always suggest the exact match, even when +// other options are very close +enum U8 { + BIT_0 = 1 << 0, + BIT_1 = 1 << 1, + BIT_2 = 1 << 2 +} + +U8.bit_2 From 70564110c0fbca504518bde9a32863c56bf0a187 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 5 Jun 2017 14:11:43 -0700 Subject: [PATCH 124/134] Make use of array helper functions (#16226) * Make use of array helper functions * Remove unnecessary 'ts.' --- src/compiler/core.ts | 2 +- src/compiler/factory.ts | 4 ++-- src/compiler/program.ts | 21 +++++++-------------- src/compiler/transformers/es2015.ts | 4 ++-- src/compiler/utilities.ts | 22 ++++------------------ src/harness/fourslash.ts | 17 ++--------------- src/harness/loggedIO.ts | 9 +++------ src/server/project.ts | 19 ++++++++----------- src/services/refactorProvider.ts | 12 +----------- 9 files changed, 30 insertions(+), 80 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 5819e634ff4..1792a393234 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -473,7 +473,7 @@ namespace ts { * @param array The array to map. * @param mapfn The callback used to map the result into one or more values. */ - export function flatMap(array: T[], mapfn: (x: T, i: number) => U | U[]): U[] { + export function flatMap(array: T[] | undefined, mapfn: (x: T, i: number) => U | U[] | undefined): U[] | undefined { let result: U[]; if (array) { result = []; diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 26c40b05239..a83f00ce86e 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -2503,8 +2503,8 @@ namespace ts { helpers } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + if (leadingComments) destEmitNode.leadingComments = concatenate(leadingComments, destEmitNode.leadingComments); + if (trailingComments) destEmitNode.trailingComments = concatenate(trailingComments, destEmitNode.trailingComments); if (flags) destEmitNode.flags = flags; if (commentRange) destEmitNode.commentRange = commentRange; if (sourceMapRange) destEmitNode.sourceMapRange = sourceMapRange; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 834122b3584..00df31ed5ab 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -984,16 +984,12 @@ namespace ts { if (sourceFile) { return getDiagnostics(sourceFile, cancellationToken); } - - const allDiagnostics: Diagnostic[] = []; - forEach(program.getSourceFiles(), sourceFile => { + return sortAndDeduplicateDiagnostics(flatMap(program.getSourceFiles(), sourceFile => { if (cancellationToken) { cancellationToken.throwIfCancellationRequested(); } - addRange(allDiagnostics, getDiagnostics(sourceFile, cancellationToken)); - }); - - return sortAndDeduplicateDiagnostics(allDiagnostics); + return getDiagnostics(sourceFile, cancellationToken); + })); } function getSyntacticDiagnostics(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] { @@ -1330,16 +1326,13 @@ namespace ts { } function getOptionsDiagnostics(): Diagnostic[] { - const allDiagnostics: Diagnostic[] = []; - addRange(allDiagnostics, fileProcessingDiagnostics.getGlobalDiagnostics()); - addRange(allDiagnostics, programDiagnostics.getGlobalDiagnostics()); - return sortAndDeduplicateDiagnostics(allDiagnostics); + return sortAndDeduplicateDiagnostics(concatenate( + fileProcessingDiagnostics.getGlobalDiagnostics(), + programDiagnostics.getGlobalDiagnostics())); } function getGlobalDiagnostics(): Diagnostic[] { - const allDiagnostics: Diagnostic[] = []; - addRange(allDiagnostics, getDiagnosticsProducingTypeChecker().getGlobalDiagnostics()); - return sortAndDeduplicateDiagnostics(allDiagnostics); + return sortAndDeduplicateDiagnostics(getDiagnosticsProducingTypeChecker().getGlobalDiagnostics().slice()); } function processRootFile(fileName: string, isDefaultLib: boolean) { diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index a0656476421..7acbd3126b4 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -2095,9 +2095,9 @@ namespace ts { enableSubstitutionsForBlockScopedBindings(); } - const declarations = flatten(map(node.declarations, node.flags & NodeFlags.Let + const declarations = flatMap(node.declarations, node.flags & NodeFlags.Let ? visitVariableDeclarationInLetDeclarationList - : visitVariableDeclaration)); + : visitVariableDeclaration); const declarationList = createVariableDeclarationList(declarations); setOriginalNode(declarationList, node); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b52ace78615..faec63d5a28 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1434,24 +1434,10 @@ namespace ts { } function getJSDocTags(node: Node, kind: SyntaxKind): JSDocTag[] { - const docs = getJSDocs(node); - if (docs) { - const result: JSDocTag[] = []; - for (const doc of docs) { - if (doc.kind === SyntaxKind.JSDocParameterTag) { - if (doc.kind === kind) { - result.push(doc as JSDocTag); - } - } - else { - const tags = (doc as JSDoc).tags; - if (tags) { - result.push(...filter(tags, tag => tag.kind === kind)); - } - } - } - return result; - } + return flatMap(getJSDocs(node), doc => + doc.kind === SyntaxKind.JSDocComment + ? filter((doc as JSDoc).tags, tag => tag.kind === kind) + : doc.kind === kind && doc); } function getFirstJSDocTag(node: Node, kind: SyntaxKind): JSDocTag { diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 8f19b83c7ad..4045c738aa0 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -479,24 +479,11 @@ namespace FourSlash { } private getDiagnostics(fileName: string): ts.Diagnostic[] { - const syntacticErrors = this.languageService.getSyntacticDiagnostics(fileName); - const semanticErrors = this.languageService.getSemanticDiagnostics(fileName); - - const diagnostics: ts.Diagnostic[] = []; - diagnostics.push.apply(diagnostics, syntacticErrors); - diagnostics.push.apply(diagnostics, semanticErrors); - - return diagnostics; + return this.languageService.getSyntacticDiagnostics(fileName).concat(this.languageService.getSemanticDiagnostics(fileName)); } private getAllDiagnostics(): ts.Diagnostic[] { - const diagnostics: ts.Diagnostic[] = []; - - for (const fileName of this.languageServiceAdapterHost.getFilenames()) { - diagnostics.push.apply(this.getDiagnostics(fileName)); - } - - return diagnostics; + return ts.flatMap(this.languageServiceAdapterHost.getFilenames(), fileName => this.getDiagnostics(fileName)); } public verifyErrorExistsAfterMarker(markerName: string, negative: boolean, after: boolean) { diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index eeb47f0cfa0..76f585b623a 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -232,14 +232,11 @@ namespace Playback { // different entry). // TODO (yuisu): We can certainly remove these once we recapture the RWC using new API const normalizedPath = ts.normalizePath(path).toLowerCase(); - const result: string[] = []; - for (const directory of replayLog.directoriesRead) { + return ts.flatMap(replayLog.directoriesRead, directory => { if (ts.normalizeSlashes(directory.path).toLowerCase() === normalizedPath) { - result.push(...directory.result); + return directory.result; } - } - - return result; + }); }); wrapper.writeFile = recordReplay(wrapper.writeFile, underlying)( diff --git a/src/server/project.ts b/src/server/project.ts index c76e5296678..be854f948ea 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -976,18 +976,15 @@ namespace ts.server { } getExternalFiles(): SortedReadonlyArray { - const items: string[] = []; - for (const plugin of this.plugins) { - if (typeof plugin.getExternalFiles === "function") { - try { - items.push(...plugin.getExternalFiles(this)); - } - catch (e) { - this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`); - } + return toSortedReadonlyArray(flatMap(this.plugins, plugin => { + if (typeof plugin.getExternalFiles !== "function") return; + try { + return plugin.getExternalFiles(this); } - } - return toSortedReadonlyArray(items); + catch (e) { + this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`); + } + })); } watchConfigFile(callback: (project: ConfiguredProject) => void) { diff --git a/src/services/refactorProvider.ts b/src/services/refactorProvider.ts index 0b6ea3487ec..1058f9c2ca6 100644 --- a/src/services/refactorProvider.ts +++ b/src/services/refactorProvider.ts @@ -52,18 +52,8 @@ namespace ts { } export function getRefactorCodeActions(context: RefactorContext, refactorName: string): CodeAction[] | undefined { - - let result: CodeAction[]; const refactor = refactors.get(refactorName); - if (!refactor) { - return undefined; - } - - const codeActions = refactor.getCodeActions(context); - if (codeActions) { - addRange((result || (result = [])), codeActions); - } - return result; + return refactor && refactor.getCodeActions(context); } } } From 8ace7b826f3bf53b503d5cb870befc1a4deca69b Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 5 Jun 2017 14:23:39 -0700 Subject: [PATCH 125/134] importFixes: Support missing "React" at a JSXOpeningElement (#16066) * importFixes: Support missing "React" at a JSXOpeningElement * Fix nextLineRule linting * Rename to resolveJsxNamespaceAtLocation * Expose getJsxNamespace and resolveNameAtLocation separately --- scripts/tslint/nextLineRule.ts | 4 +- src/compiler/checker.ts | 12 ++++-- src/compiler/program.ts | 3 +- src/compiler/types.ts | 3 ++ src/harness/fourslash.ts | 5 ++- src/harness/unittests/telemetry.ts | 3 +- src/services/codefixes/importFixes.ts | 38 +++++++++++++------ src/services/findAllReferences.ts | 3 +- src/services/importTracker.ts | 3 +- .../importNameCodeFixUMDGlobalReact0.ts | 28 ++++++++++++++ .../importNameCodeFixUMDGlobalReact1.ts | 28 ++++++++++++++ .../importNameCodeFixUMDGlobalReact2.ts | 21 ++++++++++ 12 files changed, 130 insertions(+), 21 deletions(-) create mode 100644 tests/cases/fourslash/importNameCodeFixUMDGlobalReact0.ts create mode 100644 tests/cases/fourslash/importNameCodeFixUMDGlobalReact1.ts create mode 100644 tests/cases/fourslash/importNameCodeFixUMDGlobalReact2.ts diff --git a/scripts/tslint/nextLineRule.ts b/scripts/tslint/nextLineRule.ts index b149d09eb38..fa03746afc6 100644 --- a/scripts/tslint/nextLineRule.ts +++ b/scripts/tslint/nextLineRule.ts @@ -18,7 +18,7 @@ export class Rule extends Lint.Rules.AbstractRule { function walk(ctx: Lint.WalkContext, checkCatch: boolean, checkElse: boolean): void { const { sourceFile } = ctx; - function recur(node: ts.Node): void { + ts.forEachChild(sourceFile, function recur(node) { switch (node.kind) { case ts.SyntaxKind.IfStatement: checkIf(node as ts.IfStatement); @@ -28,7 +28,7 @@ function walk(ctx: Lint.WalkContext, checkCatch: boolean, checkElse: boole break; } ts.forEachChild(node, recur); - } + }); function checkIf(node: ts.IfStatement): void { const { thenStatement, elseStatement } = node; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1cc91550dc0..af876e32468 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -210,6 +210,11 @@ namespace ts { getSuggestionForNonexistentProperty, getSuggestionForNonexistentSymbol, getBaseConstraintOfType, + getJsxNamespace, + resolveNameAtLocation(location: Node, name: string, meaning: SymbolFlags): Symbol | undefined { + location = getParseTreeNode(location); + return resolveName(location, name, meaning, /*nameNotFoundMessage*/ undefined, name); + }, }; const tupleTypes: GenericType[] = []; @@ -847,7 +852,7 @@ namespace ts { location: Node | undefined, name: string, meaning: SymbolFlags, - nameNotFoundMessage: DiagnosticMessage, + nameNotFoundMessage: DiagnosticMessage | undefined, nameArg: string | Identifier, suggestedNameNotFoundMessage?: DiagnosticMessage): Symbol { return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage); @@ -5841,7 +5846,8 @@ namespace ts { } } return arrayFrom(props.values()); - } else { + } + else { return getPropertiesOfType(type); } } @@ -14151,7 +14157,7 @@ namespace ts { checkJsxPreconditions(node); // The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import. // And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error. - const reactRefErr = compilerOptions.jsx === JsxEmit.React ? Diagnostics.Cannot_find_name_0 : undefined; + const reactRefErr = diagnostics && compilerOptions.jsx === JsxEmit.React ? Diagnostics.Cannot_find_name_0 : undefined; const reactNamespace = getJsxNamespace(); const reactSym = resolveName(node.tagName, reactNamespace, SymbolFlags.Value, reactRefErr, reactNamespace); if (reactSym) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 00df31ed5ab..39d82b8606d 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1479,7 +1479,8 @@ namespace ts { } } return sourceFile; - } else { + } + else { const sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile(fileName); if (sourceFileNoExtension) return sourceFileNoExtension; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ed1d5dcbe23..83aa50fb803 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2605,6 +2605,9 @@ namespace ts { * Does not include properties of primitive types. */ /* @internal */ getAllPossiblePropertiesOfType(type: Type): Symbol[]; + + /* @internal */ getJsxNamespace(): string; + /* @internal */ resolveNameAtLocation(location: Node, name: string, meaning: SymbolFlags): Symbol | undefined; } export enum NodeBuilderFlags { diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 4045c738aa0..4b5af197a36 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2372,7 +2372,10 @@ namespace FourSlash { const codeFixes = this.getCodeFixActions(this.activeFile.fileName, errorCode); if (!codeFixes || codeFixes.length === 0) { - this.raiseError("No codefixes returned."); + if (expectedTextArray.length !== 0) { + this.raiseError("No codefixes returned."); + } + return; } const actualTextArray: string[] = []; diff --git a/src/harness/unittests/telemetry.ts b/src/harness/unittests/telemetry.ts index d3811edf251..f250c732c0b 100644 --- a/src/harness/unittests/telemetry.ts +++ b/src/harness/unittests/telemetry.ts @@ -252,7 +252,8 @@ namespace ts.projectSystem { } getEvent(eventName: T["eventName"], mayBeMore = false): T["data"] { - if (mayBeMore) assert(this.events.length !== 0); else assert.equal(this.events.length, 1); + if (mayBeMore) { assert(this.events.length !== 0); } + else { assert.equal(this.events.length, 1); } const event = this.events.shift(); assert.equal(event.eventName, eventName); return event.data; diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 53ec99fac81..c2d26da4392 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -138,8 +138,23 @@ namespace ts.codefix { const currentTokenMeaning = getMeaningFromLocation(token); if (context.errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) { - const symbol = checker.getAliasedSymbol(checker.getSymbolAtLocation(token)); - return getCodeActionForImport(symbol, /*isDefault*/ false, /*isNamespaceImport*/ true); + const umdSymbol = checker.getSymbolAtLocation(token); + let symbol: ts.Symbol; + let symbolName: string; + if (umdSymbol.flags & ts.SymbolFlags.Alias) { + symbol = checker.getAliasedSymbol(umdSymbol); + symbolName = name; + } + else if (isJsxOpeningLikeElement(token.parent) && token.parent.tagName === token) { + // The error wasn't for the symbolAtLocation, it was for the JSX tag itself, which needs access to e.g. `React`. + symbol = checker.getAliasedSymbol(checker.resolveNameAtLocation(token, checker.getJsxNamespace(), SymbolFlags.Value)); + symbolName = symbol.name; + } + else { + Debug.fail("Either the symbol or the JSX namespace should be a UMD global if we got here"); + } + + return getCodeActionForImport(symbol, symbolName, /*isDefault*/ false, /*isNamespaceImport*/ true); } const candidateModules = checker.getAmbientModules(); @@ -159,7 +174,7 @@ namespace ts.codefix { if (localSymbol && localSymbol.name === name && checkSymbolHasMeaning(localSymbol, currentTokenMeaning)) { // check if this symbol is already used const symbolId = getUniqueSymbolId(localSymbol); - symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, /*isDefault*/ true)); + symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name, /*isDefault*/ true)); } } @@ -167,7 +182,7 @@ namespace ts.codefix { const exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExports(name, moduleSymbol); if (exportSymbolWithIdenticalName && checkSymbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) { const symbolId = getUniqueSymbolId(exportSymbolWithIdenticalName); - symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol)); + symbolIdActionMap.addActions(symbolId, getCodeActionForImport(moduleSymbol, name)); } } @@ -218,7 +233,7 @@ namespace ts.codefix { return declarations ? some(symbol.declarations, decl => !!(getMeaningFromDeclaration(decl) & meaning)) : false; } - function getCodeActionForImport(moduleSymbol: Symbol, isDefault?: boolean, isNamespaceImport?: boolean): ImportCodeAction[] { + function getCodeActionForImport(moduleSymbol: Symbol, symbolName: string, isDefault?: boolean, isNamespaceImport?: boolean): ImportCodeAction[] { const existingDeclarations = getImportDeclarations(moduleSymbol); if (existingDeclarations.length > 0) { // With an existing import statement, there are more than one actions the user can do. @@ -375,10 +390,10 @@ namespace ts.codefix { const moduleSpecifierWithoutQuotes = stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport()); const changeTracker = createChangeTracker(); const importClause = isDefault - ? createImportClause(createIdentifier(name), /*namedBindings*/ undefined) + ? createImportClause(createIdentifier(symbolName), /*namedBindings*/ undefined) : isNamespaceImport - ? createImportClause(/*name*/ undefined, createNamespaceImport(createIdentifier(name))) - : createImportClause(/*name*/ undefined, createNamedImports([createImportSpecifier(/*propertyName*/ undefined, createIdentifier(name))])); + ? createImportClause(/*name*/ undefined, createNamespaceImport(createIdentifier(symbolName))) + : createImportClause(/*name*/ undefined, createNamedImports([createImportSpecifier(/*propertyName*/ undefined, createIdentifier(symbolName))])); const importDecl = createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, importClause, createLiteral(moduleSpecifierWithoutQuotes)); if (!lastImportDeclaration) { changeTracker.insertNodeAt(sourceFile, sourceFile.getStart(), importDecl, { suffix: `${context.newLineCharacter}${context.newLineCharacter}` }); @@ -392,7 +407,7 @@ namespace ts.codefix { // are there are already a new line seperating code and import statements. return createCodeAction( Diagnostics.Import_0_from_1, - [name, `"${moduleSpecifierWithoutQuotes}"`], + [symbolName, `"${moduleSpecifierWithoutQuotes}"`], changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes @@ -412,8 +427,9 @@ namespace ts.codefix { removeFileExtension(getRelativePath(moduleFileName, sourceDirectory)); function tryGetModuleNameFromAmbientModule(): string { - if (moduleSymbol.valueDeclaration.kind !== SyntaxKind.SourceFile) { - return moduleSymbol.name; + const decl = moduleSymbol.valueDeclaration; + if (isModuleDeclaration(decl) && isStringLiteral(decl.name)) { + return decl.name.text; } } diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index df499cbd38a..c1a7408fae7 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -185,7 +185,8 @@ namespace ts.FindAllReferences { if (entry.type === "node") { const { node } = entry; return { textSpan: getTextSpan(node), fileName: node.getSourceFile().fileName, ...implementationKindDisplayParts(node, checker) }; - } else { + } + else { const { textSpan, fileName } = entry; return { textSpan, fileName, kind: ScriptElementKind.unknown, displayParts: [] }; } diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index f20c80c14ef..585af7ebd31 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -530,7 +530,8 @@ namespace ts.FindAllReferences { if (parent.kind === SyntaxKind.VariableDeclaration) { const p = parent as ts.VariableDeclaration; return p.parent.kind === ts.SyntaxKind.CatchClause ? undefined : p.parent.parent.kind === SyntaxKind.VariableStatement ? p.parent.parent : undefined; - } else { + } + else { return parent; } } diff --git a/tests/cases/fourslash/importNameCodeFixUMDGlobalReact0.ts b/tests/cases/fourslash/importNameCodeFixUMDGlobalReact0.ts new file mode 100644 index 00000000000..260c34d10a6 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFixUMDGlobalReact0.ts @@ -0,0 +1,28 @@ +/// + +// @jsx: react + +// @Filename: /node_modules/@types/react/index.d.ts +////export = React; +////export as namespace React; +////declare namespace React { +//// export class Component { render(): JSX.Element | null; } +////} +////declare global { +//// namespace JSX { +//// interface Element {} +//// } +////} + +// @Filename: /a.tsx +////[|import { Component } from "react"; +////export class MyMap extends Component { } +////;|] + +goTo.file("/a.tsx"); + +verify.importFixAtPosition([ +`import { Component } from "react"; +import * as React from "react"; +export class MyMap extends Component { } +;`]); diff --git a/tests/cases/fourslash/importNameCodeFixUMDGlobalReact1.ts b/tests/cases/fourslash/importNameCodeFixUMDGlobalReact1.ts new file mode 100644 index 00000000000..ccd69c50199 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFixUMDGlobalReact1.ts @@ -0,0 +1,28 @@ +/// + +// @jsx: react + +// @Filename: /node_modules/@types/react/index.d.ts +////export = React; +////export as namespace React; +////declare namespace React { +//// export class Component { render(): JSX.Element | null; } +////} +////declare global { +//// namespace JSX { +//// interface Element {} +//// } +////} + +// @Filename: /a.tsx +////[|import { Component } from "react"; +////export class MyMap extends Component { } +////;|] + +goTo.file("/a.tsx"); + +verify.importFixAtPosition([ +`import { Component } from "react"; +import * as React from "react"; +export class MyMap extends Component { } +;`]); diff --git a/tests/cases/fourslash/importNameCodeFixUMDGlobalReact2.ts b/tests/cases/fourslash/importNameCodeFixUMDGlobalReact2.ts new file mode 100644 index 00000000000..a3c8253fbd1 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFixUMDGlobalReact2.ts @@ -0,0 +1,21 @@ +/// + +// https://github.com/Microsoft/TypeScript/issues/16065 + +// @jsx: react +// @jsxFactory: factory + +// @Filename: /factory.ts +////export function factory() { return {}; } +////declare global { +//// namespace JSX { +//// interface Element {} +//// } +////} + +// @Filename: /a.tsx +////[|
    |] + +goTo.file("/a.tsx"); +verify.not +verify.importFixAtPosition([]); From ddb9774de75e5484cf700ff093d86c870c1e3890 Mon Sep 17 00:00:00 2001 From: Mine Starks Date: Mon, 5 Jun 2017 15:52:19 -0700 Subject: [PATCH 126/134] discoverTypings should look at typingSafelist.json values --- src/services/jsTyping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/jsTyping.ts b/src/services/jsTyping.ts index f601c9604de..a4fb88fadfe 100644 --- a/src/services/jsTyping.ts +++ b/src/services/jsTyping.ts @@ -192,7 +192,7 @@ namespace ts.JsTyping { const cleanedTypingNames = map(inferredTypingNames, f => f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, "")); if (safeList !== EmptySafeList) { - mergeTypings(filter(cleanedTypingNames, f => safeList.has(f))); + mergeTypings(map(filter(cleanedTypingNames, f => safeList.has(f)), (f => safeList.get(f)))); } const hasJsxFile = forEach(fileNames, f => ensureScriptKind(f, getScriptKindFromFileName(f)) === ScriptKind.JSX); From bb54a6a53e0ace961270a5ff21afd9b914e1c6c1 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Mon, 5 Jun 2017 15:57:32 -0700 Subject: [PATCH 127/134] Typeof can refer to a class in a previous file with --out (#16269) * Typeof can refer block-scoped values in prev file `typeof C` can now refer to block-scoped values in a preceding file when used with --out or --outFile. Previously this was not allowed with --out or --outFile since they depend on file order for their emit. * Test `typeof C` reference across files with --out --- src/compiler/checker.ts | 1 + .../blockScopedClassDeclarationAcrossFiles.js | 15 +++++++++++++++ ...blockScopedClassDeclarationAcrossFiles.symbols | 9 +++++++++ .../blockScopedClassDeclarationAcrossFiles.types | 9 +++++++++ .../blockScopedClassDeclarationAcrossFiles.ts | 5 +++++ 5 files changed, 39 insertions(+) create mode 100644 tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.js create mode 100644 tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols create mode 100644 tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types create mode 100644 tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index af876e32468..cc4a0f4e34d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -740,6 +740,7 @@ namespace ts { if (declarationFile !== useFile) { if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) || (!compilerOptions.outFile && !compilerOptions.out) || + isInTypeQuery(usage) || isInAmbientContext(declaration)) { // nodes are in different files and order cannot be determined return true; diff --git a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.js b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.js new file mode 100644 index 00000000000..b89943b24ff --- /dev/null +++ b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.js @@ -0,0 +1,15 @@ +//// [tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts] //// + +//// [c.ts] +let foo: typeof C; +//// [b.ts] +class C { } + + +//// [foo.js] +var foo; +var C = (function () { + function C() { + } + return C; +}()); diff --git a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols new file mode 100644 index 00000000000..c5c6e40da20 --- /dev/null +++ b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/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 === +class C { } +>C : Symbol(C, Decl(b.ts, 0, 0)) + diff --git a/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types new file mode 100644 index 00000000000..5bc8862b2aa --- /dev/null +++ b/tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/c.ts === +let foo: typeof C; +>foo : typeof C +>C : typeof C + +=== tests/cases/compiler/b.ts === +class C { } +>C : C + diff --git a/tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts b/tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts new file mode 100644 index 00000000000..16827602308 --- /dev/null +++ b/tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts @@ -0,0 +1,5 @@ +// @outFile: foo.js +// @Filename: c.ts +let foo: typeof C; +// @Filename: b.ts +class C { } From 1f3c2b399828f8e08ce07d4fc29ab92982c561f3 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 5 Jun 2017 16:19:32 -0700 Subject: [PATCH 128/134] JSX Closing tags get priority over other completion types (#15922) Fixes #15897 --- src/services/completions.ts | 38 ++++++++++--------- .../fourslash/jsxQualifiedTagCompletion.ts | 15 ++++++++ 2 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 tests/cases/fourslash/jsxQualifiedTagCompletion.ts diff --git a/src/services/completions.ts b/src/services/completions.ts index a895be8a7da..71fe4ce1c78 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -20,6 +20,22 @@ namespace ts.Completions { const { symbols, isGlobalCompletion, isMemberCompletion, isNewIdentifierLocation, location, requestJsDocTagName, requestJsDocTag, hasFilteredClassMemberKeywords } = completionData; + if (sourceFile.languageVariant === LanguageVariant.JSX && + location && location.parent && location.parent.kind === SyntaxKind.JsxClosingElement) { + // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, + // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. + // For example: + // var x =
    completion list at "1" will contain "div" with type any + const tagName = (location.parent.parent).openingElement.tagName; + return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, + entries: [{ + name: (tagName).getFullText(), + kind: ScriptElementKind.classElement, + kindModifiers: undefined, + sortText: "0", + }]}; + } + if (requestJsDocTagName) { // If the current position is a jsDoc tag name, only tag names should be provided for completion return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries: JsDoc.getJSDocTagNameCompletions() }; @@ -38,21 +54,7 @@ namespace ts.Completions { } else { if (!symbols || symbols.length === 0) { - if (sourceFile.languageVariant === LanguageVariant.JSX && - location.parent && location.parent.kind === SyntaxKind.JsxClosingElement) { - // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, - // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. - // For example: - // var x =
    completion list at "1" will contain "div" with type any - const tagName = (location.parent.parent).openingElement.tagName; - entries.push({ - name: (tagName).text, - kind: undefined, - kindModifiers: undefined, - sortText: "0", - }); - } - else if (!hasFilteredClassMemberKeywords) { + if (!hasFilteredClassMemberKeywords) { return undefined; } } @@ -495,7 +497,7 @@ namespace ts.Completions { // It has a left-hand side, so we're not in an opening JSX tag. break; } - // falls through + // falls through case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: @@ -1050,7 +1052,7 @@ namespace ts.Completions { default: if (isFromClassElementDeclaration(contextToken) && (isClassMemberCompletionKeyword(contextToken.kind) || - isClassMemberCompletionKeywordText(contextToken.getText()))) { + isClassMemberCompletionKeywordText(contextToken.getText()))) { return contextToken.parent.parent as ClassLikeDeclaration; } } @@ -1213,7 +1215,7 @@ namespace ts.Completions { if (isFromClassElementDeclaration(contextToken)) { return false; } - // falls through + // falls through case SyntaxKind.ClassKeyword: case SyntaxKind.EnumKeyword: case SyntaxKind.InterfaceKeyword: diff --git a/tests/cases/fourslash/jsxQualifiedTagCompletion.ts b/tests/cases/fourslash/jsxQualifiedTagCompletion.ts new file mode 100644 index 00000000000..3d799324e7e --- /dev/null +++ b/tests/cases/fourslash/jsxQualifiedTagCompletion.ts @@ -0,0 +1,15 @@ +/// + +//@Filename: file.tsx +//// declare var React: any; +//// namespace NS { +//// export var Foo: any = null; +//// } +//// const j = Hello!/**/ +//// + +goTo.marker(); +edit.insert(" Date: Mon, 5 Jun 2017 16:57:50 -0700 Subject: [PATCH 129/134] Fix for..await emit for es2017 --- src/compiler/transformers/esnext.ts | 12 +- .../reference/emitter.forAwait.es2017.js | 143 ++++++++++++++++++ .../reference/emitter.forAwait.es2017.symbols | 50 ++++++ .../reference/emitter.forAwait.es2017.types | 50 ++++++ .../forAwait/emitter.forAwait.es2017.ts | 26 ++++ 5 files changed, 276 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/emitter.forAwait.es2017.js create mode 100644 tests/baselines/reference/emitter.forAwait.es2017.symbols create mode 100644 tests/baselines/reference/emitter.forAwait.es2017.types create mode 100644 tests/cases/conformance/emitter/es2017/forAwait/emitter.forAwait.es2017.ts diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index 6e2f70b5c35..a3aa0139aa4 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -351,8 +351,10 @@ namespace ts { ); } - function awaitAsYield(expression: Expression) { - return createYield(/*asteriskToken*/ undefined, enclosingFunctionFlags & FunctionFlags.Generator ? createAwaitHelper(context, expression) : expression); + function createDownlevelAwait(expression: Expression) { + return enclosingFunctionFlags & FunctionFlags.Generator + ? createYield(/*asteriskToken*/ undefined, createAwaitHelper(context, expression)) + : createAwait(expression); } function transformForAwaitOfStatement(node: ForOfStatement, outermostLabeledStatement: LabeledStatement) { @@ -385,11 +387,11 @@ namespace ts { EmitFlags.NoHoisting ), /*condition*/ createComma( - createAssignment(result, awaitAsYield(callNext)), + createAssignment(result, createDownlevelAwait(callNext)), createLogicalNot(getDone) ), /*incrementor*/ undefined, - /*statement*/ convertForOfStatementHead(node, awaitAsYield(getValue)) + /*statement*/ convertForOfStatementHead(node, createDownlevelAwait(getValue)) ), /*location*/ node ), @@ -434,7 +436,7 @@ namespace ts { createPropertyAccess(iterator, "return") ) ), - createStatement(awaitAsYield(callReturn)) + createStatement(createDownlevelAwait(callReturn)) ), EmitFlags.SingleLine ) diff --git a/tests/baselines/reference/emitter.forAwait.es2017.js b/tests/baselines/reference/emitter.forAwait.es2017.js new file mode 100644 index 00000000000..eb953781ab3 --- /dev/null +++ b/tests/baselines/reference/emitter.forAwait.es2017.js @@ -0,0 +1,143 @@ +//// [tests/cases/conformance/emitter/es2017/forAwait/emitter.forAwait.es2017.ts] //// + +//// [file1.ts] +async function f1() { + let y: any; + for await (const x of y) { + } +} +//// [file2.ts] +async function f2() { + let x: any, y: any; + for await (x of y) { + } +} +//// [file3.ts] +async function* f3() { + let y: any; + for await (const x of y) { + } +} +//// [file4.ts] +async function* f4() { + let x: any, y: any; + for await (x of y) { + } +} + +//// [file1.js] +var __asyncValues = (this && this.__asyncIterator) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator]; + return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); +}; +async function f1() { + let y; + try { + for (var y_1 = __asyncValues(y), y_1_1; y_1_1 = await y_1.next(), !y_1_1.done;) { + const x = await y_1_1.value; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (y_1_1 && !y_1_1.done && (_a = y_1.return)) await _a.call(y_1); + } + finally { if (e_1) throw e_1.error; } + } + var e_1, _a; +} +//// [file2.js] +var __asyncValues = (this && this.__asyncIterator) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator]; + return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); +}; +async function f2() { + let x, y; + try { + for (var y_1 = __asyncValues(y), y_1_1; y_1_1 = await y_1.next(), !y_1_1.done;) { + x = await y_1_1.value; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (y_1_1 && !y_1_1.done && (_a = y_1.return)) await _a.call(y_1); + } + finally { if (e_1) throw e_1.error; } + } + var e_1, _a; +} +//// [file3.js] +var __asyncValues = (this && this.__asyncIterator) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator]; + return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); +}; +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 f3() { + return __asyncGenerator(this, arguments, function* f3_1() { + let y; + try { + for (var y_1 = __asyncValues(y), y_1_1; y_1_1 = yield __await(y_1.next()), !y_1_1.done;) { + const x = yield __await(y_1_1.value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (y_1_1 && !y_1_1.done && (_a = y_1.return)) yield __await(_a.call(y_1)); + } + finally { if (e_1) throw e_1.error; } + } + var e_1, _a; + }); +} +//// [file4.js] +var __asyncValues = (this && this.__asyncIterator) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator]; + return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); +}; +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 f4() { + return __asyncGenerator(this, arguments, function* f4_1() { + let x, y; + try { + for (var y_1 = __asyncValues(y), y_1_1; y_1_1 = yield __await(y_1.next()), !y_1_1.done;) { + x = yield __await(y_1_1.value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (y_1_1 && !y_1_1.done && (_a = y_1.return)) yield __await(_a.call(y_1)); + } + finally { if (e_1) throw e_1.error; } + } + var e_1, _a; + }); +} diff --git a/tests/baselines/reference/emitter.forAwait.es2017.symbols b/tests/baselines/reference/emitter.forAwait.es2017.symbols new file mode 100644 index 00000000000..a08e31f5553 --- /dev/null +++ b/tests/baselines/reference/emitter.forAwait.es2017.symbols @@ -0,0 +1,50 @@ +=== tests/cases/conformance/emitter/es2017/forAwait/file1.ts === +async function f1() { +>f1 : Symbol(f1, Decl(file1.ts, 0, 0)) + + let y: any; +>y : Symbol(y, Decl(file1.ts, 1, 7)) + + for await (const x of y) { +>x : Symbol(x, Decl(file1.ts, 2, 20)) +>y : Symbol(y, Decl(file1.ts, 1, 7)) + } +} +=== tests/cases/conformance/emitter/es2017/forAwait/file2.ts === +async function f2() { +>f2 : Symbol(f2, Decl(file2.ts, 0, 0)) + + let x: any, y: any; +>x : Symbol(x, Decl(file2.ts, 1, 7)) +>y : Symbol(y, Decl(file2.ts, 1, 15)) + + for await (x of y) { +>x : Symbol(x, Decl(file2.ts, 1, 7)) +>y : Symbol(y, Decl(file2.ts, 1, 15)) + } +} +=== tests/cases/conformance/emitter/es2017/forAwait/file3.ts === +async function* f3() { +>f3 : Symbol(f3, Decl(file3.ts, 0, 0)) + + let y: any; +>y : Symbol(y, Decl(file3.ts, 1, 7)) + + for await (const x of y) { +>x : Symbol(x, Decl(file3.ts, 2, 20)) +>y : Symbol(y, Decl(file3.ts, 1, 7)) + } +} +=== tests/cases/conformance/emitter/es2017/forAwait/file4.ts === +async function* f4() { +>f4 : Symbol(f4, Decl(file4.ts, 0, 0)) + + let x: any, y: any; +>x : Symbol(x, Decl(file4.ts, 1, 7)) +>y : Symbol(y, Decl(file4.ts, 1, 15)) + + for await (x of y) { +>x : Symbol(x, Decl(file4.ts, 1, 7)) +>y : Symbol(y, Decl(file4.ts, 1, 15)) + } +} diff --git a/tests/baselines/reference/emitter.forAwait.es2017.types b/tests/baselines/reference/emitter.forAwait.es2017.types new file mode 100644 index 00000000000..0d886cca4cc --- /dev/null +++ b/tests/baselines/reference/emitter.forAwait.es2017.types @@ -0,0 +1,50 @@ +=== tests/cases/conformance/emitter/es2017/forAwait/file1.ts === +async function f1() { +>f1 : () => Promise + + let y: any; +>y : any + + for await (const x of y) { +>x : any +>y : any + } +} +=== tests/cases/conformance/emitter/es2017/forAwait/file2.ts === +async function f2() { +>f2 : () => Promise + + let x: any, y: any; +>x : any +>y : any + + for await (x of y) { +>x : any +>y : any + } +} +=== tests/cases/conformance/emitter/es2017/forAwait/file3.ts === +async function* f3() { +>f3 : () => AsyncIterableIterator + + let y: any; +>y : any + + for await (const x of y) { +>x : any +>y : any + } +} +=== tests/cases/conformance/emitter/es2017/forAwait/file4.ts === +async function* f4() { +>f4 : () => AsyncIterableIterator + + let x: any, y: any; +>x : any +>y : any + + for await (x of y) { +>x : any +>y : any + } +} diff --git a/tests/cases/conformance/emitter/es2017/forAwait/emitter.forAwait.es2017.ts b/tests/cases/conformance/emitter/es2017/forAwait/emitter.forAwait.es2017.ts new file mode 100644 index 00000000000..f2d1f46873d --- /dev/null +++ b/tests/cases/conformance/emitter/es2017/forAwait/emitter.forAwait.es2017.ts @@ -0,0 +1,26 @@ +// @target: es2017 +// @lib: esnext +// @filename: file1.ts +async function f1() { + let y: any; + for await (const x of y) { + } +} +// @filename: file2.ts +async function f2() { + let x: any, y: any; + for await (x of y) { + } +} +// @filename: file3.ts +async function* f3() { + let y: any; + for await (const x of y) { + } +} +// @filename: file4.ts +async function* f4() { + let x: any, y: any; + for await (x of y) { + } +} \ No newline at end of file From b9017795a00cd6a781eff637155ec658f557ef46 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Jun 2017 17:16:29 -0700 Subject: [PATCH 130/134] Revert "Revert "[Master] wip-dynamic import" (#16264)" This reverts commit ccc60c8b3b75476c4b11abb6ab4d2e6f06214f8f. --- src/compiler/binder.ts | 6 +- src/compiler/checker.ts | 70 ++++++++- src/compiler/commandLineParser.ts | 3 +- src/compiler/diagnosticMessages.json | 36 ++++- src/compiler/emitter.ts | 1 + src/compiler/parser.ts | 67 +++++---- src/compiler/program.ts | 13 +- src/compiler/transformer.ts | 1 + src/compiler/transformers/module/module.ts | 137 ++++++++++++++++-- src/compiler/transformers/module/system.ts | 74 ++++++---- src/compiler/types.ts | 43 ++++-- src/compiler/utilities.ts | 4 + src/harness/harness.ts | 1 + src/harness/unittests/commandLineParsing.ts | 2 +- .../convertCompilerOptionsFromJson.ts | 2 +- src/services/services.ts | 3 +- .../reference/importCallExpression1ESNext.js | 27 ++++ .../importCallExpression1ESNext.symbols | 28 ++++ .../importCallExpression1ESNext.types | 39 +++++ .../reference/importCallExpression2ESNext.js | 29 ++++ .../importCallExpression2ESNext.symbols | 33 +++++ .../importCallExpression2ESNext.types | 45 ++++++ .../reference/importCallExpression3ESNext.js | 27 ++++ .../importCallExpression3ESNext.symbols | 29 ++++ .../importCallExpression3ESNext.types | 37 +++++ .../reference/importCallExpression4ESNext.js | 49 +++++++ .../importCallExpression4ESNext.symbols | 61 ++++++++ .../importCallExpression4ESNext.types | 83 +++++++++++ .../importCallExpression5ESNext.errors.txt | 31 ++++ .../reference/importCallExpression5ESNext.js | 33 +++++ .../importCallExpression6ESNext.errors.txt | 25 ++++ .../reference/importCallExpression6ESNext.js | 33 +++++ ...tCallExpressionCheckReturntype1.errors.txt | 30 ++++ .../importCallExpressionCheckReturntype1.js | 35 +++++ .../importCallExpressionDeclarationEmit1.js | 35 +++++ ...portCallExpressionDeclarationEmit1.symbols | 36 +++++ ...importCallExpressionDeclarationEmit1.types | 47 ++++++ ...tCallExpressionDeclarationEmit2.errors.txt | 10 ++ .../importCallExpressionDeclarationEmit2.js | 16 ++ .../importCallExpressionDeclarationEmit3.js | 31 ++++ ...portCallExpressionDeclarationEmit3.symbols | 28 ++++ ...importCallExpressionDeclarationEmit3.types | 37 +++++ .../reference/importCallExpressionES5AMD.js | 35 +++++ .../importCallExpressionES5AMD.symbols | 28 ++++ .../importCallExpressionES5AMD.types | 39 +++++ .../reference/importCallExpressionES5CJS.js | 30 ++++ .../importCallExpressionES5CJS.symbols | 28 ++++ .../importCallExpressionES5CJS.types | 39 +++++ .../importCallExpressionES5System.js | 46 ++++++ .../importCallExpressionES5System.symbols | 28 ++++ .../importCallExpressionES5System.types | 39 +++++ .../reference/importCallExpressionES5UMD.js | 52 +++++++ .../importCallExpressionES5UMD.symbols | 28 ++++ .../importCallExpressionES5UMD.types | 39 +++++ ...portCallExpressionErrorInES2015.errors.txt | 24 +++ .../importCallExpressionErrorInES2015.js | 27 ++++ ...mportCallExpressionGrammarError.errors.txt | 34 +++++ .../importCallExpressionGrammarError.js | 19 +++ .../reference/importCallExpressionInAMD1.js | 35 +++++ .../importCallExpressionInAMD1.symbols | 28 ++++ .../importCallExpressionInAMD1.types | 39 +++++ .../reference/importCallExpressionInAMD2.js | 39 +++++ .../importCallExpressionInAMD2.symbols | 34 +++++ .../importCallExpressionInAMD2.types | 46 ++++++ .../reference/importCallExpressionInAMD3.js | 35 +++++ .../importCallExpressionInAMD3.symbols | 29 ++++ .../importCallExpressionInAMD3.types | 37 +++++ .../reference/importCallExpressionInAMD4.js | 63 ++++++++ .../importCallExpressionInAMD4.symbols | 61 ++++++++ .../importCallExpressionInAMD4.types | 83 +++++++++++ .../reference/importCallExpressionInCJS1.js | 30 ++++ .../importCallExpressionInCJS1.symbols | 28 ++++ .../importCallExpressionInCJS1.types | 39 +++++ .../reference/importCallExpressionInCJS2.js | 40 +++++ .../importCallExpressionInCJS2.symbols | 34 +++++ .../importCallExpressionInCJS2.types | 51 +++++++ .../reference/importCallExpressionInCJS3.js | 34 +++++ .../importCallExpressionInCJS3.symbols | 34 +++++ .../importCallExpressionInCJS3.types | 46 ++++++ .../reference/importCallExpressionInCJS4.js | 30 ++++ .../importCallExpressionInCJS4.symbols | 29 ++++ .../importCallExpressionInCJS4.types | 37 +++++ .../reference/importCallExpressionInCJS5.js | 56 +++++++ .../importCallExpressionInCJS5.symbols | 61 ++++++++ .../importCallExpressionInCJS5.types | 83 +++++++++++ .../importCallExpressionInScriptContext1.js | 17 +++ ...portCallExpressionInScriptContext1.symbols | 11 ++ ...importCallExpressionInScriptContext1.types | 14 ++ ...tCallExpressionInScriptContext2.errors.txt | 12 ++ .../importCallExpressionInScriptContext2.js | 19 +++ .../importCallExpressionInSystem1.js | 46 ++++++ .../importCallExpressionInSystem1.symbols | 28 ++++ .../importCallExpressionInSystem1.types | 39 +++++ .../importCallExpressionInSystem2.js | 50 +++++++ .../importCallExpressionInSystem2.symbols | 34 +++++ .../importCallExpressionInSystem2.types | 46 ++++++ .../importCallExpressionInSystem3.js | 46 ++++++ .../importCallExpressionInSystem3.symbols | 29 ++++ .../importCallExpressionInSystem3.types | 37 +++++ .../importCallExpressionInSystem4.js | 80 ++++++++++ .../importCallExpressionInSystem4.symbols | 61 ++++++++ .../importCallExpressionInSystem4.types | 83 +++++++++++ .../reference/importCallExpressionInUMD1.js | 52 +++++++ .../importCallExpressionInUMD1.symbols | 28 ++++ .../importCallExpressionInUMD1.types | 39 +++++ .../reference/importCallExpressionInUMD2.js | 56 +++++++ .../importCallExpressionInUMD2.symbols | 34 +++++ .../importCallExpressionInUMD2.types | 46 ++++++ .../reference/importCallExpressionInUMD3.js | 52 +++++++ .../importCallExpressionInUMD3.symbols | 29 ++++ .../importCallExpressionInUMD3.types | 37 +++++ .../reference/importCallExpressionInUMD4.js | 88 +++++++++++ .../importCallExpressionInUMD4.symbols | 61 ++++++++ .../importCallExpressionInUMD4.types | 83 +++++++++++ .../importCallExpressionReturnPromiseOfAny.js | 61 ++++++++ ...rtCallExpressionReturnPromiseOfAny.symbols | 89 ++++++++++++ ...portCallExpressionReturnPromiseOfAny.types | 118 +++++++++++++++ ...sionSpecifierNotStringTypeError.errors.txt | 31 ++++ ...llExpressionSpecifierNotStringTypeError.js | 25 ++++ ...tCallExpressionWithTypeArgument.errors.txt | 18 +++ .../importCallExpressionWithTypeArgument.js | 22 +++ ...ons module-kind is out-of-range.errors.txt | 4 +- ...s target-script is out-of-range.errors.txt | 4 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../importCallExpression1ESNext.ts | 15 ++ .../importCallExpression2ESNext.ts | 16 ++ .../importCallExpression3ESNext.ts | 14 ++ .../importCallExpression4ESNext.ts | 26 ++++ .../importCallExpression5ESNext.ts | 20 +++ .../importCallExpression6ESNext.ts | 19 +++ .../importCallExpressionCheckReturntype1.ts | 17 +++ .../importCallExpressionDeclarationEmit1.ts | 19 +++ .../importCallExpressionDeclarationEmit2.ts | 9 ++ .../importCallExpressionDeclarationEmit3.ts | 15 ++ .../importCallExpressionES5AMD.ts | 16 ++ .../importCallExpressionES5CJS.ts | 16 ++ .../importCallExpressionES5System.ts | 16 ++ .../importCallExpressionES5UMD.ts | 16 ++ .../importCallExpressionErrorInES2015.ts | 15 ++ .../importCallExpressionGrammarError.ts | 14 ++ .../importCallExpressionInAMD1.ts | 15 ++ .../importCallExpressionInAMD2.ts | 17 +++ .../importCallExpressionInAMD3.ts | 14 ++ .../importCallExpressionInAMD4.ts | 26 ++++ .../importCallExpressionInCJS1.ts | 15 ++ .../importCallExpressionInCJS2.ts | 19 +++ .../importCallExpressionInCJS3.ts | 17 +++ .../importCallExpressionInCJS4.ts | 14 ++ .../importCallExpressionInCJS5.ts | 26 ++++ .../importCallExpressionInScriptContext1.ts | 10 ++ .../importCallExpressionInScriptContext2.ts | 11 ++ .../importCallExpressionInSystem1.ts | 15 ++ .../importCallExpressionInSystem2.ts | 17 +++ .../importCallExpressionInSystem3.ts | 14 ++ .../importCallExpressionInSystem4.ts | 26 ++++ .../importCallExpressionInUMD1.ts | 15 ++ .../importCallExpressionInUMD2.ts | 17 +++ .../importCallExpressionInUMD3.ts | 14 ++ .../importCallExpressionInUMD4.ts | 26 ++++ .../importCallExpressionReturnPromiseOfAny.ts | 34 +++++ ...llExpressionSpecifierNotStringTypeError.ts | 17 +++ .../importCallExpressionWithTypeArgument.ts | 14 ++ 169 files changed, 5271 insertions(+), 103 deletions(-) create mode 100644 tests/baselines/reference/importCallExpression1ESNext.js create mode 100644 tests/baselines/reference/importCallExpression1ESNext.symbols create mode 100644 tests/baselines/reference/importCallExpression1ESNext.types create mode 100644 tests/baselines/reference/importCallExpression2ESNext.js create mode 100644 tests/baselines/reference/importCallExpression2ESNext.symbols create mode 100644 tests/baselines/reference/importCallExpression2ESNext.types create mode 100644 tests/baselines/reference/importCallExpression3ESNext.js create mode 100644 tests/baselines/reference/importCallExpression3ESNext.symbols create mode 100644 tests/baselines/reference/importCallExpression3ESNext.types create mode 100644 tests/baselines/reference/importCallExpression4ESNext.js create mode 100644 tests/baselines/reference/importCallExpression4ESNext.symbols create mode 100644 tests/baselines/reference/importCallExpression4ESNext.types create mode 100644 tests/baselines/reference/importCallExpression5ESNext.errors.txt create mode 100644 tests/baselines/reference/importCallExpression5ESNext.js create mode 100644 tests/baselines/reference/importCallExpression6ESNext.errors.txt create mode 100644 tests/baselines/reference/importCallExpression6ESNext.js create mode 100644 tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionCheckReturntype1.js create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit1.js create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit1.types create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit2.js create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit3.js create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols create mode 100644 tests/baselines/reference/importCallExpressionDeclarationEmit3.types create mode 100644 tests/baselines/reference/importCallExpressionES5AMD.js create mode 100644 tests/baselines/reference/importCallExpressionES5AMD.symbols create mode 100644 tests/baselines/reference/importCallExpressionES5AMD.types create mode 100644 tests/baselines/reference/importCallExpressionES5CJS.js create mode 100644 tests/baselines/reference/importCallExpressionES5CJS.symbols create mode 100644 tests/baselines/reference/importCallExpressionES5CJS.types create mode 100644 tests/baselines/reference/importCallExpressionES5System.js create mode 100644 tests/baselines/reference/importCallExpressionES5System.symbols create mode 100644 tests/baselines/reference/importCallExpressionES5System.types create mode 100644 tests/baselines/reference/importCallExpressionES5UMD.js create mode 100644 tests/baselines/reference/importCallExpressionES5UMD.symbols create mode 100644 tests/baselines/reference/importCallExpressionES5UMD.types create mode 100644 tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionErrorInES2015.js create mode 100644 tests/baselines/reference/importCallExpressionGrammarError.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionGrammarError.js create mode 100644 tests/baselines/reference/importCallExpressionInAMD1.js create mode 100644 tests/baselines/reference/importCallExpressionInAMD1.symbols create mode 100644 tests/baselines/reference/importCallExpressionInAMD1.types create mode 100644 tests/baselines/reference/importCallExpressionInAMD2.js create mode 100644 tests/baselines/reference/importCallExpressionInAMD2.symbols create mode 100644 tests/baselines/reference/importCallExpressionInAMD2.types create mode 100644 tests/baselines/reference/importCallExpressionInAMD3.js create mode 100644 tests/baselines/reference/importCallExpressionInAMD3.symbols create mode 100644 tests/baselines/reference/importCallExpressionInAMD3.types create mode 100644 tests/baselines/reference/importCallExpressionInAMD4.js create mode 100644 tests/baselines/reference/importCallExpressionInAMD4.symbols create mode 100644 tests/baselines/reference/importCallExpressionInAMD4.types create mode 100644 tests/baselines/reference/importCallExpressionInCJS1.js create mode 100644 tests/baselines/reference/importCallExpressionInCJS1.symbols create mode 100644 tests/baselines/reference/importCallExpressionInCJS1.types create mode 100644 tests/baselines/reference/importCallExpressionInCJS2.js create mode 100644 tests/baselines/reference/importCallExpressionInCJS2.symbols create mode 100644 tests/baselines/reference/importCallExpressionInCJS2.types create mode 100644 tests/baselines/reference/importCallExpressionInCJS3.js create mode 100644 tests/baselines/reference/importCallExpressionInCJS3.symbols create mode 100644 tests/baselines/reference/importCallExpressionInCJS3.types create mode 100644 tests/baselines/reference/importCallExpressionInCJS4.js create mode 100644 tests/baselines/reference/importCallExpressionInCJS4.symbols create mode 100644 tests/baselines/reference/importCallExpressionInCJS4.types create mode 100644 tests/baselines/reference/importCallExpressionInCJS5.js create mode 100644 tests/baselines/reference/importCallExpressionInCJS5.symbols create mode 100644 tests/baselines/reference/importCallExpressionInCJS5.types create mode 100644 tests/baselines/reference/importCallExpressionInScriptContext1.js create mode 100644 tests/baselines/reference/importCallExpressionInScriptContext1.symbols create mode 100644 tests/baselines/reference/importCallExpressionInScriptContext1.types create mode 100644 tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionInScriptContext2.js create mode 100644 tests/baselines/reference/importCallExpressionInSystem1.js create mode 100644 tests/baselines/reference/importCallExpressionInSystem1.symbols create mode 100644 tests/baselines/reference/importCallExpressionInSystem1.types create mode 100644 tests/baselines/reference/importCallExpressionInSystem2.js create mode 100644 tests/baselines/reference/importCallExpressionInSystem2.symbols create mode 100644 tests/baselines/reference/importCallExpressionInSystem2.types create mode 100644 tests/baselines/reference/importCallExpressionInSystem3.js create mode 100644 tests/baselines/reference/importCallExpressionInSystem3.symbols create mode 100644 tests/baselines/reference/importCallExpressionInSystem3.types create mode 100644 tests/baselines/reference/importCallExpressionInSystem4.js create mode 100644 tests/baselines/reference/importCallExpressionInSystem4.symbols create mode 100644 tests/baselines/reference/importCallExpressionInSystem4.types create mode 100644 tests/baselines/reference/importCallExpressionInUMD1.js create mode 100644 tests/baselines/reference/importCallExpressionInUMD1.symbols create mode 100644 tests/baselines/reference/importCallExpressionInUMD1.types create mode 100644 tests/baselines/reference/importCallExpressionInUMD2.js create mode 100644 tests/baselines/reference/importCallExpressionInUMD2.symbols create mode 100644 tests/baselines/reference/importCallExpressionInUMD2.types create mode 100644 tests/baselines/reference/importCallExpressionInUMD3.js create mode 100644 tests/baselines/reference/importCallExpressionInUMD3.symbols create mode 100644 tests/baselines/reference/importCallExpressionInUMD3.types create mode 100644 tests/baselines/reference/importCallExpressionInUMD4.js create mode 100644 tests/baselines/reference/importCallExpressionInUMD4.symbols create mode 100644 tests/baselines/reference/importCallExpressionInUMD4.types create mode 100644 tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js create mode 100644 tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols create mode 100644 tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types create mode 100644 tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js create mode 100644 tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt create mode 100644 tests/baselines/reference/importCallExpressionWithTypeArgument.js create mode 100644 tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts create mode 100644 tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index d55f3650c10..22209e2e41e 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2333,7 +2333,7 @@ namespace ts { // A common practice in node modules is to set 'export = module.exports = {}', this ensures that 'exports' // is still pointing to 'module.exports'. // We do not want to consider this as 'export=' since a module can have only one of these. - // Similarlly we do not want to treat 'module.exports = exports' as an 'export='. + // Similarly we do not want to treat 'module.exports = exports' as an 'export='. const assignedExpression = getRightMostAssignedExpression(node.right); if (isEmptyObjectLiteral(assignedExpression) || isExportsOrModuleExportsOrAlias(assignedExpression)) { // Mark it as a module in case there are no other exports in the file @@ -2741,6 +2741,10 @@ namespace ts { transformFlags |= TransformFlags.AssertES2015; } + if (expression.kind === SyntaxKind.ImportKeyword) { + transformFlags |= TransformFlags.ContainsDynamicImport; + } + node.transformFlags = transformFlags | TransformFlags.HasComputedFlags; return transformFlags & ~TransformFlags.ArrayLiteralOrCallOrNewExcludes; } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1ab88880d9e..f1aca672c52 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8366,6 +8366,12 @@ namespace ts { /** * This is *not* a bi-directional relationship. * If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'. + * + * A type S is comparable to a type T if some (but not necessarily all) of the possible values of S are also possible values of T. + * It is used to check following cases: + * - the types of the left and right sides of equality/inequality operators (`===`, `!==`, `==`, `!=`). + * - the types of `case` clause expressions and their respective `switch` expressions. + * - the type of an expression in a type assertion with the type being asserted. */ function isTypeComparableTo(source: Type, target: Type): boolean { return isTypeRelatedTo(source, target, comparableRelation); @@ -16173,6 +16179,35 @@ namespace ts { return getReturnTypeOfSignature(signature); } + function checkImportCallExpression(node: ImportCall): Type { + // Check grammar of dynamic import + checkGrammarArguments(node, node.arguments) || checkGrammarImportCallExpression(node); + + if (node.arguments.length === 0) { + return createPromiseReturnType(node, anyType); + } + const specifier = node.arguments[0]; + const specifierType = checkExpressionCached(specifier); + // Even though multiple arugments is grammatically incorrect, type-check extra arguments for completion + for (let i = 1; i < node.arguments.length; ++i) { + checkExpressionCached(node.arguments[i]); + } + + if (specifierType.flags & TypeFlags.Undefined || specifierType.flags & TypeFlags.Null || !isTypeAssignableTo(specifierType, stringType)) { + error(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); + } + + // resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal + const moduleSymbol = resolveExternalModuleName(node, specifier); + if (moduleSymbol) { + const esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, /*dontRecursivelyResolve*/ true); + if (esModuleSymbol) { + return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol)); + } + } + return createPromiseReturnType(node, anyType); + } + function isCommonJsRequire(node: Node) { if (!isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { return false; @@ -16379,14 +16414,18 @@ namespace ts { return emptyObjectType; } - function createPromiseReturnType(func: FunctionLikeDeclaration, promisedType: Type) { + function createPromiseReturnType(func: FunctionLikeDeclaration | ImportCall, promisedType: Type) { const promiseType = createPromiseType(promisedType); if (promiseType === emptyObjectType) { - error(func, Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error(func, isImportCall(func) ? + Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : + Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return unknownType; } else if (!getGlobalPromiseConstructorSymbol(/*reportErrors*/ true)) { - error(func, 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(func, isImportCall(func) ? + Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : + 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); } return promiseType; @@ -17745,6 +17784,10 @@ namespace ts { case SyntaxKind.ElementAccessExpression: return checkIndexedAccess(node); case SyntaxKind.CallExpression: + if ((node).expression.kind === SyntaxKind.ImportKeyword) { + return checkImportCallExpression(node); + } + /* falls through */ case SyntaxKind.NewExpression: return checkCallExpression(node); case SyntaxKind.TaggedTemplateExpression: @@ -24670,6 +24713,27 @@ namespace ts { }); return result; } + + function checkGrammarImportCallExpression(node: ImportCall): boolean { + if (modulekind === ModuleKind.ES2015) { + return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_be_used_when_targeting_ECMAScript_2015_modules); + } + + if (node.typeArguments) { + return grammarErrorOnNode(node, Diagnostics.Dynamic_import_cannot_have_type_arguments); + } + + const arguments = node.arguments; + if (arguments.length !== 1) { + return grammarErrorOnNode(node, Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument); + } + + // see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import. + // parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import. + if (isSpreadElement(arguments[0])) { + return grammarErrorOnNode(arguments[0], Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element); + } + } } /** Like 'isDeclarationName', but returns true for LHS of `import { x as y }` or `export { x as y }`. */ diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index fa0c8140bb6..23efd047e46 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -100,11 +100,12 @@ namespace ts { "umd": ModuleKind.UMD, "es6": ModuleKind.ES2015, "es2015": ModuleKind.ES2015, + "esnext": ModuleKind.ESNext }), paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Basic_Options, - description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015, + description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_es2015_or_ESNext, }, { name: "lib", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 09391d233a7..70efe50143e 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -883,6 +883,23 @@ "category": "Error", "code": 1322 }, + "Dynamic import cannot be used when targeting ECMAScript 2015 modules.": { + "category": "Error", + "code": 1323 + }, + "Dynamic import must have one specifier as an argument.": { + "category": "Error", + "code": 1324 + }, + "Specifier of dynamic import cannot be spread element.": { + "category": "Error", + "code": 1325 + }, + "Dynamic import cannot have type arguments": { + "category": "Error", + "code": 1326 + }, + "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 @@ -1927,10 +1944,6 @@ "category": "Error", "code": 2649 }, - "Cannot emit namespaced JSX elements in React.": { - "category": "Error", - "code": 2650 - }, "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.": { "category": "Error", "code": 2651 @@ -2163,6 +2176,14 @@ "category": "Error", "code": 2710 }, + "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { + "category": "Error", + "code": 2711 + }, + "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": { + "category": "Error", + "code": 2712 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -2629,7 +2650,7 @@ "category": "Message", "code": 6015 }, - "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'.": { + "Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.": { "category": "Message", "code": 6016 }, @@ -3365,6 +3386,11 @@ "category": "Error", "code": 7035 }, + "Dynamic import's specifier must be of type 'string', but here has type '{0}'.": { + "category": "Error", + "code": 7036 + }, + "You cannot rename this element.": { "category": "Error", "code": 8000 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 1d2f75fcd60..1e6cc3b12db 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -676,6 +676,7 @@ namespace ts { case SyntaxKind.SuperKeyword: case SyntaxKind.TrueKeyword: case SyntaxKind.ThisKeyword: + case SyntaxKind.ImportKeyword: writeTokenNode(node); return; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 849f97bbbaf..a3f440fd6c0 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -46,10 +46,16 @@ namespace ts { } } - // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes - // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, - // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns - // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + /** + * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes + * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, + * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns + * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. + * + * @param node a given node to visit its children + * @param cbNode a callback to be invoked for all child nodes + * @param cbNodeArray a callback to be invoked for embedded array + */ export function forEachChild(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined { if (!node) { return; @@ -2409,7 +2415,7 @@ namespace ts { if (token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken) { return parseSignatureMember(SyntaxKind.CallSignature); } - if (token() === SyntaxKind.NewKeyword && lookAhead(isStartOfConstructSignature)) { + if (token() === SyntaxKind.NewKeyword && lookAhead(nextTokenIsOpenParenOrLessThan)) { return parseSignatureMember(SyntaxKind.ConstructSignature); } const fullStart = getNodePos(); @@ -2420,7 +2426,7 @@ namespace ts { return parsePropertyOrMethodSignature(fullStart, modifiers); } - function isStartOfConstructSignature() { + function nextTokenIsOpenParenOrLessThan() { nextToken(); return token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken; } @@ -2776,6 +2782,7 @@ namespace ts { case SyntaxKind.SlashToken: case SyntaxKind.SlashEqualsToken: case SyntaxKind.Identifier: + case SyntaxKind.ImportKeyword: return true; default: return isIdentifier(); @@ -3509,10 +3516,10 @@ namespace ts { * 5) --UnaryExpression[?Yield] */ if (isUpdateExpression()) { - const incrementExpression = parseIncrementExpression(); + const updateExpression = parseUpdateExpression(); return token() === SyntaxKind.AsteriskAsteriskToken ? - parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : - incrementExpression; + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), updateExpression) : + updateExpression; } /** @@ -3578,7 +3585,7 @@ namespace ts { } // falls through default: - return parseIncrementExpression(); + return parseUpdateExpression(); } } @@ -3594,7 +3601,7 @@ namespace ts { */ function isUpdateExpression(): boolean { // This function is called inside parseUnaryExpression to decide - // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly + // whether to call parseSimpleUnaryExpression or call parseUpdateExpression directly switch (token()) { case SyntaxKind.PlusToken: case SyntaxKind.MinusToken: @@ -3618,9 +3625,9 @@ namespace ts { } /** - * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. + * Parse ES7 UpdateExpression. UpdateExpression is used instead of ES6's PostFixExpression. * - * ES7 IncrementExpression[yield]: + * ES7 UpdateExpression[yield]: * 1) LeftHandSideExpression[?yield] * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- @@ -3628,7 +3635,7 @@ namespace ts { * 5) --LeftHandSideExpression[?yield] * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ - function parseIncrementExpression(): IncrementExpression { + function parseUpdateExpression(): UpdateExpression { if (token() === SyntaxKind.PlusPlusToken || token() === SyntaxKind.MinusMinusToken) { const node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token(); @@ -3678,17 +3685,27 @@ namespace ts { // CallExpression Arguments // CallExpression[Expression] // CallExpression.IdentifierName - // super ( ArgumentListopt ) + // import (AssignmentExpression) + // super Arguments // super.IdentifierName // - // Because of the recursion in these calls, we need to bottom out first. There are two - // bottom out states we can run into. Either we see 'super' which must start either of - // the last two CallExpression productions. Or we have a MemberExpression which either - // completes the LeftHandSideExpression, or starts the beginning of the first four - // CallExpression productions. - const expression = token() === SyntaxKind.SuperKeyword - ? parseSuperExpression() - : parseMemberExpressionOrHigher(); + // Because of the recursion in these calls, we need to bottom out first. There are three + // bottom out states we can run into: 1) We see 'super' which must start either of + // the last two CallExpression productions. 2) We see 'import' which must start import call. + // 3)we have a MemberExpression which either completes the LeftHandSideExpression, + // or starts the beginning of the first four CallExpression productions. + let expression: MemberExpression; + if (token() === SyntaxKind.ImportKeyword && lookAhead(nextTokenIsOpenParenOrLessThan)) { + // We don't want to eagerly consume all import keyword as import call expression so we look a head to find "(" + // For example: + // var foo3 = require("subfolder + // import * as foo1 from "module-from-node -> we want this import to be a statement rather than import call expression + sourceFile.flags |= NodeFlags.PossiblyContainDynamicImport; + expression = parseTokenNode(); + } + else { + expression = token() === SyntaxKind.SuperKeyword ? parseSuperExpression() : parseMemberExpressionOrHigher(); + } // Now, we *may* be complete. However, we might have consumed the start of a // CallExpression. As such, we need to consume the rest of it here to be complete. @@ -3696,7 +3713,7 @@ namespace ts { } function parseMemberExpressionOrHigher(): MemberExpression { - // Note: to make our lives simpler, we decompose the the NewExpression productions and + // Note: to make our lives simpler, we decompose the NewExpression productions and // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. // like so: // @@ -4790,11 +4807,11 @@ namespace ts { // however, we say they are here so that we may gracefully parse them and error later. case SyntaxKind.CatchKeyword: case SyntaxKind.FinallyKeyword: + case SyntaxKind.ImportKeyword: return true; case SyntaxKind.ConstKeyword: case SyntaxKind.ExportKeyword: - case SyntaxKind.ImportKeyword: return isStartOfDeclaration(); case SyntaxKind.AsyncKeyword: diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 39d82b8606d..92c50e6ddff 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1359,6 +1359,7 @@ namespace ts { const isJavaScriptFile = isSourceFileJavaScript(file); const isExternalModuleFile = isExternalModule(file); + // file.imports may not be undefined if there exists dynamic import let imports: LiteralExpression[]; let moduleAugmentations: LiteralExpression[]; let ambientModules: string[]; @@ -1378,8 +1379,8 @@ namespace ts { for (const node of file.statements) { collectModuleReferences(node, /*inAmbientModule*/ false); - if (isJavaScriptFile) { - collectRequireCalls(node); + if ((file.flags & NodeFlags.PossiblyContainDynamicImport) || isJavaScriptFile) { + collectDynamicImportOrRequireCalls(node); } } @@ -1442,12 +1443,16 @@ namespace ts { } } - function collectRequireCalls(node: Node): void { + function collectDynamicImportOrRequireCalls(node: Node): void { if (isRequireCall(node, /*checkArgumentIsStringLiteral*/ true)) { (imports || (imports = [])).push((node).arguments[0]); } + // we have to check the argument list has length of 1. We will still have to process these even though we have parsing error. + else if (isImportCall(node) && node.arguments.length === 1 && node.arguments[0].kind === SyntaxKind.StringLiteral) { + (imports || (imports = [])).push((node).arguments[0]); + } else { - forEachChild(node, collectRequireCalls); + forEachChild(node, collectDynamicImportOrRequireCalls); } } } diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 75f9c43c6fe..f0c827d8396 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -15,6 +15,7 @@ namespace ts { function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory { switch (moduleKind) { + case ModuleKind.ESNext: case ModuleKind.ES2015: return transformES2015Module; case ModuleKind.System: diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index b3e544a3f8b..b2e1c1c70a9 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -46,6 +46,7 @@ namespace ts { let currentSourceFile: SourceFile; // The current file. let currentModuleInfo: ExternalModuleInfo; // The ExternalModuleInfo for the current file. let noSubstitution: boolean[]; // Set of nodes for which substitution rules should be ignored. + let needUMDDynamicImportHelper: boolean; return transformSourceFile; @@ -55,7 +56,7 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules)) { + if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules || node.transformFlags & TransformFlags.ContainsDynamicImport)) { return node; } @@ -66,9 +67,9 @@ namespace ts { // Perform the transformation. const transformModule = getTransformModuleDelegate(moduleKind); const updated = transformModule(node); - currentSourceFile = undefined; currentModuleInfo = undefined; + needUMDDynamicImportHelper = false; return aggregateTransformFlags(updated); } @@ -107,6 +108,7 @@ namespace ts { // we need to inform the emitter to add the __export helper. addEmitHelper(updated, exportStarHelper); } + addEmitHelpers(updated, context.readEmitHelpers()); return updated; } @@ -411,6 +413,9 @@ namespace ts { // we need to inform the emitter to add the __export helper. addEmitHelper(body, exportStarHelper); } + if (needUMDDynamicImportHelper) { + addEmitHelper(body, dynamicImportUMDHelper); + } return body; } @@ -488,12 +493,110 @@ namespace ts { return visitEndOfDeclarationMarker(node); default: - // This visitor does not descend into the tree, as export/import statements - // are only transformed at the top level of a file. - return node; + return visitEachChild(node, importCallExpressionVisitor, context); } } + function importCallExpressionVisitor(node: Node): VisitResult { + // This visitor does not need to descend into the tree if there is no dynamic import, + // as export/import statements are only transformed at the top level of a file. + if (!(node.transformFlags & TransformFlags.ContainsDynamicImport)) { + return node; + } + + if (isImportCall(node)) { + return visitImportCallExpression(node); + } + else { + return visitEachChild(node, importCallExpressionVisitor, context); + } + } + + function visitImportCallExpression(node: ImportCall): Expression { + switch (compilerOptions.module) { + case ModuleKind.CommonJS: + return transformImportCallExpressionCommonJS(node); + case ModuleKind.AMD: + return transformImportCallExpressionAMD(node); + case ModuleKind.UMD: + return transformImportCallExpressionUMD(node); + } + Debug.fail("All supported module kind in this transformation step should have been handled"); + } + + function transformImportCallExpressionUMD(node: ImportCall): Expression { + // (function (factory) { + // ... (regular UMD) + // } + // })(function (require, exports, useSyncRequire) { + // "use strict"; + // Object.defineProperty(exports, "__esModule", { value: true }); + // var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + // var __resolved = new Promise(function (resolve) { resolve(); }); + // ..... + // __syncRequire + // ? __resolved.then(function () { return require(x); }) /*CommonJs Require*/ + // : new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ + // }); + needUMDDynamicImportHelper = true; + return createConditional( + /*condition*/ createIdentifier("__syncRequire"), + /*whenTrue*/ transformImportCallExpressionCommonJS(node), + /*whenFalse*/ transformImportCallExpressionAMD(node) + ); + } + + function transformImportCallExpressionAMD(node: ImportCall): Expression { + // improt("./blah") + // emit as + // define(["require", "exports", "blah"], function (require, exports) { + // ... + // new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ + // }); + const resolve = createUniqueName("resolve"); + const reject = createUniqueName("reject"); + return createNew( + createIdentifier("Promise"), + /*typeArguments*/ undefined, + [createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + [createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ resolve), + createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject)], + /*type*/ undefined, + createBlock([createStatement( + createCall( + createIdentifier("require"), + /*typeArguments*/ undefined, + [createArrayLiteral([firstOrUndefined(node.arguments) || createOmittedExpression()]), resolve, reject] + ))]) + )]); + } + + function transformImportCallExpressionCommonJS(node: ImportCall): Expression { + // import("./blah") + // emit as + // Promise.resolve().then(function () { return require(x); }) /*CommonJs Require*/ + // We have to wrap require in then callback so that require is done in asynchronously + // if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately + return createCall( + createPropertyAccess( + createCall(createPropertyAccess(createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []), + "then"), + /*typeArguments*/ undefined, + [createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ undefined, + /*type*/ undefined, + createBlock([createReturn(createCall(createIdentifier("require"), /*typeArguments*/ undefined, node.arguments))]) + )]); + } + /** * Visits an ImportDeclaration node. * @@ -786,9 +889,9 @@ namespace ts { node.asteriskToken, getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, - node.parameters, + visitNodes(node.parameters, importCallExpressionVisitor), /*type*/ undefined, - node.body + visitEachChild(node.body, importCallExpressionVisitor, context) ), /*location*/ node ), @@ -797,7 +900,7 @@ namespace ts { ); } else { - statements = append(statements, node); + statements = append(statements, visitEachChild(node, importCallExpressionVisitor, context)); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -828,7 +931,7 @@ namespace ts { visitNodes(node.modifiers, modifierVisitor, isModifier), getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, - node.heritageClauses, + visitNodes(node.heritageClauses, importCallExpressionVisitor), node.members ), node @@ -838,7 +941,7 @@ namespace ts { ); } else { - statements = append(statements, node); + statements = append(statements, visitEachChild(node, importCallExpressionVisitor, context)); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -890,7 +993,7 @@ namespace ts { } } else { - statements = append(statements, node); + statements = append(statements, visitEachChild(node, importCallExpressionVisitor, context)); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -913,7 +1016,7 @@ namespace ts { function transformInitializedVariable(node: VariableDeclaration): Expression { if (isBindingPattern(node.name)) { return flattenDestructuringAssignment( - node, + visitNode(node, importCallExpressionVisitor), /*visitor*/ undefined, context, FlattenLevel.All, @@ -930,7 +1033,7 @@ namespace ts { ), /*location*/ node.name ), - node.initializer + visitNode(node.initializer, importCallExpressionVisitor) ); } } @@ -1497,4 +1600,12 @@ namespace ts { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; }` }; + + // emit helper for dynamic import + const dynamicImportUMDHelper: EmitHelper = { + name: "typescript:dynamicimport-sync-require", + scoped: true, + text: ` + var __syncRequire = typeof module === "object" && typeof module.exports === "object";` + }; } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index e6351c0965e..fa126d1faa7 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -50,7 +50,7 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile || !(isExternalModule(node) || compilerOptions.isolatedModules)) { + if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & TransformFlags.ContainsDynamicImport)) { return node; } @@ -646,7 +646,7 @@ namespace ts { return undefined; } - const expression = visitNode(node.expression, destructuringVisitor, isExpression); + const expression = visitNode(node.expression, destructuringAndImportCallVisitor, isExpression); const original = node.original; if (original && hasAssociatedEndOfDeclarationMarker(original)) { // Defer exports until we encounter an EndOfDeclarationMarker node @@ -673,12 +673,12 @@ namespace ts { node.asteriskToken, getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, - visitNodes(node.parameters, destructuringVisitor, isParameterDeclaration), + visitNodes(node.parameters, destructuringAndImportCallVisitor, isParameterDeclaration), /*type*/ undefined, - visitNode(node.body, destructuringVisitor, isBlock))); + visitNode(node.body, destructuringAndImportCallVisitor, isBlock))); } else { - hoistedStatements = append(hoistedStatements, node); + hoistedStatements = append(hoistedStatements, visitEachChild(node, destructuringAndImportCallVisitor, context)); } if (hasAssociatedEndOfDeclarationMarker(node)) { @@ -716,8 +716,8 @@ namespace ts { /*modifiers*/ undefined, node.name, /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, destructuringVisitor, isHeritageClause), - visitNodes(node.members, destructuringVisitor, isClassElement) + visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, isHeritageClause), + visitNodes(node.members, destructuringAndImportCallVisitor, isClassElement) ), node ) @@ -747,7 +747,7 @@ namespace ts { */ function visitVariableStatement(node: VariableStatement): VisitResult { if (!shouldHoistVariableDeclarationList(node.declarationList)) { - return visitNode(node, destructuringVisitor, isStatement); + return visitNode(node, destructuringAndImportCallVisitor, isStatement); } let expressions: Expression[]; @@ -820,13 +820,13 @@ namespace ts { return isBindingPattern(node.name) ? flattenDestructuringAssignment( node, - destructuringVisitor, + destructuringAndImportCallVisitor, context, FlattenLevel.All, /*needsValue*/ false, createAssignment ) - : createAssignment(node.name, visitNode(node.initializer, destructuringVisitor, isExpression)); + : createAssignment(node.name, visitNode(node.initializer, destructuringAndImportCallVisitor, isExpression)); } /** @@ -1204,7 +1204,7 @@ namespace ts { return visitEndOfDeclarationMarker(node); default: - return destructuringVisitor(node); + return destructuringAndImportCallVisitor(node); } } @@ -1220,8 +1220,8 @@ namespace ts { node = updateFor( node, visitForInitializer(node.initializer), - visitNode(node.condition, destructuringVisitor, isExpression), - visitNode(node.incrementor, destructuringVisitor, isExpression), + visitNode(node.condition, destructuringAndImportCallVisitor, isExpression), + visitNode(node.incrementor, destructuringAndImportCallVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement) ); @@ -1241,7 +1241,7 @@ namespace ts { node = updateForIn( node, visitForInitializer(node.initializer), - visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); @@ -1262,7 +1262,7 @@ namespace ts { node, node.awaitModifier, visitForInitializer(node.initializer), - visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); @@ -1313,7 +1313,7 @@ namespace ts { return updateDo( node, visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock), - visitNode(node.expression, destructuringVisitor, isExpression) + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression) ); } @@ -1325,7 +1325,7 @@ namespace ts { function visitWhileStatement(node: WhileStatement): VisitResult { return updateWhile( node, - visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); } @@ -1351,7 +1351,7 @@ namespace ts { function visitWithStatement(node: WithStatement): VisitResult { return updateWith( node, - visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), visitNode(node.statement, nestedElementVisitor, isStatement, liftToBlock) ); } @@ -1364,7 +1364,7 @@ namespace ts { function visitSwitchStatement(node: SwitchStatement): VisitResult { return updateSwitch( node, - visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), visitNode(node.caseBlock, nestedElementVisitor, isCaseBlock) ); } @@ -1395,7 +1395,7 @@ namespace ts { function visitCaseClause(node: CaseClause): VisitResult { return updateCaseClause( node, - visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.expression, destructuringAndImportCallVisitor, isExpression), visitNodes(node.statements, nestedElementVisitor, isStatement) ); } @@ -1461,19 +1461,43 @@ namespace ts { * * @param node The node to visit. */ - function destructuringVisitor(node: Node): VisitResult { + function destructuringAndImportCallVisitor(node: Node): VisitResult { if (node.transformFlags & TransformFlags.DestructuringAssignment && node.kind === SyntaxKind.BinaryExpression) { return visitDestructuringAssignment(node); } - else if (node.transformFlags & TransformFlags.ContainsDestructuringAssignment) { - return visitEachChild(node, destructuringVisitor, context); + else if (isImportCall(node)) { + return visitImportCallExpression(node); + } + else if ((node.transformFlags & TransformFlags.ContainsDestructuringAssignment) || (node.transformFlags & TransformFlags.ContainsDynamicImport)) { + return visitEachChild(node, destructuringAndImportCallVisitor, context); } else { return node; } } + function visitImportCallExpression(node: ImportCall): Expression { + // import("./blah") + // emit as + // System.register([], function (_export, _context) { + // return { + // setters: [], + // execute: () => { + // _context.import('./blah'); + // } + // }; + // }); + return createCall( + createPropertyAccess( + contextObject, + createIdentifier("import") + ), + /*typeArguments*/ undefined, + node.arguments + ); + } + /** * Visits a DestructuringAssignment to flatten destructuring to exported symbols. * @@ -1483,14 +1507,14 @@ namespace ts { if (hasExportedReferenceInDestructuringTarget(node.left)) { return flattenDestructuringAssignment( node, - destructuringVisitor, + destructuringAndImportCallVisitor, context, FlattenLevel.All, /*needsValue*/ true ); } - return visitEachChild(node, destructuringVisitor, context); + return visitEachChild(node, destructuringAndImportCallVisitor, context); } /** diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f16140cdf8c..1c7f36bb27b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -395,6 +395,7 @@ namespace ts { // Enum value count Count, + // Markers FirstAssignment = EqualsToken, LastAssignment = CaretEqualsToken, @@ -449,6 +450,14 @@ namespace ts { ThisNodeOrAnySubNodesHasError = 1 << 17, // If this node or any of its children had an error HasAggregatedChildData = 1 << 18, // If we've computed data from children and cached it in this node + // This flag will be set to true when the parse encounter dynamic import so that post-parsing process of module resolution + // will not walk the tree if the flag is not set. However, this flag is just a approximation because once it is set, the flag never get reset. + // (hence it is named "possiblyContainDynamicImport"). + // During editing, if dynamic import is remove, incremental parsing will *NOT* update this flag. This will then causes walking of the tree during module resolution. + // However, the removal operation should not occur often and in the case of the removal, it is likely that users will add back the import anyway. + // The advantage of this approach is its simplicity. For the case of batch compilation, we garuntee that users won't have to pay the price of walking the tree if dynamic import isn't used. + PossiblyContainDynamicImport = 1 << 19, + BlockScoped = Let | Const, ReachabilityCheckFlags = HasImplicitReturn | HasExplicitReturn, @@ -1001,8 +1010,10 @@ namespace ts { _unaryExpressionBrand: any; } - export interface IncrementExpression extends UnaryExpression { - _incrementExpressionBrand: any; + /** Deprecated, please use UpdateExpression */ + export type IncrementExpression = UpdateExpression; + export interface UpdateExpression extends UnaryExpression { + _updateExpressionBrand: any; } // see: https://tc39.github.io/ecma262/#prod-UpdateExpression @@ -1013,10 +1024,9 @@ namespace ts { | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken - | SyntaxKind.ExclamationToken - ; + | SyntaxKind.ExclamationToken; - export interface PrefixUnaryExpression extends IncrementExpression { + export interface PrefixUnaryExpression extends UpdateExpression { kind: SyntaxKind.PrefixUnaryExpression; operator: PrefixUnaryOperator; operand: UnaryExpression; @@ -1028,13 +1038,13 @@ namespace ts { | SyntaxKind.MinusMinusToken ; - export interface PostfixUnaryExpression extends IncrementExpression { + export interface PostfixUnaryExpression extends UpdateExpression { kind: SyntaxKind.PostfixUnaryExpression; operand: LeftHandSideExpression; operator: PostfixUnaryOperator; } - export interface LeftHandSideExpression extends IncrementExpression { + export interface LeftHandSideExpression extends UpdateExpression { _leftHandSideExpressionBrand: any; } @@ -1062,6 +1072,10 @@ namespace ts { kind: SyntaxKind.SuperKeyword; } + export interface ImportExpression extends PrimaryExpression { + kind: SyntaxKind.ImportKeyword; + } + export interface DeleteExpression extends UnaryExpression { kind: SyntaxKind.DeleteExpression; expression: UnaryExpression; @@ -1454,10 +1468,7 @@ namespace ts { } // see: https://tc39.github.io/ecma262/#prod-SuperProperty - export type SuperProperty - = SuperPropertyAccessExpression - | SuperElementAccessExpression - ; + export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; export interface CallExpression extends LeftHandSideExpression, Declaration { kind: SyntaxKind.CallExpression; @@ -1471,6 +1482,10 @@ namespace ts { expression: SuperExpression; } + export interface ImportCall extends CallExpression { + expression: ImportExpression; + } + export interface ExpressionWithTypeArguments extends TypeNode { kind: SyntaxKind.ExpressionWithTypeArguments; parent?: HeritageClause; @@ -3566,6 +3581,7 @@ namespace ts { UMD = 3, System = 4, ES2015 = 5, + ESNext = 6 } export const enum JsxEmit { @@ -3950,6 +3966,11 @@ namespace ts { ContainsYield = 1 << 24, ContainsHoistedDeclarationOrCompletion = 1 << 25, + ContainsDynamicImport = 1 << 26, + + // Please leave this as 1 << 29. + // It is the maximum bit we can set before we outgrow the size of a v8 small integer (SMI) on an x86 system. + // It is a good reminder of how much room we have left HasComputedFlags = 1 << 29, // Transform flags have been computed. // Assertions diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index faec63d5a28..30f7e0a52f9 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -596,6 +596,10 @@ namespace ts { return n.kind === SyntaxKind.CallExpression && (n).expression.kind === SyntaxKind.SuperKeyword; } + export function isImportCall(n: Node): n is ImportCall { + return n.kind === SyntaxKind.CallExpression && (n).expression.kind === SyntaxKind.ImportKeyword; + } + export function isPrologueDirective(node: Node): node is PrologueDirective { return node.kind === SyntaxKind.ExpressionStatement && (node).expression.kind === SyntaxKind.StringLiteral; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 49dbdbf2102..9bf4591112d 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -857,6 +857,7 @@ namespace Harness { export function getDefaultLibFileName(options: ts.CompilerOptions): string { switch (options.target) { + case ts.ScriptTarget.ESNext: case ts.ScriptTarget.ES2017: return "lib.es2017.d.ts"; case ts.ScriptTarget.ES2016: diff --git a/src/harness/unittests/commandLineParsing.ts b/src/harness/unittests/commandLineParsing.ts index 19ccc919d4c..01a208aa330 100644 --- a/src/harness/unittests/commandLineParsing.ts +++ b/src/harness/unittests/commandLineParsing.ts @@ -113,7 +113,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, diff --git a/src/harness/unittests/convertCompilerOptionsFromJson.ts b/src/harness/unittests/convertCompilerOptionsFromJson.ts index 3aa1a4c9b8e..798f8c6a76b 100644 --- a/src/harness/unittests/convertCompilerOptionsFromJson.ts +++ b/src/harness/unittests/convertCompilerOptionsFromJson.ts @@ -122,7 +122,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] diff --git a/src/services/services.ts b/src/services/services.ts index 05fe59084b4..21c756a9acc 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -368,7 +368,7 @@ namespace ts { _primaryExpressionBrand: any; _memberExpressionBrand: any; _leftHandSideExpressionBrand: any; - _incrementExpressionBrand: any; + _updateExpressionBrand: any; _unaryExpressionBrand: any; _expressionBrand: any; /*@internal*/typeArguments: NodeArray; @@ -521,6 +521,7 @@ namespace ts { private namedDeclarations: Map; public ambientModuleNames: string[]; public checkJsDirective: CheckJsDirective | undefined; + public possiblyContainDynamicImport: boolean; constructor(kind: SyntaxKind, pos: number, end: number) { super(kind, pos, end); diff --git a/tests/baselines/reference/importCallExpression1ESNext.js b/tests/baselines/reference/importCallExpression1ESNext.js new file mode 100644 index 00000000000..39b779c921f --- /dev/null +++ b/tests/baselines/reference/importCallExpression1ESNext.js @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}) + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +export function foo() { return "foo"; } +//// [1.js] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); +function foo() { + const p2 = import("./0"); +} diff --git a/tests/baselines/reference/importCallExpression1ESNext.symbols b/tests/baselines/reference/importCallExpression1ESNext.symbols new file mode 100644 index 00000000000..28b5ba13e99 --- /dev/null +++ b/tests/baselines/reference/importCallExpression1ESNext.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}) + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 2)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpression1ESNext.types b/tests/baselines/reference/importCallExpression1ESNext.types new file mode 100644 index 00000000000..53a1b3d08fa --- /dev/null +++ b/tests/baselines/reference/importCallExpression1ESNext.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}) + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpression2ESNext.js b/tests/baselines/reference/importCallExpression2ESNext.js new file mode 100644 index 00000000000..662f57f07ff --- /dev/null +++ b/tests/baselines/reference/importCallExpression2ESNext.js @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); + +//// [0.js] +export class B { + print() { return "I am B"; } +} +//// [2.js] +function foo(x) { + x.then(value => { + let b = new value.B(); + b.print(); + }); +} +foo(import("./0")); diff --git a/tests/baselines/reference/importCallExpression2ESNext.symbols b/tests/baselines/reference/importCallExpression2ESNext.symbols new file mode 100644 index 00000000000..2002398aeb9 --- /dev/null +++ b/tests/baselines/reference/importCallExpression2ESNext.symbols @@ -0,0 +1,33 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +function foo(x: Promise) { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) +>x : Symbol(x, Decl(2.ts, 0, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + x.then(value => { +>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(2.ts, 0, 13)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>value : Symbol(value, Decl(2.ts, 1, 11)) + + let b = new value.B(); +>b : Symbol(b, Decl(2.ts, 2, 11)) +>value : Symbol(value, Decl(2.ts, 1, 11)) + + b.print(); +>b : Symbol(b, Decl(2.ts, 2, 11)) + + }) +} + +foo(import("./0")); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpression2ESNext.types b/tests/baselines/reference/importCallExpression2ESNext.types new file mode 100644 index 00000000000..084eb33dde9 --- /dev/null +++ b/tests/baselines/reference/importCallExpression2ESNext.types @@ -0,0 +1,45 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +function foo(x: Promise) { +>foo : (x: Promise) => void +>x : Promise +>Promise : Promise + + x.then(value => { +>x.then(value => { let b = new value.B(); b.print(); }) : Promise +>x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>x : Promise +>then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>value => { let b = new value.B(); b.print(); } : (value: any) => void +>value : any + + let b = new value.B(); +>b : any +>new value.B() : any +>value.B : any +>value : any +>B : any + + b.print(); +>b.print() : any +>b.print : any +>b : any +>print : any + + }) +} + +foo(import("./0")); +>foo(import("./0")) : void +>foo : (x: Promise) => void +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpression3ESNext.js b/tests/baselines/reference/importCallExpression3ESNext.js new file mode 100644 index 00000000000..0cd41388616 --- /dev/null +++ b/tests/baselines/reference/importCallExpression3ESNext.js @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); + +//// [0.js] +export class B { + print() { return "I am B"; } +} +//// [2.js] +async function foo() { + class C extends (await import("./0")).B { + } + var c = new C(); + c.print(); +} +foo(); diff --git a/tests/baselines/reference/importCallExpression3ESNext.symbols b/tests/baselines/reference/importCallExpression3ESNext.symbols new file mode 100644 index 00000000000..5ca85d6e693 --- /dev/null +++ b/tests/baselines/reference/importCallExpression3ESNext.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + + class C extends (await import("./0")).B {} +>C : Symbol(C, Decl(2.ts, 0, 22)) +>(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) +>B : Symbol(B, Decl(0.ts, 0, 0)) + + var c = new C(); +>c : Symbol(c, Decl(2.ts, 2, 7)) +>C : Symbol(C, Decl(2.ts, 0, 22)) + + c.print(); +>c.print : Symbol(B.print, Decl(0.ts, 0, 16)) +>c : Symbol(c, Decl(2.ts, 2, 7)) +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} +foo(); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpression3ESNext.types b/tests/baselines/reference/importCallExpression3ESNext.types new file mode 100644 index 00000000000..e517be6e722 --- /dev/null +++ b/tests/baselines/reference/importCallExpression3ESNext.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : () => Promise + + class C extends (await import("./0")).B {} +>C : C +>(await import("./0")).B : B +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise +>"./0" : "./0" +>B : typeof B + + var c = new C(); +>c : C +>new C() : C +>C : typeof C + + c.print(); +>c.print() : string +>c.print : () => string +>c : C +>print : () => string +} +foo(); +>foo() : Promise +>foo : () => Promise + diff --git a/tests/baselines/reference/importCallExpression4ESNext.js b/tests/baselines/reference/importCallExpression4ESNext.js new file mode 100644 index 00000000000..e148d5c1e51 --- /dev/null +++ b/tests/baselines/reference/importCallExpression4ESNext.js @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} + +//// [0.js] +export class B { + print() { return "I am B"; } +} +export function foo() { return "foo"; } +//// [1.js] +export function backup() { return "backup"; } +//// [2.js] +class C { + constructor() { + this.myModule = import("./0"); + } + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async (err) => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} diff --git a/tests/baselines/reference/importCallExpression4ESNext.symbols b/tests/baselines/reference/importCallExpression4ESNext.symbols new file mode 100644 index 00000000000..34a1dcf4d7b --- /dev/null +++ b/tests/baselines/reference/importCallExpression4ESNext.symbols @@ -0,0 +1,61 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +export function foo() { return "foo" } +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : Symbol(console, Decl(2.ts, 0, 11)) + +class C { +>C : Symbol(C, Decl(2.ts, 0, 25)) + + private myModule = import("./0"); +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) + + method() { +>method : Symbol(C.method, Decl(2.ts, 2, 37)) + + this.myModule.then(Zero => { +>this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>this : Symbol(C, Decl(2.ts, 0, 25)) +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) + + console.log(Zero.foo()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + + }, async err => { +>err : Symbol(err, Decl(2.ts, 6, 16)) + + console.log(err); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>err : Symbol(err, Decl(2.ts, 6, 16)) + + let one = await import("./1"); +>one : Symbol(one, Decl(2.ts, 8, 15)) + + console.log(one.backup()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>one.backup : Symbol(backup, Decl(1.ts, 0, 0)) +>one : Symbol(one, Decl(2.ts, 8, 15)) +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + + }); + } +} diff --git a/tests/baselines/reference/importCallExpression4ESNext.types b/tests/baselines/reference/importCallExpression4ESNext.types new file mode 100644 index 00000000000..2ea666ba672 --- /dev/null +++ b/tests/baselines/reference/importCallExpression4ESNext.types @@ -0,0 +1,83 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +export function foo() { return "foo" } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : () => string +>"backup" : "backup" + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : any + +class C { +>C : C + + private myModule = import("./0"); +>myModule : Promise +>import("./0") : Promise +>"./0" : "./0" + + method() { +>method : () => void + + this.myModule.then(Zero => { +>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise +>this : this +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" + + console.log(Zero.foo()); +>console.log(Zero.foo()) : any +>console.log : any +>console : any +>log : any +>Zero.foo() : string +>Zero.foo : () => string +>Zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + + }, async err => { +>async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise +>err : any + + console.log(err); +>console.log(err) : any +>console.log : any +>console : any +>log : any +>err : any + + let one = await import("./1"); +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise +>"./1" : "./1" + + console.log(one.backup()); +>console.log(one.backup()) : any +>console.log : any +>console : any +>log : any +>one.backup() : string +>one.backup : () => string +>one : typeof "tests/cases/conformance/dynamicImport/1" +>backup : () => string + + }); + } +} diff --git a/tests/baselines/reference/importCallExpression5ESNext.errors.txt b/tests/baselines/reference/importCallExpression5ESNext.errors.txt new file mode 100644 index 00000000000..ed5900c2a03 --- /dev/null +++ b/tests/baselines/reference/importCallExpression5ESNext.errors.txt @@ -0,0 +1,31 @@ +tests/cases/conformance/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. +tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. +tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. + + +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== + export class B { + print() { return "I am B"} + } + + export function foo() { return "foo" } + +==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ==== + export function backup() { return "backup"; } + +==== tests/cases/conformance/dynamicImport/2.ts (4 errors) ==== + declare function bar(): boolean; + const specify = bar() ? "./0" : undefined; + let myModule = import(specify); + ~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'. + let myModule1 = import(undefined); + ~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. + let myModule2 = import(bar() ? "./1" : null); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'. + let myModule3 = import(null); + ~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpression5ESNext.js b/tests/baselines/reference/importCallExpression5ESNext.js new file mode 100644 index 00000000000..1f4c789120b --- /dev/null +++ b/tests/baselines/reference/importCallExpression5ESNext.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare function bar(): boolean; +const specify = bar() ? "./0" : undefined; +let myModule = import(specify); +let myModule1 = import(undefined); +let myModule2 = import(bar() ? "./1" : null); +let myModule3 = import(null); + +//// [0.js] +export class B { + print() { return "I am B"; } +} +export function foo() { return "foo"; } +//// [1.js] +export function backup() { return "backup"; } +//// [2.js] +const specify = bar() ? "./0" : undefined; +let myModule = import(specify); +let myModule1 = import(undefined); +let myModule2 = import(bar() ? "./1" : null); +let myModule3 = import(null); diff --git a/tests/baselines/reference/importCallExpression6ESNext.errors.txt b/tests/baselines/reference/importCallExpression6ESNext.errors.txt new file mode 100644 index 00000000000..1703e0913d1 --- /dev/null +++ b/tests/baselines/reference/importCallExpression6ESNext.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. + + +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== + export class B { + print() { return "I am B"} + } + + export function foo() { return "foo" } + +==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ==== + export function backup() { return "backup"; } + +==== tests/cases/conformance/dynamicImport/2.ts (2 errors) ==== + declare function bar(): boolean; + const specify = bar() ? "./0" : undefined; + let myModule = import(specify); + let myModule1 = import(undefined); + ~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. + let myModule2 = import(bar() ? "./1" : null); + let myModule3 = import(null); + ~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpression6ESNext.js b/tests/baselines/reference/importCallExpression6ESNext.js new file mode 100644 index 00000000000..bdac7328f69 --- /dev/null +++ b/tests/baselines/reference/importCallExpression6ESNext.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare function bar(): boolean; +const specify = bar() ? "./0" : undefined; +let myModule = import(specify); +let myModule1 = import(undefined); +let myModule2 = import(bar() ? "./1" : null); +let myModule3 = import(null); + +//// [0.js] +export class B { + print() { return "I am B"; } +} +export function foo() { return "foo"; } +//// [1.js] +export function backup() { return "backup"; } +//// [2.js] +const specify = bar() ? "./0" : undefined; +let myModule = import(specify); +let myModule1 = import(undefined); +let myModule2 = import(bar() ? "./1" : null); +let myModule3 = import(null); diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt new file mode 100644 index 00000000000..39622f39b3f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/dynamicImport/1.ts(4,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. + Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. + Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. +tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise' cannot be converted to type 'Promise'. + Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. + Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. + + +==== tests/cases/conformance/dynamicImport/anotherModule.ts (0 errors) ==== + export class D{} + +==== tests/cases/conformance/dynamicImport/defaultPath.ts (0 errors) ==== + export class C {} + +==== tests/cases/conformance/dynamicImport/1.ts (2 errors) ==== + import * as defaultModule from "./defaultPath"; + import * as anotherModule from "./anotherModule"; + + let p1: Promise = import("./defaultPath"); + ~~ +!!! error TS2322: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2322: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. +!!! error TS2322: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. + let p2 = import("./defaultPath") as Promise; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2352: Type 'Promise' cannot be converted to type 'Promise'. +!!! error TS2352: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'. +!!! error TS2352: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'. + let p3: Promise = import("./defaultPath"); + \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.js b/tests/baselines/reference/importCallExpressionCheckReturntype1.js new file mode 100644 index 00000000000..facb6913388 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.js @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts] //// + +//// [anotherModule.ts] +export class D{} + +//// [defaultPath.ts] +export class C {} + +//// [1.ts] +import * as defaultModule from "./defaultPath"; +import * as anotherModule from "./anotherModule"; + +let p1: Promise = import("./defaultPath"); +let p2 = import("./defaultPath") as Promise; +let p3: Promise = import("./defaultPath"); + + +//// [anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class D { +} +exports.D = D; +//// [defaultPath.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class C { +} +exports.C = C; +//// [1.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +let p1 = Promise.resolve().then(function () { return require("./defaultPath"); }); +let p2 = Promise.resolve().then(function () { return require("./defaultPath"); }); +let p3 = Promise.resolve().then(function () { return require("./defaultPath"); }); diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js new file mode 100644 index 00000000000..07f95d3b3b2 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js @@ -0,0 +1,35 @@ +//// [importCallExpressionDeclarationEmit1.ts] +declare function getSpecifier(): string; +declare var whatToLoad: boolean; +declare const directory: string; +declare const moduleFile: number; + +import(getSpecifier()); + +var p0 = import(`${directory}\${moduleFile}`); +var p1 = import(getSpecifier()); +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") + +function returnDynamicLoad(path: string) { + return import(path); +} + +//// [importCallExpressionDeclarationEmit1.js] +Promise.resolve().then(function () { return require(getSpecifier()); }); +var p0 = Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); +var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); +const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +function returnDynamicLoad(path) { + return Promise.resolve().then(function () { return require(path); }); +} + + +//// [importCallExpressionDeclarationEmit1.d.ts] +declare function getSpecifier(): string; +declare var whatToLoad: boolean; +declare const directory: string; +declare const moduleFile: number; +declare var p0: Promise; +declare var p1: Promise; +declare const p2: Promise; +declare function returnDynamicLoad(path: string): Promise; diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols b/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols new file mode 100644 index 00000000000..d2266cc768b --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.symbols @@ -0,0 +1,36 @@ +=== tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts === +declare function getSpecifier(): string; +>getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) + +declare var whatToLoad: boolean; +>whatToLoad : Symbol(whatToLoad, Decl(importCallExpressionDeclarationEmit1.ts, 1, 11)) + +declare const directory: string; +>directory : Symbol(directory, Decl(importCallExpressionDeclarationEmit1.ts, 2, 13)) + +declare const moduleFile: number; +>moduleFile : Symbol(moduleFile, Decl(importCallExpressionDeclarationEmit1.ts, 3, 13)) + +import(getSpecifier()); +>getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) + +var p0 = import(`${directory}\${moduleFile}`); +>p0 : Symbol(p0, Decl(importCallExpressionDeclarationEmit1.ts, 7, 3)) +>directory : Symbol(directory, Decl(importCallExpressionDeclarationEmit1.ts, 2, 13)) + +var p1 = import(getSpecifier()); +>p1 : Symbol(p1, Decl(importCallExpressionDeclarationEmit1.ts, 8, 3)) +>getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) + +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") +>p2 : Symbol(p2, Decl(importCallExpressionDeclarationEmit1.ts, 9, 5)) +>whatToLoad : Symbol(whatToLoad, Decl(importCallExpressionDeclarationEmit1.ts, 1, 11)) +>getSpecifier : Symbol(getSpecifier, Decl(importCallExpressionDeclarationEmit1.ts, 0, 0)) + +function returnDynamicLoad(path: string) { +>returnDynamicLoad : Symbol(returnDynamicLoad, Decl(importCallExpressionDeclarationEmit1.ts, 9, 61)) +>path : Symbol(path, Decl(importCallExpressionDeclarationEmit1.ts, 11, 27)) + + return import(path); +>path : Symbol(path, Decl(importCallExpressionDeclarationEmit1.ts, 11, 27)) +} diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.types b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types new file mode 100644 index 00000000000..db5400818c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.types @@ -0,0 +1,47 @@ +=== tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts === +declare function getSpecifier(): string; +>getSpecifier : () => string + +declare var whatToLoad: boolean; +>whatToLoad : boolean + +declare const directory: string; +>directory : string + +declare const moduleFile: number; +>moduleFile : number + +import(getSpecifier()); +>import(getSpecifier()) : Promise +>getSpecifier() : string +>getSpecifier : () => string + +var p0 = import(`${directory}\${moduleFile}`); +>p0 : Promise +>import(`${directory}\${moduleFile}`) : Promise +>`${directory}\${moduleFile}` : string +>directory : string + +var p1 = import(getSpecifier()); +>p1 : Promise +>import(getSpecifier()) : Promise +>getSpecifier() : string +>getSpecifier : () => string + +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") +>p2 : Promise +>import(whatToLoad ? getSpecifier() : "defaulPath") : Promise +>whatToLoad ? getSpecifier() : "defaulPath" : string +>whatToLoad : boolean +>getSpecifier() : string +>getSpecifier : () => string +>"defaulPath" : "defaulPath" + +function returnDynamicLoad(path: string) { +>returnDynamicLoad : (path: string) => Promise +>path : string + + return import(path); +>import(path) : Promise +>path : string +} diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt b/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt new file mode 100644 index 00000000000..6c394c98bdf --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit2.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/dynamicImport/1.ts(1,5): error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. + + +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== + export function foo() { return "foo"; } + +==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== + var p1 = import("./0"); + ~~ +!!! error TS4023: Exported variable 'p1' has or is using name '"tests/cases/conformance/dynamicImport/0"' from external module "tests/cases/conformance/dynamicImport/0" but cannot be named. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit2.js b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js new file mode 100644 index 00000000000..7659e94ee81 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit2.js @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +var p1 = import("./0"); + +//// [0.js] +export function foo() { return "foo"; } +//// [1.js] +var p1 = import("./0"); + + +//// [0.d.ts] +export declare function foo(): string; diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.js b/tests/baselines/reference/importCallExpressionDeclarationEmit3.js new file mode 100644 index 00000000000..d38c2309a33 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit3.js @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +declare function getPath(): string; +import * as Zero from "./0"; +import("./0"); + +export var p0: Promise = import(getPath()); +export var p1: Promise = import("./0"); +export var p2: Promise = import("./0"); + + +//// [0.js] +export function foo() { return "foo"; } +//// [1.js] +import("./0"); +export var p0 = import(getPath()); +export var p1 = import("./0"); +export var p2 = import("./0"); + + +//// [0.d.ts] +export declare function foo(): string; +//// [1.d.ts] +import * as Zero from "./0"; +export declare var p0: Promise; +export declare var p1: Promise; +export declare var p2: Promise; diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols b/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols new file mode 100644 index 00000000000..1491e05db55 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit3.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +declare function getPath(): string; +>getPath : Symbol(getPath, Decl(1.ts, 0, 0)) + +import * as Zero from "./0"; +>Zero : Symbol(Zero, Decl(1.ts, 1, 6)) + +import("./0"); + +export var p0: Promise = import(getPath()); +>p0 : Symbol(p0, Decl(1.ts, 4, 10)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(1.ts, 1, 6)) +>getPath : Symbol(getPath, Decl(1.ts, 0, 0)) + +export var p1: Promise = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 5, 10)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(1.ts, 1, 6)) + +export var p2: Promise = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 6, 10)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit3.types b/tests/baselines/reference/importCallExpressionDeclarationEmit3.types new file mode 100644 index 00000000000..fe4552b708f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit3.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +declare function getPath(): string; +>getPath : () => string + +import * as Zero from "./0"; +>Zero : typeof Zero + +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +export var p0: Promise = import(getPath()); +>p0 : Promise +>Promise : Promise +>Zero : typeof Zero +>import(getPath()) : Promise +>getPath() : string +>getPath : () => string + +export var p1: Promise = import("./0"); +>p1 : Promise +>Promise : Promise +>Zero : typeof Zero +>import("./0") : Promise +>"./0" : "./0" + +export var p2: Promise = import("./0"); +>p2 : Promise +>Promise : Promise +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpressionES5AMD.js b/tests/baselines/reference/importCallExpressionES5AMD.js new file mode 100644 index 00000000000..cce61a5a3f9 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5AMD.js @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function foo() { return "foo"; } + exports.foo = foo; +}); +//// [1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + p1.then(function (zero) { + return zero.foo(); + }); + function foo() { + var p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionES5AMD.symbols b/tests/baselines/reference/importCallExpressionES5AMD.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5AMD.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionES5AMD.types b/tests/baselines/reference/importCallExpressionES5AMD.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5AMD.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionES5CJS.js b/tests/baselines/reference/importCallExpressionES5CJS.js new file mode 100644 index 00000000000..11d1bf46319 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5CJS.js @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +Promise.resolve().then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(function () { return require("./0"); }); +p1.then(function (zero) { + return zero.foo(); +}); +function foo() { + var p2 = Promise.resolve().then(function () { return require("./0"); }); +} diff --git a/tests/baselines/reference/importCallExpressionES5CJS.symbols b/tests/baselines/reference/importCallExpressionES5CJS.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5CJS.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionES5CJS.types b/tests/baselines/reference/importCallExpressionES5CJS.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5CJS.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionES5System.js b/tests/baselines/reference/importCallExpressionES5System.js new file mode 100644 index 00000000000..1842fc6e60a --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5System.js @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + function foo() { return "foo"; } + exports_1("foo", foo); + return { + setters: [], + execute: function () { + } + }; +}); +//// [1.js] +System.register([], function (exports_1, context_1) { + var __moduleName = context_1 && context_1.id; + function foo() { + var p2 = context_1.import("./0"); + } + var p1; + return { + setters: [], + execute: function () { + context_1.import("./0"); + p1 = context_1.import("./0"); + p1.then(function (zero) { + return zero.foo(); + }); + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionES5System.symbols b/tests/baselines/reference/importCallExpressionES5System.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5System.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionES5System.types b/tests/baselines/reference/importCallExpressionES5System.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5System.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionES5UMD.js b/tests/baselines/reference/importCallExpressionES5UMD.js new file mode 100644 index 00000000000..dfe6813839c --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5UMD.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function foo() { return "foo"; } + exports.foo = foo; +}); +//// [1.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + p1.then(function (zero) { + return zero.foo(); + }); + function foo() { + var p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionES5UMD.symbols b/tests/baselines/reference/importCallExpressionES5UMD.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5UMD.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionES5UMD.types b/tests/baselines/reference/importCallExpressionES5UMD.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionES5UMD.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt new file mode 100644 index 00000000000..d47980d1312 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionErrorInES2015.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/dynamicImport/1.ts(1,1): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/1.ts(8,16): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + + +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== + export function foo() { return "foo"; } + +==== tests/cases/conformance/dynamicImport/1.ts (3 errors) ==== + import("./0"); + ~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + var p1 = import("./0"); + ~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + p1.then(zero => { + return zero.foo(); + }) + + function foo() { + const p2 = import("./0"); + ~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionErrorInES2015.js b/tests/baselines/reference/importCallExpressionErrorInES2015.js new file mode 100644 index 00000000000..f07486504ee --- /dev/null +++ b/tests/baselines/reference/importCallExpressionErrorInES2015.js @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}) + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +export function foo() { return "foo"; } +//// [1.js] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); +function foo() { + const p2 = import("./0"); +} diff --git a/tests/baselines/reference/importCallExpressionGrammarError.errors.txt b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt new file mode 100644 index 00000000000..6d64808e111 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionGrammarError.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1325: Specifier of dynamic import cannot be spread element. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS1135: Argument expression expected. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1324: Dynamic import must have one specifier as an argument. +tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(10,19): error TS2307: Cannot find module 'pathToModule'. + + +==== tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts (7 errors) ==== + declare function getSpecifier(): string; + declare var whatToLoad: boolean; + + var a = ["./0"]; + import(...["PathModule"]); + ~~~~~~~~~~~~~~~~~ +!!! error TS1325: Specifier of dynamic import cannot be spread element. + + var p1 = import(...a); + ~~~~ +!!! error TS1325: Specifier of dynamic import cannot be spread element. + const p2 = import(); + ~~~~~~~~ +!!! error TS1324: Dynamic import must have one specifier as an argument. + const p3 = import(,); + +!!! error TS1135: Argument expression expected. + +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'. + const p4 = import("pathToModule", "secondModule"); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1324: Dynamic import must have one specifier as an argument. + ~~~~~~~~~~~~~~ +!!! error TS2307: Cannot find module 'pathToModule'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionGrammarError.js b/tests/baselines/reference/importCallExpressionGrammarError.js new file mode 100644 index 00000000000..b30b0c9ddd5 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionGrammarError.js @@ -0,0 +1,19 @@ +//// [importCallExpressionGrammarError.ts] +declare function getSpecifier(): string; +declare var whatToLoad: boolean; + +var a = ["./0"]; +import(...["PathModule"]); + +var p1 = import(...a); +const p2 = import(); +const p3 = import(,); +const p4 = import("pathToModule", "secondModule"); + +//// [importCallExpressionGrammarError.js] +var a = ["./0"]; +Promise.resolve().then(function () { return require(...["PathModule"]); }); +var p1 = Promise.resolve().then(function () { return require(...a); }); +const p2 = Promise.resolve().then(function () { return require(); }); +const p3 = Promise.resolve().then(function () { return require(); }); +const p4 = Promise.resolve().then(function () { return require("pathToModule", "secondModule"); }); diff --git a/tests/baselines/reference/importCallExpressionInAMD1.js b/tests/baselines/reference/importCallExpressionInAMD1.js new file mode 100644 index 00000000000..e1758173646 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD1.js @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function foo() { return "foo"; } + exports.foo = foo; +}); +//// [1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + p1.then(zero => { + return zero.foo(); + }); + function foo() { + const p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionInAMD1.symbols b/tests/baselines/reference/importCallExpressionInAMD1.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD1.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionInAMD1.types b/tests/baselines/reference/importCallExpressionInAMD1.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD1.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionInAMD2.js b/tests/baselines/reference/importCallExpressionInAMD2.js new file mode 100644 index 00000000000..7347e2f8105 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD2.js @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); + +//// [0.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + class B { + print() { return "I am B"; } + } + exports.B = B; +}); +//// [2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + // We use Promise for now as there is no way to specify shape of module object + function foo(x) { + x.then(value => { + let b = new value.B(); + b.print(); + }); + } + foo(new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); +}); diff --git a/tests/baselines/reference/importCallExpressionInAMD2.symbols b/tests/baselines/reference/importCallExpressionInAMD2.symbols new file mode 100644 index 00000000000..16fc79c774f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD2.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + x.then(value => { +>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + let b = new value.B(); +>b : Symbol(b, Decl(2.ts, 3, 11)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + b.print(); +>b : Symbol(b, Decl(2.ts, 3, 11)) + + }) +} + +foo(import("./0")); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInAMD2.types b/tests/baselines/reference/importCallExpressionInAMD2.types new file mode 100644 index 00000000000..44b17eb51fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD2.types @@ -0,0 +1,46 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : (x: Promise) => void +>x : Promise +>Promise : Promise + + x.then(value => { +>x.then(value => { let b = new value.B(); b.print(); }) : Promise +>x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>x : Promise +>then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>value => { let b = new value.B(); b.print(); } : (value: any) => void +>value : any + + let b = new value.B(); +>b : any +>new value.B() : any +>value.B : any +>value : any +>B : any + + b.print(); +>b.print() : any +>b.print : any +>b : any +>print : any + + }) +} + +foo(import("./0")); +>foo(import("./0")) : void +>foo : (x: Promise) => void +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpressionInAMD3.js b/tests/baselines/reference/importCallExpressionInAMD3.js new file mode 100644 index 00000000000..471f35a6415 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD3.js @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); + +//// [0.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + class B { + print() { return "I am B"; } + } + exports.B = B; +}); +//// [2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + async function foo() { + class C extends (await new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })).B { + } + var c = new C(); + c.print(); + } + foo(); +}); diff --git a/tests/baselines/reference/importCallExpressionInAMD3.symbols b/tests/baselines/reference/importCallExpressionInAMD3.symbols new file mode 100644 index 00000000000..5ca85d6e693 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD3.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + + class C extends (await import("./0")).B {} +>C : Symbol(C, Decl(2.ts, 0, 22)) +>(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) +>B : Symbol(B, Decl(0.ts, 0, 0)) + + var c = new C(); +>c : Symbol(c, Decl(2.ts, 2, 7)) +>C : Symbol(C, Decl(2.ts, 0, 22)) + + c.print(); +>c.print : Symbol(B.print, Decl(0.ts, 0, 16)) +>c : Symbol(c, Decl(2.ts, 2, 7)) +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} +foo(); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInAMD3.types b/tests/baselines/reference/importCallExpressionInAMD3.types new file mode 100644 index 00000000000..e517be6e722 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD3.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : () => Promise + + class C extends (await import("./0")).B {} +>C : C +>(await import("./0")).B : B +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise +>"./0" : "./0" +>B : typeof B + + var c = new C(); +>c : C +>new C() : C +>C : typeof C + + c.print(); +>c.print() : string +>c.print : () => string +>c : C +>print : () => string +} +foo(); +>foo() : Promise +>foo : () => Promise + diff --git a/tests/baselines/reference/importCallExpressionInAMD4.js b/tests/baselines/reference/importCallExpressionInAMD4.js new file mode 100644 index 00000000000..6e50e139116 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD4.js @@ -0,0 +1,63 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} + +//// [0.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + class B { + print() { return "I am B"; } + } + exports.B = B; + function foo() { return "foo"; } + exports.foo = foo; +}); +//// [1.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function backup() { return "backup"; } + exports.backup = backup; +}); +//// [2.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + class C { + constructor() { + this.myModule = new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + } + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async (err) => { + console.log(err); + let one = await new Promise(function (resolve_2, reject_2) { require(["./1"], resolve_2, reject_2); }); + console.log(one.backup()); + }); + } + } +}); diff --git a/tests/baselines/reference/importCallExpressionInAMD4.symbols b/tests/baselines/reference/importCallExpressionInAMD4.symbols new file mode 100644 index 00000000000..34a1dcf4d7b --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD4.symbols @@ -0,0 +1,61 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +export function foo() { return "foo" } +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : Symbol(console, Decl(2.ts, 0, 11)) + +class C { +>C : Symbol(C, Decl(2.ts, 0, 25)) + + private myModule = import("./0"); +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) + + method() { +>method : Symbol(C.method, Decl(2.ts, 2, 37)) + + this.myModule.then(Zero => { +>this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>this : Symbol(C, Decl(2.ts, 0, 25)) +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) + + console.log(Zero.foo()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + + }, async err => { +>err : Symbol(err, Decl(2.ts, 6, 16)) + + console.log(err); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>err : Symbol(err, Decl(2.ts, 6, 16)) + + let one = await import("./1"); +>one : Symbol(one, Decl(2.ts, 8, 15)) + + console.log(one.backup()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>one.backup : Symbol(backup, Decl(1.ts, 0, 0)) +>one : Symbol(one, Decl(2.ts, 8, 15)) +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInAMD4.types b/tests/baselines/reference/importCallExpressionInAMD4.types new file mode 100644 index 00000000000..2ea666ba672 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInAMD4.types @@ -0,0 +1,83 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +export function foo() { return "foo" } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : () => string +>"backup" : "backup" + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : any + +class C { +>C : C + + private myModule = import("./0"); +>myModule : Promise +>import("./0") : Promise +>"./0" : "./0" + + method() { +>method : () => void + + this.myModule.then(Zero => { +>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise +>this : this +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" + + console.log(Zero.foo()); +>console.log(Zero.foo()) : any +>console.log : any +>console : any +>log : any +>Zero.foo() : string +>Zero.foo : () => string +>Zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + + }, async err => { +>async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise +>err : any + + console.log(err); +>console.log(err) : any +>console.log : any +>console : any +>log : any +>err : any + + let one = await import("./1"); +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise +>"./1" : "./1" + + console.log(one.backup()); +>console.log(one.backup()) : any +>console.log : any +>console : any +>log : any +>one.backup() : string +>one.backup : () => string +>one : typeof "tests/cases/conformance/dynamicImport/1" +>backup : () => string + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInCJS1.js b/tests/baselines/reference/importCallExpressionInCJS1.js new file mode 100644 index 00000000000..3fb298b5bde --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS1.js @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +Promise.resolve().then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(function () { return require("./0"); }); +p1.then(zero => { + return zero.foo(); +}); +function foo() { + const p2 = Promise.resolve().then(function () { return require("./0"); }); +} diff --git a/tests/baselines/reference/importCallExpressionInCJS1.symbols b/tests/baselines/reference/importCallExpressionInCJS1.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS1.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionInCJS1.types b/tests/baselines/reference/importCallExpressionInCJS1.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS1.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionInCJS2.js b/tests/baselines/reference/importCallExpressionInCJS2.js new file mode 100644 index 00000000000..aa983a7a2fe --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS2.js @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +async function compute(promise: Promise) { + let j = await promise; + if (!j) { + j = await import("./1"); + return j.backup(); + } + return j.foo(); +} + +compute(import("./0")); + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function backup() { return "backup"; } +exports.backup = backup; +//// [2.js] +async function compute(promise) { + let j = await promise; + if (!j) { + j = await Promise.resolve().then(function () { return require("./1"); }); + return j.backup(); + } + return j.foo(); +} +compute(Promise.resolve().then(function () { return require("./0"); })); diff --git a/tests/baselines/reference/importCallExpressionInCJS2.symbols b/tests/baselines/reference/importCallExpressionInCJS2.symbols new file mode 100644 index 00000000000..24f7a5cdb48 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS2.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/2.ts === +async function compute(promise: Promise) { +>compute : Symbol(compute, Decl(2.ts, 0, 0)) +>promise : Symbol(promise, Decl(2.ts, 0, 23)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + let j = await promise; +>j : Symbol(j, Decl(2.ts, 1, 7)) +>promise : Symbol(promise, Decl(2.ts, 0, 23)) + + if (!j) { +>j : Symbol(j, Decl(2.ts, 1, 7)) + + j = await import("./1"); +>j : Symbol(j, Decl(2.ts, 1, 7)) + + return j.backup(); +>j : Symbol(j, Decl(2.ts, 1, 7)) + } + return j.foo(); +>j : Symbol(j, Decl(2.ts, 1, 7)) +} + +compute(import("./0")); +>compute : Symbol(compute, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInCJS2.types b/tests/baselines/reference/importCallExpressionInCJS2.types new file mode 100644 index 00000000000..063a5224539 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS2.types @@ -0,0 +1,51 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : () => string +>"backup" : "backup" + +=== tests/cases/conformance/dynamicImport/2.ts === +async function compute(promise: Promise) { +>compute : (promise: Promise) => Promise +>promise : Promise +>Promise : Promise + + let j = await promise; +>j : any +>await promise : any +>promise : Promise + + if (!j) { +>!j : boolean +>j : any + + j = await import("./1"); +>j = await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>j : any +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise +>"./1" : "./1" + + return j.backup(); +>j.backup() : any +>j.backup : any +>j : any +>backup : any + } + return j.foo(); +>j.foo() : any +>j.foo : any +>j : any +>foo : any +} + +compute(import("./0")); +>compute(import("./0")) : Promise +>compute : (promise: Promise) => Promise +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpressionInCJS3.js b/tests/baselines/reference/importCallExpressionInCJS3.js new file mode 100644 index 00000000000..2f956d9ac3a --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS3.js @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class B { + print() { return "I am B"; } +} +exports.B = B; +//// [2.js] +// We use Promise for now as there is no way to specify shape of module object +function foo(x) { + x.then(value => { + let b = new value.B(); + b.print(); + }); +} +foo(Promise.resolve().then(function () { return require("./0"); })); diff --git a/tests/baselines/reference/importCallExpressionInCJS3.symbols b/tests/baselines/reference/importCallExpressionInCJS3.symbols new file mode 100644 index 00000000000..16fc79c774f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS3.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + x.then(value => { +>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + let b = new value.B(); +>b : Symbol(b, Decl(2.ts, 3, 11)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + b.print(); +>b : Symbol(b, Decl(2.ts, 3, 11)) + + }) +} + +foo(import("./0")); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInCJS3.types b/tests/baselines/reference/importCallExpressionInCJS3.types new file mode 100644 index 00000000000..44b17eb51fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS3.types @@ -0,0 +1,46 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : (x: Promise) => void +>x : Promise +>Promise : Promise + + x.then(value => { +>x.then(value => { let b = new value.B(); b.print(); }) : Promise +>x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>x : Promise +>then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>value => { let b = new value.B(); b.print(); } : (value: any) => void +>value : any + + let b = new value.B(); +>b : any +>new value.B() : any +>value.B : any +>value : any +>B : any + + b.print(); +>b.print() : any +>b.print : any +>b : any +>print : any + + }) +} + +foo(import("./0")); +>foo(import("./0")) : void +>foo : (x: Promise) => void +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpressionInCJS4.js b/tests/baselines/reference/importCallExpressionInCJS4.js new file mode 100644 index 00000000000..554a0b222ab --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS4.js @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class B { + print() { return "I am B"; } +} +exports.B = B; +//// [2.js] +async function foo() { + class C extends (await Promise.resolve().then(function () { return require("./0"); })).B { + } + var c = new C(); + c.print(); +} +foo(); diff --git a/tests/baselines/reference/importCallExpressionInCJS4.symbols b/tests/baselines/reference/importCallExpressionInCJS4.symbols new file mode 100644 index 00000000000..5ca85d6e693 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS4.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + + class C extends (await import("./0")).B {} +>C : Symbol(C, Decl(2.ts, 0, 22)) +>(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) +>B : Symbol(B, Decl(0.ts, 0, 0)) + + var c = new C(); +>c : Symbol(c, Decl(2.ts, 2, 7)) +>C : Symbol(C, Decl(2.ts, 0, 22)) + + c.print(); +>c.print : Symbol(B.print, Decl(0.ts, 0, 16)) +>c : Symbol(c, Decl(2.ts, 2, 7)) +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} +foo(); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInCJS4.types b/tests/baselines/reference/importCallExpressionInCJS4.types new file mode 100644 index 00000000000..e517be6e722 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS4.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : () => Promise + + class C extends (await import("./0")).B {} +>C : C +>(await import("./0")).B : B +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise +>"./0" : "./0" +>B : typeof B + + var c = new C(); +>c : C +>new C() : C +>C : typeof C + + c.print(); +>c.print() : string +>c.print : () => string +>c : C +>print : () => string +} +foo(); +>foo() : Promise +>foo : () => Promise + diff --git a/tests/baselines/reference/importCallExpressionInCJS5.js b/tests/baselines/reference/importCallExpressionInCJS5.js new file mode 100644 index 00000000000..762da592827 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS5.js @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class B { + print() { return "I am B"; } +} +exports.B = B; +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function backup() { return "backup"; } +exports.backup = backup; +//// [2.js] +class C { + constructor() { + this.myModule = Promise.resolve().then(function () { return require("./0"); }); + } + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async (err) => { + console.log(err); + let one = await Promise.resolve().then(function () { return require("./1"); }); + console.log(one.backup()); + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInCJS5.symbols b/tests/baselines/reference/importCallExpressionInCJS5.symbols new file mode 100644 index 00000000000..34a1dcf4d7b --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS5.symbols @@ -0,0 +1,61 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +export function foo() { return "foo" } +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : Symbol(console, Decl(2.ts, 0, 11)) + +class C { +>C : Symbol(C, Decl(2.ts, 0, 25)) + + private myModule = import("./0"); +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) + + method() { +>method : Symbol(C.method, Decl(2.ts, 2, 37)) + + this.myModule.then(Zero => { +>this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>this : Symbol(C, Decl(2.ts, 0, 25)) +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) + + console.log(Zero.foo()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + + }, async err => { +>err : Symbol(err, Decl(2.ts, 6, 16)) + + console.log(err); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>err : Symbol(err, Decl(2.ts, 6, 16)) + + let one = await import("./1"); +>one : Symbol(one, Decl(2.ts, 8, 15)) + + console.log(one.backup()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>one.backup : Symbol(backup, Decl(1.ts, 0, 0)) +>one : Symbol(one, Decl(2.ts, 8, 15)) +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInCJS5.types b/tests/baselines/reference/importCallExpressionInCJS5.types new file mode 100644 index 00000000000..2ea666ba672 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInCJS5.types @@ -0,0 +1,83 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +export function foo() { return "foo" } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : () => string +>"backup" : "backup" + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : any + +class C { +>C : C + + private myModule = import("./0"); +>myModule : Promise +>import("./0") : Promise +>"./0" : "./0" + + method() { +>method : () => void + + this.myModule.then(Zero => { +>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise +>this : this +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" + + console.log(Zero.foo()); +>console.log(Zero.foo()) : any +>console.log : any +>console : any +>log : any +>Zero.foo() : string +>Zero.foo : () => string +>Zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + + }, async err => { +>async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise +>err : any + + console.log(err); +>console.log(err) : any +>console.log : any +>console : any +>log : any +>err : any + + let one = await import("./1"); +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise +>"./1" : "./1" + + console.log(one.backup()); +>console.log(one.backup()) : any +>console.log : any +>console : any +>log : any +>one.backup() : string +>one.backup : () => string +>one : typeof "tests/cases/conformance/dynamicImport/1" +>backup : () => string + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.js b/tests/baselines/reference/importCallExpressionInScriptContext1.js new file mode 100644 index 00000000000..2c2d2f904d5 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.js @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +var p1 = import("./0"); +function arguments() { } // this is allow as the file doesn't have implicit "use strict" + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +var p1 = Promise.resolve().then(function () { return require("./0"); }); +function arguments() { } // this is allow as the file doesn't have implicit "use strict" diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.symbols b/tests/baselines/reference/importCallExpressionInScriptContext1.symbols new file mode 100644 index 00000000000..513612056a8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.symbols @@ -0,0 +1,11 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 0, 3)) + +function arguments() { } // this is allow as the file doesn't have implicit "use strict" +>arguments : Symbol(arguments, Decl(1.ts, 0, 23)) + diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.types b/tests/baselines/reference/importCallExpressionInScriptContext1.types new file mode 100644 index 00000000000..c318667c7d8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.types @@ -0,0 +1,14 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +function arguments() { } // this is allow as the file doesn't have implicit "use strict" +>arguments : () => void + diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt b/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt new file mode 100644 index 00000000000..9020963f68f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInScriptContext2.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== + export function foo() { return "foo"; } + +==== tests/cases/conformance/dynamicImport/1.ts (1 errors) ==== + "use strict" + var p1 = import("./0"); + function arguments() { } + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.js b/tests/baselines/reference/importCallExpressionInScriptContext2.js new file mode 100644 index 00000000000..6b6e0109fda --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInScriptContext2.js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +"use strict" +var p1 = import("./0"); +function arguments() { } + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +"use strict"; +var p1 = Promise.resolve().then(function () { return require("./0"); }); +function arguments() { } diff --git a/tests/baselines/reference/importCallExpressionInSystem1.js b/tests/baselines/reference/importCallExpressionInSystem1.js new file mode 100644 index 00000000000..d74eb6ffc76 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem1.js @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + function foo() { return "foo"; } + exports_1("foo", foo); + return { + setters: [], + execute: function () { + } + }; +}); +//// [1.js] +System.register([], function (exports_1, context_1) { + var __moduleName = context_1 && context_1.id; + function foo() { + const p2 = context_1.import("./0"); + } + var p1; + return { + setters: [], + execute: function () { + context_1.import("./0"); + p1 = context_1.import("./0"); + p1.then(zero => { + return zero.foo(); + }); + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionInSystem1.symbols b/tests/baselines/reference/importCallExpressionInSystem1.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem1.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionInSystem1.types b/tests/baselines/reference/importCallExpressionInSystem1.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem1.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionInSystem2.js b/tests/baselines/reference/importCallExpressionInSystem2.js new file mode 100644 index 00000000000..ea84e47e63c --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem2.js @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); + +//// [0.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + var B; + return { + setters: [], + execute: function () { + B = class B { + print() { return "I am B"; } + }; + exports_1("B", B); + } + }; +}); +//// [2.js] +System.register([], function (exports_1, context_1) { + var __moduleName = context_1 && context_1.id; + // We use Promise for now as there is no way to specify shape of module object + function foo(x) { + x.then(value => { + let b = new value.B(); + b.print(); + }); + } + return { + setters: [], + execute: function () { + foo(context_1.import("./0")); + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionInSystem2.symbols b/tests/baselines/reference/importCallExpressionInSystem2.symbols new file mode 100644 index 00000000000..16fc79c774f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem2.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + x.then(value => { +>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + let b = new value.B(); +>b : Symbol(b, Decl(2.ts, 3, 11)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + b.print(); +>b : Symbol(b, Decl(2.ts, 3, 11)) + + }) +} + +foo(import("./0")); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInSystem2.types b/tests/baselines/reference/importCallExpressionInSystem2.types new file mode 100644 index 00000000000..44b17eb51fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem2.types @@ -0,0 +1,46 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : (x: Promise) => void +>x : Promise +>Promise : Promise + + x.then(value => { +>x.then(value => { let b = new value.B(); b.print(); }) : Promise +>x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>x : Promise +>then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>value => { let b = new value.B(); b.print(); } : (value: any) => void +>value : any + + let b = new value.B(); +>b : any +>new value.B() : any +>value.B : any +>value : any +>B : any + + b.print(); +>b.print() : any +>b.print : any +>b : any +>print : any + + }) +} + +foo(import("./0")); +>foo(import("./0")) : void +>foo : (x: Promise) => void +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpressionInSystem3.js b/tests/baselines/reference/importCallExpressionInSystem3.js new file mode 100644 index 00000000000..309be9114fe --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem3.js @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); + +//// [0.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + var B; + return { + setters: [], + execute: function () { + B = class B { + print() { return "I am B"; } + }; + exports_1("B", B); + } + }; +}); +//// [2.js] +System.register([], function (exports_1, context_1) { + var __moduleName = context_1 && context_1.id; + async function foo() { + class C extends (await context_1.import("./0")).B { + } + var c = new C(); + c.print(); + } + return { + setters: [], + execute: function () { + foo(); + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionInSystem3.symbols b/tests/baselines/reference/importCallExpressionInSystem3.symbols new file mode 100644 index 00000000000..5ca85d6e693 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem3.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + + class C extends (await import("./0")).B {} +>C : Symbol(C, Decl(2.ts, 0, 22)) +>(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) +>B : Symbol(B, Decl(0.ts, 0, 0)) + + var c = new C(); +>c : Symbol(c, Decl(2.ts, 2, 7)) +>C : Symbol(C, Decl(2.ts, 0, 22)) + + c.print(); +>c.print : Symbol(B.print, Decl(0.ts, 0, 16)) +>c : Symbol(c, Decl(2.ts, 2, 7)) +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} +foo(); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInSystem3.types b/tests/baselines/reference/importCallExpressionInSystem3.types new file mode 100644 index 00000000000..e517be6e722 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem3.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : () => Promise + + class C extends (await import("./0")).B {} +>C : C +>(await import("./0")).B : B +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise +>"./0" : "./0" +>B : typeof B + + var c = new C(); +>c : C +>new C() : C +>C : typeof C + + c.print(); +>c.print() : string +>c.print : () => string +>c : C +>print : () => string +} +foo(); +>foo() : Promise +>foo : () => Promise + diff --git a/tests/baselines/reference/importCallExpressionInSystem4.js b/tests/baselines/reference/importCallExpressionInSystem4.js new file mode 100644 index 00000000000..ac01a0439e8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem4.js @@ -0,0 +1,80 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} + +//// [0.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + function foo() { return "foo"; } + exports_1("foo", foo); + var B; + return { + setters: [], + execute: function () { + B = class B { + print() { return "I am B"; } + }; + exports_1("B", B); + } + }; +}); +//// [1.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + function backup() { return "backup"; } + exports_1("backup", backup); + return { + setters: [], + execute: function () { + } + }; +}); +//// [2.js] +System.register([], function (exports_1, context_1) { + var __moduleName = context_1 && context_1.id; + var C; + return { + setters: [], + execute: function () { + C = class C { + constructor() { + this.myModule = context_1.import("./0"); + } + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async (err) => { + console.log(err); + let one = await context_1.import("./1"); + console.log(one.backup()); + }); + } + }; + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionInSystem4.symbols b/tests/baselines/reference/importCallExpressionInSystem4.symbols new file mode 100644 index 00000000000..34a1dcf4d7b --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem4.symbols @@ -0,0 +1,61 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +export function foo() { return "foo" } +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : Symbol(console, Decl(2.ts, 0, 11)) + +class C { +>C : Symbol(C, Decl(2.ts, 0, 25)) + + private myModule = import("./0"); +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) + + method() { +>method : Symbol(C.method, Decl(2.ts, 2, 37)) + + this.myModule.then(Zero => { +>this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>this : Symbol(C, Decl(2.ts, 0, 25)) +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) + + console.log(Zero.foo()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + + }, async err => { +>err : Symbol(err, Decl(2.ts, 6, 16)) + + console.log(err); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>err : Symbol(err, Decl(2.ts, 6, 16)) + + let one = await import("./1"); +>one : Symbol(one, Decl(2.ts, 8, 15)) + + console.log(one.backup()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>one.backup : Symbol(backup, Decl(1.ts, 0, 0)) +>one : Symbol(one, Decl(2.ts, 8, 15)) +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInSystem4.types b/tests/baselines/reference/importCallExpressionInSystem4.types new file mode 100644 index 00000000000..2ea666ba672 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInSystem4.types @@ -0,0 +1,83 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +export function foo() { return "foo" } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : () => string +>"backup" : "backup" + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : any + +class C { +>C : C + + private myModule = import("./0"); +>myModule : Promise +>import("./0") : Promise +>"./0" : "./0" + + method() { +>method : () => void + + this.myModule.then(Zero => { +>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise +>this : this +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" + + console.log(Zero.foo()); +>console.log(Zero.foo()) : any +>console.log : any +>console : any +>log : any +>Zero.foo() : string +>Zero.foo : () => string +>Zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + + }, async err => { +>async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise +>err : any + + console.log(err); +>console.log(err) : any +>console.log : any +>console : any +>log : any +>err : any + + let one = await import("./1"); +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise +>"./1" : "./1" + + console.log(one.backup()); +>console.log(one.backup()) : any +>console.log : any +>console : any +>log : any +>one.backup() : string +>one.backup : () => string +>one : typeof "tests/cases/conformance/dynamicImport/1" +>backup : () => string + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInUMD1.js b/tests/baselines/reference/importCallExpressionInUMD1.js new file mode 100644 index 00000000000..f1bfcd3cc71 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD1.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} + +//// [0.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function foo() { return "foo"; } + exports.foo = foo; +}); +//// [1.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + p1.then(zero => { + return zero.foo(); + }); + function foo() { + const p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionInUMD1.symbols b/tests/baselines/reference/importCallExpressionInUMD1.symbols new file mode 100644 index 00000000000..333251da662 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD1.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +var p1 = import("./0"); +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 1, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) + + return zero.foo(); +>zero.foo : Symbol(foo, Decl(0.ts, 0, 0)) +>zero : Symbol(zero, Decl(1.ts, 2, 8)) +>foo : Symbol(foo, Decl(0.ts, 0, 0)) + +}); + +function foo() { +>foo : Symbol(foo, Decl(1.ts, 4, 3)) + + const p2 = import("./0"); +>p2 : Symbol(p2, Decl(1.ts, 7, 9)) +} diff --git a/tests/baselines/reference/importCallExpressionInUMD1.types b/tests/baselines/reference/importCallExpressionInUMD1.types new file mode 100644 index 00000000000..59da055ee01 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD1.types @@ -0,0 +1,39 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export function foo() { return "foo"; } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +import("./0"); +>import("./0") : Promise +>"./0" : "./0" + +var p1 = import("./0"); +>p1 : Promise +>import("./0") : Promise +>"./0" : "./0" + +p1.then(zero => { +>p1.then(zero => { return zero.foo();}) : Promise +>p1.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" + + return zero.foo(); +>zero.foo() : string +>zero.foo : () => string +>zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + +}); + +function foo() { +>foo : () => void + + const p2 = import("./0"); +>p2 : Promise +>import("./0") : Promise +>"./0" : "./0" +} diff --git a/tests/baselines/reference/importCallExpressionInUMD2.js b/tests/baselines/reference/importCallExpressionInUMD2.js new file mode 100644 index 00000000000..db8b87a2f79 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD2.js @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); + +//// [0.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + class B { + print() { return "I am B"; } + } + exports.B = B; +}); +//// [2.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + // We use Promise for now as there is no way to specify shape of module object + function foo(x) { + x.then(value => { + let b = new value.B(); + b.print(); + }); + } + foo(__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); +}); diff --git a/tests/baselines/reference/importCallExpressionInUMD2.symbols b/tests/baselines/reference/importCallExpressionInUMD2.symbols new file mode 100644 index 00000000000..16fc79c774f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD2.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + x.then(value => { +>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(2.ts, 1, 13)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + let b = new value.B(); +>b : Symbol(b, Decl(2.ts, 3, 11)) +>value : Symbol(value, Decl(2.ts, 2, 11)) + + b.print(); +>b : Symbol(b, Decl(2.ts, 3, 11)) + + }) +} + +foo(import("./0")); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInUMD2.types b/tests/baselines/reference/importCallExpressionInUMD2.types new file mode 100644 index 00000000000..44b17eb51fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD2.types @@ -0,0 +1,46 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { +>foo : (x: Promise) => void +>x : Promise +>Promise : Promise + + x.then(value => { +>x.then(value => { let b = new value.B(); b.print(); }) : Promise +>x.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>x : Promise +>then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>value => { let b = new value.B(); b.print(); } : (value: any) => void +>value : any + + let b = new value.B(); +>b : any +>new value.B() : any +>value.B : any +>value : any +>B : any + + b.print(); +>b.print() : any +>b.print : any +>b : any +>print : any + + }) +} + +foo(import("./0")); +>foo(import("./0")) : void +>foo : (x: Promise) => void +>import("./0") : Promise +>"./0" : "./0" + diff --git a/tests/baselines/reference/importCallExpressionInUMD3.js b/tests/baselines/reference/importCallExpressionInUMD3.js new file mode 100644 index 00000000000..41106e3ab78 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD3.js @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +//// [2.ts] +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); + +//// [0.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + class B { + print() { return "I am B"; } + } + exports.B = B; +}); +//// [2.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + async function foo() { + class C extends (await (__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }))).B { + } + var c = new C(); + c.print(); + } + foo(); +}); diff --git a/tests/baselines/reference/importCallExpressionInUMD3.symbols b/tests/baselines/reference/importCallExpressionInUMD3.symbols new file mode 100644 index 00000000000..5ca85d6e693 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD3.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + + class C extends (await import("./0")).B {} +>C : Symbol(C, Decl(2.ts, 0, 22)) +>(await import("./0")).B : Symbol(B, Decl(0.ts, 0, 0)) +>B : Symbol(B, Decl(0.ts, 0, 0)) + + var c = new C(); +>c : Symbol(c, Decl(2.ts, 2, 7)) +>C : Symbol(C, Decl(2.ts, 0, 22)) + + c.print(); +>c.print : Symbol(B.print, Decl(0.ts, 0, 16)) +>c : Symbol(c, Decl(2.ts, 2, 7)) +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} +foo(); +>foo : Symbol(foo, Decl(2.ts, 0, 0)) + diff --git a/tests/baselines/reference/importCallExpressionInUMD3.types b/tests/baselines/reference/importCallExpressionInUMD3.types new file mode 100644 index 00000000000..e517be6e722 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD3.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +=== tests/cases/conformance/dynamicImport/2.ts === +async function foo() { +>foo : () => Promise + + class C extends (await import("./0")).B {} +>C : C +>(await import("./0")).B : B +>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0" +>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0" +>import("./0") : Promise +>"./0" : "./0" +>B : typeof B + + var c = new C(); +>c : C +>new C() : C +>C : typeof C + + c.print(); +>c.print() : string +>c.print : () => string +>c : C +>print : () => string +} +foo(); +>foo() : Promise +>foo : () => Promise + diff --git a/tests/baselines/reference/importCallExpressionInUMD4.js b/tests/baselines/reference/importCallExpressionInUMD4.js new file mode 100644 index 00000000000..47ba83b1718 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD4.js @@ -0,0 +1,88 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts] //// + +//// [0.ts] +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +//// [1.ts] +export function backup() { return "backup"; } + +//// [2.ts] +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} + +//// [0.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + class B { + print() { return "I am B"; } + } + exports.B = B; + function foo() { return "foo"; } + exports.foo = foo; +}); +//// [1.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function backup() { return "backup"; } + exports.backup = backup; +}); +//// [2.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + class C { + constructor() { + this.myModule = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + } + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async (err) => { + console.log(err); + let one = await (__syncRequire ? Promise.resolve().then(function () { return require("./1"); }) : new Promise(function (resolve_2, reject_2) { require(["./1"], resolve_2, reject_2); })); + console.log(one.backup()); + }); + } + } +}); diff --git a/tests/baselines/reference/importCallExpressionInUMD4.symbols b/tests/baselines/reference/importCallExpressionInUMD4.symbols new file mode 100644 index 00000000000..34a1dcf4d7b --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD4.symbols @@ -0,0 +1,61 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : Symbol(B, Decl(0.ts, 0, 0)) + + print() { return "I am B"} +>print : Symbol(B.print, Decl(0.ts, 0, 16)) +} + +export function foo() { return "foo" } +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : Symbol(console, Decl(2.ts, 0, 11)) + +class C { +>C : Symbol(C, Decl(2.ts, 0, 25)) + + private myModule = import("./0"); +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) + + method() { +>method : Symbol(C.method, Decl(2.ts, 2, 37)) + + this.myModule.then(Zero => { +>this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>this : Symbol(C, Decl(2.ts, 0, 25)) +>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) + + console.log(Zero.foo()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>Zero.foo : Symbol(foo, Decl(0.ts, 2, 1)) +>Zero : Symbol(Zero, Decl(2.ts, 4, 27)) +>foo : Symbol(foo, Decl(0.ts, 2, 1)) + + }, async err => { +>err : Symbol(err, Decl(2.ts, 6, 16)) + + console.log(err); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>err : Symbol(err, Decl(2.ts, 6, 16)) + + let one = await import("./1"); +>one : Symbol(one, Decl(2.ts, 8, 15)) + + console.log(one.backup()); +>console : Symbol(console, Decl(2.ts, 0, 11)) +>one.backup : Symbol(backup, Decl(1.ts, 0, 0)) +>one : Symbol(one, Decl(2.ts, 8, 15)) +>backup : Symbol(backup, Decl(1.ts, 0, 0)) + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionInUMD4.types b/tests/baselines/reference/importCallExpressionInUMD4.types new file mode 100644 index 00000000000..2ea666ba672 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionInUMD4.types @@ -0,0 +1,83 @@ +=== tests/cases/conformance/dynamicImport/0.ts === +export class B { +>B : B + + print() { return "I am B"} +>print : () => string +>"I am B" : "I am B" +} + +export function foo() { return "foo" } +>foo : () => string +>"foo" : "foo" + +=== tests/cases/conformance/dynamicImport/1.ts === +export function backup() { return "backup"; } +>backup : () => string +>"backup" : "backup" + +=== tests/cases/conformance/dynamicImport/2.ts === +declare var console: any; +>console : any + +class C { +>C : C + + private myModule = import("./0"); +>myModule : Promise +>import("./0") : Promise +>"./0" : "./0" + + method() { +>method : () => void + + this.myModule.then(Zero => { +>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise +>this.myModule.then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>this.myModule : Promise +>this : this +>myModule : Promise +>then : (onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void +>Zero : typeof "tests/cases/conformance/dynamicImport/0" + + console.log(Zero.foo()); +>console.log(Zero.foo()) : any +>console.log : any +>console : any +>log : any +>Zero.foo() : string +>Zero.foo : () => string +>Zero : typeof "tests/cases/conformance/dynamicImport/0" +>foo : () => string + + }, async err => { +>async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); } : (err: any) => Promise +>err : any + + console.log(err); +>console.log(err) : any +>console.log : any +>console : any +>log : any +>err : any + + let one = await import("./1"); +>one : typeof "tests/cases/conformance/dynamicImport/1" +>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1" +>import("./1") : Promise +>"./1" : "./1" + + console.log(one.backup()); +>console.log(one.backup()) : any +>console.log : any +>console : any +>log : any +>one.backup() : string +>one.backup : () => string +>one : typeof "tests/cases/conformance/dynamicImport/1" +>backup : () => string + + }); + } +} diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js new file mode 100644 index 00000000000..728d6636953 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts] //// + +//// [defaultPath.ts] +export class C {} + +//// [1.ts] +import * as defaultModule from "./defaultPath"; +declare function getSpecifier(): string; +declare function ValidSomeCondition(): boolean; +declare var whatToLoad: boolean; +declare const directory: string; +declare const moduleFile: number; + +import(`${directory}\${moduleFile}`); +import(getSpecifier()); + +var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); +var p1: Promise = import(getSpecifier()); +var p11: Promise = import(getSpecifier()); +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; +p1.then(zero => { + return zero.foo(); // ok, zero is any +}); + +let j: string; +var p3: Promise = import(j=getSpecifier()); + +function * loadModule(directories: string[]) { + for (const directory of directories) { + const path = `${directory}\moduleFile`; + import(yield path); + } +} + + +//// [defaultPath.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class C { +} +exports.C = C; +//// [1.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); +Promise.resolve().then(function () { return require(getSpecifier()); }); +var p1 = Promise.resolve().then(function () { return require(ValidSomeCondition() ? "./0" : "externalModule"); }); +var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); +var p11 = Promise.resolve().then(function () { return require(getSpecifier()); }); +const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +p1.then(zero => { + return zero.foo(); // ok, zero is any +}); +let j; +var p3 = Promise.resolve().then(function () { return require(j = getSpecifier()); }); +function* loadModule(directories) { + for (const directory of directories) { + const path = `${directory}\moduleFile`; + Promise.resolve().then(function () { return require(yield path); }); + } +} diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols new file mode 100644 index 00000000000..0d46961475f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.symbols @@ -0,0 +1,89 @@ +=== tests/cases/conformance/dynamicImport/defaultPath.ts === +export class C {} +>C : Symbol(C, Decl(defaultPath.ts, 0, 0)) + +=== tests/cases/conformance/dynamicImport/1.ts === +import * as defaultModule from "./defaultPath"; +>defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) + +declare function getSpecifier(): string; +>getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) + +declare function ValidSomeCondition(): boolean; +>ValidSomeCondition : Symbol(ValidSomeCondition, Decl(1.ts, 1, 40)) + +declare var whatToLoad: boolean; +>whatToLoad : Symbol(whatToLoad, Decl(1.ts, 3, 11)) + +declare const directory: string; +>directory : Symbol(directory, Decl(1.ts, 4, 13)) + +declare const moduleFile: number; +>moduleFile : Symbol(moduleFile, Decl(1.ts, 5, 13)) + +import(`${directory}\${moduleFile}`); +>directory : Symbol(directory, Decl(1.ts, 4, 13)) + +import(getSpecifier()); +>getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) + +var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); +>p1 : Symbol(p1, Decl(1.ts, 10, 3), Decl(1.ts, 11, 3)) +>ValidSomeCondition : Symbol(ValidSomeCondition, Decl(1.ts, 1, 40)) + +var p1: Promise = import(getSpecifier()); +>p1 : Symbol(p1, Decl(1.ts, 10, 3), Decl(1.ts, 11, 3)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) + +var p11: Promise = import(getSpecifier()); +>p11 : Symbol(p11, Decl(1.ts, 12, 3)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) +>getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) + +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; +>p2 : Symbol(p2, Decl(1.ts, 13, 5)) +>whatToLoad : Symbol(whatToLoad, Decl(1.ts, 3, 11)) +>getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) + +p1.then(zero => { +>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p1 : Symbol(p1, Decl(1.ts, 10, 3), Decl(1.ts, 11, 3)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>zero : Symbol(zero, Decl(1.ts, 14, 8)) + + return zero.foo(); // ok, zero is any +>zero : Symbol(zero, Decl(1.ts, 14, 8)) + +}); + +let j: string; +>j : Symbol(j, Decl(1.ts, 18, 3)) + +var p3: Promise = import(j=getSpecifier()); +>p3 : Symbol(p3, Decl(1.ts, 19, 3)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>defaultModule : Symbol(defaultModule, Decl(1.ts, 0, 6)) +>j : Symbol(j, Decl(1.ts, 18, 3)) +>getSpecifier : Symbol(getSpecifier, Decl(1.ts, 0, 47)) + +function * loadModule(directories: string[]) { +>loadModule : Symbol(loadModule, Decl(1.ts, 19, 65)) +>directories : Symbol(directories, Decl(1.ts, 21, 22)) + + for (const directory of directories) { +>directory : Symbol(directory, Decl(1.ts, 22, 14)) +>directories : Symbol(directories, Decl(1.ts, 21, 22)) + + const path = `${directory}\moduleFile`; +>path : Symbol(path, Decl(1.ts, 23, 13)) +>directory : Symbol(directory, Decl(1.ts, 22, 14)) + + import(yield path); +>path : Symbol(path, Decl(1.ts, 23, 13)) + } +} + diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types new file mode 100644 index 00000000000..fc52b38c1fb --- /dev/null +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.types @@ -0,0 +1,118 @@ +=== tests/cases/conformance/dynamicImport/defaultPath.ts === +export class C {} +>C : C + +=== tests/cases/conformance/dynamicImport/1.ts === +import * as defaultModule from "./defaultPath"; +>defaultModule : typeof defaultModule + +declare function getSpecifier(): string; +>getSpecifier : () => string + +declare function ValidSomeCondition(): boolean; +>ValidSomeCondition : () => boolean + +declare var whatToLoad: boolean; +>whatToLoad : boolean + +declare const directory: string; +>directory : string + +declare const moduleFile: number; +>moduleFile : number + +import(`${directory}\${moduleFile}`); +>import(`${directory}\${moduleFile}`) : Promise +>`${directory}\${moduleFile}` : string +>directory : string + +import(getSpecifier()); +>import(getSpecifier()) : Promise +>getSpecifier() : string +>getSpecifier : () => string + +var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); +>p1 : Promise +>import(ValidSomeCondition() ? "./0" : "externalModule") : Promise +>ValidSomeCondition() ? "./0" : "externalModule" : "./0" | "externalModule" +>ValidSomeCondition() : boolean +>ValidSomeCondition : () => boolean +>"./0" : "./0" +>"externalModule" : "externalModule" + +var p1: Promise = import(getSpecifier()); +>p1 : Promise +>Promise : Promise +>import(getSpecifier()) : Promise +>getSpecifier() : string +>getSpecifier : () => string + +var p11: Promise = import(getSpecifier()); +>p11 : Promise +>Promise : Promise +>defaultModule : typeof defaultModule +>import(getSpecifier()) : Promise +>getSpecifier() : string +>getSpecifier : () => string + +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; +>p2 : Promise +>import(whatToLoad ? getSpecifier() : "defaulPath") as Promise : Promise +>import(whatToLoad ? getSpecifier() : "defaulPath") : Promise +>whatToLoad ? getSpecifier() : "defaulPath" : string +>whatToLoad : boolean +>getSpecifier() : string +>getSpecifier : () => string +>"defaulPath" : "defaulPath" +>Promise : Promise +>defaultModule : typeof defaultModule + +p1.then(zero => { +>p1.then(zero => { return zero.foo(); // ok, zero is any}) : Promise +>p1.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p1 : Promise +>then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>zero => { return zero.foo(); // ok, zero is any} : (zero: any) => any +>zero : any + + return zero.foo(); // ok, zero is any +>zero.foo() : any +>zero.foo : any +>zero : any +>foo : any + +}); + +let j: string; +>j : string + +var p3: Promise = import(j=getSpecifier()); +>p3 : Promise +>Promise : Promise +>defaultModule : typeof defaultModule +>import(j=getSpecifier()) : Promise +>j=getSpecifier() : string +>j : string +>getSpecifier() : string +>getSpecifier : () => string + +function * loadModule(directories: string[]) { +>loadModule : (directories: string[]) => IterableIterator +>directories : string[] + + for (const directory of directories) { +>directory : string +>directories : string[] + + const path = `${directory}\moduleFile`; +>path : string +>`${directory}\moduleFile` : string +>directory : string + + import(yield path); +>import(yield path) : Promise +>yield path : any +>path : string + } +} + diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt new file mode 100644 index 00000000000..a1159a31ebd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.errors.txt @@ -0,0 +1,31 @@ +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(5,8): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(6,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(7,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(12,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'. +tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(13,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'. + + +==== tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts (5 errors) ==== + declare function getSpecifier(): boolean; + declare var whatToLoad: boolean; + + // Error specifier is not assignable to string + import(getSpecifier()); + ~~~~~~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. + var p1 = import(getSpecifier()); + ~~~~~~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'. + const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'. + p1.then(zero => { + return zero.foo(); // ok, zero is any + }); + + var p3 = import(["path1", "path2"]); + ~~~~~~~~~~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'. + var p4 = import(()=>"PathToModule"); + ~~~~~~~~~~~~~~~~~~ +!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'. \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js new file mode 100644 index 00000000000..dde35d8048b --- /dev/null +++ b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js @@ -0,0 +1,25 @@ +//// [importCallExpressionSpecifierNotStringTypeError.ts] +declare function getSpecifier(): boolean; +declare var whatToLoad: boolean; + +// Error specifier is not assignable to string +import(getSpecifier()); +var p1 = import(getSpecifier()); +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") +p1.then(zero => { + return zero.foo(); // ok, zero is any +}); + +var p3 = import(["path1", "path2"]); +var p4 = import(()=>"PathToModule"); + +//// [importCallExpressionSpecifierNotStringTypeError.js] +// Error specifier is not assignable to string +Promise.resolve().then(function () { return require(getSpecifier()); }); +var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); +const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +p1.then(zero => { + return zero.foo(); // ok, zero is any +}); +var p3 = Promise.resolve().then(function () { return require(["path1", "path2"]); }); +var p4 = Promise.resolve().then(function () { return require(() => "PathToModule"); }); diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt new file mode 100644 index 00000000000..8adf2789585 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionWithTypeArgument.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments +tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments + + +==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ==== + export function foo() { return "foo"; } + +==== tests/cases/conformance/dynamicImport/1.ts (2 errors) ==== + "use strict" + var p1 = import>("./0"); // error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1326: Dynamic import cannot have type arguments + var p2 = import<>("./0"); // error + ~~~~~~~~~~~~~~~ +!!! error TS1326: Dynamic import cannot have type arguments + // p1.then(value => { + // value.anyFunction(); + // }) \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.js b/tests/baselines/reference/importCallExpressionWithTypeArgument.js new file mode 100644 index 00000000000..d8690cf5d75 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionWithTypeArgument.js @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts] //// + +//// [0.ts] +export function foo() { return "foo"; } + +//// [1.ts] +"use strict" +var p1 = import>("./0"); // error +var p2 = import<>("./0"); // error +// p1.then(value => { +// value.anyFunction(); +// }) + +//// [0.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function foo() { return "foo"; } +exports.foo = foo; +//// [1.js] +"use strict"; +var p1 = (import)("./0"); // error +var p2 = (import)("./0"); // error diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt index d746f35cbe7..f746915da7d 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt index d746f35cbe7..f746915da7d 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 04599005244..772c218eb4e 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 2a41e2c4df0..7a9b895636c 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index e29a2813282..70d5ed9d738 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index 69831916904..914b9d99d1b 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 407df036f89..50bd28442bb 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 04599005244..772c218eb4e 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index e4d0b37ae51..afae7193d58 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 3e3f7a85b34..a87fe9c5206 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ + "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation: */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ diff --git a/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts new file mode 100644 index 00000000000..295b6470301 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts @@ -0,0 +1,15 @@ +// @module: esnext +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}) + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts new file mode 100644 index 00000000000..f0e9b358854 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts @@ -0,0 +1,16 @@ +// @module: esnext +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts new file mode 100644 index 00000000000..ee7264b8c7e --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts @@ -0,0 +1,14 @@ +// @module: esnext +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts new file mode 100644 index 00000000000..91342770d7d --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts @@ -0,0 +1,26 @@ +// @module: esnext +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts new file mode 100644 index 00000000000..173b606a50c --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts @@ -0,0 +1,20 @@ +// @module: esnext +// @target: esnext +// @strictNullChecks: true +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare function bar(): boolean; +const specify = bar() ? "./0" : undefined; +let myModule = import(specify); +let myModule1 = import(undefined); +let myModule2 = import(bar() ? "./1" : null); +let myModule3 = import(null); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts new file mode 100644 index 00000000000..f09521186e8 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts @@ -0,0 +1,19 @@ +// @module: esnext +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare function bar(): boolean; +const specify = bar() ? "./0" : undefined; +let myModule = import(specify); +let myModule1 = import(undefined); +let myModule2 = import(bar() ? "./1" : null); +let myModule3 = import(null); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts new file mode 100644 index 00000000000..1218565fa54 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionCheckReturntype1.ts @@ -0,0 +1,17 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: true + +// @filename: anotherModule.ts +export class D{} + +// @filename: defaultPath.ts +export class C {} + +// @filename: 1.ts +import * as defaultModule from "./defaultPath"; +import * as anotherModule from "./anotherModule"; + +let p1: Promise = import("./defaultPath"); +let p2 = import("./defaultPath") as Promise; +let p3: Promise = import("./defaultPath"); diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts new file mode 100644 index 00000000000..fb299951148 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit1.ts @@ -0,0 +1,19 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: false +// @declaration: true + +declare function getSpecifier(): string; +declare var whatToLoad: boolean; +declare const directory: string; +declare const moduleFile: number; + +import(getSpecifier()); + +var p0 = import(`${directory}\${moduleFile}`); +var p1 = import(getSpecifier()); +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") + +function returnDynamicLoad(path: string) { + return import(path); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts new file mode 100644 index 00000000000..4b9196dea20 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit2.ts @@ -0,0 +1,9 @@ +// @module: esnext +// @target: esnext +// @declaration: true + +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +var p1 = import("./0"); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts new file mode 100644 index 00000000000..6d17d624190 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionDeclarationEmit3.ts @@ -0,0 +1,15 @@ +// @module: esnext +// @target: esnext +// @declaration: true + +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +declare function getPath(): string; +import * as Zero from "./0"; +import("./0"); + +export var p0: Promise = import(getPath()); +export var p1: Promise = import("./0"); +export var p2: Promise = import("./0"); diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts new file mode 100644 index 00000000000..33c31283ea0 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionES5AMD.ts @@ -0,0 +1,16 @@ +// @module: amd +// @target: es5 +// @lib: es6 +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts new file mode 100644 index 00000000000..900ddbdba0c --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionES5CJS.ts @@ -0,0 +1,16 @@ +// @module: commonjs +// @target: es5 +// @lib: es6 +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts new file mode 100644 index 00000000000..c00ab6899c6 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionES5System.ts @@ -0,0 +1,16 @@ +// @module: system +// @target: es5 +// @lib: es6 +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts new file mode 100644 index 00000000000..699b0ffc342 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionES5UMD.ts @@ -0,0 +1,16 @@ +// @module: umd +// @target: es5 +// @lib: es6 +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts b/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts new file mode 100644 index 00000000000..a7fcd8533a3 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionErrorInES2015.ts @@ -0,0 +1,15 @@ +// @module: es2015 +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}) + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts b/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts new file mode 100644 index 00000000000..38dc47f3207 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts @@ -0,0 +1,14 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: false + +declare function getSpecifier(): string; +declare var whatToLoad: boolean; + +var a = ["./0"]; +import(...["PathModule"]); + +var p1 = import(...a); +const p2 = import(); +const p3 = import(,); +const p4 = import("pathToModule", "secondModule"); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts new file mode 100644 index 00000000000..63cfc54c732 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD1.ts @@ -0,0 +1,15 @@ +// @module: amd +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts new file mode 100644 index 00000000000..96b2fd4ceff --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD2.ts @@ -0,0 +1,17 @@ +// @module: amd +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts new file mode 100644 index 00000000000..a2b287b4d95 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD3.ts @@ -0,0 +1,14 @@ +// @module: amd +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts new file mode 100644 index 00000000000..10044ab674c --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInAMD4.ts @@ -0,0 +1,26 @@ +// @module: amd +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts new file mode 100644 index 00000000000..e1457017552 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS1.ts @@ -0,0 +1,15 @@ +// @module: commonjs +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts new file mode 100644 index 00000000000..e42a58a290c --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS2.ts @@ -0,0 +1,19 @@ +// @module: commonjs +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +async function compute(promise: Promise) { + let j = await promise; + if (!j) { + j = await import("./1"); + return j.backup(); + } + return j.foo(); +} + +compute(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts new file mode 100644 index 00000000000..5990eb3a5a2 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts @@ -0,0 +1,17 @@ +// @module: commonjs +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts new file mode 100644 index 00000000000..fba246c0b8b --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS4.ts @@ -0,0 +1,14 @@ +// @module: commonjs +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts new file mode 100644 index 00000000000..db86764802b --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInCJS5.ts @@ -0,0 +1,26 @@ +// @module: commonjs +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts new file mode 100644 index 00000000000..166513321a3 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext1.ts @@ -0,0 +1,10 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: false + +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +var p1 = import("./0"); +function arguments() { } // this is allow as the file doesn't have implicit "use strict" \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts new file mode 100644 index 00000000000..754f7e865bb --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInScriptContext2.ts @@ -0,0 +1,11 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: false + +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +"use strict" +var p1 = import("./0"); +function arguments() { } \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts new file mode 100644 index 00000000000..a69e844c7a7 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem1.ts @@ -0,0 +1,15 @@ +// @module: system +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts new file mode 100644 index 00000000000..c6fac3683ee --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem2.ts @@ -0,0 +1,17 @@ +// @module: system +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts new file mode 100644 index 00000000000..7f4485d8962 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem3.ts @@ -0,0 +1,14 @@ +// @module: system +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts new file mode 100644 index 00000000000..1ab3040862c --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInSystem4.ts @@ -0,0 +1,26 @@ +// @module: system +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts new file mode 100644 index 00000000000..05c4d699104 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD1.ts @@ -0,0 +1,15 @@ +// @module: umd +// @target: esnext +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +import("./0"); +var p1 = import("./0"); +p1.then(zero => { + return zero.foo(); +}); + +function foo() { + const p2 = import("./0"); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts new file mode 100644 index 00000000000..2f76d0aa267 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD2.ts @@ -0,0 +1,17 @@ +// @module: umd +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +// We use Promise for now as there is no way to specify shape of module object +function foo(x: Promise) { + x.then(value => { + let b = new value.B(); + b.print(); + }) +} + +foo(import("./0")); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts new file mode 100644 index 00000000000..58d21ee52d0 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD3.ts @@ -0,0 +1,14 @@ +// @module: umd +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +// @filename: 2.ts +async function foo() { + class C extends (await import("./0")).B {} + var c = new C(); + c.print(); +} +foo(); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts new file mode 100644 index 00000000000..ef0f0999407 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionInUMD4.ts @@ -0,0 +1,26 @@ +// @module: umd +// @target: esnext +// @filename: 0.ts +export class B { + print() { return "I am B"} +} + +export function foo() { return "foo" } + +// @filename: 1.ts +export function backup() { return "backup"; } + +// @filename: 2.ts +declare var console: any; +class C { + private myModule = import("./0"); + method() { + this.myModule.then(Zero => { + console.log(Zero.foo()); + }, async err => { + console.log(err); + let one = await import("./1"); + console.log(one.backup()); + }); + } +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts b/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts new file mode 100644 index 00000000000..34f0b63be6f --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionReturnPromiseOfAny.ts @@ -0,0 +1,34 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: true +// @filename: defaultPath.ts +export class C {} + +// @filename: 1.ts +import * as defaultModule from "./defaultPath"; +declare function getSpecifier(): string; +declare function ValidSomeCondition(): boolean; +declare var whatToLoad: boolean; +declare const directory: string; +declare const moduleFile: number; + +import(`${directory}\${moduleFile}`); +import(getSpecifier()); + +var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); +var p1: Promise = import(getSpecifier()); +var p11: Promise = import(getSpecifier()); +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; +p1.then(zero => { + return zero.foo(); // ok, zero is any +}); + +let j: string; +var p3: Promise = import(j=getSpecifier()); + +function * loadModule(directories: string[]) { + for (const directory of directories) { + const path = `${directory}\moduleFile`; + import(yield path); + } +} diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts b/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts new file mode 100644 index 00000000000..3af0ec89ac2 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts @@ -0,0 +1,17 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: false + +declare function getSpecifier(): boolean; +declare var whatToLoad: boolean; + +// Error specifier is not assignable to string +import(getSpecifier()); +var p1 = import(getSpecifier()); +const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") +p1.then(zero => { + return zero.foo(); // ok, zero is any +}); + +var p3 = import(["path1", "path2"]); +var p4 = import(()=>"PathToModule"); \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts b/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts new file mode 100644 index 00000000000..895b61af6ff --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionWithTypeArgument.ts @@ -0,0 +1,14 @@ +// @module: commonjs +// @target: es6 +// @noImplicitAny: false + +// @filename: 0.ts +export function foo() { return "foo"; } + +// @filename: 1.ts +"use strict" +var p1 = import>("./0"); // error +var p2 = import<>("./0"); // error +// p1.then(value => { +// value.anyFunction(); +// }) \ No newline at end of file From fe4fec5220d4ac35683b9aa4370f57073de39864 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Jun 2017 17:23:33 -0700 Subject: [PATCH 131/134] Fix breaking tests --- src/compiler/parser.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a3f440fd6c0..84306cd81d8 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2782,8 +2782,9 @@ namespace ts { case SyntaxKind.SlashToken: case SyntaxKind.SlashEqualsToken: case SyntaxKind.Identifier: - case SyntaxKind.ImportKeyword: return true; + case SyntaxKind.ImportKeyword: + return lookAhead(nextTokenIsOpenParenOrLessThan); default: return isIdentifier(); } @@ -3695,7 +3696,7 @@ namespace ts { // 3)we have a MemberExpression which either completes the LeftHandSideExpression, // or starts the beginning of the first four CallExpression productions. let expression: MemberExpression; - if (token() === SyntaxKind.ImportKeyword && lookAhead(nextTokenIsOpenParenOrLessThan)) { + if (token() === SyntaxKind.ImportKeyword) { // We don't want to eagerly consume all import keyword as import call expression so we look a head to find "(" // For example: // var foo3 = require("subfolder @@ -4807,9 +4808,11 @@ namespace ts { // however, we say they are here so that we may gracefully parse them and error later. case SyntaxKind.CatchKeyword: case SyntaxKind.FinallyKeyword: - case SyntaxKind.ImportKeyword: return true; + case SyntaxKind.ImportKeyword: + return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThan); + case SyntaxKind.ConstKeyword: case SyntaxKind.ExportKeyword: return isStartOfDeclaration(); From ba04dc8860c5d4ff7f7e0d6b0fad8763dfb93770 Mon Sep 17 00:00:00 2001 From: Mine Starks Date: Mon, 5 Jun 2017 17:45:07 -0700 Subject: [PATCH 132/134] Add typingsInstaller unit test --- .../unittests/tsserverProjectSystem.ts | 4 +-- src/harness/unittests/typingsInstaller.ts | 27 ++++++++++++++++--- src/services/jsTyping.ts | 4 +-- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/harness/unittests/tsserverProjectSystem.ts b/src/harness/unittests/tsserverProjectSystem.ts index 6f898e7f4a6..7a19aa9167f 100644 --- a/src/harness/unittests/tsserverProjectSystem.ts +++ b/src/harness/unittests/tsserverProjectSystem.ts @@ -13,7 +13,8 @@ namespace ts.projectSystem { express: "express", jquery: "jquery", lodash: "lodash", - moment: "moment" + moment: "moment", + chroma: "chroma-js" }) }; @@ -61,7 +62,6 @@ namespace ts.projectSystem { super(installTypingHost, globalTypingsCacheLocation, safeList.path, throttleLimit, log); } - safeFileList = safeList.path; protected postExecActions: PostExecAction[] = []; executePendingCommands() { diff --git a/src/harness/unittests/typingsInstaller.ts b/src/harness/unittests/typingsInstaller.ts index 699b1807428..c356d0941c0 100644 --- a/src/harness/unittests/typingsInstaller.ts +++ b/src/harness/unittests/typingsInstaller.ts @@ -1009,6 +1009,26 @@ namespace ts.projectSystem { }); describe("discover typings", () => { + it("should use mappings from safe list", () => { + const app = { + path: "/a/b/app.js", + content: "" + }; + const jquery = { + path: "/a/b/jquery.js", + content: "" + }; + const chroma = { + path: "/a/b/chroma.min.js", + content: "" + }; + const cache = createMap(); + + const host = createServerHost([app, jquery, chroma]); + const result = JsTyping.discoverTypings(host, [app.path, jquery.path, chroma.path], getDirectoryPath(app.path), /*safeListPath*/ undefined, cache, { enable: true }, []); + assert.deepEqual(result.newTypingNames, ["jquery", "chroma-js"]); + }); + it("should return node for core modules", () => { const f = { path: "/a/b/app.js", @@ -1016,6 +1036,7 @@ namespace ts.projectSystem { }; const host = createServerHost([f]); const cache = createMap(); + for (const name of JsTyping.nodeCoreModuleList) { const result = JsTyping.discoverTypings(host, [f.path], getDirectoryPath(f.path), /*safeListPath*/ undefined, cache, { enable: true }, [name, "somename"]); assert.deepEqual(result.newTypingNames.sort(), ["node", "somename"]); @@ -1040,7 +1061,7 @@ namespace ts.projectSystem { }); describe("telemetry events", () => { - it ("should be received", () => { + it("should be received", () => { const f1 = { path: "/a/app.js", content: "" @@ -1089,7 +1110,7 @@ namespace ts.projectSystem { }); describe("progress notifications", () => { - it ("should be sent for success", () => { + it("should be sent for success", () => { const f1 = { path: "/a/app.js", content: "" @@ -1140,7 +1161,7 @@ namespace ts.projectSystem { checkProjectActualFiles(projectService.inferredProjects[0], [f1.path, commander.path]); }); - it ("should be sent for error", () => { + it("should be sent for error", () => { const f1 = { path: "/a/app.js", content: "" diff --git a/src/services/jsTyping.ts b/src/services/jsTyping.ts index a4fb88fadfe..5e31d6a0190 100644 --- a/src/services/jsTyping.ts +++ b/src/services/jsTyping.ts @@ -143,7 +143,7 @@ namespace ts.JsTyping { /** * Merge a given list of typingNames to the inferredTypings map */ - function mergeTypings(typingNames: string[]) { + function mergeTypings(typingNames: ReadonlyArray) { if (!typingNames) { return; } @@ -192,7 +192,7 @@ namespace ts.JsTyping { const cleanedTypingNames = map(inferredTypingNames, f => f.replace(/((?:\.|-)min(?=\.|$))|((?:-|\.)\d+)/g, "")); if (safeList !== EmptySafeList) { - mergeTypings(map(filter(cleanedTypingNames, f => safeList.has(f)), (f => safeList.get(f)))); + mergeTypings(ts.mapDefined(cleanedTypingNames, f => safeList.get(f))); } const hasJsxFile = forEach(fileNames, f => ensureScriptKind(f, getScriptKindFromFileName(f)) === ScriptKind.JSX); From cbdf02f47c1af41a985c970d50c942d3c996dcdb Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 5 Jun 2017 18:07:55 -0700 Subject: [PATCH 133/134] Undo change and go back to making a copy of leadingComments and trailingComments (#16273) --- src/compiler/factory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index a83f00ce86e..12e8110e7be 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -2503,8 +2503,9 @@ namespace ts { helpers } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) destEmitNode.leadingComments = concatenate(leadingComments, destEmitNode.leadingComments); - if (trailingComments) destEmitNode.trailingComments = concatenate(trailingComments, destEmitNode.trailingComments); + // 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 (commentRange) destEmitNode.commentRange = commentRange; if (sourceMapRange) destEmitNode.sourceMapRange = sourceMapRange; From 0600a27dd93a4759bcb062647a249d41aaadda52 Mon Sep 17 00:00:00 2001 From: Herrington Darkholme Date: Wed, 7 Jun 2017 01:08:33 +0800 Subject: [PATCH 134/134] fix #15447: `object` is empty object type (#16290) --- src/compiler/checker.ts | 1 + .../nonPrimitiveUnionIntersection.errors.txt | 18 ++++++++++++++++-- .../reference/nonPrimitiveUnionIntersection.js | 12 ++++++++++++ .../nonPrimitiveUnionIntersection.ts | 4 ++++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f1aca672c52..10247343525 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8599,6 +8599,7 @@ namespace ts { function isEmptyObjectType(type: Type): boolean { return type.flags & TypeFlags.Object ? isEmptyResolvedType(resolveStructuredTypeMembers(type)) : + type.flags & TypeFlags.NonPrimitive ? true : type.flags & TypeFlags.Union ? forEach((type).types, isEmptyObjectType) : type.flags & TypeFlags.Intersection ? !forEach((type).types, t => !isEmptyObjectType(t)) : false; diff --git a/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt b/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt index 5fb1e89c2e3..5aad982dc20 100644 --- a/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt +++ b/tests/baselines/reference/nonPrimitiveUnionIntersection.errors.txt @@ -1,18 +1,32 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(1,5): error TS2322: Type '""' is not assignable to type 'object & string'. Type '""' is not assignable to type 'object'. -tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(3,1): error TS2322: Type 'string' is not assignable to type 'object & string'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(3,5): error TS2322: Type '123' is not assignable to type 'object & {}'. + Type '123' is not assignable to type 'object'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(4,1): error TS2322: Type 'string' is not assignable to type 'object & string'. Type 'string' is not assignable to type 'object'. +tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts(8,38): error TS2322: Type '{ bar: string; }' is not assignable to type 'object & { err: string; }'. + Object literal may only specify known properties, and 'bar' does not exist in type 'object & { err: string; }'. -==== tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts (2 errors) ==== +==== tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts (4 errors) ==== var a: object & string = ""; // error ~ !!! error TS2322: Type '""' is not assignable to type 'object & string'. !!! error TS2322: Type '""' is not assignable to type 'object'. var b: object | string = ""; // ok + var c: object & {} = 123; // error + ~ +!!! error TS2322: Type '123' is not assignable to type 'object & {}'. +!!! error TS2322: Type '123' is not assignable to type 'object'. a = b; // error ~ !!! error TS2322: Type 'string' is not assignable to type 'object & string'. !!! error TS2322: Type 'string' is not assignable to type 'object'. b = a; // ok + + const foo: object & {} = {bar: 'bar'}; // ok + const bar: object & {err: string} = {bar: 'bar'}; // error + ~~~~~~~~~~ +!!! error TS2322: Type '{ bar: string; }' is not assignable to type 'object & { err: string; }'. +!!! error TS2322: Object literal may only specify known properties, and 'bar' does not exist in type 'object & { err: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/nonPrimitiveUnionIntersection.js b/tests/baselines/reference/nonPrimitiveUnionIntersection.js index 7f4b46c42ed..771024f15e6 100644 --- a/tests/baselines/reference/nonPrimitiveUnionIntersection.js +++ b/tests/baselines/reference/nonPrimitiveUnionIntersection.js @@ -1,17 +1,29 @@ //// [nonPrimitiveUnionIntersection.ts] var a: object & string = ""; // error var b: object | string = ""; // ok +var c: object & {} = 123; // error a = b; // error b = a; // ok + +const foo: object & {} = {bar: 'bar'}; // ok +const bar: object & {err: string} = {bar: 'bar'}; // error //// [nonPrimitiveUnionIntersection.js] var a = ""; // error var b = ""; // ok +var c = 123; // error a = b; // error b = a; // ok +var foo = { bar: 'bar' }; // ok +var bar = { bar: 'bar' }; // error //// [nonPrimitiveUnionIntersection.d.ts] declare var a: object & string; declare var b: object | string; +declare var c: object & {}; +declare const foo: object & {}; +declare const bar: object & { + err: string; +}; diff --git a/tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts b/tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts index a9d5872705c..55c1acb03b3 100644 --- a/tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts +++ b/tests/cases/conformance/types/nonPrimitive/nonPrimitiveUnionIntersection.ts @@ -1,5 +1,9 @@ // @declaration: true var a: object & string = ""; // error var b: object | string = ""; // ok +var c: object & {} = 123; // error a = b; // error b = a; // ok + +const foo: object & {} = {bar: 'bar'}; // ok +const bar: object & {err: string} = {bar: 'bar'}; // error