From 153634fef2f13db8c6b2ea93bc1fe0b4f735adf9 Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Mon, 11 Jul 2022 04:23:54 +0800 Subject: [PATCH 01/10] lib Types and Documentations Fix --- src/lib/es2015.collection.d.ts | 2 +- src/lib/es2015.core.d.ts | 135 +++-- src/lib/es2015.iterable.d.ts | 123 ++-- src/lib/es2015.symbol.wellknown.d.ts | 12 +- src/lib/es2017.object.d.ts | 2 +- src/lib/es2019.array.d.ts | 23 +- src/lib/es2020.bigint.d.ts | 90 +-- src/lib/es2020.symbol.wellknown.d.ts | 2 +- src/lib/es2021.string.d.ts | 26 +- src/lib/es2022.object.d.ts | 2 +- src/lib/es5.d.ts | 543 ++++++++++-------- src/lib/scripthost.d.ts | 6 +- .../anyInferenceAnonymousFunctions.symbols | 12 +- .../anyInferenceAnonymousFunctions.types | 12 +- tests/baselines/reference/arrayFind.types | 8 +- tests/baselines/reference/arrayFlatMap.types | 8 +- tests/baselines/reference/arrayFrom.types | 44 +- .../reference/bigintWithLib.errors.txt | 32 +- .../checkExportsObjectAssignProperty.types | 40 +- ...ExportsObjectAssignPrototypeProperty.types | 20 +- .../reference/checkObjectDefineProperty.types | 24 +- .../checkOtherObjectAssignProperty.types | 24 +- .../circularContextualReturnType.types | 8 +- .../completionEntryForUnionMethod.baseline | 332 +---------- .../completionsCommentsClass.baseline | 2 +- .../completionsCommentsClassMembers.baseline | 40 +- ...completionsCommentsCommentParsing.baseline | 14 +- ...etionsCommentsFunctionDeclaration.baseline | 6 +- ...letionsCommentsFunctionExpression.baseline | 8 +- .../completionsStringMethods.baseline | 30 +- .../conditionalTypeDoesntSpinForever.symbols | 32 +- .../conditionalTypeDoesntSpinForever.types | 58 +- .../contextualSignatureInObjectFreeze.types | 4 +- ...ionEmitObjectAssignedDefaultExport.symbols | 4 +- ...ationEmitObjectAssignedDefaultExport.types | 6 +- ...iveInternalTypesProduceUniqueTypeParams.js | 26 +- ...ternalTypesProduceUniqueTypeParams.symbols | 8 +- ...InternalTypesProduceUniqueTypeParams.types | 30 +- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/destructuringTuple.errors.txt | 12 +- .../reference/destructuringTuple.symbols | 8 +- .../reference/destructuringTuple.types | 8 +- .../duplicateNumericIndexers.errors.txt | 4 +- ...plicateOverloadInTypeAugmentation1.symbols | 8 +- ...duplicateOverloadInTypeAugmentation1.types | 8 +- ...ignmentDefineProperrtyPotentialMerge.types | 8 +- .../reference/es2018ObjectAssign.symbols | 4 +- .../reference/es2018ObjectAssign.types | 8 +- .../esNextWeakRefs_IterableWeakMap.types | 8 +- .../excessPropertyCheckWithEmptyObject.types | 4 +- .../reference/externModule.errors.txt | 8 +- .../flatArrayNoExcessiveStackDepth.types | 6 +- .../formatToPartsFractionalSecond.types | 6 +- ...ericContextualTypingSpecialization.symbols | 4 +- ...enericContextualTypingSpecialization.types | 4 +- .../baselines/reference/genericReduce.symbols | 12 +- tests/baselines/reference/genericReduce.types | 12 +- .../reference/getterSetterNonAccessor.types | 4 +- .../reference/importAliasModuleExports.types | 4 +- ...ferFromGenericFunctionReturnTypes1.symbols | 4 +- ...inferFromGenericFunctionReturnTypes1.types | 4 +- ...ferFromGenericFunctionReturnTypes2.symbols | 4 +- ...inferFromGenericFunctionReturnTypes2.types | 4 +- .../intersectionTypeInference3.types | 8 +- .../intersectionsAndEmptyObjects.symbols | 4 +- .../intersectionsAndEmptyObjects.types | 6 +- ...efinePropertyPrototypeNonConstructor.types | 4 +- .../jsCheckObjectDefineThisNoCrash.types | 8 +- ...DeclarationsExportDefinePropertyEmit.types | 52 +- .../jsDeclarationsGetterSetter.types | 12 +- .../reference/jsEnumTagOnObjectFrozen.types | 4 +- .../jsExpandoObjectDefineProperty.types | 4 +- .../reference/jsFileESModuleWithEnumTag.types | 4 +- .../reference/keyofAndIndexedAccess.types | 4 +- ...teBoundAssignmentDeclarationSupport3.types | 8 +- ...teBoundAssignmentDeclarationSupport6.types | 8 +- .../reference/mappedTypeAsClauses.types | 4 +- ...ithAsClauseAndLateBoundProperty.errors.txt | 6 +- ...TypeWithAsClauseAndLateBoundProperty.types | 6 +- ...ypeWithAsClauseAndLateBoundProperty2.types | 6 +- ...wnSymbolWithOutES6WellknownSymbolLib.types | 4 +- ...eLibrary_NoErrorDuplicateLibOptions1.types | 4 +- ...eLibrary_NoErrorDuplicateLibOptions2.types | 4 +- ...dularizeLibrary_TargetES5UsingES6Lib.types | 4 +- ...dularizeLibrary_TargetES6UsingES6Lib.types | 4 +- ...izeLibrary_UsingES5LibAndES6ArrayLib.types | 4 +- ...5LibES6ArrayLibES6WellknownSymbolLib.types | 4 +- ...wExceptionVariableInCatchClause.errors.txt | 2 +- .../narrowFromAnyWithInstanceof.errors.txt | 4 +- .../narrowFromAnyWithTypePredicate.errors.txt | 4 +- .../baselines/reference/neverInference.types | 8 +- tests/baselines/reference/objectFreeze.types | 16 +- .../reference/objectFromEntries.types | 8 +- .../reference/objectLitGetterSetter.types | 4 +- ...erAccessAfterPostfixExpression1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity2.errors.txt | 2 +- .../reference/parserS7.2_A1.5_T2.errors.txt | 4 +- .../reference/parserS7.3_A1.1_T2.errors.txt | 2 +- .../reference/parserS7.6_A4.2_T1.errors.txt | 20 +- .../reference/parserUnicode1.errors.txt | 4 +- .../parserUsingConstructorAsIdentifier.types | 4 +- .../baselines/reference/parserharness.symbols | 12 +- tests/baselines/reference/parserharness.types | 12 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../recursiveTypeReferences1.symbols | 8 +- .../reference/recursiveTypeReferences1.types | 8 +- .../reference/recursiveTypeRelations.symbols | 4 +- .../reference/recursiveTypeRelations.types | 4 +- .../reference/redefineArray.errors.txt | 2 +- .../restElementWithNumberPropertyName.types | 2 +- .../reference/restInvalidArgumentType.types | 2 +- .../restParameterWithBindingPattern3.types | 2 +- .../restPropertyWithBindingPattern.types | 4 +- .../returnTypeParameterWithModules.symbols | 4 +- .../returnTypeParameterWithModules.types | 4 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.6_A4.2_T1.errors.txt | 20 +- .../reference/spreadInvalidArgumentType.types | 4 +- ...eStringsWithOverloadResolution1.errors.txt | 2 +- ...ingsWithOverloadResolution1_ES6.errors.txt | 2 +- ...ingsWithOverloadResolution3_ES6.errors.txt | 2 +- tests/baselines/reference/typedArrays.symbols | 216 +++---- tests/baselines/reference/typedArrays.types | 216 +++---- .../unionAndIntersectionInference1.symbols | 4 +- .../unionAndIntersectionInference1.types | 14 +- .../reference/unionOfClassCalls.errors.txt | 4 +- .../reference/unionOfClassCalls.symbols | 12 +- .../reference/unionOfClassCalls.types | 12 +- .../unknownSymbolOffContextualType1.symbols | 4 +- .../unknownSymbolOffContextualType1.types | 4 +- 134 files changed, 1324 insertions(+), 1492 deletions(-) diff --git a/src/lib/es2015.collection.d.ts b/src/lib/es2015.collection.d.ts index 83a7719acef55..fd565af94de0f 100644 --- a/src/lib/es2015.collection.d.ts +++ b/src/lib/es2015.collection.d.ts @@ -30,7 +30,7 @@ interface WeakMap { } interface WeakMapConstructor { - new (entries?: readonly [K, V][] | null): WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index b42880c8ece82..7700aa78f65ef 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -8,7 +8,17 @@ interface Array { * @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: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + find(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @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: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; /** @@ -26,19 +36,19 @@ interface Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ fill(value: T, start?: number, end?: number): this; /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ copyWithin(target: number, start: number, end?: number): this; @@ -46,24 +56,24 @@ interface Array { interface ArrayConstructor { /** - * Creates an array from an array-like object. - * @param arrayLike An array-like object to convert to an array. + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): T[]; + from(source: ArrayLike): T[]; /** - * Creates an array from an iterable object. - * @param arrayLike An array-like object to convert to an array. + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => U, thisArg?: any): U[]; + from(source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; /** * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: T[]): T[]; + of(...items: T): T; } interface DateConstructor { @@ -194,7 +204,7 @@ interface NumberConstructor { /** * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 * that is representable as a Number value, which is approximately: - * 2.2204460492503130808472633361816 x 10‍−‍16. + * 2.2204460492503130808472633361816E−‍16 (2^-52). */ readonly EPSILON: number; @@ -229,14 +239,14 @@ interface NumberConstructor { /** * The value of the largest integer n such that n and n + 1 are both exactly representable as * a Number value. - * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 (2^53 − 1). */ readonly MAX_SAFE_INTEGER: number; /** * The value of the smallest integer n such that n and n − 1 are both exactly representable as * a Number value. - * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−2^53 + 1). */ readonly MIN_SAFE_INTEGER: number; @@ -257,13 +267,20 @@ interface NumberConstructor { } interface ObjectConstructor { + /** + * Copy the values of all of the enumerable own properties from one or more source objects to a + * target object. Returns the target object. + * @param target The target object to copy to. + */ + assign(target: T): T; + /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. * @param target The target object to copy to. * @param source The source object from which to copy properties. */ - assign(target: T, source: U): T & U; + assign(target: T, source: U): T & Writable; /** * Copy the values of all of the enumerable own properties from one or more source objects to a @@ -272,7 +289,7 @@ interface ObjectConstructor { * @param source1 The first source object from which to copy properties. * @param source2 The second source object from which to copy properties. */ - assign(target: T, source1: U, source2: V): T & U & V; + assign(target: T, source1: U, source2: V): T & Writable & Writable; /** * Copy the values of all of the enumerable own properties from one or more source objects to a @@ -282,21 +299,21 @@ interface ObjectConstructor { * @param source2 The second source object from which to copy properties. * @param source3 The third source object from which to copy properties. */ - assign(target: T, source1: U, source2: V, source3: W): T & U & V & W; + assign(target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties + * @param sources One or more source objects from which to copy properties. */ - assign(target: object, ...sources: any[]): any; + assign(target: {}, ...sources: any[]): any; /** * Returns an array of all symbol properties found directly on object o. * @param o Object to retrieve the symbols from. */ - getOwnPropertySymbols(o: any): symbol[]; + getOwnPropertySymbols(o: {}): symbol[]; /** * Returns the names of the enumerable string properties and methods of an object. @@ -316,7 +333,7 @@ interface ObjectConstructor { * @param o The object to change its prototype. * @param proto The value of the new prototype or null. */ - setPrototypeOf(o: any, proto: object | null): any; + setPrototypeOf(o: {}, proto: object | null): any; } interface ReadonlyArray { @@ -329,7 +346,17 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (this: void, value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + + /** + * Returns the value of the first element in the array where predicate is true, and undefined + * otherwise. + * @param predicate find calls predicate once for each element of the array, in ascending + * order, until it finds one where predicate returns true. If such an element is found, find + * immediately returns that element value. Otherwise, find returns undefined. + * @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: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; /** @@ -379,11 +406,11 @@ interface RegExpConstructor { interface String { /** - * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point - * value of the UTF-16 encoded code point starting at the string element at position pos in - * the String resulting from converting this object to a String. - * If there is no element at that position, the result is undefined. - * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. + * Returns a non-negative integer less than 1114112 (0x110000) that is the code point value + * starting at the string element at the specified position. + * @param pos The zero-based index of the desired code point. If there is no character at the + * specified index, undefined is returned. If a UTF-16 surrogate pair does not begin at pos, + * the result is the code unit at pos. */ codePointAt(pos: number): number | undefined; @@ -397,46 +424,38 @@ interface String { includes(searchString: string, position?: number): boolean; /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * endPosition – length(this). Otherwise returns false. + * Determines whether the string ends with a substring, ending at the specified index. + * @param searchString The string to search for. + * @param endPosition The index at which to begin searching for. The default value is the + * length of searchString. */ endsWith(searchString: string, endPosition?: number): boolean; /** * Returns the String value result of normalizing the string into the normalization form * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" - */ - normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; - - /** - * Returns the String value result of normalizing the string into the normalization form - * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. - * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default - * is "NFC" + * @param form The normalization form to be used. The default value is "NFC". */ - normalize(form?: string): string; + normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD"): string; /** * Returns a String value that is made from count copies appended together. If count is 0, * the empty string is returned. - * @param count number of copies to append + * @param count The number of copies to append */ repeat(count: number): string; /** - * Returns true if the sequence of elements of searchString converted to a String is the - * same as the corresponding elements of this object (converted to a String) starting at - * position. Otherwise returns false. + * Determines whether the string starts with a substring, beginning at the specified index. + * @param searchString The string to search for. + * @param position The index at which to begin searching for. The default value is 0. */ startsWith(searchString: string, position?: number): boolean; /** - * Returns an `` HTML anchor element and sets the name attribute to the text value + * Returns an `` HTML anchor element and sets the name attribute value * @deprecated A legacy feature for browser compatibility - * @param name + * @param name The name attribute value */ anchor(name: string): string; @@ -467,20 +486,16 @@ interface String { /** * Returns a `` HTML element and sets the color attribute value * @deprecated A legacy feature for browser compatibility + * @param color The color attribute value */ fontcolor(color: string): string; /** * Returns a `` HTML element and sets the size attribute value * @deprecated A legacy feature for browser compatibility + * @param size The size attribute value */ - fontsize(size: number): string; - - /** - * Returns a `` HTML element and sets the size attribute value - * @deprecated A legacy feature for browser compatibility - */ - fontsize(size: string): string; + fontsize(size: number | string): string; /** * Returns an `` HTML element @@ -491,6 +506,7 @@ interface String { /** * Returns an `` HTML element and sets the href attribute value * @deprecated A legacy feature for browser compatibility + * @param url The href attribute value */ link(url: string): string; @@ -521,8 +537,9 @@ interface String { interface StringConstructor { /** - * Return the String value whose elements are, in order, the elements in the List elements. - * If length is 0, the empty string is returned. + * Returns a string created by a sequence of code points. + * If no arguments are given, the empty string is returned. + * @param codePoints A sequence of code points. */ fromCodePoint(...codePoints: number[]): string; @@ -535,5 +552,5 @@ interface StringConstructor { * @param template A well-formed template string call site representation. * @param substitutions A set of substitution values. */ - raw(template: { raw: readonly string[] | ArrayLike}, ...substitutions: any[]): string; + raw(template: { raw: readonly string[] | ArrayLike }, ...substitutions: any[]): string; } diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index f1fb454f980b1..0d6c53ee4f0d5 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -57,18 +57,18 @@ interface Array { interface ArrayConstructor { /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): T[]; + from(source: Iterable | ArrayLike): T[]; /** - * Creates an array from an iterable object. - * @param iterable An iterable object to convert to an array. + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + from(source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } interface ReadonlyArray { @@ -151,7 +151,7 @@ interface Set { /** Iterates over values in the set. */ [Symbol.iterator](): IterableIterator; /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. + * Returns an iterable of [v, v] pairs for every value `v` in the set. */ entries(): IterableIterator<[T, T]>; /** @@ -170,7 +170,7 @@ interface ReadonlySet { [Symbol.iterator](): IterableIterator; /** - * Returns an iterable of [v,v] pairs for every value `v` in the set. + * Returns an iterable of [v, v] pairs for every value `v` in the set. */ entries(): IterableIterator<[T, T]>; @@ -237,15 +237,21 @@ interface Int8Array { } interface Int8ArrayConstructor { - new (elements: Iterable): Int8Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Int8Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Int8Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } interface Uint8Array { @@ -265,15 +271,21 @@ interface Uint8Array { } interface Uint8ArrayConstructor { - new (elements: Iterable): Uint8Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Uint8Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Uint8Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } interface Uint8ClampedArray { @@ -295,16 +307,21 @@ interface Uint8ClampedArray { } interface Uint8ClampedArrayConstructor { - new (elements: Iterable): Uint8ClampedArray; + new (array: ArrayLike | Iterable | ArrayBufferLike): Uint8ClampedArray; + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Uint8ClampedArray; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } interface Int16Array { @@ -326,15 +343,21 @@ interface Int16Array { } interface Int16ArrayConstructor { - new (elements: Iterable): Int16Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Int16Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Int16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } interface Uint16Array { @@ -354,15 +377,21 @@ interface Uint16Array { } interface Uint16ArrayConstructor { - new (elements: Iterable): Uint16Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Uint16Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Uint16Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } interface Int32Array { @@ -382,15 +411,21 @@ interface Int32Array { } interface Int32ArrayConstructor { - new (elements: Iterable): Int32Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Int32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Int32Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } interface Uint32Array { @@ -410,15 +445,21 @@ interface Uint32Array { } interface Uint32ArrayConstructor { - new (elements: Iterable): Uint32Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Uint32Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Uint32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } interface Float32Array { @@ -438,15 +479,21 @@ interface Float32Array { } interface Float32ArrayConstructor { - new (elements: Iterable): Float32Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Float32Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Float32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } interface Float64Array { @@ -466,13 +513,19 @@ interface Float64Array { } interface Float64ArrayConstructor { - new (elements: Iterable): Float64Array; + new (array: ArrayLike | Iterable | ArrayBufferLike): Float64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): Float64Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index 8911baa9bb9cf..9ace256f83576 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -219,22 +219,22 @@ interface String { match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; /** - * Replaces first match with string or all matches with RegExp. - * @param searchValue A string or RegExp search value. - * @param replaceValue A string containing the text to replace for match. + * Replaces one or more occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. */ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; /** - * Replaces text in a string, using an object that supports replacement within a string. - * @param searchValue A object can search for and replace matches within a string. + * Replaces one or more occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. * @param replacer A function that returns the replacement text. */ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; /** * Finds the first substring match in a regular expression search. - * @param searcher An object which supports searching within a string. + * @param searcher An object that supports searching within a string. */ search(searcher: { [Symbol.search](string: string): number; }): number; diff --git a/src/lib/es2017.object.d.ts b/src/lib/es2017.object.d.ts index b3ace85bef182..d0a85b406a1c5 100644 --- a/src/lib/es2017.object.d.ts +++ b/src/lib/es2017.object.d.ts @@ -27,5 +27,5 @@ interface ObjectConstructor { * Returns an object containing all own property descriptors of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - getOwnPropertyDescriptors(o: T): {[P in keyof T]: TypedPropertyDescriptor} & { [x: string]: PropertyDescriptor }; + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor } & { [x: string]: PropertyDescriptor }; } diff --git a/src/lib/es2019.array.d.ts b/src/lib/es2019.array.d.ts index 5181677c5f973..02655a1bdad05 100644 --- a/src/lib/es2019.array.d.ts +++ b/src/lib/es2019.array.d.ts @@ -6,7 +6,6 @@ type FlatArray = { }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray { - /** * Calls a defined callback function on each element of an array. Then, flattens the result into * a new array. @@ -17,11 +16,7 @@ interface ReadonlyArray { * @param thisArg An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ - flatMap ( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This - ): U[] - + flatMap(callback: (value: T, index: number, array: T[]) => U | ReadonlyArray, thisArg?: any): U[] /** * Returns a new array with all sub-array elements concatenated into it recursively up to the @@ -29,14 +24,10 @@ interface ReadonlyArray { * * @param depth The maximum recursion depth */ - flat( - this: A, - depth?: D - ): FlatArray[] + flat(this: A, depth?: D): FlatArray[] } interface Array { - /** * Calls a defined callback function on each element of an array. Then, flattens the result into * a new array. @@ -47,10 +38,7 @@ interface Array { * @param thisArg An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ - flatMap ( - callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray, - thisArg?: This - ): U[] + flatMap (callback: (value: T, index: number, array: T[]) => U | ReadonlyArray, thisArg?: any): U[] /** * Returns a new array with all sub-array elements concatenated into it recursively up to the @@ -58,8 +46,5 @@ interface Array { * * @param depth The maximum recursion depth */ - flat( - this: A, - depth?: D - ): FlatArray[] + flat(this: A, depth?: D): FlatArray[] } diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index e13da87bc71c7..62caac7b0a480 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -144,13 +144,13 @@ interface BigInt64Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): BigInt64Array; /** Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, bigint]>; @@ -163,17 +163,17 @@ interface BigInt64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + every(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): boolean; /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: bigint, start?: number, end?: number): this; + fill(value: bigint, start?: number, end?: number): BigInt64Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -182,7 +182,7 @@ interface BigInt64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; + filter(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): BigInt64Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -193,7 +193,7 @@ interface BigInt64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; + find(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -204,7 +204,7 @@ interface BigInt64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -271,7 +271,7 @@ interface BigInt64Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint, initialValue?: bigint): bigint; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -295,7 +295,7 @@ interface BigInt64Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint, initialValue?: bigint): bigint; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -310,7 +310,7 @@ interface BigInt64Array { reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; /** Reverses the elements in the array. */ - reverse(): this; + reverse(): BigInt64Array; /** * Sets a value or an array of values. @@ -334,13 +334,13 @@ interface BigInt64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; + some(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): boolean; /** * Sorts the array. * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): BigInt64Array; /** * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements @@ -372,7 +372,7 @@ interface BigInt64Array { interface BigInt64ArrayConstructor { readonly prototype: BigInt64Array; new(length?: number): BigInt64Array; - new(array: Iterable): BigInt64Array; + new(array: ArrayLike | Iterable | ArrayBufferLike): BigInt64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array; /** The size in bytes of each element in the array. */ @@ -386,12 +386,17 @@ interface BigInt64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): BigInt64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @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): BigInt64Array; - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -416,13 +421,13 @@ interface BigUint64Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): BigUint64Array; /** Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, bigint]>; @@ -435,17 +440,17 @@ interface BigUint64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + every(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): boolean; /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: bigint, start?: number, end?: number): this; + fill(value: bigint, start?: number, end?: number): BigUint64Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -454,7 +459,7 @@ interface BigUint64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; + filter(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): BigUint64Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -465,7 +470,7 @@ interface BigUint64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; + find(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -476,7 +481,7 @@ interface BigUint64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -543,7 +548,7 @@ interface BigUint64Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint, initialValue?: bigint): bigint; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -567,7 +572,7 @@ interface BigUint64Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; + reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint, initialValue?: bigint): bigint; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -582,7 +587,7 @@ interface BigUint64Array { reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; /** Reverses the elements in the array. */ - reverse(): this; + reverse(): BigUint64Array; /** * Sets a value or an array of values. @@ -606,13 +611,13 @@ interface BigUint64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; + some(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): boolean; /** * Sorts the array. * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. */ - sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; + sort(compareFn?: (a: bigint, b: bigint) => number | bigint): BigUint64Array; /** * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements @@ -644,7 +649,7 @@ interface BigUint64Array { interface BigUint64ArrayConstructor { readonly prototype: BigUint64Array; new(length?: number): BigUint64Array; - new(array: Iterable): BigUint64Array; + new(array: ArrayLike | Iterable | ArrayBufferLike): BigUint64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array; /** The size in bytes of each element in the array. */ @@ -658,12 +663,17 @@ interface BigUint64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. + */ + from(source: ArrayLike | Iterable): BigUint64Array; + + /** + * Creates an array from an array-like or iterable object. + * @param source An array-like or iterable object to convert to an array. * @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): BigUint64Array; - from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; + from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; diff --git a/src/lib/es2020.symbol.wellknown.d.ts b/src/lib/es2020.symbol.wellknown.d.ts index 94a11768256c7..158ca3b83aa36 100644 --- a/src/lib/es2020.symbol.wellknown.d.ts +++ b/src/lib/es2020.symbol.wellknown.d.ts @@ -13,7 +13,7 @@ interface RegExp { /** * Matches a string with this regular expression, and returns an iterable of matches * containing the results of that search. - * @param string A string to search within. + * @param str A string to search within. */ [Symbol.matchAll](str: string): IterableIterator; } diff --git a/src/lib/es2021.string.d.ts b/src/lib/es2021.string.d.ts index 66971bf84d6cf..a0390c1ba6d7f 100644 --- a/src/lib/es2021.string.d.ts +++ b/src/lib/es2021.string.d.ts @@ -1,15 +1,31 @@ interface String { /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Replaces all occurrences of substrings that match a search string or a regular expression. + * A `TypeError` will be thrown if a RegExp without a `g` (global) flag is used. + * @param searchValue A string or RegExp search value. + * @param replaceValue The replacement text. */ replaceAll(searchValue: string | RegExp, replaceValue: string): string; /** - * Replace all instances of a substring in a string, using a regular expression or search string. - * @param searchValue A string to search for. + * Replaces all occurrences of substrings that match a search string or a regular expression. + * A `TypeError` will be thrown if a RegExp without a `g` (global) flag is used. + * @param searchValue A string or RegExp search value. * @param replacer A function that returns the replacement text. */ replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; + + /** + * Replaces all occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replaceAll(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + + /** + * Replaces all occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replacer A function that returns the replacement text. + */ + replaceAll(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; } diff --git a/src/lib/es2022.object.d.ts b/src/lib/es2022.object.d.ts index 7325ef3c343e2..0a07706ba941c 100644 --- a/src/lib/es2022.object.d.ts +++ b/src/lib/es2022.object.d.ts @@ -4,5 +4,5 @@ interface ObjectConstructor { * @param o An object. * @param v A property name. */ - hasOwn(o: object, v: PropertyKey): boolean; + hasOwn(o: {}, v: PropertyKey): boolean; } diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index b062a920c37c3..12353ff6829e0 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -143,7 +143,7 @@ interface ObjectConstructor { * Returns the prototype of an object. * @param o The object that references the prototype. */ - getPrototypeOf(o: any): any; + getPrototypeOf(o: {}): any; /** * Gets the own property descriptor of the specified object. @@ -151,14 +151,14 @@ interface ObjectConstructor { * @param o Object that contains the property. * @param p Name of the property. */ - getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined; + getOwnPropertyDescriptor(o: {}, p: PropertyKey): PropertyDescriptor | undefined; /** * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. * @param o Object that contains the own properties. */ - getOwnPropertyNames(o: any): string[]; + getOwnPropertyNames(o: {}): string[]; /** * Creates an object that has the specified prototype or that has null prototype. @@ -179,14 +179,14 @@ interface ObjectConstructor { * @param p The property name. * @param attributes Descriptor for the property. It can be for a data property or an accessor property. */ - defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; + defineProperty(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType): T; /** * Adds one or more properties to an object, and/or modifies attributes of existing properties. * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object. * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property. */ - defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; + defineProperties(o: T, properties: PropertyDescriptorMap & ThisType): T; /** * Prevents the modification of attributes of existing properties, and prevents the addition of new properties. @@ -198,7 +198,7 @@ interface ObjectConstructor { * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param a Object on which to lock the attributes. */ - freeze(a: T[]): readonly T[]; + freeze(a: T): Readonly; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. @@ -210,7 +210,7 @@ interface ObjectConstructor { * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: T): Readonly; + freeze(o: T): Readonly; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. @@ -317,9 +317,14 @@ interface CallableFunction extends Function { /** * Calls the function with the specified object as the this value and the elements of specified array as the arguments. * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. */ apply(this: (this: T) => R, thisArg: T): R; + + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; /** @@ -333,13 +338,53 @@ interface CallableFunction extends Function { * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. */ bind(this: T, thisArg: ThisParameterType): OmitThisParameter; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + */ bind(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + * @param arg1 The second argument to bind to the parameters of the function. + */ bind(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + * @param arg1 The second argument to bind to the parameters of the function. + * @param arg2 The third argument to bind to the parameters of the function. + */ bind(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + * @param arg1 The second argument to bind to the parameters of the function. + * @param arg2 The third argument to bind to the parameters of the function. + * @param arg3 The fourth to bind to the parameters of the function. + */ bind(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ bind(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } @@ -347,9 +392,13 @@ interface NewableFunction extends Function { /** * Calls the function with the specified object as the this value and the elements of specified array as the arguments. * @param thisArg The object to be used as the this object. - * @param args An array of argument values to be passed to the function. */ apply(this: new () => T, thisArg: T): void; + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ apply(this: new (...args: A) => T, thisArg: T, args: A): void; /** @@ -363,13 +412,53 @@ interface NewableFunction extends Function { * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. * @param thisArg The object to be used as the this object. - * @param args Arguments to bind to the parameters of the function. */ bind(this: T, thisArg: any): T; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + */ bind(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + * @param arg1 The second argument to bind to the parameters of the function. + */ bind(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + * @param arg1 The second argument to bind to the parameters of the function. + * @param arg2 The third argument to bind to the parameters of the function. + */ bind(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param arg0 The first argument to bind to the parameters of the function. + * @param arg1 The second argument to bind to the parameters of the function. + * @param arg2 The third argument to bind to the parameters of the function. + * @param arg3 The fourth to bind to the parameters of the function. + */ bind(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ bind(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } @@ -390,7 +479,7 @@ interface String { charAt(pos: number): string; /** - * Returns the Unicode value of the character at the specified location. + * Returns a non-negative integer less than 65536 (0x10000) that is the code unit value of the character at the specified index. * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned. */ charCodeAt(index: number): number; @@ -416,42 +505,47 @@ interface String { lastIndexOf(searchString: string, position?: number): number; /** - * Determines whether two strings are equivalent in the current locale. - * @param that String to compare to target string + * Determines whether the reference string comes before, after or is equivalent to the specified string in the current locale. + * Returns a negative integer if it comes before, a positive number if it comes after, and 0 if they are equivalent. + * @param that The string to compare to. */ localeCompare(that: string): number; /** * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A variable name or string literal containing the regular expression pattern and flags. + * @param regexp The regular expression for matching. If the provided value is not a RegExp, it is implicitly + * converted to a RegExp by using `new RegExp(regexp)`. */ match(regexp: string | RegExp): RegExpMatchArray | null; /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. + * Replaces one or more occurrences of substrings that match a search string or a regular expression. + * Only the first occurrence will be replaced unless a RegExp with a `g` (global) flag is used. + * @param searchValue A string or RegExp search value. + * @param replaceValue The replacement text. */ replace(searchValue: string | RegExp, replaceValue: string): string; /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A string to search for. + * Replaces one or more occurrences of substrings that match a search string or a regular expression. + * Only the first occurrence will be replaced unless a RegExp with a `g` (global) flag is used. + * @param searchValue A string or RegExp search value. * @param replacer A function that returns the replacement text. */ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; /** * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. + * @param regexp The regular expression for matching. If the provided value is not a RegExp, it is implicitly + * converted to a RegExp by using `new RegExp(regexp)`. */ search(regexp: string | RegExp): number; /** * Returns a section of a string. - * @param start The index to the beginning of the specified portion of stringObj. - * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. - * If this value is not specified, the substring continues to the end of stringObj. + * @param start The index to the beginning of the specified portion of the string. + * @param end The index to the end of the specified portion of the string. The substring includes the characters up to, but not including, the character indicated by end. + * If this value is not specified, the substring continues to the end of the string. */ slice(start?: number, end?: number): string; @@ -463,9 +557,9 @@ interface String { split(separator: string | RegExp, limit?: number): string[]; /** - * Returns the substring at the specified location within a String object. - * @param start The zero-based index number indicating the beginning of the substring. - * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. + * Returns the substring beginning at the specified index within a String object. + * @param start The zero-based index indicating the beginning of the substring. + * @param end The zero-based index indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. * If end is omitted, the characters from start through the end of the original string are returned. */ substring(start: number, end?: number): string; @@ -490,9 +584,9 @@ interface String { // IE extensions /** - * Gets a substring beginning at the specified location and having the specified length. + * Gets a substring beginning at the specified index and having the specified length. * @deprecated A legacy feature for browser compatibility - * @param from The starting position of the desired substring. The index of the first character in the string is zero. + * @param from The starting index of the desired substring. The index of the first character in the string is zero. * @param length The number of characters to include in the returned substring. */ substr(from: number, length?: number): string; @@ -511,7 +605,7 @@ interface StringConstructor { } /** - * Allows manipulation and formatting of text strings and determination and location of substrings within strings. + * Allows manipulation and formatting of text strings and determination of location of substrings within strings. */ declare var String: StringConstructor; @@ -963,7 +1057,7 @@ interface RegExp { // Non-standard extensions /** @deprecated A legacy feature for browser compatibility */ - compile(pattern: string, flags?: string): this; + compile(pattern: string, flags?: string): RegExp; } interface RegExpConstructor { @@ -1232,8 +1326,7 @@ interface ReadonlyArray { * @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. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue?: T): 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. @@ -1245,8 +1338,7 @@ interface ReadonlyArray { * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue?: T): T; /** * Calls the specified callback function for all the elements in an array, in descending order. 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 reduceRight method calls the callbackfn function one time for each element in the array. @@ -1331,20 +1423,20 @@ interface Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: T, b: T) => number): this; + sort(compareFn?: (a: T, b: T) => number): T[]; /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. + * @param start The zero-based index in the array from which to start removing elements. * @param deleteCount The number of elements to remove. * @returns An array containing the elements that were deleted. */ splice(start: number, deleteCount?: number): T[]; /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. - * @param start The zero-based location in the array from which to start removing elements. + * @param start The zero-based index in the array from which to start removing elements. * @param deleteCount The number of elements to remove. * @param items Elements to insert into the array in place of the deleted elements. * @returns An array containing the elements that were deleted. @@ -1423,8 +1515,7 @@ interface Array { * @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. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): 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. @@ -1436,8 +1527,7 @@ interface Array { * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; /** * Calls the specified callback function for all the elements in an array, in descending order. 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 reduceRight method calls the callbackfn function one time for each element in the array. @@ -1544,6 +1634,13 @@ type Readonly = { readonly [P in keyof T]: T[P]; }; +/** + * Make all properties in T writable + */ +type Writable = { + -readonly [P in keyof T]: T[P]; +}; + /** * From T, pick a set of properties whose keys are in the union K */ @@ -1835,13 +1932,13 @@ interface Int8Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Int8Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -1857,11 +1954,11 @@ interface Int8Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Int8Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -1870,7 +1967,7 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array; + filter(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): Int8Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -1881,7 +1978,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: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Int8Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -1892,7 +1989,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: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Int8Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -1951,8 +2048,7 @@ interface Int8Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -1976,8 +2072,7 @@ interface Int8Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2026,10 +2121,10 @@ interface Int8Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Int8Array; /** * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements @@ -2056,7 +2151,7 @@ interface Int8Array { } interface Int8ArrayConstructor { readonly prototype: Int8Array; - new(length: number): Int8Array; + new(length?: number): Int8Array; new(array: ArrayLike | ArrayBufferLike): Int8Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; @@ -2073,17 +2168,17 @@ interface Int8ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int8Array; + from(source: ArrayLike): Int8Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Int8Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } @@ -2117,13 +2212,13 @@ interface Uint8Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Uint8Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -2139,11 +2234,11 @@ interface Uint8Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Uint8Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -2152,7 +2247,7 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array; + filter(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): Uint8Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2163,7 +2258,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: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Uint8Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2174,7 +2269,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: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Uint8Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -2233,8 +2328,7 @@ interface Uint8Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2258,8 +2352,7 @@ interface Uint8Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2308,10 +2401,10 @@ interface Uint8Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Uint8Array; /** * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements @@ -2339,7 +2432,7 @@ interface Uint8Array { interface Uint8ArrayConstructor { readonly prototype: Uint8Array; - new(length: number): Uint8Array; + new(length?: number): Uint8Array; new(array: ArrayLike | ArrayBufferLike): Uint8Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; @@ -2356,17 +2449,17 @@ interface Uint8ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint8Array; + from(source: ArrayLike): Uint8Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Uint8Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -2399,13 +2492,13 @@ interface Uint8ClampedArray { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Uint8ClampedArray; /** * Determines whether all the members of an array satisfy the specified test. @@ -2421,11 +2514,11 @@ interface Uint8ClampedArray { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Uint8ClampedArray; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -2434,7 +2527,7 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray; + filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): Uint8ClampedArray; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2445,7 +2538,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: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2456,7 +2549,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: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -2515,8 +2608,7 @@ interface Uint8ClampedArray { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2540,8 +2632,7 @@ interface Uint8ClampedArray { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2590,10 +2681,10 @@ interface Uint8ClampedArray { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; /** * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements @@ -2621,7 +2712,7 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { readonly prototype: Uint8ClampedArray; - new(length: number): Uint8ClampedArray; + new(length?: number): Uint8ClampedArray; new(array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; @@ -2638,17 +2729,17 @@ interface Uint8ClampedArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + from(source: ArrayLike): Uint8ClampedArray; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -2680,13 +2771,13 @@ interface Int16Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Int16Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -2702,11 +2793,11 @@ interface Int16Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Int16Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -2715,7 +2806,7 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array; + filter(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): Int16Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2726,7 +2817,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: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Int16Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2737,7 +2828,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: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Int16Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -2795,8 +2886,7 @@ interface Int16Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2820,8 +2910,7 @@ interface Int16Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2870,10 +2959,10 @@ interface Int16Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Int16Array; /** * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements @@ -2901,7 +2990,7 @@ interface Int16Array { interface Int16ArrayConstructor { readonly prototype: Int16Array; - new(length: number): Int16Array; + new(length?: number): Int16Array; new(array: ArrayLike | ArrayBufferLike): Int16Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; @@ -2918,17 +3007,17 @@ interface Int16ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int16Array; + from(source: ArrayLike): Int16Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Int16Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } @@ -2962,13 +3051,13 @@ interface Uint16Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Uint16Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -2984,11 +3073,11 @@ interface Uint16Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Uint16Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -2997,7 +3086,7 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array; + filter(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): Uint16Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3008,7 +3097,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: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Uint16Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3019,7 +3108,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: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Uint16Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3078,8 +3167,7 @@ interface Uint16Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3103,8 +3191,7 @@ interface Uint16Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3153,10 +3240,10 @@ interface Uint16Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Uint16Array; /** * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements @@ -3184,7 +3271,7 @@ interface Uint16Array { interface Uint16ArrayConstructor { readonly prototype: Uint16Array; - new(length: number): Uint16Array; + new(length?: number): Uint16Array; new(array: ArrayLike | ArrayBufferLike): Uint16Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; @@ -3201,17 +3288,17 @@ interface Uint16ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint16Array; + from(source: ArrayLike): Uint16Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Uint16Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } @@ -3244,13 +3331,13 @@ interface Int32Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Int32Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -3266,11 +3353,11 @@ interface Int32Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Int32Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -3279,7 +3366,7 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array; + filter(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): Int32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3290,7 +3377,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: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Int32Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3301,7 +3388,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: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Int32Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3360,8 +3447,7 @@ interface Int32Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3385,8 +3471,7 @@ interface Int32Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3435,10 +3520,10 @@ interface Int32Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Int32Array; /** * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements @@ -3466,7 +3551,7 @@ interface Int32Array { interface Int32ArrayConstructor { readonly prototype: Int32Array; - new(length: number): Int32Array; + new(length?: number): Int32Array; new(array: ArrayLike | ArrayBufferLike): Int32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; @@ -3483,17 +3568,17 @@ interface Int32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int32Array; + from(source: ArrayLike): Int32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Int32Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -3526,13 +3611,13 @@ interface Uint32Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Uint32Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -3548,11 +3633,11 @@ interface Uint32Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Uint32Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -3561,7 +3646,7 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array; + filter(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): Uint32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3572,7 +3657,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: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Uint32Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3583,7 +3668,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: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Uint32Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3641,8 +3726,7 @@ interface Uint32Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3666,8 +3750,7 @@ interface Uint32Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3716,10 +3799,10 @@ interface Uint32Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Uint32Array; /** * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements @@ -3747,7 +3830,7 @@ interface Uint32Array { interface Uint32ArrayConstructor { readonly prototype: Uint32Array; - new(length: number): Uint32Array; + new(length?: number): Uint32Array; new(array: ArrayLike | ArrayBufferLike): Uint32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; @@ -3764,17 +3847,17 @@ interface Uint32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint32Array; + from(source: ArrayLike): Uint32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Uint32Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -3807,13 +3890,13 @@ interface Float32Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Float32Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -3829,11 +3912,11 @@ interface Float32Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Float32Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -3842,7 +3925,7 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array; + filter(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): Float32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3853,7 +3936,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: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Float32Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3864,7 +3947,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: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Float32Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -3923,8 +4006,7 @@ interface Float32Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3948,8 +4030,7 @@ interface Float32Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3998,10 +4079,10 @@ interface Float32Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Float32Array; /** * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements @@ -4029,7 +4110,7 @@ interface Float32Array { interface Float32ArrayConstructor { readonly prototype: Float32Array; - new(length: number): Float32Array; + new(length?: number): Float32Array; new(array: ArrayLike | ArrayBufferLike): Float32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; @@ -4046,17 +4127,17 @@ interface Float32ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Float32Array; + from(source: ArrayLike): Float32Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Float32Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } @@ -4090,13 +4171,13 @@ interface Float64Array { /** * Returns the this object after copying a section of the array identified by start and end * to the same array starting at position target - * @param target If target is negative, it is treated as length+target where length is the + * @param target If target is negative, it is treated as length + target where length is the * length of the array. - * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. + * @param start If start is negative, it is treated as length + start. If end is negative, it + * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): Float64Array; /** * Determines whether all the members of an array satisfy the specified test. @@ -4112,11 +4193,11 @@ interface Float64Array { * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array * @param value value to fill array section with * @param start index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. + * length + start where length is the length of the array. * @param end index to stop filling the array at. If end is negative, it is treated as - * length+end. + * length + end. */ - fill(value: number, start?: number, end?: number): this; + fill(value: number, start?: number, end?: number): Float64Array; /** * Returns the elements of an array that meet the condition specified in a callback function. @@ -4125,7 +4206,7 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the predicate function. * If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array; + filter(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): Float64Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -4136,7 +4217,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: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (value: number, index: number, obj: Float64Array) => unknown, thisArg?: any): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -4147,7 +4228,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: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number; + findIndex(predicate: (value: number, index: number, obj: Float64Array) => unknown, thisArg?: any): number; /** * Performs the specified action for each element in an array. @@ -4206,8 +4287,7 @@ interface Float64Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number; - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -4231,8 +4311,7 @@ interface Float64Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number; - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -4281,10 +4360,10 @@ interface Float64Array { * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * [11,2,22,1].sort((a, b) => a - b) + * [11, 2, 22, 1].sort((a, b) => a - b) * ``` */ - sort(compareFn?: (a: number, b: number) => number): this; + sort(compareFn?: (a: number, b: number) => number): Float64Array; /** * at begin, inclusive, up to end, exclusive. @@ -4303,7 +4382,7 @@ interface Float64Array { interface Float64ArrayConstructor { readonly prototype: Float64Array; - new(length: number): Float64Array; + new(length?: number): Float64Array; new(array: ArrayLike | ArrayBufferLike): Float64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; @@ -4320,17 +4399,17 @@ interface Float64ArrayConstructor { /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Float64Array; + from(source: ArrayLike): Float64Array; /** * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. + * @param source An array-like or iterable object to convert to an array. * @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: (v: T, k: number) => number, thisArg?: any): Float64Array; + from(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; diff --git a/src/lib/scripthost.d.ts b/src/lib/scripthost.d.ts index c3ac4a7e6560f..8dd04b3998770 100644 --- a/src/lib/scripthost.d.ts +++ b/src/lib/scripthost.d.ts @@ -175,7 +175,7 @@ declare var WScript: { /** * Creates a COM object. - * @param strProgiID + * @param strProgID * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. */ CreateObject(strProgID: string, strPrefix?: string): any; @@ -277,9 +277,9 @@ interface VBArray { ubound(dimension?: number): number; /** - * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions, + * Returns a JavaScript array with all the elements in the VBArray. If there are multiple dimensions, * each successive dimension is appended to the end of the array. - * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6] + * Example: [[1, 2, 3], [4, 5, 6]] becomes [1, 2, 3, 4, 5, 6] */ toArray(): T[]; } diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols index 941b19b32392b..b005c75a84fc4 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols @@ -3,9 +3,9 @@ var paired: any[]; >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) paired.reduce(function (a1, a2) { ->paired.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a1 : Symbol(a1, Decl(anyInferenceAnonymousFunctions.ts, 2, 24)) >a2 : Symbol(a2, Decl(anyInferenceAnonymousFunctions.ts, 2, 27)) @@ -15,9 +15,9 @@ paired.reduce(function (a1, a2) { } , []); paired.reduce((b1, b2) => { ->paired.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >b1 : Symbol(b1, Decl(anyInferenceAnonymousFunctions.ts, 8, 15)) >b2 : Symbol(b2, Decl(anyInferenceAnonymousFunctions.ts, 8, 18)) @@ -27,9 +27,9 @@ paired.reduce((b1, b2) => { } , []); paired.reduce((b3, b4) => b3.concat({}), []); ->paired.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) >b4 : Symbol(b4, Decl(anyInferenceAnonymousFunctions.ts, 13, 18)) >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.types b/tests/baselines/reference/anyInferenceAnonymousFunctions.types index d5f693b5453b4..8dc7fdcb90f1d 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.types +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.types @@ -4,9 +4,9 @@ var paired: any[]; paired.reduce(function (a1, a2) { >paired.reduce(function (a1, a2) { return a1.concat({});} , []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >function (a1, a2) { return a1.concat({});} : (a1: any, a2: any) => any >a1 : any >a2 : any @@ -23,9 +23,9 @@ paired.reduce(function (a1, a2) { paired.reduce((b1, b2) => { >paired.reduce((b1, b2) => { return b1.concat({});} , []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(b1, b2) => { return b1.concat({});} : (b1: any, b2: any) => any >b1 : any >b2 : any @@ -42,9 +42,9 @@ paired.reduce((b1, b2) => { paired.reduce((b3, b4) => b3.concat({}), []); >paired.reduce((b3, b4) => b3.concat({}), []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(b3, b4) => b3.concat({}) : (b3: any, b4: any) => any >b3 : any >b4 : any diff --git a/tests/baselines/reference/arrayFind.types b/tests/baselines/reference/arrayFind.types index 12eead1630cb8..9ba393d76212c 100644 --- a/tests/baselines/reference/arrayFind.types +++ b/tests/baselines/reference/arrayFind.types @@ -24,9 +24,9 @@ const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true] const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); >foundNumber : number >arrayOfStringsNumbersAndBooleans.find(isNumber) : number ->arrayOfStringsNumbersAndBooleans.find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>arrayOfStringsNumbersAndBooleans.find : { (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >arrayOfStringsNumbersAndBooleans : (string | number | boolean)[] ->find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>find : { (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >isNumber : (x: any) => x is number const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; @@ -37,8 +37,8 @@ const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBoolean const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); >readonlyFoundNumber : number >readonlyArrayOfStringsNumbersAndBooleans.find(isNumber) : number ->readonlyArrayOfStringsNumbersAndBooleans.find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>readonlyArrayOfStringsNumbersAndBooleans.find : { (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >readonlyArrayOfStringsNumbersAndBooleans : readonly (string | number | boolean)[] ->find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>find : { (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >isNumber : (x: any) => x is number diff --git a/tests/baselines/reference/arrayFlatMap.types b/tests/baselines/reference/arrayFlatMap.types index 0e36141f64b64..0c9bec17629ea 100644 --- a/tests/baselines/reference/arrayFlatMap.types +++ b/tests/baselines/reference/arrayFlatMap.types @@ -9,17 +9,17 @@ const readonlyArray: ReadonlyArray = []; array.flatMap((): ReadonlyArray => []); // ok >array.flatMap((): ReadonlyArray => []) : number[] ->array.flatMap : (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[] +>array.flatMap : (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[] >array : number[] ->flatMap : (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[] +>flatMap : (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[] >(): ReadonlyArray => [] : () => ReadonlyArray >[] : undefined[] readonlyArray.flatMap((): ReadonlyArray => []); // ok >readonlyArray.flatMap((): ReadonlyArray => []) : number[] ->readonlyArray.flatMap : (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[] +>readonlyArray.flatMap : (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[] >readonlyArray : readonly number[] ->flatMap : (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[] +>flatMap : (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[] >(): ReadonlyArray => [] : () => ReadonlyArray >[] : undefined[] diff --git a/tests/baselines/reference/arrayFrom.types b/tests/baselines/reference/arrayFrom.types index 8c755a6366f8a..17ef10842b65b 100644 --- a/tests/baselines/reference/arrayFrom.types +++ b/tests/baselines/reference/arrayFrom.types @@ -41,17 +41,17 @@ const inputASet = new Set(); const result1: A[] = Array.from(inputA); >result1 : A[] >Array.from(inputA) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputA : A[] const result2: A[] = Array.from(inputA.values()); >result2 : A[] >Array.from(inputA.values()) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputA.values() : IterableIterator >inputA.values : () => IterableIterator >inputA : A[] @@ -60,9 +60,9 @@ const result2: A[] = Array.from(inputA.values()); const result3: B[] = Array.from(inputA.values()); // expect error >result3 : B[] >Array.from(inputA.values()) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputA.values() : IterableIterator >inputA.values : () => IterableIterator >inputA : A[] @@ -71,9 +71,9 @@ const result3: B[] = Array.from(inputA.values()); // expect error const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); >result4 : A[] >Array.from(inputB, ({ b }): A => ({ a: b })) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputB : B[] >({ b }): A => ({ a: b }) : ({ b }: B) => A >b : string @@ -85,25 +85,25 @@ const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); const result5: A[] = Array.from(inputALike); >result5 : A[] >Array.from(inputALike) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputALike : ArrayLike const result6: B[] = Array.from(inputALike); // expect error >result6 : B[] >Array.from(inputALike) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputALike : ArrayLike const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); >result7 : B[] >Array.from(inputALike, ({ a }): B => ({ b: a })) : B[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputALike : ArrayLike >({ a }): B => ({ b: a }) : ({ a }: A) => B >a : string @@ -115,17 +115,17 @@ const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); const result8: A[] = Array.from(inputARand); >result8 : A[] >Array.from(inputARand) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputARand : ArrayLike | Iterable const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); >result9 : B[] >Array.from(inputARand, ({ a }): B => ({ b: a })) : B[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputARand : ArrayLike | Iterable >({ a }): B => ({ b: a }) : ({ a }: A) => B >a : string @@ -137,18 +137,18 @@ const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); const result10: A[] = Array.from(new Set()); >result10 : A[] >Array.from(new Set()) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >new Set() : Set >Set : SetConstructor const result11: B[] = Array.from(inputASet, ({ a }): B => ({ b: a })); >result11 : B[] >Array.from(inputASet, ({ a }): B => ({ b: a })) : B[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputASet : Set >({ a }): B => ({ b: a }) : ({ a }: A) => B >a : string diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index bfc87bff5d8dd..a35a090165b84 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -2,22 +2,18 @@ tests/cases/compiler/bigintWithLib.ts(4,1): error TS2350: Only a void function c tests/cases/compiler/bigintWithLib.ts(19,33): error TS2769: No overload matches this call. Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. - Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. - Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. - The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. - Type 'IteratorResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. - Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. - Type 'number' is not assignable to type 'bigint'. + Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigInt64Array', gave the following error. + Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. + Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. - Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] + Type 'number[]' is not assignable to type 'SharedArrayBuffer'. tests/cases/compiler/bigintWithLib.ts(24,13): error TS2540: Cannot assign to 'length' because it is a read-only property. tests/cases/compiler/bigintWithLib.ts(31,35): error TS2769: No overload matches this call. Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. - Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. - Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. + Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigUint64Array', gave the following error. + Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. tests/cases/compiler/bigintWithLib.ts(36,13): error TS2540: Cannot assign to 'length' because it is a read-only property. @@ -51,16 +47,12 @@ tests/cases/compiler/bigintWithLib.ts(46,26): error TS2345: Argument of type 'nu !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! error TS2769: Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. -!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. -!!! error TS2769: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. -!!! error TS2769: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. -!!! error TS2769: Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. -!!! error TS2769: Type 'number' is not assignable to type 'bigint'. +!!! error TS2769: Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigInt64Array', gave the following error. +!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. +!!! error TS2769: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] !!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. -!!! error TS2769: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] +!!! error TS2769: Type 'number[]' is not assignable to type 'SharedArrayBuffer'. bigIntArray = new BigInt64Array(new ArrayBuffer(80)); bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8); bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3); @@ -79,8 +71,8 @@ tests/cases/compiler/bigintWithLib.ts(46,26): error TS2345: Argument of type 'nu !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! error TS2769: Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. -!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. +!!! error TS2769: Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigUint64Array', gave the following error. +!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. !!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. bigUintArray = new BigUint64Array(new ArrayBuffer(80)); diff --git a/tests/baselines/reference/checkExportsObjectAssignProperty.types b/tests/baselines/reference/checkExportsObjectAssignProperty.types index 60fcd84477a12..77277f90ce369 100644 --- a/tests/baselines/reference/checkExportsObjectAssignProperty.types +++ b/tests/baselines/reference/checkExportsObjectAssignProperty.types @@ -176,9 +176,9 @@ m2.setonlyAccessor = 0; === tests/cases/conformance/jsdoc/mod1.js === Object.defineProperty(exports, "thing", { value: 42, writable: true }); >Object.defineProperty(exports, "thing", { value: 42, writable: true }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"thing" : "thing" >{ value: 42, writable: true } : { value: number; writable: true; } @@ -189,9 +189,9 @@ Object.defineProperty(exports, "thing", { value: 42, writable: true }); Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false }); >Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"readonlyProp" : "readonlyProp" >{ value: "Smith", writable: false } : { value: string; writable: false; } @@ -202,9 +202,9 @@ Object.defineProperty(exports, "readonlyProp", { value: "Smith", writable: false Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }); >Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"rwAccessors" : "rwAccessors" >{ get() { return 98122 }, set(_) { /*ignore*/ } } : { get(): number; set(_: any): void; } @@ -215,9 +215,9 @@ Object.defineProperty(exports, "rwAccessors", { get() { return 98122 }, set(_) { Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }); >Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"readonlyAccessor" : "readonlyAccessor" >{ get() { return 21.75 } } : { get(): number; } @@ -226,9 +226,9 @@ Object.defineProperty(exports, "readonlyAccessor", { get() { return 21.75 } }); Object.defineProperty(exports, "setonlyAccessor", { >Object.defineProperty(exports, "setonlyAccessor", { /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }}) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"setonlyAccessor" : "setonlyAccessor" >{ /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }} : { set(str: string): void; } @@ -252,9 +252,9 @@ Object.defineProperty(exports, "setonlyAccessor", { === tests/cases/conformance/jsdoc/mod2.js === Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }); >Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -267,9 +267,9 @@ Object.defineProperty(module.exports, "thing", { value: "yes", writable: true }) Object.defineProperty(module.exports, "readonlyProp", { value: "Smith", writable: false }); >Object.defineProperty(module.exports, "readonlyProp", { value: "Smith", writable: false }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -282,9 +282,9 @@ Object.defineProperty(module.exports, "readonlyProp", { value: "Smith", writable Object.defineProperty(module.exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }); >Object.defineProperty(module.exports, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -297,9 +297,9 @@ Object.defineProperty(module.exports, "rwAccessors", { get() { return 98122 }, s Object.defineProperty(module.exports, "readonlyAccessor", { get() { return 21.75 } }); >Object.defineProperty(module.exports, "readonlyAccessor", { get() { return 21.75 } }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -310,9 +310,9 @@ Object.defineProperty(module.exports, "readonlyAccessor", { get() { return 21.75 Object.defineProperty(module.exports, "setonlyAccessor", { >Object.defineProperty(module.exports, "setonlyAccessor", { /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }}) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports diff --git a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types index 6ea6a5ff129b8..1a24db4e9ec46 100644 --- a/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types +++ b/tests/baselines/reference/checkExportsObjectAssignPrototypeProperty.types @@ -129,9 +129,9 @@ Person.prototype.describe = function () { }; Object.defineProperty(Person.prototype, "thing", { value: 42, writable: true }); >Object.defineProperty(Person.prototype, "thing", { value: 42, writable: true }) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Person.prototype : any >Person : typeof Person >prototype : any @@ -144,9 +144,9 @@ Object.defineProperty(Person.prototype, "thing", { value: 42, writable: true }); Object.defineProperty(Person.prototype, "readonlyProp", { value: "Smith", writable: false }); >Object.defineProperty(Person.prototype, "readonlyProp", { value: "Smith", writable: false }) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Person.prototype : any >Person : typeof Person >prototype : any @@ -159,9 +159,9 @@ Object.defineProperty(Person.prototype, "readonlyProp", { value: "Smith", writab Object.defineProperty(Person.prototype, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }); >Object.defineProperty(Person.prototype, "rwAccessors", { get() { return 98122 }, set(_) { /*ignore*/ } }) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Person.prototype : any >Person : typeof Person >prototype : any @@ -174,9 +174,9 @@ Object.defineProperty(Person.prototype, "rwAccessors", { get() { return 98122 }, Object.defineProperty(Person.prototype, "readonlyAccessor", { get() { return 21.75 } }); >Object.defineProperty(Person.prototype, "readonlyAccessor", { get() { return 21.75 } }) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Person.prototype : any >Person : typeof Person >prototype : any @@ -187,9 +187,9 @@ Object.defineProperty(Person.prototype, "readonlyAccessor", { get() { return 21. Object.defineProperty(Person.prototype, "setonlyAccessor", { >Object.defineProperty(Person.prototype, "setonlyAccessor", { /** @param {string} str */ set(str) { this.rwAccessors = Number(str) }}) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Person.prototype : any >Person : typeof Person >prototype : any diff --git a/tests/baselines/reference/checkObjectDefineProperty.types b/tests/baselines/reference/checkObjectDefineProperty.types index 05f8b200c51f8..a96c2e2209571 100644 --- a/tests/baselines/reference/checkObjectDefineProperty.types +++ b/tests/baselines/reference/checkObjectDefineProperty.types @@ -89,9 +89,9 @@ const x = {}; Object.defineProperty(x, "name", { value: "Charles", writable: true }); >Object.defineProperty(x, "name", { value: "Charles", writable: true }) : typeof x ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >x : typeof x >"name" : "name" >{ value: "Charles", writable: true } : { value: string; writable: true; } @@ -102,9 +102,9 @@ Object.defineProperty(x, "name", { value: "Charles", writable: true }); Object.defineProperty(x, "middleInit", { value: "H" }); >Object.defineProperty(x, "middleInit", { value: "H" }) : typeof x ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >x : typeof x >"middleInit" : "middleInit" >{ value: "H" } : { value: string; } @@ -113,9 +113,9 @@ Object.defineProperty(x, "middleInit", { value: "H" }); Object.defineProperty(x, "lastName", { value: "Smith", writable: false }); >Object.defineProperty(x, "lastName", { value: "Smith", writable: false }) : typeof x ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >x : typeof x >"lastName" : "lastName" >{ value: "Smith", writable: false } : { value: string; writable: false; } @@ -126,9 +126,9 @@ Object.defineProperty(x, "lastName", { value: "Smith", writable: false }); Object.defineProperty(x, "zip", { get() { return 98122 }, set(_) { /*ignore*/ } }); >Object.defineProperty(x, "zip", { get() { return 98122 }, set(_) { /*ignore*/ } }) : typeof x ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >x : typeof x >"zip" : "zip" >{ get() { return 98122 }, set(_) { /*ignore*/ } } : { get(): number; set(_: any): void; } @@ -139,9 +139,9 @@ Object.defineProperty(x, "zip", { get() { return 98122 }, set(_) { /*ignore*/ } Object.defineProperty(x, "houseNumber", { get() { return 21.75 } }); >Object.defineProperty(x, "houseNumber", { get() { return 21.75 } }) : typeof x ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >x : typeof x >"houseNumber" : "houseNumber" >{ get() { return 21.75 } } : { get(): number; } @@ -150,9 +150,9 @@ Object.defineProperty(x, "houseNumber", { get() { return 21.75 } }); Object.defineProperty(x, "zipStr", { >Object.defineProperty(x, "zipStr", { /** @param {string} str */ set(str) { this.zip = Number(str) }}) : typeof x ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >x : typeof x >"zipStr" : "zipStr" >{ /** @param {string} str */ set(str) { this.zip = Number(str) }} : { set(str: string): void; } diff --git a/tests/baselines/reference/checkOtherObjectAssignProperty.types b/tests/baselines/reference/checkOtherObjectAssignProperty.types index 180ea63989945..0ffa9620bc5fc 100644 --- a/tests/baselines/reference/checkOtherObjectAssignProperty.types +++ b/tests/baselines/reference/checkOtherObjectAssignProperty.types @@ -89,9 +89,9 @@ const obj = { value: 42, writable: true }; Object.defineProperty(exports, "thing", obj); >Object.defineProperty(exports, "thing", obj) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"thing" : "thing" >obj : { value: number; writable: boolean; } @@ -106,9 +106,9 @@ let str = /** @type {string} */("other"); Object.defineProperty(exports, str, { value: 42, writable: true }); >Object.defineProperty(exports, str, { value: 42, writable: true }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >str : string >{ value: 42, writable: true } : { value: number; writable: true; } @@ -123,9 +123,9 @@ const propName = "prop" Object.defineProperty(exports, propName, { value: 42, writable: true }); >Object.defineProperty(exports, propName, { value: 42, writable: true }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >propName : "prop" >{ value: 42, writable: true } : { value: number; writable: true; } @@ -137,18 +137,18 @@ Object.defineProperty(exports, propName, { value: 42, writable: true }); Object.defineProperty(exports, "bad1", { }); >Object.defineProperty(exports, "bad1", { }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"bad1" : "bad1" >{ } : {} Object.defineProperty(exports, "bad2", { get() { return 12 }, value: "no" }); >Object.defineProperty(exports, "bad2", { get() { return 12 }, value: "no" }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"bad2" : "bad2" >{ get() { return 12 }, value: "no" } : { get(): number; value: string; } @@ -159,9 +159,9 @@ Object.defineProperty(exports, "bad2", { get() { return 12 }, value: "no" }); Object.defineProperty(exports, "bad3", { writable: true }); >Object.defineProperty(exports, "bad3", { writable: true }) : typeof import("tests/cases/conformance/jsdoc/mod1") ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >exports : typeof import("tests/cases/conformance/jsdoc/mod1") >"bad3" : "bad3" >{ writable: true } : { writable: true; } diff --git a/tests/baselines/reference/circularContextualReturnType.types b/tests/baselines/reference/circularContextualReturnType.types index 883cf67ba574c..78ebfe572f16c 100644 --- a/tests/baselines/reference/circularContextualReturnType.types +++ b/tests/baselines/reference/circularContextualReturnType.types @@ -3,9 +3,9 @@ Object.freeze({ >Object.freeze({ foo() { return Object.freeze('a'); },}) : Readonly<{ foo(): string; }> ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >{ foo() { return Object.freeze('a'); },} : { foo(): string; } foo() { @@ -13,9 +13,9 @@ Object.freeze({ return Object.freeze('a'); >Object.freeze('a') : string ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >'a' : "a" }, diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index b46b77f0f7641..d6108a9fc7db2 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -3325,94 +3325,6 @@ "text": "string", "kind": "keyword" }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "callbackfn", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "previousValue", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ",", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "currentValue", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, { "text": ",", "kind": "punctuation" @@ -3422,85 +3334,13 @@ "kind": "space" }, { - "text": "currentIndex", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ",", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "array", + "text": "initialValue", "kind": "parameterName" }, { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": "[", - "kind": "punctuation" - }, - { - "text": "]", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ",", + "text": "?", "kind": "punctuation" }, - { - "text": " ", - "kind": "space" - }, - { - "text": "initialValue", - "kind": "parameterName" - }, { "text": ":", "kind": "punctuation" @@ -4061,94 +3901,6 @@ "text": "string", "kind": "keyword" }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "callbackfn", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "previousValue", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ",", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "currentValue", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, { "text": ",", "kind": "punctuation" @@ -4158,85 +3910,13 @@ "kind": "space" }, { - "text": "currentIndex", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ",", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "array", + "text": "initialValue", "kind": "parameterName" }, { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": "[", - "kind": "punctuation" - }, - { - "text": "]", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ",", + "text": "?", "kind": "punctuation" }, - { - "text": " ", - "kind": "space" - }, - { - "text": "initialValue", - "kind": "parameterName" - }, { "text": ":", "kind": "punctuation" @@ -5633,7 +5313,7 @@ "kind": "space" }, { - "text": "Function used to determine the order of the elements. It is expected to return\r\na negative value if the first argument is less than the second argument, zero if they're equal, and a positive\r\nvalue otherwise. If omitted, the elements are sorted in ascending, ASCII character order.\r\n```ts\r\n[11,2,22,1].sort((a, b) => a - b)\r\n```", + "text": "Function used to determine the order of the elements. It is expected to return\r\na negative value if the first argument is less than the second argument, zero if they're equal, and a positive\r\nvalue otherwise. If omitted, the elements are sorted in ascending, ASCII character order.\r\n```ts\r\n[11, 2, 22, 1].sort((a, b) => a - b)\r\n```", "kind": "text" } ] @@ -5830,7 +5510,7 @@ "kind": "space" }, { - "text": "The zero-based location in the array from which to start removing elements.", + "text": "The zero-based index in the array from which to start removing elements.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index 5dce64b756ea7..a7a7e3545ffbc 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -3176,7 +3176,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index c09142c2a916f..4e48ea7911da3 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -4097,7 +4097,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -11170,7 +11170,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -15996,7 +15996,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -23069,7 +23069,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -27146,7 +27146,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -32379,7 +32379,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -36410,7 +36410,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -41597,7 +41597,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -46830,7 +46830,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -52063,7 +52063,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -57296,7 +57296,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -61368,7 +61368,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -65440,7 +65440,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -69512,7 +69512,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -73584,7 +73584,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -77656,7 +77656,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -81728,7 +81728,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -86249,7 +86249,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -91607,7 +91607,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -96113,7 +96113,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index 99a71cece8017..2354226b2c9ff 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -4931,7 +4931,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -11159,7 +11159,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -17023,7 +17023,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -22688,7 +22688,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -28479,7 +28479,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -34707,7 +34707,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -40600,7 +40600,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index 4e3bcb801455d..256c7ab3254b7 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -3366,7 +3366,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -7083,7 +7083,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -11178,7 +11178,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index 4fac96f0abb80..def966c4093ef 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -3083,7 +3083,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -7578,7 +7578,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -11521,7 +11521,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] @@ -15800,7 +15800,7 @@ ], "documentation": [ { - "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.", + "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.", "kind": "text" } ] diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index 0d3fe39d755c9..30f3cd57fecb5 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -181,7 +181,7 @@ ], "documentation": [ { - "text": "Returns the Unicode value of the character at the specified location.", + "text": "Returns a non-negative integer less than 65536 (0x10000) that is the code unit value of the character at the specified index.", "kind": "text" } ], @@ -753,7 +753,7 @@ ], "documentation": [ { - "text": "Determines whether two strings are equivalent in the current locale.", + "text": "Determines whether the reference string comes before, after or is equivalent to the specified string in the current locale.\r\nReturns a negative integer if it comes before, a positive number if it comes after, and 0 if they are equivalent.", "kind": "text" } ], @@ -770,7 +770,7 @@ "kind": "space" }, { - "text": "String to compare to target string", + "text": "The string to compare to.", "kind": "text" } ] @@ -883,7 +883,7 @@ "kind": "space" }, { - "text": "A variable name or string literal containing the regular expression pattern and flags.", + "text": "The regular expression for matching. If the provided value is not a RegExp, it is implicitly\r\nconverted to a RegExp by using `new RegExp(regexp)`.", "kind": "text" } ] @@ -1031,7 +1031,7 @@ ], "documentation": [ { - "text": "Replaces text in a string, using a regular expression or search string.", + "text": "Replaces one or more occurrences of substrings that match a search string or a regular expression.\r\nOnly the first occurrence will be replaced unless a RegExp with a `g` (global) flag is used.", "kind": "text" } ], @@ -1048,7 +1048,7 @@ "kind": "space" }, { - "text": "A string to search for.", + "text": "A string or RegExp search value.", "kind": "text" } ] @@ -1065,7 +1065,7 @@ "kind": "space" }, { - "text": "A string containing the text to replace for every successful match of searchValue in this string.", + "text": "The replacement text.", "kind": "text" } ] @@ -1178,7 +1178,7 @@ "kind": "space" }, { - "text": "The regular expression pattern and applicable flags.", + "text": "The regular expression for matching. If the provided value is not a RegExp, it is implicitly\r\nconverted to a RegExp by using `new RegExp(regexp)`.", "kind": "text" } ] @@ -1307,7 +1307,7 @@ "kind": "space" }, { - "text": "The index to the beginning of the specified portion of stringObj.", + "text": "The index to the beginning of the specified portion of the string.", "kind": "text" } ] @@ -1324,7 +1324,7 @@ "kind": "space" }, { - "text": "The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf this value is not specified, the substring continues to the end of stringObj.", + "text": "The index to the end of the specified portion of the string. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf this value is not specified, the substring continues to the end of the string.", "kind": "text" } ] @@ -1598,7 +1598,7 @@ ], "documentation": [ { - "text": "Returns the substring at the specified location within a String object.", + "text": "Returns the substring beginning at the specified index within a String object.", "kind": "text" } ], @@ -1615,7 +1615,7 @@ "kind": "space" }, { - "text": "The zero-based index number indicating the beginning of the substring.", + "text": "The zero-based index indicating the beginning of the substring.", "kind": "text" } ] @@ -1632,7 +1632,7 @@ "kind": "space" }, { - "text": "Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf end is omitted, the characters from start through the end of the original string are returned.", + "text": "The zero-based index indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\nIf end is omitted, the characters from start through the end of the original string are returned.", "kind": "text" } ] @@ -2262,7 +2262,7 @@ ], "documentation": [ { - "text": "Gets a substring beginning at the specified location and having the specified length.", + "text": "Gets a substring beginning at the specified index and having the specified length.", "kind": "text" } ], @@ -2288,7 +2288,7 @@ "kind": "space" }, { - "text": "The starting position of the desired substring. The index of the first character in the string is zero.", + "text": "The starting index of the desired substring. The index of the first character in the string is zero.", "kind": "text" } ] diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.symbols b/tests/baselines/reference/conditionalTypeDoesntSpinForever.symbols index b5dcb78015b3f..3e2f1b61b791a 100644 --- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.symbols +++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.symbols @@ -77,9 +77,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) as BuildPubSubRecordType >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 21, 45)) >name : Symbol(name, Decl(conditionalTypeDoesntSpinForever.ts, 24, 56)) >instance : Symbol(instance, Decl(conditionalTypeDoesntSpinForever.ts, 23, 19)) @@ -133,9 +133,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 34, 44)) >storedAs : Symbol(storedAs, Decl(conditionalTypeDoesntSpinForever.ts, 37, 56)) >PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString : Symbol(PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString, Decl(conditionalTypeDoesntSpinForever.ts, 4, 28)) @@ -154,9 +154,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 34, 44)) >storedAs : Symbol(storedAs, Decl(conditionalTypeDoesntSpinForever.ts, 40, 56)) >PubSubRecordIsStoredInRedisAsA.redisHash : Symbol(PubSubRecordIsStoredInRedisAsA.redisHash, Decl(conditionalTypeDoesntSpinForever.ts, 3, 44)) @@ -217,9 +217,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) as BuildPubSubRecordType >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 51, 51)) >identifier : Symbol(identifier, Decl(conditionalTypeDoesntSpinForever.ts, 54, 56)) >instance : Symbol(instance, Decl(conditionalTypeDoesntSpinForever.ts, 53, 25)) @@ -271,9 +271,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) as BuildPubSubRecordType >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 63, 47)) >record : Symbol(record, Decl(conditionalTypeDoesntSpinForever.ts, 66, 56)) >instance : Symbol(instance, Decl(conditionalTypeDoesntSpinForever.ts, 65, 21)) @@ -327,9 +327,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType, >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 76, 68)) >maxMsToWaitBeforePublishing : Symbol(maxMsToWaitBeforePublishing, Decl(conditionalTypeDoesntSpinForever.ts, 79, 56)) >instance : Symbol(instance, Decl(conditionalTypeDoesntSpinForever.ts, 78, 36)) @@ -342,9 +342,9 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, >buildPubSubRecordType : Symbol(buildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 108, 7)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 76, 68)) >maxMsToWaitBeforePublishing : Symbol(maxMsToWaitBeforePublishing, Decl(conditionalTypeDoesntSpinForever.ts, 81, 56)) >BuildPubSubRecordType : Symbol(BuildPubSubRecordType, Decl(conditionalTypeDoesntSpinForever.ts, 98, 4)) @@ -450,9 +450,9 @@ export enum PubSubRecordIsStoredInRedisAsA { >SO_FAR : Symbol(SO_FAR, Decl(conditionalTypeDoesntSpinForever.ts, 108, 33)) >soFar : Symbol(soFar, Decl(conditionalTypeDoesntSpinForever.ts, 108, 41)) >SO_FAR : Symbol(SO_FAR, Decl(conditionalTypeDoesntSpinForever.ts, 108, 33)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) {}, buildNameFieldConstructor(soFar), diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types index c1eee6deff83f..09235dcd3f961 100644 --- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types +++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types @@ -68,10 +68,10 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE}) : BuildPubSubRecordType >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType >Object.assign({}, soFar, {name: instance as TYPE}) as SO_FAR & {name: TYPE} : SO_FAR & { name: TYPE; } ->Object.assign({}, soFar, {name: instance as TYPE}) : SO_FAR & { name: TYPE; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {name: instance as TYPE}) : Writable & Writable<{ name: TYPE; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR >{name: instance as TYPE} : { name: TYPE; } @@ -120,12 +120,12 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) as BuildPubSubRecordType : BuildPubSubRecordType ->buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) : BuildPubSubRecordType +>buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString})) : BuildPubSubRecordType & Writable<{ storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString; }>> >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType ->Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString}) : SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString}) : Writable & Writable<{ storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR >{storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString} : { storedAs: PubSubRecordIsStoredInRedisAsA.jsonEncodedRedisString; } @@ -144,12 +144,12 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as >buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) as BuildPubSubRecordType : BuildPubSubRecordType ->buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) : BuildPubSubRecordType +>buildPubSubRecordType(Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash})) : BuildPubSubRecordType & Writable<{ storedAs: PubSubRecordIsStoredInRedisAsA.redisHash; }>> >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType ->Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash}) : SO_FAR & { storedAs: PubSubRecordIsStoredInRedisAsA; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {storedAs: PubSubRecordIsStoredInRedisAsA.redisHash}) : Writable & Writable<{ storedAs: PubSubRecordIsStoredInRedisAsA.redisHash; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR >{storedAs: PubSubRecordIsStoredInRedisAsA.redisHash} : { storedAs: PubSubRecordIsStoredInRedisAsA.redisHash; } @@ -212,10 +212,10 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE}) : BuildPubSubRecordType >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType >Object.assign({}, soFar, {identifier: instance as TYPE}) as SO_FAR & {identifier: TYPE} : SO_FAR & { identifier: TYPE; } ->Object.assign({}, soFar, {identifier: instance as TYPE}) : SO_FAR & { identifier: TYPE; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {identifier: instance as TYPE}) : Writable & Writable<{ identifier: TYPE; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR >{identifier: instance as TYPE} : { identifier: TYPE; } @@ -264,10 +264,10 @@ export enum PubSubRecordIsStoredInRedisAsA { >buildPubSubRecordType(Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE}) : BuildPubSubRecordType >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType >Object.assign({}, soFar, {record: instance as TYPE}) as SO_FAR & {record: TYPE} : SO_FAR & { record: TYPE; } ->Object.assign({}, soFar, {record: instance as TYPE}) : SO_FAR & { record: TYPE; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {record: instance as TYPE}) : Writable & Writable<{ record: TYPE; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR >{record: instance as TYPE} : { record: TYPE; } @@ -318,12 +318,12 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType, >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) as BuildPubSubRecordType : BuildPubSubRecordType ->buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) : BuildPubSubRecordType +>buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance})) : BuildPubSubRecordType & Writable<{ maxMsToWaitBeforePublishing: number; }>> >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType ->Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance}) : SO_FAR & { maxMsToWaitBeforePublishing: number; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {maxMsToWaitBeforePublishing: instance}) : Writable & Writable<{ maxMsToWaitBeforePublishing: number; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR >{maxMsToWaitBeforePublishing: instance} : { maxMsToWaitBeforePublishing: number; } @@ -337,16 +337,16 @@ export enum PubSubRecordIsStoredInRedisAsA { buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType, >buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) as BuildPubSubRecordType : BuildPubSubRecordType ->buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) : BuildPubSubRecordType +>buildPubSubRecordType(Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0})) : BuildPubSubRecordType & Writable<{ maxMsToWaitBeforePublishing: 0; }>> >buildPubSubRecordType : (soFar: SO_FAR) => BuildPubSubRecordType ->Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0}) : SO_FAR & { maxMsToWaitBeforePublishing: number; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, soFar, {maxMsToWaitBeforePublishing: 0}) : Writable & Writable<{ maxMsToWaitBeforePublishing: 0; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >soFar : SO_FAR ->{maxMsToWaitBeforePublishing: 0} : { maxMsToWaitBeforePublishing: number; } ->maxMsToWaitBeforePublishing : number +>{maxMsToWaitBeforePublishing: 0} : { maxMsToWaitBeforePublishing: 0; } +>maxMsToWaitBeforePublishing : 0 >0 : 0 >maxMsToWaitBeforePublishing : 0 } @@ -441,9 +441,9 @@ export enum PubSubRecordIsStoredInRedisAsA { >soFar : SO_FAR >Object.assign( {}, buildNameFieldConstructor(soFar), buildIdentifierFieldConstructor(soFar), buildRecordFieldConstructor(soFar), buildStoredAsConstructor(soFar), buildMaxMsToWaitBeforePublishingFieldConstructor(soFar), buildType(soFar) ) as BuildPubSubRecordType : BuildPubSubRecordType >Object.assign( {}, buildNameFieldConstructor(soFar), buildIdentifierFieldConstructor(soFar), buildRecordFieldConstructor(soFar), buildStoredAsConstructor(soFar), buildMaxMsToWaitBeforePublishingFieldConstructor(soFar), buildType(soFar) ) : any ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } {}, >{} : {} diff --git a/tests/baselines/reference/contextualSignatureInObjectFreeze.types b/tests/baselines/reference/contextualSignatureInObjectFreeze.types index a2d8418cbf0b0..ae666dfb1124b 100644 --- a/tests/baselines/reference/contextualSignatureInObjectFreeze.types +++ b/tests/baselines/reference/contextualSignatureInObjectFreeze.types @@ -3,9 +3,9 @@ Object.freeze({ >Object.freeze({ f: function () { }}) : Readonly<{ f: () => void; }> ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >{ f: function () { }} : { f: () => void; } f: function () { } diff --git a/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.symbols b/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.symbols index 659edb5ddca3c..981f13e3820d6 100644 --- a/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.symbols +++ b/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.symbols @@ -113,9 +113,9 @@ export const C = styled.div``; >div : Symbol(StyledInterface.div, Decl(index.d.ts, 12, 34)) export default Object.assign(A, { ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >A : Symbol(A, Decl(index.ts, 2, 5)) B, diff --git a/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.types b/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.types index 9d05d21a2fdd6..acc7ad58c4137 100644 --- a/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.types +++ b/tests/baselines/reference/declarationEmitObjectAssignedDefaultExport.types @@ -77,10 +77,10 @@ export const C = styled.div``; >`` : "" export default Object.assign(A, { ->Object.assign(A, { B, C}) : string & import("tests/cases/compiler/node_modules/styled-components/index").StyledComponentBase<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never> & import("tests/cases/compiler/node_modules/styled-components/node_modules/hoist-non-react-statics/index").NonReactStatics<"div"> & { B: import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never>; C: import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never>; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign(A, { B, C}) : string & import("tests/cases/compiler/node_modules/styled-components/index").StyledComponentBase<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never> & import("tests/cases/compiler/node_modules/styled-components/node_modules/hoist-non-react-statics/index").NonReactStatics<"div"> & Writable<{ B: import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never>; C: import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never>; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >A : import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never> >{ B, C} : { B: import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never>; C: import("tests/cases/compiler/node_modules/styled-components/index").StyledComponent<"div", import("tests/cases/compiler/node_modules/styled-components/index").DefaultTheme, {}, never>; } diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js index ddc78e9effe40..1babd29ba16dc 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js @@ -94,43 +94,43 @@ void p3.result.three; //// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts] export declare type Key = keyof U; export declare type Value, U> = U[K]; -export declare const updateIfChanged: (t: T) => ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any & { +export declare const updateIfChanged: (t: T) => ((key: K) => (>(key: K_1) => (>>(key: K_2) => (>>>(key: K_3) => (>>>>(key: K_4) => (>>>>>(key: K_5) => (>>>>>>(key: K_6) => (>>>>>>>(key: K_7) => (>>>>>>>>(key: K_8) => (>>>>>>>>>(key: K_9) => (>>>>>>>>>>(key: K_10) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; -}) & { +}>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; -}) & { +}>) & Writable<{ map: (updater: (u: T) => T) => T; set: (newU: T) => T; -}; +}>; export declare const testRecFun: (parent: T) => { result: T; deeper: (child: U) => { diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.symbols b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.symbols index 08c4eccca0829..bfbdd6084157c 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.symbols +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.symbols @@ -47,9 +47,9 @@ export const updateIfChanged = (t: T) => { >newU : Symbol(newU, Decl(declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts, 8, 21)) return Object.assign( ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >(key: K) => >K : Symbol(K, Decl(declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts, 10, 13)) @@ -76,9 +76,9 @@ export const updateIfChanged = (t: T) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); >update : Symbol(update, Decl(declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts, 7, 28)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types index 4e4bf5b76933a..1bef7f2379546 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types @@ -10,13 +10,13 @@ export type Value, U> = U[K]; >Value : Value export const updateIfChanged = (t: T) => { ->updateIfChanged : (t: T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: T) => T) => T; set: (newU: T) => T; } ->(t: T) => { const reduce = (u: U, update: (u: U) => T) => { const set = (newU: U) => Object.is(u, newU) ? t : update(newU); return Object.assign( >(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }), { map: (updater: (u: U) => U) => set(updater(u)), set }); }; return reduce(t, (t: T) => t);} : (t: T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: T) => T) => T; set: (newU: T) => T; } +>updateIfChanged : (t: T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: T) => T) => T; set: (newU: T) => T; }> +>(t: T) => { const reduce = (u: U, update: (u: U) => T) => { const set = (newU: U) => Object.is(u, newU) ? t : update(newU); return Object.assign( >(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }), { map: (updater: (u: U) => U) => set(updater(u)), set }); }; return reduce(t, (t: T) => t);} : (t: T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: T) => T) => T; set: (newU: T) => T; }> >t : T const reduce = (u: U, update: (u: U) => T) => { ->reduce : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: U) => U) => T; set: (newU: U) => T; } ->(u: U, update: (u: U) => T) => { const set = (newU: U) => Object.is(u, newU) ? t : update(newU); return Object.assign( >(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }), { map: (updater: (u: U) => U) => set(updater(u)), set }); } : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: U) => U) => T; set: (newU: U) => T; } +>reduce : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: U) => U) => T; set: (newU: U) => T; }> +>(u: U, update: (u: U) => T) => { const set = (newU: U) => Object.is(u, newU) ? t : update(newU); return Object.assign( >(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }), { map: (updater: (u: U) => U) => set(updater(u)), set }); } : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: U) => U) => T; set: (newU: U) => T; }> >u : U >update : (u: U) => T >u : U @@ -38,18 +38,18 @@ export const updateIfChanged = (t: T) => { >newU : U return Object.assign( ->Object.assign( >(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }), { map: (updater: (u: U) => U) => set(updater(u)), set }) : ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: U) => U) => T; set: (newU: U) => T; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign( >(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }), { map: (updater: (u: U) => U) => set(updater(u)), set }) : ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: U) => U) => T; set: (newU: U) => T; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >(key: K) => ->>(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }) : (key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; } +>>(key: K) => reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }) : (key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }> >key : K reduce>(u[key as keyof U] as Value, (v: Value) => { ->reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }) : (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => (>>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>>) => Value>>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; } ->reduce : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: U) => U) => T; set: (newU: U) => T; } +>reduce>(u[key as keyof U] as Value, (v: Value) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); }) : (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => (>>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>>) => Value>>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }> +>reduce : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: U) => U) => T; set: (newU: U) => T; }> >u[key as keyof U] as Value : Value >u[key as keyof U] : U[keyof U] >u : U @@ -61,10 +61,10 @@ export const updateIfChanged = (t: T) => { return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })); >update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v })) : T >update : (u: U) => T ->Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v }) : U & { [x: string]: Value; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v }) : Writable & Writable<{ [x: string]: Value; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Array.isArray(u) ? [] : {} : undefined[] | {} >Array.isArray(u) : boolean >Array.isArray : (arg: any) => arg is any[] @@ -95,8 +95,8 @@ export const updateIfChanged = (t: T) => { }; return reduce(t, (t: T) => t); ->reduce(t, (t: T) => t) : ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: T) => T) => T; set: (newU: T) => T; } ->reduce : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & { map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }) & { map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }) & { map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }) & { map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }) & { map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }) & { map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }) & { map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }) & { map: (updater: (u: U) => U) => T; set: (newU: U) => T; } +>reduce(t, (t: T) => t) : ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: T) => T) => T; set: (newU: T) => T; }> +>reduce : (u: U, update: (u: U) => T) => ((key: K) => (>(key: K) => (>>(key: K) => (>>>(key: K) => (>>>>(key: K) => (>>>>>(key: K) => (>>>>>>(key: K) => (>>>>>>>(key: K) => (>>>>>>>>(key: K) => (>>>>>>>>>(key: K) => (>>>>>>>>>>(key: K) => any & Writable<{ map: (updater: (u: Value>>>>>>>>>>) => Value>>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>>) => Value>>>>>>>>>) => T; set: (newU: Value>>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>>) => Value>>>>>>>>) => T; set: (newU: Value>>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>>) => Value>>>>>>>) => T; set: (newU: Value>>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>>) => Value>>>>>>) => T; set: (newU: Value>>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>>) => Value>>>>>) => T; set: (newU: Value>>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>>) => Value>>>>) => T; set: (newU: Value>>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>>) => Value>>>) => T; set: (newU: Value>>>) => T; }>) & Writable<{ map: (updater: (u: Value>>) => Value>>) => T; set: (newU: Value>>) => T; }>) & Writable<{ map: (updater: (u: Value>) => Value>) => T; set: (newU: Value>) => T; }>) & Writable<{ map: (updater: (u: Value) => Value) => T; set: (newU: Value) => T; }>) & Writable<{ map: (updater: (u: U) => U) => T; set: (newU: U) => T; }> >t : T >(t: T) => t : (t: T) => T >t : T diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index f14e058fd3620..1db6a015d9c7e 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1482:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1572:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/destructuringTuple.errors.txt b/tests/baselines/reference/destructuringTuple.errors.txt index b68681eca59b1..59142e251958c 100644 --- a/tests/baselines/reference/destructuringTuple.errors.txt +++ b/tests/baselines/reference/destructuringTuple.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/destructuringTuple.ts(11,7): error TS2461: Type 'number' is not an array type. tests/cases/compiler/destructuringTuple.ts(11,48): error TS2769: No overload matches this call. - Overload 1 of 3, '(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number', gave the following error. + Overload 1 of 2, '(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number', gave the following error. Type 'never[]' is not assignable to type 'number'. - Overload 2 of 3, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. + Overload 2 of 2, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. Type 'never[]' is not assignable to type '[]'. Target allows only 0 element(s) but source may have more. tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload matches this call. @@ -28,13 +28,13 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat !!! error TS2461: Type 'number' is not an array type. ~~~~~~~~~~~~~~~ !!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 3, '(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number', gave the following error. +!!! error TS2769: Overload 1 of 2, '(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number', gave the following error. !!! error TS2769: Type 'never[]' is not assignable to type 'number'. -!!! error TS2769: Overload 2 of 3, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. +!!! error TS2769: Overload 2 of 2, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. !!! error TS2769: Type 'never[]' is not assignable to type '[]'. !!! error TS2769: Target allows only 0 element(s) but source may have more. -!!! related TS6502 /.ts/lib.es5.d.ts:1447:24: The expected type comes from the return type of this signature. -!!! related TS6502 /.ts/lib.es5.d.ts:1453:27: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1538:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1544:27: The expected type comes from the return type of this signature. ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. diff --git a/tests/baselines/reference/destructuringTuple.symbols b/tests/baselines/reference/destructuringTuple.symbols index 82e006ca8c194..6c6632a2f1ca1 100644 --- a/tests/baselines/reference/destructuringTuple.symbols +++ b/tests/baselines/reference/destructuringTuple.symbols @@ -21,8 +21,8 @@ declare var receiver: typeof tuple; const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []); >oops1 : Symbol(oops1, Decl(destructuringTuple.ts, 10, 7)) ->[1, 2, 3].reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>[1, 2, 3].reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >accu : Symbol(accu, Decl(destructuringTuple.ts, 10, 34)) >el : Symbol(el, Decl(destructuringTuple.ts, 10, 39)) >accu.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -32,8 +32,8 @@ const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []); const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []); >oops2 : Symbol(oops2, Decl(destructuringTuple.ts, 12, 7)) ->[1, 2, 3].reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>[1, 2, 3].reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >acc : Symbol(acc, Decl(destructuringTuple.ts, 12, 34)) >e : Symbol(e, Decl(destructuringTuple.ts, 12, 48)) >acc.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/destructuringTuple.types b/tests/baselines/reference/destructuringTuple.types index 0227d82572ddc..97ab455fcd4d9 100644 --- a/tests/baselines/reference/destructuringTuple.types +++ b/tests/baselines/reference/destructuringTuple.types @@ -25,12 +25,12 @@ declare var receiver: typeof tuple; const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []); >oops1 : any >[1, 2, 3].reduce((accu, el) => accu.concat(el), []) : number ->[1, 2, 3].reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>[1, 2, 3].reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(accu, el) => accu.concat(el) : (accu: [], el: number) => never[] >accu : [] >el : number @@ -44,12 +44,12 @@ const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []); const [oops2] = [1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []); >oops2 : number >[1, 2, 3].reduce((acc: number[], e) => acc.concat(e), []) : number[] ->[1, 2, 3].reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>[1, 2, 3].reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(acc: number[], e) => acc.concat(e) : (acc: number[], e: number) => number[] >acc : number[] >e : number diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index 727e05c2639ef..99e5fa0cbc232 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt +++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt @@ -10,8 +10,8 @@ tests/cases/conformance/types/members/duplicateNumericIndexers.ts(24,5): error T tests/cases/conformance/types/members/duplicateNumericIndexers.ts(25,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(29,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(30,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(523,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(1468,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(617,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(1558,5): error TS2374: Duplicate index signature for type 'number'. ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ==== diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols index db63f98e5ae99..b22564f9455b6 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols @@ -4,7 +4,7 @@ interface Array { >T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 11)) >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 24)) >T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) @@ -21,7 +21,7 @@ interface Array { >T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 14)) >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 27)) @@ -44,9 +44,9 @@ var a: Array; var r5 = a.reduce((x, y) => x + y); >r5 : Symbol(r5, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 3)) ->a.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>a.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >a : Symbol(a, Decl(duplicateOverloadInTypeAugmentation1.ts, 6, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >x : Symbol(x, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 19)) >y : Symbol(y, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 21)) >x : Symbol(x, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 19)) diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types index ab043d9b24cd6..d54d6f9d69910 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types @@ -1,7 +1,7 @@ === tests/cases/compiler/duplicateOverloadInTypeAugmentation1.ts === interface Array { reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, ->reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >callbackfn : (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T >previousValue : T >currentValue : T @@ -12,7 +12,7 @@ interface Array { >initialValue : T reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, ->reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >callbackfn : (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U >previousValue : U >currentValue : T @@ -28,9 +28,9 @@ var a: Array; var r5 = a.reduce((x, y) => x + y); >r5 : string >a.reduce((x, y) => x + y) : string ->a.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>a.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >a : string[] ->reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: string, y: string) => string >x : string >y : string diff --git a/tests/baselines/reference/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.types b/tests/baselines/reference/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.types index c566d1897b08d..cf4beacdfc810 100644 --- a/tests/baselines/reference/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.types +++ b/tests/baselines/reference/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.types @@ -14,9 +14,9 @@ module.exports = 12; Object.defineProperty(module, "exports", { value: "oh no" }); >Object.defineProperty(module, "exports", { value: "oh no" }) : typeof module ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module : typeof module >"exports" : "exports" >{ value: "oh no" } : { value: string; } @@ -59,9 +59,9 @@ B.NS = require("./namespacey"); Object.defineProperty(B, "NS", { value: "why though", writable: true }); >Object.defineProperty(B, "NS", { value: "why though", writable: true }) : typeof B ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >B : typeof B >"NS" : "NS" >{ value: "why though", writable: true } : { value: string; writable: true; } diff --git a/tests/baselines/reference/es2018ObjectAssign.symbols b/tests/baselines/reference/es2018ObjectAssign.symbols index 3ed140cb570d3..3f27f2158d345 100644 --- a/tests/baselines/reference/es2018ObjectAssign.symbols +++ b/tests/baselines/reference/es2018ObjectAssign.symbols @@ -1,9 +1,9 @@ === tests/cases/compiler/es2018ObjectAssign.ts === const test = Object.assign({}, { test: true }); >test : Symbol(test, Decl(es2018ObjectAssign.ts, 0, 5)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >test : Symbol(test, Decl(es2018ObjectAssign.ts, 0, 32)) declare const p: Promise; diff --git a/tests/baselines/reference/es2018ObjectAssign.types b/tests/baselines/reference/es2018ObjectAssign.types index e8cc1927c5caf..7e85abc8fe285 100644 --- a/tests/baselines/reference/es2018ObjectAssign.types +++ b/tests/baselines/reference/es2018ObjectAssign.types @@ -1,10 +1,10 @@ === tests/cases/compiler/es2018ObjectAssign.ts === const test = Object.assign({}, { test: true }); ->test : { test: boolean; } ->Object.assign({}, { test: true }) : { test: boolean; } ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>test : Writable<{ test: boolean; }> +>Object.assign({}, { test: true }) : Writable<{ test: boolean; }> +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >{ test: true } : { test: true; } >test : true diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types index 79e54575127f7..8845f1a09b15a 100644 --- a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types @@ -307,9 +307,9 @@ export class IterableWeakMap implements WeakMap { Object.defineProperties(IterableWeakMap.prototype, { >Object.defineProperties(IterableWeakMap.prototype, { [Symbol.iterator]: { configurable: true, enumerable: false, writable: true, value: Object.getOwnPropertyDescriptor( IterableWeakMap.prototype, "entries", )!.value, }, [Symbol.toStringTag]: { configurable: true, enumerable: false, writable: false, value: "IterableWeakMap", },}) : IterableWeakMap ->Object.defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T +>Object.defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T >Object : ObjectConstructor ->defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T +>defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T >IterableWeakMap.prototype : IterableWeakMap >IterableWeakMap : typeof IterableWeakMap >prototype : IterableWeakMap @@ -339,9 +339,9 @@ Object.defineProperties(IterableWeakMap.prototype, { >Object.getOwnPropertyDescriptor( IterableWeakMap.prototype, "entries", )!.value : any >Object.getOwnPropertyDescriptor( IterableWeakMap.prototype, "entries", )! : PropertyDescriptor >Object.getOwnPropertyDescriptor( IterableWeakMap.prototype, "entries", ) : PropertyDescriptor | undefined ->Object.getOwnPropertyDescriptor : (o: any, p: PropertyKey) => PropertyDescriptor | undefined +>Object.getOwnPropertyDescriptor : (o: {}, p: PropertyKey) => PropertyDescriptor | undefined >Object : ObjectConstructor ->getOwnPropertyDescriptor : (o: any, p: PropertyKey) => PropertyDescriptor | undefined +>getOwnPropertyDescriptor : (o: {}, p: PropertyKey) => PropertyDescriptor | undefined IterableWeakMap.prototype, >IterableWeakMap.prototype : IterableWeakMap diff --git a/tests/baselines/reference/excessPropertyCheckWithEmptyObject.types b/tests/baselines/reference/excessPropertyCheckWithEmptyObject.types index 3c748f7fd923b..6e19f04737b72 100644 --- a/tests/baselines/reference/excessPropertyCheckWithEmptyObject.types +++ b/tests/baselines/reference/excessPropertyCheckWithEmptyObject.types @@ -4,9 +4,9 @@ // Excess property error expected here Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false }); >Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false }) : Window & typeof globalThis ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >window : Window & typeof globalThis >"prop" : "prop" >{ value: "v1.0.0", readonly: false } : { value: string; readonly: boolean; } diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index db7d505bba102..e35136aa6c7f5 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -66,20 +66,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat var d=new XDate(); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:933:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. d.getDay(); d=new XDate(1978,2); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:933:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:933:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. n=XDate.UTC(1964,2,1); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:933:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types b/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types index 51bde63a33b80..ae098ba4cff88 100644 --- a/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types +++ b/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types @@ -7,10 +7,10 @@ declare const foo: unknown[]; const bar = foo.flatMap(bar => bar as Foo); >bar : string[] >foo.flatMap(bar => bar as Foo) : string[] ->foo.flatMap : (callback: (this: This, value: unknown, index: number, array: unknown[]) => U | readonly U[], thisArg?: This | undefined) => U[] +>foo.flatMap : (callback: (value: unknown, index: number, array: unknown[]) => U | readonly U[], thisArg?: any) => U[] >foo : unknown[] ->flatMap : (callback: (this: This, value: unknown, index: number, array: unknown[]) => U | readonly U[], thisArg?: This | undefined) => U[] ->bar => bar as Foo : (this: undefined, bar: unknown) => Foo +>flatMap : (callback: (value: unknown, index: number, array: unknown[]) => U | readonly U[], thisArg?: any) => U[] +>bar => bar as Foo : (bar: unknown) => Foo >bar : unknown >bar as Foo : Foo >bar : unknown diff --git a/tests/baselines/reference/formatToPartsFractionalSecond.types b/tests/baselines/reference/formatToPartsFractionalSecond.types index 222c94fd83200..c50d9994aed81 100644 --- a/tests/baselines/reference/formatToPartsFractionalSecond.types +++ b/tests/baselines/reference/formatToPartsFractionalSecond.types @@ -1,7 +1,7 @@ === tests/cases/compiler/formatToPartsFractionalSecond.ts === new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') >new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') : Intl.DateTimeFormatPart ->new Intl.DateTimeFormat().formatToParts().find : { (predicate: (this: void, value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } +>new Intl.DateTimeFormat().formatToParts().find : { (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } >new Intl.DateTimeFormat().formatToParts() : Intl.DateTimeFormatPart[] >new Intl.DateTimeFormat().formatToParts : (date?: number | Date) => Intl.DateTimeFormatPart[] >new Intl.DateTimeFormat() : Intl.DateTimeFormat @@ -9,8 +9,8 @@ new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractional >Intl : typeof Intl >DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions): string[]; readonly prototype: Intl.DateTimeFormat; } >formatToParts : (date?: number | Date) => Intl.DateTimeFormatPart[] ->find : { (predicate: (this: void, value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } ->(val) => val.type === 'fractionalSecond' : (this: void, val: Intl.DateTimeFormatPart) => boolean +>find : { (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } +>(val) => val.type === 'fractionalSecond' : (val: Intl.DateTimeFormatPart) => boolean >val : Intl.DateTimeFormatPart >val.type === 'fractionalSecond' : boolean >val.type : keyof Intl.DateTimeFormatPartTypesRegistry diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.symbols b/tests/baselines/reference/genericContextualTypingSpecialization.symbols index 28609346111d9..b8bb442609042 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.symbols +++ b/tests/baselines/reference/genericContextualTypingSpecialization.symbols @@ -3,9 +3,9 @@ var b: number[]; >b : Symbol(b, Decl(genericContextualTypingSpecialization.ts, 0, 3)) b.reduce((c, d) => c + d, 0); // should not error on '+' ->b.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >b : Symbol(b, Decl(genericContextualTypingSpecialization.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(genericContextualTypingSpecialization.ts, 1, 18)) >d : Symbol(d, Decl(genericContextualTypingSpecialization.ts, 1, 20)) >c : Symbol(c, Decl(genericContextualTypingSpecialization.ts, 1, 18)) diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.types b/tests/baselines/reference/genericContextualTypingSpecialization.types index d7d6101050799..8225502034731 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.types +++ b/tests/baselines/reference/genericContextualTypingSpecialization.types @@ -4,9 +4,9 @@ var b: number[]; b.reduce((c, d) => c + d, 0); // should not error on '+' >b.reduce((c, d) => c + d, 0) : number ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(c, d) => c + d : (c: number, d: number) => number >c : number >d : number diff --git a/tests/baselines/reference/genericReduce.symbols b/tests/baselines/reference/genericReduce.symbols index 1ace07b9adf9a..16c9382a6e81f 100644 --- a/tests/baselines/reference/genericReduce.symbols +++ b/tests/baselines/reference/genericReduce.symbols @@ -14,9 +14,9 @@ var b = a.map(s => s.length); var n1 = b.reduce((x, y) => x + y); >n1 : Symbol(n1, Decl(genericReduce.ts, 2, 3)) ->b.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >b : Symbol(b, Decl(genericReduce.ts, 1, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(genericReduce.ts, 2, 19)) >y : Symbol(y, Decl(genericReduce.ts, 2, 21)) >x : Symbol(x, Decl(genericReduce.ts, 2, 19)) @@ -24,9 +24,9 @@ var n1 = b.reduce((x, y) => x + y); var n2 = b.reduceRight((x, y) => x + y); >n2 : Symbol(n2, Decl(genericReduce.ts, 3, 3)) ->b.reduceRight : Symbol(Array.reduceRight, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b.reduceRight : Symbol(Array.reduceRight, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >b : Symbol(b, Decl(genericReduce.ts, 1, 3)) ->reduceRight : Symbol(Array.reduceRight, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduceRight : Symbol(Array.reduceRight, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(genericReduce.ts, 3, 24)) >y : Symbol(y, Decl(genericReduce.ts, 3, 26)) >x : Symbol(x, Decl(genericReduce.ts, 3, 24)) @@ -50,9 +50,9 @@ n2.toExponential(2); // should not error if 'n2' is correctly number. var n3 = b.reduce( (x, y) => x + y, ""); // Initial value is of type string >n3 : Symbol(n3, Decl(genericReduce.ts, 10, 3)) ->b.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >b : Symbol(b, Decl(genericReduce.ts, 1, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(genericReduce.ts, 10, 28)) >y : Symbol(y, Decl(genericReduce.ts, 10, 30)) >x : Symbol(x, Decl(genericReduce.ts, 10, 28)) diff --git a/tests/baselines/reference/genericReduce.types b/tests/baselines/reference/genericReduce.types index 65a069426a7d5..628398f86fdbf 100644 --- a/tests/baselines/reference/genericReduce.types +++ b/tests/baselines/reference/genericReduce.types @@ -22,9 +22,9 @@ var b = a.map(s => s.length); var n1 = b.reduce((x, y) => x + y); >n1 : number >b.reduce((x, y) => x + y) : number ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: number, y: number) => number >x : number >y : number @@ -35,9 +35,9 @@ var n1 = b.reduce((x, y) => x + y); var n2 = b.reduceRight((x, y) => x + y); >n2 : number >b.reduceRight((x, y) => x + y) : number ->b.reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: number, y: number) => number >x : number >y : number @@ -76,9 +76,9 @@ n2.toExponential(2); // should not error if 'n2' is correctly number. var n3 = b.reduce( (x, y) => x + y, ""); // Initial value is of type string >n3 : string >b.reduce( (x, y) => x + y, "") : string ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: string, y: number) => string >x : string >y : number diff --git a/tests/baselines/reference/getterSetterNonAccessor.types b/tests/baselines/reference/getterSetterNonAccessor.types index 5f9a658b575f0..b81b5a6dcad1d 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.types +++ b/tests/baselines/reference/getterSetterNonAccessor.types @@ -9,9 +9,9 @@ function setFunc(v){} Object.defineProperty({}, "0", ({ >Object.defineProperty({}, "0", ({ get: getFunc, set: setFunc, configurable: true })) : {} ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >{} : {} >"0" : "0" >({ get: getFunc, set: setFunc, configurable: true }) : PropertyDescriptor diff --git a/tests/baselines/reference/importAliasModuleExports.types b/tests/baselines/reference/importAliasModuleExports.types index 2067e8b8d74e4..982fbb7cfba05 100644 --- a/tests/baselines/reference/importAliasModuleExports.types +++ b/tests/baselines/reference/importAliasModuleExports.types @@ -42,9 +42,9 @@ A.prototype.func = function() { this._func = 0; } Object.defineProperty(A.prototype, "def", { value: 0 }); >Object.defineProperty(A.prototype, "def", { value: 0 }) : A ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >A.prototype : A >A : typeof A >prototype : A diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols index 319ae14250127..46d491a663621 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols @@ -124,9 +124,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { return (x: T) => fns.reduce((prev, fn) => fn(prev), x); >x : Symbol(x, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 10)) >T : Symbol(T, Decl(inferFromGenericFunctionReturnTypes1.ts, 26, 17)) ->fns.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>fns.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fns : Symbol(fns, Decl(inferFromGenericFunctionReturnTypes1.ts, 26, 20)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prev : Symbol(prev, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 31)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 36)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 36)) diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types index bc2d36c8d0f34..0161623a0e3b2 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types @@ -89,9 +89,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { >(x: T) => fns.reduce((prev, fn) => fn(prev), x) : (x: T) => T >x : T >fns.reduce((prev, fn) => fn(prev), x) : T ->fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >fns : ((x: T) => T)[] ->reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >(prev, fn) => fn(prev) : (prev: T, fn: (x: T) => T) => T >prev : T >fn : (x: T) => T diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols index 379f011d2ebca..6f06d29de8091 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols @@ -292,9 +292,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { return (x: T) => fns.reduce((prev, fn) => fn(prev), x); >x : Symbol(x, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 10)) >T : Symbol(T, Decl(inferFromGenericFunctionReturnTypes2.ts, 48, 17)) ->fns.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>fns.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fns : Symbol(fns, Decl(inferFromGenericFunctionReturnTypes2.ts, 48, 20)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prev : Symbol(prev, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 31)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 36)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 36)) diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types index 0c9cff3bf4a17..f8f905982c8e7 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types @@ -282,9 +282,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { >(x: T) => fns.reduce((prev, fn) => fn(prev), x) : (x: T) => T >x : T >fns.reduce((prev, fn) => fn(prev), x) : T ->fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >fns : ((x: T) => T)[] ->reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >(prev, fn) => fn(prev) : (prev: T, fn: (x: T) => T) => T >prev : T >fn : (x: T) => T diff --git a/tests/baselines/reference/intersectionTypeInference3.types b/tests/baselines/reference/intersectionTypeInference3.types index 27e65f7684ad6..1a70861dbc6bf 100644 --- a/tests/baselines/reference/intersectionTypeInference3.types +++ b/tests/baselines/reference/intersectionTypeInference3.types @@ -26,15 +26,15 @@ const c1 = Array.from(a).concat(Array.from(b)); >Array.from(a).concat(Array.from(b)) : A[] >Array.from(a).concat : { (...items: ConcatArray[]): A[]; (...items: (A | ConcatArray)[]): A[]; } >Array.from(a) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >a : Set >concat : { (...items: ConcatArray[]): A[]; (...items: (A | ConcatArray)[]): A[]; } >Array.from(b) : A[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >b : Set // Simpler repro diff --git a/tests/baselines/reference/intersectionsAndEmptyObjects.symbols b/tests/baselines/reference/intersectionsAndEmptyObjects.symbols index 7cb08ebfb2523..94ee28962dbbc 100644 --- a/tests/baselines/reference/intersectionsAndEmptyObjects.symbols +++ b/tests/baselines/reference/intersectionsAndEmptyObjects.symbols @@ -116,9 +116,9 @@ const intersectDictionaries = ( ): F1 & F2 => Object.assign({}, d1, d2); >F1 : Symbol(F1, Decl(intersectionsAndEmptyObjects.ts, 30, 31)) >F2 : Symbol(F2, Decl(intersectionsAndEmptyObjects.ts, 30, 53)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >d1 : Symbol(d1, Decl(intersectionsAndEmptyObjects.ts, 30, 77)) >d2 : Symbol(d2, Decl(intersectionsAndEmptyObjects.ts, 31, 9)) diff --git a/tests/baselines/reference/intersectionsAndEmptyObjects.types b/tests/baselines/reference/intersectionsAndEmptyObjects.types index 6972e06169dcb..57864b2d289ea 100644 --- a/tests/baselines/reference/intersectionsAndEmptyObjects.types +++ b/tests/baselines/reference/intersectionsAndEmptyObjects.types @@ -75,10 +75,10 @@ const intersectDictionaries = ( >d2 : F2 ): F1 & F2 => Object.assign({}, d1, d2); ->Object.assign({}, d1, d2) : {} & F1 & F2 ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign({}, d1, d2) : Writable & Writable +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >{} : {} >d1 : F1 >d2 : F2 diff --git a/tests/baselines/reference/javascriptDefinePropertyPrototypeNonConstructor.types b/tests/baselines/reference/javascriptDefinePropertyPrototypeNonConstructor.types index 7dbd38d69dffa..834380deb4edf 100644 --- a/tests/baselines/reference/javascriptDefinePropertyPrototypeNonConstructor.types +++ b/tests/baselines/reference/javascriptDefinePropertyPrototypeNonConstructor.types @@ -5,9 +5,9 @@ function Graphic() { Object.defineProperty(Graphic.prototype, "instance", { >Object.defineProperty(Graphic.prototype, "instance", { get: function() { return this; }}) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Graphic.prototype : any >Graphic : typeof Graphic >prototype : any diff --git a/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types b/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types index e175b0527772f..00acd0d924652 100644 --- a/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types +++ b/tests/baselines/reference/jsCheckObjectDefineThisNoCrash.types @@ -6,9 +6,9 @@ class C { // Neither of the following should be recognized as declarations yet Object.defineProperty(this, "_prop", { value: {} }); >Object.defineProperty(this, "_prop", { value: {} }) : this ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >this : this >"_prop" : "_prop" >{ value: {} } : { value: {}; } @@ -17,9 +17,9 @@ class C { Object.defineProperty(this._prop, "num", { value: 12 }); >Object.defineProperty(this._prop, "num", { value: 12 }) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >this._prop : any >this : this >_prop : any diff --git a/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types b/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types index fc664ec5d19a6..3bbfde8ecf84d 100644 --- a/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types +++ b/tests/baselines/reference/jsDeclarationsExportDefinePropertyEmit.types @@ -1,9 +1,9 @@ === tests/cases/conformance/jsdoc/declarations/index.js === Object.defineProperty(module.exports, "a", { value: function a() {} }); >Object.defineProperty(module.exports, "a", { value: function a() {} }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -15,9 +15,9 @@ Object.defineProperty(module.exports, "a", { value: function a() {} }); Object.defineProperty(module.exports, "b", { value: function b() {} }); >Object.defineProperty(module.exports, "b", { value: function b() {} }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -29,9 +29,9 @@ Object.defineProperty(module.exports, "b", { value: function b() {} }); Object.defineProperty(module.exports.b, "cat", { value: "cat" }); >Object.defineProperty(module.exports.b, "cat", { value: "cat" }) : () => void ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports.b : () => void >module.exports : typeof module.exports >module : { exports: typeof module.exports; } @@ -56,9 +56,9 @@ function d(a, b) { return /** @type {*} */(null); } Object.defineProperty(module.exports, "d", { value: d }); >Object.defineProperty(module.exports, "d", { value: d }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -83,9 +83,9 @@ function e(a, b) { return /** @type {*} */(null); } Object.defineProperty(module.exports, "e", { value: e }); >Object.defineProperty(module.exports, "e", { value: e }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -107,9 +107,9 @@ function f(a) { } Object.defineProperty(module.exports, "f", { value: f }); >Object.defineProperty(module.exports, "f", { value: f }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -120,9 +120,9 @@ Object.defineProperty(module.exports, "f", { value: f }); Object.defineProperty(module.exports.f, "self", { value: module.exports.f }); >Object.defineProperty(module.exports.f, "self", { value: module.exports.f }) : (a: T) => T ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports.f : (a: T) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } @@ -158,9 +158,9 @@ function g(a, b) { } Object.defineProperty(module.exports, "g", { value: g }); >Object.defineProperty(module.exports, "g", { value: g }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -191,9 +191,9 @@ function hh(a, b) { } Object.defineProperty(module.exports, "h", { value: hh }); >Object.defineProperty(module.exports, "h", { value: hh }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -204,9 +204,9 @@ Object.defineProperty(module.exports, "h", { value: hh }); Object.defineProperty(module.exports, "i", { value: function i(){} }); >Object.defineProperty(module.exports, "i", { value: function i(){} }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -218,9 +218,9 @@ Object.defineProperty(module.exports, "i", { value: function i(){} }); Object.defineProperty(module.exports, "ii", { value: module.exports.i }); >Object.defineProperty(module.exports, "ii", { value: module.exports.i }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -236,9 +236,9 @@ Object.defineProperty(module.exports, "ii", { value: module.exports.i }); // note that this last one doesn't make much sense in cjs, since exports aren't hoisted bindings Object.defineProperty(module.exports, "jj", { value: module.exports.j }); >Object.defineProperty(module.exports, "jj", { value: module.exports.j }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -253,9 +253,9 @@ Object.defineProperty(module.exports, "jj", { value: module.exports.j }); Object.defineProperty(module.exports, "j", { value: function j() {} }); >Object.defineProperty(module.exports, "j", { value: function j() {} }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports diff --git a/tests/baselines/reference/jsDeclarationsGetterSetter.types b/tests/baselines/reference/jsDeclarationsGetterSetter.types index 146600cc4151e..aa064fb2d5be8 100644 --- a/tests/baselines/reference/jsDeclarationsGetterSetter.types +++ b/tests/baselines/reference/jsDeclarationsGetterSetter.types @@ -42,9 +42,9 @@ export class D {} Object.defineProperty(D.prototype, "x", { >Object.defineProperty(D.prototype, "x", { get() { return 12; }}) : D ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >D.prototype : D >D : typeof D >prototype : D @@ -64,9 +64,9 @@ export class E {} Object.defineProperty(E.prototype, "x", { >Object.defineProperty(E.prototype, "x", { /** * @param {number} _arg */ set(_arg) {}}) : E ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >E.prototype : E >E : typeof E >prototype : E @@ -87,9 +87,9 @@ export class F {} Object.defineProperty(F.prototype, "x", { >Object.defineProperty(F.prototype, "x", { get() { return 12; }, /** * @param {number} _arg */ set(_arg) {}}) : F ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >F.prototype : F >F : typeof F >prototype : F diff --git a/tests/baselines/reference/jsEnumTagOnObjectFrozen.types b/tests/baselines/reference/jsEnumTagOnObjectFrozen.types index 12d79352452f4..f9aee3559f774 100644 --- a/tests/baselines/reference/jsEnumTagOnObjectFrozen.types +++ b/tests/baselines/reference/jsEnumTagOnObjectFrozen.types @@ -49,9 +49,9 @@ cbThing(type => { const Thing = Object.freeze({ >Thing : Readonly<{ a: "thing"; b: "chill"; }> >Object.freeze({ a: "thing", b: "chill"}) : Readonly<{ a: "thing"; b: "chill"; }> ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >{ a: "thing", b: "chill"} : { a: "thing"; b: "chill"; } a: "thing", diff --git a/tests/baselines/reference/jsExpandoObjectDefineProperty.types b/tests/baselines/reference/jsExpandoObjectDefineProperty.types index fb25ede2da462..d1c059915ea2e 100644 --- a/tests/baselines/reference/jsExpandoObjectDefineProperty.types +++ b/tests/baselines/reference/jsExpandoObjectDefineProperty.types @@ -5,9 +5,9 @@ var chrome = {} Object.defineProperty(chrome, 'devtools', { value: {}, enumerable: true }) >Object.defineProperty(chrome, 'devtools', { value: {}, enumerable: true }) : typeof chrome ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >chrome : typeof chrome >'devtools' : "devtools" >{ value: {}, enumerable: true } : { value: {}; enumerable: true; } diff --git a/tests/baselines/reference/jsFileESModuleWithEnumTag.types b/tests/baselines/reference/jsFileESModuleWithEnumTag.types index 4ecc2d0fdd6a5..57bf39e14d499 100644 --- a/tests/baselines/reference/jsFileESModuleWithEnumTag.types +++ b/tests/baselines/reference/jsFileESModuleWithEnumTag.types @@ -34,9 +34,9 @@ ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = 'Default'; Object.defineProperty(ChangeDetectionStrategy, "aField", {value: 42}); >Object.defineProperty(ChangeDetectionStrategy, "aField", {value: 42}) : { OnPush: number; Default: number; } ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >ChangeDetectionStrategy : { OnPush: number; Default: number; } >"aField" : "aField" >{value: 42} : { value: number; } diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index fc4603b997ff7..d8498a08eb70a 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -1876,9 +1876,9 @@ class SampleClass

{ >this : this >props : Readonly

>Object.freeze(props) : Readonly

->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >props : P } } diff --git a/tests/baselines/reference/lateBoundAssignmentDeclarationSupport3.types b/tests/baselines/reference/lateBoundAssignmentDeclarationSupport3.types index 7f6c8d2c42ada..f04edbf31e6c5 100644 --- a/tests/baselines/reference/lateBoundAssignmentDeclarationSupport3.types +++ b/tests/baselines/reference/lateBoundAssignmentDeclarationSupport3.types @@ -32,9 +32,9 @@ const _str = "my-fake-sym"; Object.defineProperty(module.exports, _sym, { value: "ok" }); >Object.defineProperty(module.exports, _sym, { value: "ok" }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports @@ -45,9 +45,9 @@ Object.defineProperty(module.exports, _sym, { value: "ok" }); Object.defineProperty(module.exports, _str, { value: "ok" }); >Object.defineProperty(module.exports, _str, { value: "ok" }) : typeof module.exports ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >module.exports : typeof module.exports >module : { exports: typeof module.exports; } >exports : typeof module.exports diff --git a/tests/baselines/reference/lateBoundAssignmentDeclarationSupport6.types b/tests/baselines/reference/lateBoundAssignmentDeclarationSupport6.types index 754ff5f67dbfe..fb697a9cfdc79 100644 --- a/tests/baselines/reference/lateBoundAssignmentDeclarationSupport6.types +++ b/tests/baselines/reference/lateBoundAssignmentDeclarationSupport6.types @@ -51,9 +51,9 @@ F.prototype.defsAClass = true; Object.defineProperty(F.prototype, _str, {value: "ok"}); >Object.defineProperty(F.prototype, _str, {value: "ok"}) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >F.prototype : any >F : typeof F >prototype : any @@ -64,9 +64,9 @@ Object.defineProperty(F.prototype, _str, {value: "ok"}); Object.defineProperty(F.prototype, _sym, {value: "ok"}); >Object.defineProperty(F.prototype, _sym, {value: "ok"}) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >F.prototype : any >F : typeof F >prototype : any diff --git a/tests/baselines/reference/mappedTypeAsClauses.types b/tests/baselines/reference/mappedTypeAsClauses.types index de951157933a3..9f561e45112cc 100644 --- a/tests/baselines/reference/mappedTypeAsClauses.types +++ b/tests/baselines/reference/mappedTypeAsClauses.types @@ -33,10 +33,10 @@ type TP1 = TypeFromDefs<{ name: 'a', type: string } | { name: 'b', type: number // No array or tuple type mapping when 'as N' clause present type TA1 = Getters; ->TA1 : { getConcat: () => { (...items: ConcatArray[]): string[]; (...items: (string | ConcatArray)[]): string[]; }; getIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => string[]; getLength: () => number; getToString: () => () => string; getToLocaleString: () => () => string; getPop: () => () => string | undefined; getPush: () => (...items: string[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => string[]; getShift: () => () => string | undefined; getSort: () => (compareFn?: ((a: string, b: string) => number) | undefined) => string[]; getSplice: () => { (start: number, deleteCount?: number | undefined): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; }; getUnshift: () => (...items: string[]) => number; getEvery: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[]; }; getReduce: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; } +>TA1 : { getConcat: () => { (...items: ConcatArray[]): string[]; (...items: (string | ConcatArray)[]): string[]; }; getIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => string[]; getLength: () => number; getToString: () => () => string; getToLocaleString: () => () => string; getPop: () => () => string | undefined; getPush: () => (...items: string[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => string[]; getShift: () => () => string | undefined; getSort: () => (compareFn?: ((a: string, b: string) => number) | undefined) => string[]; getSplice: () => { (start: number, deleteCount?: number | undefined): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; }; getUnshift: () => (...items: string[]) => number; getEvery: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[]; }; getReduce: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; } type TA2 = Getters<[number, boolean]>; ->TA2 : { getConcat: () => { (...items: ConcatArray[]): (number | boolean)[]; (...items: (number | boolean | ConcatArray)[]): (number | boolean)[]; }; getIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => (number | boolean)[]; getLength: () => 2; getToString: () => () => string; getToLocaleString: () => () => string; getPop: () => () => number | boolean | undefined; getPush: () => (...items: (number | boolean)[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => (number | boolean)[]; getShift: () => () => number | boolean | undefined; getSort: () => (compareFn?: ((a: number | boolean, b: number | boolean) => number) | undefined) => [number, boolean]; getSplice: () => { (start: number, deleteCount?: number | undefined): (number | boolean)[]; (start: number, deleteCount: number, ...items: (number | boolean)[]): (number | boolean)[]; }; getUnshift: () => (...items: (number | boolean)[]) => number; getEvery: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): (number | boolean)[]; }; getReduce: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean): number | boolean; (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue: number | boolean): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean): number | boolean; (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue: number | boolean): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; get0: () => number; get1: () => boolean; } +>TA2 : { getConcat: () => { (...items: ConcatArray[]): (number | boolean)[]; (...items: (number | boolean | ConcatArray)[]): (number | boolean)[]; }; getIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => (number | boolean)[]; getLength: () => 2; getToString: () => () => string; getToLocaleString: () => () => string; getPop: () => () => number | boolean | undefined; getPush: () => (...items: (number | boolean)[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => (number | boolean)[]; getShift: () => () => number | boolean | undefined; getSort: () => (compareFn?: ((a: number | boolean, b: number | boolean) => number) | undefined) => (number | boolean)[]; getSplice: () => { (start: number, deleteCount?: number | undefined): (number | boolean)[]; (start: number, deleteCount: number, ...items: (number | boolean)[]): (number | boolean)[]; }; getUnshift: () => (...items: (number | boolean)[]) => number; getEvery: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): (number | boolean)[]; }; getReduce: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue?: number | boolean | undefined): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue?: number | boolean | undefined): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; get0: () => number; get1: () => boolean; } // Filtering using 'as N' clause diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index 39ef006ce8cc1..a0f0c3db6b3dc 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. +tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. ==== tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error T declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; tgt2 = src2; // Should error ~~~~ -!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. -!!! related TS2728 /.ts/lib.es5.d.ts:1291:5: 'length' is declared here. +!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. +!!! related TS2728 /.ts/lib.es5.d.ts:1383:5: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types index 07618554a7c3c..50ee999820634 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types @@ -3,10 +3,10 @@ declare let tgt2: number[]; >tgt2 : number[] declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; ->src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } tgt2 = src2; // Should error ->tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } >tgt2 : number[] ->src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types index 20d056505123f..7725cbed7ce36 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types @@ -1,8 +1,8 @@ === tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts === export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); ->thing : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } ->(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } ->null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>thing : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } >null as any : any >null : null diff --git a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.types b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.types index 1f8f0c5cb63fd..2562d0f8b9322 100644 --- a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.types +++ b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.types @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types index a7512bc94ab71..9c1874e9c3202 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types index 4aad64cf7fec3..55d6e665a9563 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types index 45ea713ea17c3..5ca53166506c6 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types index ba55dc465e84a..7ede33b46a567 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types b/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types index d624c1ac259ad..394b8a4174b56 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types index d754962ab8689..9bfe173c253d9 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index 6331c0fa8947b..20ac5ffef67d1 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ !!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1041:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1135:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index 216c2a89380b3..c12b61de8a744 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1041:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1135:5: 'message' is declared here. } if (x instanceof Date) { @@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:789:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:883:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index 110cfc90aadb6..a00ad8b1ea4ed 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1041:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1135:5: 'message' is declared here. } if (isDate(x)) { @@ -49,6 +49,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:789:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:883:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/neverInference.types b/tests/baselines/reference/neverInference.types index d6b0da3c3d6e9..87baae237b751 100644 --- a/tests/baselines/reference/neverInference.types +++ b/tests/baselines/reference/neverInference.types @@ -71,9 +71,9 @@ f2(Array.from([0]), [], (a1, a2) => a1 - a2); >f2(Array.from([0]), [], (a1, a2) => a1 - a2) : void >f2 : (as1: a[], as2: a[], cmp: (a1: a, a2: a) => number) => void >Array.from([0]) : number[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >[0] : number[] >0 : 0 >[] : never[] @@ -88,9 +88,9 @@ f2(Array.from([]), [0], (a1, a2) => a1 - a2); >f2(Array.from([]), [0], (a1, a2) => a1 - a2) : void >f2 : (as1: a[], as2: a[], cmp: (a1: a, a2: a) => number) => void >Array.from([]) : never[] ->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >[] : never[] >[0] : number[] >0 : 0 diff --git a/tests/baselines/reference/objectFreeze.types b/tests/baselines/reference/objectFreeze.types index b39293e109230..9471823cb6a51 100644 --- a/tests/baselines/reference/objectFreeze.types +++ b/tests/baselines/reference/objectFreeze.types @@ -2,9 +2,9 @@ const f = Object.freeze(function foo(a: number, b: string) { return false; }); >f : (a: number, b: string) => false >Object.freeze(function foo(a: number, b: string) { return false; }) : (a: number, b: string) => false ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >function foo(a: number, b: string) { return false; } : (a: number, b: string) => false >foo : (a: number, b: string) => false >a : number @@ -26,9 +26,9 @@ class C { constructor(a: number) { } } const c = Object.freeze(C); >c : typeof C >Object.freeze(C) : typeof C ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >C : typeof C new c(1); @@ -39,9 +39,9 @@ new c(1); const a = Object.freeze([1, 2, 3]); >a : readonly number[] >Object.freeze([1, 2, 3]) : readonly number[] ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 @@ -62,9 +62,9 @@ a[0] = a[2].toString(); const o = Object.freeze({ a: 1, b: "string", c: true }); >o : Readonly<{ a: 1; b: "string"; c: true; }> >Object.freeze({ a: 1, b: "string", c: true }) : Readonly<{ a: 1; b: "string"; c: true; }> ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >{ a: 1, b: "string", c: true } : { a: 1; b: "string"; c: true; } >a : 1 >1 : 1 diff --git a/tests/baselines/reference/objectFromEntries.types b/tests/baselines/reference/objectFromEntries.types index 0701b9ed5258d..a87598d06e5bf 100644 --- a/tests/baselines/reference/objectFromEntries.types +++ b/tests/baselines/reference/objectFromEntries.types @@ -43,9 +43,9 @@ const o3 = Object.fromEntries(new Map([[Symbol("key"), "value"]])); const frozenArray = Object.freeze([['a', 1], ['b', 2], ['c', 3]]); >frozenArray : readonly (string | number)[][] >Object.freeze([['a', 1], ['b', 2], ['c', 3]]) : readonly (string | number)[][] ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >[['a', 1], ['b', 2], ['c', 3]] : (string | number)[][] >['a', 1] : (string | number)[] >'a' : "a" @@ -68,9 +68,9 @@ const o4 = Object.fromEntries(frozenArray); const frozenArray2: readonly [string, number][] = Object.freeze([['a', 1], ['b', 2], ['c', 3]]); >frozenArray2 : readonly [string, number][] >Object.freeze([['a', 1], ['b', 2], ['c', 3]]) : readonly [string, number][] ->Object.freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >Object : ObjectConstructor ->freeze : { (a: T[]): readonly T[]; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } >[['a', 1], ['b', 2], ['c', 3]] : [string, number][] >['a', 1] : [string, number] >'a' : "a" diff --git a/tests/baselines/reference/objectLitGetterSetter.types b/tests/baselines/reference/objectLitGetterSetter.types index 54c587890f8ac..f70bb3d8a3c9f 100644 --- a/tests/baselines/reference/objectLitGetterSetter.types +++ b/tests/baselines/reference/objectLitGetterSetter.types @@ -5,9 +5,9 @@ Object.defineProperty(obj, "accProperty", ({ >Object.defineProperty(obj, "accProperty", ({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } })) : {} ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >obj : {} >"accProperty" : "accProperty" >({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : PropertyDescriptor diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index 6694afaf78c48..7f2dd67de8bb9 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo !!! error TS1005: ';' expected. ~~~~~~~~ !!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? -!!! related TS2728 /.ts/lib.es5.d.ts:536:13: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:630:13: 'String' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt index 8cd01e7ed9c07..780f0bc01eb28 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt @@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1037:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1131:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt index 96c5f51234250..d9e45d650866e 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre (1) /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1037:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1131:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index 862f176326ea6..cf90648a56ea0 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index b90ae737baed6..ec66e3f78d5af 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index b1992ccb2e780..9ec58161e2856 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index f6a04ed1e3267..e35551841ed55 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserUsingConstructorAsIdentifier.types b/tests/baselines/reference/parserUsingConstructorAsIdentifier.types index 0034fa0e136e5..29122ff0c0f67 100644 --- a/tests/baselines/reference/parserUsingConstructorAsIdentifier.types +++ b/tests/baselines/reference/parserUsingConstructorAsIdentifier.types @@ -90,9 +90,9 @@ Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true }); >Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true }) : any ->Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >Object : ObjectConstructor ->defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T >constructor.prototype : any >constructor : any >prototype : any diff --git a/tests/baselines/reference/parserharness.symbols b/tests/baselines/reference/parserharness.symbols index 92953908f7344..353f7ab1af0ed 100644 --- a/tests/baselines/reference/parserharness.symbols +++ b/tests/baselines/reference/parserharness.symbols @@ -4752,7 +4752,7 @@ module Harness { var minDistFromStart = entries.map(x => x.editRange.minChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromStart : Symbol(minDistFromStart, Decl(parserharness.ts, 1595, 15)) ->entries.map(x => x.editRange.minChar).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>entries.map(x => x.editRange.minChar).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >entries.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >entries : Symbol(entries, Decl(parserharness.ts, 1593, 15)) >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) @@ -4760,7 +4760,7 @@ module Harness { >x.editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) >x : Symbol(x, Decl(parserharness.ts, 1595, 47)) >editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prev : Symbol(prev, Decl(parserharness.ts, 1595, 81)) >current : Symbol(current, Decl(parserharness.ts, 1595, 86)) >Math.min : Symbol(Math.min, Decl(lib.es5.d.ts, --, --)) @@ -4771,7 +4771,7 @@ module Harness { var minDistFromEnd = entries.map(x => x.length - x.editRange.limChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromEnd : Symbol(minDistFromEnd, Decl(parserharness.ts, 1596, 15)) ->entries.map(x => x.length - x.editRange.limChar).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>entries.map(x => x.length - x.editRange.limChar).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >entries.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >entries : Symbol(entries, Decl(parserharness.ts, 1593, 15)) >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) @@ -4782,7 +4782,7 @@ module Harness { >x.editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) >x : Symbol(x, Decl(parserharness.ts, 1596, 45)) >editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prev : Symbol(prev, Decl(parserharness.ts, 1596, 90)) >current : Symbol(current, Decl(parserharness.ts, 1596, 95)) >Math.min : Symbol(Math.min, Decl(lib.es5.d.ts, --, --)) @@ -4793,7 +4793,7 @@ module Harness { var aggDelta = entries.map(x => x.editRange.delta).reduce((prev, current) => prev + current); >aggDelta : Symbol(aggDelta, Decl(parserharness.ts, 1597, 15)) ->entries.map(x => x.editRange.delta).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>entries.map(x => x.editRange.delta).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >entries.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >entries : Symbol(entries, Decl(parserharness.ts, 1593, 15)) >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) @@ -4801,7 +4801,7 @@ module Harness { >x.editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) >x : Symbol(x, Decl(parserharness.ts, 1597, 39)) >editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prev : Symbol(prev, Decl(parserharness.ts, 1597, 71)) >current : Symbol(current, Decl(parserharness.ts, 1597, 76)) >prev : Symbol(prev, Decl(parserharness.ts, 1597, 71)) diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index 498e9bf7ea7ce..c8c323cb378df 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -6476,7 +6476,7 @@ module Harness { var minDistFromStart = entries.map(x => x.editRange.minChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromStart : any >entries.map(x => x.editRange.minChar).reduce((prev, current) => Math.min(prev, current)) : any ->entries.map(x => x.editRange.minChar).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>entries.map(x => x.editRange.minChar).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >entries.map(x => x.editRange.minChar) : any[] >entries.map : (callbackfn: (value: { length: number; editRange: TypeScript.ScriptEditRange; }, index: number, array: { length: number; editRange: TypeScript.ScriptEditRange; }[]) => U, thisArg?: any) => U[] >entries : { length: number; editRange: TypeScript.ScriptEditRange; }[] @@ -6488,7 +6488,7 @@ module Harness { >x : { length: number; editRange: TypeScript.ScriptEditRange; } >editRange : TypeScript.ScriptEditRange >minChar : any ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(prev, current) => Math.min(prev, current) : (prev: any, current: any) => number >prev : any >current : any @@ -6502,7 +6502,7 @@ module Harness { var minDistFromEnd = entries.map(x => x.length - x.editRange.limChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromEnd : number >entries.map(x => x.length - x.editRange.limChar).reduce((prev, current) => Math.min(prev, current)) : number ->entries.map(x => x.length - x.editRange.limChar).reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>entries.map(x => x.length - x.editRange.limChar).reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >entries.map(x => x.length - x.editRange.limChar) : number[] >entries.map : (callbackfn: (value: { length: number; editRange: TypeScript.ScriptEditRange; }, index: number, array: { length: number; editRange: TypeScript.ScriptEditRange; }[]) => U, thisArg?: any) => U[] >entries : { length: number; editRange: TypeScript.ScriptEditRange; }[] @@ -6518,7 +6518,7 @@ module Harness { >x : { length: number; editRange: TypeScript.ScriptEditRange; } >editRange : TypeScript.ScriptEditRange >limChar : any ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(prev, current) => Math.min(prev, current) : (prev: number, current: number) => number >prev : number >current : number @@ -6532,7 +6532,7 @@ module Harness { var aggDelta = entries.map(x => x.editRange.delta).reduce((prev, current) => prev + current); >aggDelta : any >entries.map(x => x.editRange.delta).reduce((prev, current) => prev + current) : any ->entries.map(x => x.editRange.delta).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>entries.map(x => x.editRange.delta).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >entries.map(x => x.editRange.delta) : any[] >entries.map : (callbackfn: (value: { length: number; editRange: TypeScript.ScriptEditRange; }, index: number, array: { length: number; editRange: TypeScript.ScriptEditRange; }[]) => U, thisArg?: any) => U[] >entries : { length: number; editRange: TypeScript.ScriptEditRange; }[] @@ -6544,7 +6544,7 @@ module Harness { >x : { length: number; editRange: TypeScript.ScriptEditRange; } >editRange : TypeScript.ScriptEditRange >delta : any ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(prev, current) => prev + current : (prev: any, current: any) => any >prev : any >current : any diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index eb6adf95308dd..ab44d383345d0 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1527:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index b2f45aaec25e6..0e457a33f0bc3 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1527:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 2a871d46ef8b6..bfd5d2c42cdbe 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1527:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1527:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/recursiveTypeReferences1.symbols b/tests/baselines/reference/recursiveTypeReferences1.symbols index db0d7ca297136..ad0c60e40dfff 100644 --- a/tests/baselines/reference/recursiveTypeReferences1.symbols +++ b/tests/baselines/reference/recursiveTypeReferences1.symbols @@ -398,12 +398,12 @@ function cons(hs: HTMLHeadingElement[]): Tree { >Tree : Symbol(Tree, Decl(recursiveTypeReferences1.ts, 94, 19)) return hs ->hs .reduce((hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); }, [[]]) .reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->hs .reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>hs .reduce((hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); }, [[]]) .reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>hs .reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >hs : Symbol(hs, Decl(recursiveTypeReferences1.ts, 110, 14)) .reduce((hss, h) => { ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >HTMLHeadingElement : Symbol(HTMLHeadingElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --)) >hss : Symbol(hss, Decl(recursiveTypeReferences1.ts, 112, 37)) >h : Symbol(h, Decl(recursiveTypeReferences1.ts, 112, 41)) @@ -435,7 +435,7 @@ function cons(hs: HTMLHeadingElement[]): Tree { }, [[]]) .reduce((node, hs) => ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Tree : Symbol(Tree, Decl(recursiveTypeReferences1.ts, 94, 19)) >node : Symbol(node, Decl(recursiveTypeReferences1.ts, 118, 19)) >hs : Symbol(hs, Decl(recursiveTypeReferences1.ts, 118, 24)) diff --git a/tests/baselines/reference/recursiveTypeReferences1.types b/tests/baselines/reference/recursiveTypeReferences1.types index bbdcdfeb82708..ee2c8a1b47e93 100644 --- a/tests/baselines/reference/recursiveTypeReferences1.types +++ b/tests/baselines/reference/recursiveTypeReferences1.types @@ -486,13 +486,13 @@ function cons(hs: HTMLHeadingElement[]): Tree { return hs >hs .reduce((hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); }, [[]]) .reduce((node, hs) => hs.length === 0 ? node : concat(node, [[hs.shift()!, cons(hs)]]) , []) : Tree ->hs .reduce((hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); }, [[]]) .reduce : { (callbackfn: (previousValue: HTMLHeadingElement[], currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => HTMLHeadingElement[]): HTMLHeadingElement[]; (callbackfn: (previousValue: HTMLHeadingElement[], currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => HTMLHeadingElement[], initialValue: HTMLHeadingElement[]): HTMLHeadingElement[]; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => U, initialValue: U): U; } +>hs .reduce((hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); }, [[]]) .reduce : { (callbackfn: (previousValue: HTMLHeadingElement[], currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => HTMLHeadingElement[], initialValue?: HTMLHeadingElement[] | undefined): HTMLHeadingElement[]; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => U, initialValue: U): U; } >hs .reduce((hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); }, [[]]) : HTMLHeadingElement[][] ->hs .reduce : { (callbackfn: (previousValue: HTMLHeadingElement, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => HTMLHeadingElement): HTMLHeadingElement; (callbackfn: (previousValue: HTMLHeadingElement, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => HTMLHeadingElement, initialValue: HTMLHeadingElement): HTMLHeadingElement; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => U, initialValue: U): U; } +>hs .reduce : { (callbackfn: (previousValue: HTMLHeadingElement, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => HTMLHeadingElement, initialValue?: HTMLHeadingElement | undefined): HTMLHeadingElement; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => U, initialValue: U): U; } >hs : HTMLHeadingElement[] .reduce((hss, h) => { ->reduce : { (callbackfn: (previousValue: HTMLHeadingElement, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => HTMLHeadingElement): HTMLHeadingElement; (callbackfn: (previousValue: HTMLHeadingElement, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => HTMLHeadingElement, initialValue: HTMLHeadingElement): HTMLHeadingElement; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: HTMLHeadingElement, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => HTMLHeadingElement, initialValue?: HTMLHeadingElement | undefined): HTMLHeadingElement; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement, currentIndex: number, array: HTMLHeadingElement[]) => U, initialValue: U): U; } >(hss, h) => { const hs = hss.pop()!; return hs.length === 0 || level(h) > level(hs[0]) ? concat(hss, [concat(hs, [h])]) : concat(hss, [hs, [h]]); } : (hss: HTMLHeadingElement[][], h: HTMLHeadingElement) => any >hss : HTMLHeadingElement[][] >h : HTMLHeadingElement @@ -548,7 +548,7 @@ function cons(hs: HTMLHeadingElement[]): Tree { >[] : never[] .reduce((node, hs) => ->reduce : { (callbackfn: (previousValue: HTMLHeadingElement[], currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => HTMLHeadingElement[]): HTMLHeadingElement[]; (callbackfn: (previousValue: HTMLHeadingElement[], currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => HTMLHeadingElement[], initialValue: HTMLHeadingElement[]): HTMLHeadingElement[]; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: HTMLHeadingElement[], currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => HTMLHeadingElement[], initialValue?: HTMLHeadingElement[] | undefined): HTMLHeadingElement[]; (callbackfn: (previousValue: U, currentValue: HTMLHeadingElement[], currentIndex: number, array: HTMLHeadingElement[][]) => U, initialValue: U): U; } >(node, hs) => hs.length === 0 ? node : concat(node, [[hs.shift()!, cons(hs)]]) : (node: Tree, hs: HTMLHeadingElement[]) => any >node : Tree >hs : HTMLHeadingElement[] diff --git a/tests/baselines/reference/recursiveTypeRelations.symbols b/tests/baselines/reference/recursiveTypeRelations.symbols index 02ab8184b9e52..55b4939e45714 100644 --- a/tests/baselines/reference/recursiveTypeRelations.symbols +++ b/tests/baselines/reference/recursiveTypeRelations.symbols @@ -89,12 +89,12 @@ export function css(styles: S, ...classNam >arg : Symbol(arg, Decl(recursiveTypeRelations.ts, 18, 30)) return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { ->Object.keys(arg).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object.keys(arg).reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --)) >arg : Symbol(arg, Decl(recursiveTypeRelations.ts, 18, 30)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >ClassNameObject : Symbol(ClassNameObject) >obj : Symbol(obj, Decl(recursiveTypeRelations.ts, 26, 55)) >ClassNameObject : Symbol(ClassNameObject) diff --git a/tests/baselines/reference/recursiveTypeRelations.types b/tests/baselines/reference/recursiveTypeRelations.types index d632e0c097336..aaafd380ad509 100644 --- a/tests/baselines/reference/recursiveTypeRelations.types +++ b/tests/baselines/reference/recursiveTypeRelations.types @@ -70,13 +70,13 @@ export function css(styles: S, ...classNam return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { >Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}) : string ->Object.keys(arg).reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>Object.keys(arg).reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >Object.keys(arg) : string[] >Object.keys : (o: object) => string[] >Object : ObjectConstructor >keys : (o: object) => string[] >arg : ClassNameObjectMap ->reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >(obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; } : (obj: ClassNameObject, key: keyof S) => ClassNameObject >obj : ClassNameObject >key : keyof S diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index be2be83fbe4a0..8f52965950be7 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -5,4 +5,4 @@ tests/cases/compiler/redefineArray.ts(1,1): error TS2741: Property 'isArray' is Array = function (n:number, s:string) {return n;}; ~~~~~ !!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type 'ArrayConstructor'. -!!! related TS2728 /.ts/lib.es5.d.ts:1478:5: 'isArray' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:1568:5: 'isArray' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/restElementWithNumberPropertyName.types b/tests/baselines/reference/restElementWithNumberPropertyName.types index 3764ac6dca41e..0ff930eddf6e7 100644 --- a/tests/baselines/reference/restElementWithNumberPropertyName.types +++ b/tests/baselines/reference/restElementWithNumberPropertyName.types @@ -1,7 +1,7 @@ === tests/cases/compiler/restElementWithNumberPropertyName.ts === const { 0: a, ...b } = [0, 1, 2]; >a : number ->b : { [n: number]: number; 0: number; 1: number; 2: number; length: 3; toString(): string; toLocaleString(): string; pop(): number; push(...items: number[]): number; concat(...items: ConcatArray[]): number[]; concat(...items: (number | ConcatArray)[]): number[]; join(separator?: string): string; reverse(): number[]; shift(): number; slice(start?: number, end?: number): number[]; sort(compareFn?: (a: number, b: number) => number): [number, number, number]; splice(start: number, deleteCount?: number): number[]; splice(start: number, deleteCount: number, ...items: number[]): number[]; unshift(...items: number[]): number; indexOf(searchElement: number, fromIndex?: number): number; lastIndexOf(searchElement: number, fromIndex?: number): number; every(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; some(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any): void; map(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; filter(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b : { [n: number]: number; 0: number; 1: number; 2: number; length: 3; toString(): string; toLocaleString(): string; pop(): number; push(...items: number[]): number; concat(...items: ConcatArray[]): number[]; concat(...items: (number | ConcatArray)[]): number[]; join(separator?: string): string; reverse(): number[]; shift(): number; slice(start?: number, end?: number): number[]; sort(compareFn?: (a: number, b: number) => number): number[]; splice(start: number, deleteCount?: number): number[]; splice(start: number, deleteCount: number, ...items: number[]): number[]; unshift(...items: number[]): number; indexOf(searchElement: number, fromIndex?: number): number; lastIndexOf(searchElement: number, fromIndex?: number): number; every(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; some(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any): void; map(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; filter(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >[0, 1, 2] : [number, number, number] >0 : 0 >1 : 1 diff --git a/tests/baselines/reference/restInvalidArgumentType.types b/tests/baselines/reference/restInvalidArgumentType.types index 119b0394726da..221b46cf9e98c 100644 --- a/tests/baselines/reference/restInvalidArgumentType.types +++ b/tests/baselines/reference/restInvalidArgumentType.types @@ -71,7 +71,7 @@ function f(p1: T, p2: T[]) { >p1 : T var {...r2} = p2; // OK ->r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): 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): T; 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; } +>r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } >p2 : T[] var {...r3} = t; // Error, generic type paramter diff --git a/tests/baselines/reference/restParameterWithBindingPattern3.types b/tests/baselines/reference/restParameterWithBindingPattern3.types index 392cb1cd90a3e..f170fcb61647c 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern3.types +++ b/tests/baselines/reference/restParameterWithBindingPattern3.types @@ -31,5 +31,5 @@ function e(...{0: a = 1, 1: b = true, ...rest: rest}: [boolean, string, number]) >b : string >true : true >rest : any ->rest : { [n: number]: string | number | boolean; 0: boolean; 1: string; 2: number; length: 3; toString(): string; toLocaleString(): string; pop(): string | number | boolean; push(...items: (string | number | boolean)[]): number; concat(...items: ConcatArray[]): (string | number | boolean)[]; concat(...items: (string | number | boolean | ConcatArray)[]): (string | number | boolean)[]; join(separator?: string): string; reverse(): (string | number | boolean)[]; shift(): string | number | boolean; slice(start?: number, end?: number): (string | number | boolean)[]; sort(compareFn?: (a: string | number | boolean, b: string | number | boolean) => number): [boolean, string, number]; splice(start: number, deleteCount?: number): (string | number | boolean)[]; splice(start: number, deleteCount: number, ...items: (string | number | boolean)[]): (string | number | boolean)[]; unshift(...items: (string | number | boolean)[]): number; indexOf(searchElement: string | number | boolean, fromIndex?: number): number; lastIndexOf(searchElement: string | number | boolean, fromIndex?: number): number; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; some(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => void, thisArg?: any): void; map(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => U, thisArg?: any): U[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): (string | number | boolean)[]; reduce(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean): string | number | boolean; reduce(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue: string | number | boolean): string | number | boolean; reduce(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean): string | number | boolean; reduceRight(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue: string | number | boolean): string | number | boolean; reduceRight(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; } +>rest : { [n: number]: string | number | boolean; 0: boolean; 1: string; 2: number; length: 3; toString(): string; toLocaleString(): string; pop(): string | number | boolean; push(...items: (string | number | boolean)[]): number; concat(...items: ConcatArray[]): (string | number | boolean)[]; concat(...items: (string | number | boolean | ConcatArray)[]): (string | number | boolean)[]; join(separator?: string): string; reverse(): (string | number | boolean)[]; shift(): string | number | boolean; slice(start?: number, end?: number): (string | number | boolean)[]; sort(compareFn?: (a: string | number | boolean, b: string | number | boolean) => number): (string | number | boolean)[]; splice(start: number, deleteCount?: number): (string | number | boolean)[]; splice(start: number, deleteCount: number, ...items: (string | number | boolean)[]): (string | number | boolean)[]; unshift(...items: (string | number | boolean)[]): number; indexOf(searchElement: string | number | boolean, fromIndex?: number): number; lastIndexOf(searchElement: string | number | boolean, fromIndex?: number): number; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; some(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => void, thisArg?: any): void; map(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => U, thisArg?: any): U[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): (string | number | boolean)[]; reduce(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue?: string | number | boolean): string | number | boolean; reduce(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue?: string | number | boolean): string | number | boolean; reduceRight(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; } diff --git a/tests/baselines/reference/restPropertyWithBindingPattern.types b/tests/baselines/reference/restPropertyWithBindingPattern.types index 988d9b3c7afdc..29a83e1182986 100644 --- a/tests/baselines/reference/restPropertyWithBindingPattern.types +++ b/tests/baselines/reference/restPropertyWithBindingPattern.types @@ -17,14 +17,14 @@ ({...[]} = {}); >({...[]} = {}) : {} >{...[]} = {} : {} ->{...[]} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): []; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never): never; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never): never; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } +>{...[]} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): never[]; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } >[] : [] >{} : {} ({...([])} = {}); >({...([])} = {}) : {} >{...([])} = {} : {} ->{...([])} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): []; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never): never; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never): never; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } +>{...([])} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): never[]; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } >([]) : [] >[] : [] >{} : {} diff --git a/tests/baselines/reference/returnTypeParameterWithModules.symbols b/tests/baselines/reference/returnTypeParameterWithModules.symbols index f147c3f79a23e..6c709d4c15255 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.symbols +++ b/tests/baselines/reference/returnTypeParameterWithModules.symbols @@ -13,11 +13,11 @@ module M1 { return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); >Array.prototype.reduce.apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --)) ->Array.prototype.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Array.prototype.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.es5.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >prototype : Symbol(ArrayConstructor.prototype, Decl(lib.es5.d.ts, --, --)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --)) >ar : Symbol(ar, Decl(returnTypeParameterWithModules.ts, 1, 30)) >e : Symbol(e, Decl(returnTypeParameterWithModules.ts, 1, 36)) diff --git a/tests/baselines/reference/returnTypeParameterWithModules.types b/tests/baselines/reference/returnTypeParameterWithModules.types index d3601048bce91..3ca98948a17e1 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.types +++ b/tests/baselines/reference/returnTypeParameterWithModules.types @@ -11,11 +11,11 @@ module M1 { return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); >Array.prototype.reduce.apply(ar, e ? [f, e] : [f]) : any >Array.prototype.reduce.apply : (this: Function, thisArg: any, argArray?: any) => any ->Array.prototype.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>Array.prototype.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >Array.prototype : any[] >Array : ArrayConstructor >prototype : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >apply : (this: Function, thisArg: any, argArray?: any) => any >ar : any >e ? [f, e] : [f] : any[] diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index 989584c31b9a3..3d8ee5d8ec553 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index 02bc647385ee3..fe5dc5298dfa3 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index fb8bb58067511..04c976ac5bbc6 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1051:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/spreadInvalidArgumentType.types b/tests/baselines/reference/spreadInvalidArgumentType.types index 7698e240abbc3..72527abb0a1e8 100644 --- a/tests/baselines/reference/spreadInvalidArgumentType.types +++ b/tests/baselines/reference/spreadInvalidArgumentType.types @@ -73,8 +73,8 @@ function f(p1: T, p2: T[]) { >p1 : T var o2 = { ...p2 }; // OK ->o2 : { [x: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): 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): T; 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; } ->{ ...p2 } : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): 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): T; 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; } +>o2 : { [x: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } +>{ ...p2 } : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } >p2 : T[] var o3 = { ...t }; // OK, generic type paramter diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index e275dae6dfd5f..6a3c26fbf9514 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:614:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:708:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index 5e9498cede1eb..daf75f0380cd1 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:614:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:708:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt index 13147855b73b1..7ae8f82e9e788 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt @@ -113,7 +113,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio fn5 `${ (n) => n.toFixed() }`; // will error; 'n' should have type 'string'. ~~~~~~~ !!! error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'? -!!! related TS2728 /.ts/lib.es2015.core.d.ts:485:5: 'fixed' is declared here. +!!! related TS2728 /.ts/lib.es2015.core.d.ts:504:5: 'fixed' is declared here. fn5 `${ (n) => n.substr(0) }`; \ No newline at end of file diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index fb6457929e4b2..351e0703ef01f 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.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) return typedArrays; @@ -460,73 +460,73 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) 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.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -547,73 +547,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -635,81 +635,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) @@ -735,81 +735,81 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) diff --git a/tests/baselines/reference/typedArrays.types b/tests/baselines/reference/typedArrays.types index 5cd4879be7e66..6cd60d0b62203 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): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : number[] return typedArrays; @@ -384,9 +384,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >0 : 0 >Int8Array.from(obj) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike typedArrays[1] = Uint8Array.from(obj); @@ -395,9 +395,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >1 : 1 >Uint8Array.from(obj) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike typedArrays[2] = Int16Array.from(obj); @@ -406,9 +406,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >2 : 2 >Int16Array.from(obj) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike typedArrays[3] = Uint16Array.from(obj); @@ -417,9 +417,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >3 : 3 >Uint16Array.from(obj) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike typedArrays[4] = Int32Array.from(obj); @@ -428,9 +428,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >4 : 4 >Int32Array.from(obj) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike typedArrays[5] = Uint32Array.from(obj); @@ -439,9 +439,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >5 : 5 >Uint32Array.from(obj) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike typedArrays[6] = Float32Array.from(obj); @@ -450,9 +450,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >6 : 6 >Float32Array.from(obj) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike typedArrays[7] = Float64Array.from(obj); @@ -461,9 +461,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >7 : 7 >Float64Array.from(obj) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike typedArrays[8] = Uint8ClampedArray.from(obj); @@ -472,9 +472,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike return typedArrays; @@ -755,9 +755,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -767,9 +767,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -779,9 +779,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -791,9 +791,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -803,9 +803,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -815,9 +815,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -827,9 +827,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -839,9 +839,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -851,9 +851,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -878,9 +878,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -890,9 +890,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -902,9 +902,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -914,9 +914,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -926,9 +926,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -938,9 +938,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -950,9 +950,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -962,9 +962,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -974,9 +974,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -1002,9 +1002,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn, thisArg) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1015,9 +1015,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn, thisArg) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1028,9 +1028,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn, thisArg) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1041,9 +1041,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn, thisArg) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1054,9 +1054,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn, thisArg) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1067,9 +1067,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn, thisArg) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1080,9 +1080,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn, thisArg) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1093,9 +1093,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn, thisArg) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1106,9 +1106,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1135,9 +1135,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn, thisArg) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike): Int8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1148,9 +1148,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn, thisArg) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1161,9 +1161,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn, thisArg) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike): Int16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1174,9 +1174,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn, thisArg) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint16Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1187,9 +1187,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn, thisArg) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike): Int32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1200,9 +1200,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn, thisArg) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike): Uint32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1213,9 +1213,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn, thisArg) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike): Float32Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1226,9 +1226,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn, thisArg) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike): Float64Array; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1239,9 +1239,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} diff --git a/tests/baselines/reference/unionAndIntersectionInference1.symbols b/tests/baselines/reference/unionAndIntersectionInference1.symbols index 9b4e7244cfd98..ffccac7b9f162 100644 --- a/tests/baselines/reference/unionAndIntersectionInference1.symbols +++ b/tests/baselines/reference/unionAndIntersectionInference1.symbols @@ -272,9 +272,9 @@ const assign = (a: T, b: U) => Object.assign(a, b); >T : Symbol(T, Decl(unionAndIntersectionInference1.ts, 94, 16)) >b : Symbol(b, Decl(unionAndIntersectionInference1.ts, 94, 27)) >U : Symbol(U, Decl(unionAndIntersectionInference1.ts, 94, 18)) ->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >a : Symbol(a, Decl(unionAndIntersectionInference1.ts, 94, 22)) >b : Symbol(b, Decl(unionAndIntersectionInference1.ts, 94, 27)) diff --git a/tests/baselines/reference/unionAndIntersectionInference1.types b/tests/baselines/reference/unionAndIntersectionInference1.types index 51683684f2a57..48c565a08235c 100644 --- a/tests/baselines/reference/unionAndIntersectionInference1.types +++ b/tests/baselines/reference/unionAndIntersectionInference1.types @@ -241,22 +241,22 @@ const func = () => {}; >() => {} : () => void const assign = (a: T, b: U) => Object.assign(a, b); ->assign : (a: T, b: U) => T & U ->(a: T, b: U) => Object.assign(a, b) : (a: T, b: U) => T & U +>assign : (a: T, b: U) => T & Writable +>(a: T, b: U) => Object.assign(a, b) : (a: T, b: U) => T & Writable >a : T >b : U ->Object.assign(a, b) : T & U ->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>Object.assign(a, b) : T & Writable +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Object : ObjectConstructor ->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >a : T >b : U const res: (() => void) & { func: any } = assign(() => {}, { func }); >res : (() => void) & { func: any; } >func : any ->assign(() => {}, { func }) : (() => void) & { func: () => void; } ->assign : (a: T, b: U) => T & U +>assign(() => {}, { func }) : (() => void) & Writable<{ func: () => void; }> +>assign : (a: T, b: U) => T & Writable >() => {} : () => void >{ func } : { func: () => void; } >func : () => void diff --git a/tests/baselines/reference/unionOfClassCalls.errors.txt b/tests/baselines/reference/unionOfClassCalls.errors.txt index 386d34414bbf0..6b6c54520abdc 100644 --- a/tests/baselines/reference/unionOfClassCalls.errors.txt +++ b/tests/baselines/reference/unionOfClassCalls.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/unionOfClassCalls.ts(28,5): error TS2349: This expression is not callable. - Each member of the union type '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }' has signatures, but none of those signatures are compatible with each other. + Each member of the union type '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }' has signatures, but none of those signatures are compatible with each other. ==== tests/cases/compiler/unionOfClassCalls.ts (1 errors) ==== @@ -33,7 +33,7 @@ tests/cases/compiler/unionOfClassCalls.ts(28,5): error TS2349: This expression i arr.reduce((acc: Array, a: number | string, index: number) => { ~~~~~~ !!! error TS2349: This expression is not callable. -!!! error TS2349: Each member of the union type '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }' has signatures, but none of those signatures are compatible with each other. +!!! error TS2349: Each member of the union type '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }' has signatures, but none of those signatures are compatible with each other. return [] }, []) diff --git a/tests/baselines/reference/unionOfClassCalls.symbols b/tests/baselines/reference/unionOfClassCalls.symbols index 03155a66c5a10..77c85093adae8 100644 --- a/tests/baselines/reference/unionOfClassCalls.symbols +++ b/tests/baselines/reference/unionOfClassCalls.symbols @@ -67,9 +67,9 @@ arr.map((a: number | string, index: number) => { // This case still doesn't work because `reduce` has multiple overloads :( arr.reduce((acc: Array, a: number | string, index: number) => { ->arr.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>arr.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >arr : Symbol(arr, Decl(unionOfClassCalls.ts, 18, 5)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >acc : Symbol(acc, Decl(unionOfClassCalls.ts, 27, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(unionOfClassCalls.ts, 27, 31)) @@ -103,9 +103,9 @@ arr1.map((a: number, index: number) => { }) arr1.reduce((acc: number[], a: number, index: number) => { ->arr1.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>arr1.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >arr1 : Symbol(arr1, Decl(unionOfClassCalls.ts, 19, 5)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >acc : Symbol(acc, Decl(unionOfClassCalls.ts, 39, 13)) >a : Symbol(a, Decl(unionOfClassCalls.ts, 39, 27)) >index : Symbol(index, Decl(unionOfClassCalls.ts, 39, 38)) @@ -139,9 +139,9 @@ arr2.map((a: string, index: number) => { }) arr2.reduce((acc: string[], a: string, index: number) => { ->arr2.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>arr2.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >arr2 : Symbol(arr2, Decl(unionOfClassCalls.ts, 20, 5)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >acc : Symbol(acc, Decl(unionOfClassCalls.ts, 50, 13)) >a : Symbol(a, Decl(unionOfClassCalls.ts, 50, 27)) >index : Symbol(index, Decl(unionOfClassCalls.ts, 50, 38)) diff --git a/tests/baselines/reference/unionOfClassCalls.types b/tests/baselines/reference/unionOfClassCalls.types index 7edd1c7f02ac2..06e3e4bab679e 100644 --- a/tests/baselines/reference/unionOfClassCalls.types +++ b/tests/baselines/reference/unionOfClassCalls.types @@ -65,9 +65,9 @@ arr.map((a: number | string, index: number) => { // This case still doesn't work because `reduce` has multiple overloads :( arr.reduce((acc: Array, a: number | string, index: number) => { >arr.reduce((acc: Array, a: number | string, index: number) => { return []}, []) : any ->arr.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>arr.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >arr : number[] | string[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } | { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >(acc: Array, a: number | string, index: number) => { return []} : (acc: Array, a: number | string, index: number) => never[] >acc : string[] >a : string | number @@ -109,9 +109,9 @@ arr1.map((a: number, index: number) => { arr1.reduce((acc: number[], a: number, index: number) => { >arr1.reduce((acc: number[], a: number, index: number) => { return [a]}, []) : number[] ->arr1.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>arr1.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >arr1 : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number | undefined): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(acc: number[], a: number, index: number) => { return [a]} : (acc: number[], a: number, index: number) => number[] >acc : number[] >a : number @@ -153,9 +153,9 @@ arr2.map((a: string, index: number) => { arr2.reduce((acc: string[], a: string, index: number) => { >arr2.reduce((acc: string[], a: string, index: number) => { return []}, []) : never[] ->arr2.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>arr2.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >arr2 : string[] ->reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >(acc: string[], a: string, index: number) => { return []} : (acc: string[], a: string, index: number) => never[] >acc : string[] >a : string diff --git a/tests/baselines/reference/unknownSymbolOffContextualType1.symbols b/tests/baselines/reference/unknownSymbolOffContextualType1.symbols index 1360417ccf386..a7ba8fa2cffc9 100644 --- a/tests/baselines/reference/unknownSymbolOffContextualType1.symbols +++ b/tests/baselines/reference/unknownSymbolOffContextualType1.symbols @@ -61,9 +61,9 @@ function getMaxWidth(elementNames: string[]) { }); var maxWidth = widths.reduce(function (a, b) { >maxWidth : Symbol(maxWidth, Decl(unknownSymbolOffContextualType1.ts, 17, 7)) ->widths.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>widths.reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >widths : Symbol(widths, Decl(unknownSymbolOffContextualType1.ts, 14, 7)) ->reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(unknownSymbolOffContextualType1.ts, 17, 43)) >b : Symbol(b, Decl(unknownSymbolOffContextualType1.ts, 17, 45)) diff --git a/tests/baselines/reference/unknownSymbolOffContextualType1.types b/tests/baselines/reference/unknownSymbolOffContextualType1.types index 556476fcfeb4d..68858384698e7 100644 --- a/tests/baselines/reference/unknownSymbolOffContextualType1.types +++ b/tests/baselines/reference/unknownSymbolOffContextualType1.types @@ -66,9 +66,9 @@ function getMaxWidth(elementNames: string[]) { var maxWidth = widths.reduce(function (a, b) { >maxWidth : any >widths.reduce(function (a, b) { return a > b ? a : b; }) : any ->widths.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>widths.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >widths : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >function (a, b) { return a > b ? a : b; } : (a: any, b: any) => any >a : any >b : any From a332a4e1e7d2d4f87388669b65d5312c31ef444d Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Mon, 11 Jul 2022 05:10:11 +0800 Subject: [PATCH 02/10] Fix fourslash Tests --- src/harness/fourslashInterfaceImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index ddb8c02c69c17..46cedb90b6e99 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1168,6 +1168,7 @@ namespace FourSlashInterface { typeEntry("Partial"), typeEntry("Required"), typeEntry("Readonly"), + typeEntry("Writable"), typeEntry("Pick"), typeEntry("Record"), typeEntry("Exclude"), From d6eb6f865e9818259aeb800eca600548f70a6bde Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Mon, 11 Jul 2022 07:57:14 +0800 Subject: [PATCH 03/10] Spread Bind --- src/lib/es5.d.ts | 80 +----------- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/destructuringTuple.errors.txt | 4 +- .../duplicateNumericIndexers.errors.txt | 4 +- .../reference/externModule.errors.txt | 8 +- ...ithAsClauseAndLateBoundProperty.errors.txt | 2 +- ...wExceptionVariableInCatchClause.errors.txt | 2 +- .../narrowFromAnyWithInstanceof.errors.txt | 4 +- .../narrowFromAnyWithTypePredicate.errors.txt | 4 +- ...erAccessAfterPostfixExpression1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity2.errors.txt | 2 +- .../reference/parserS7.2_A1.5_T2.errors.txt | 4 +- .../reference/parserS7.3_A1.1_T2.errors.txt | 2 +- .../reference/parserS7.6_A4.2_T1.errors.txt | 20 +-- .../reference/parserUnicode1.errors.txt | 4 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../reference/redefineArray.errors.txt | 2 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.6_A4.2_T1.errors.txt | 20 +-- .../reference/strictBindCallApply1.errors.txt | 114 +++++------------- .../reference/strictBindCallApply1.symbols | 92 +++++++------- .../reference/strictBindCallApply1.types | 92 +++++++------- .../reference/strictBindCallApply2.symbols | 4 +- .../reference/strictBindCallApply2.types | 4 +- ...eStringsWithOverloadResolution1.errors.txt | 2 +- ...ingsWithOverloadResolution1_ES6.errors.txt | 2 +- 30 files changed, 182 insertions(+), 310 deletions(-) diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 12353ff6829e0..e46d9d20dc92e 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -341,51 +341,13 @@ interface CallableFunction extends Function { */ bind(this: T, thisArg: ThisParameterType): OmitThisParameter; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - */ - bind(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - * @param arg1 The second argument to bind to the parameters of the function. - */ - bind(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - * @param arg1 The second argument to bind to the parameters of the function. - * @param arg2 The third argument to bind to the parameters of the function. - */ - bind(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - * @param arg1 The second argument to bind to the parameters of the function. - * @param arg2 The third argument to bind to the parameters of the function. - * @param arg3 The fourth to bind to the parameters of the function. - */ - bind(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; - /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. * @param thisArg The object to be used as the this object. * @param args Arguments to bind to the parameters of the function. */ - bind(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; + bind(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } interface NewableFunction extends Function { @@ -415,51 +377,13 @@ interface NewableFunction extends Function { */ bind(this: T, thisArg: any): T; - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - */ - bind(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - * @param arg1 The second argument to bind to the parameters of the function. - */ - bind(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - * @param arg1 The second argument to bind to the parameters of the function. - * @param arg2 The third argument to bind to the parameters of the function. - */ - bind(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; - - /** - * For a given function, creates a bound function that has the same body as the original function. - * The this object of the bound function is associated with the specified object, and has the specified initial parameters. - * @param thisArg The object to be used as the this object. - * @param arg0 The first argument to bind to the parameters of the function. - * @param arg1 The second argument to bind to the parameters of the function. - * @param arg2 The third argument to bind to the parameters of the function. - * @param arg3 The fourth to bind to the parameters of the function. - */ - bind(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; - /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. * @param thisArg The object to be used as the this object. * @param args Arguments to bind to the parameters of the function. */ - bind(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; + bind(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } interface IArguments { diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index 1db6a015d9c7e..63e85086026c2 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1572:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1496:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/destructuringTuple.errors.txt b/tests/baselines/reference/destructuringTuple.errors.txt index 59142e251958c..74859621dab02 100644 --- a/tests/baselines/reference/destructuringTuple.errors.txt +++ b/tests/baselines/reference/destructuringTuple.errors.txt @@ -33,8 +33,8 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat !!! error TS2769: Overload 2 of 2, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. !!! error TS2769: Type 'never[]' is not assignable to type '[]'. !!! error TS2769: Target allows only 0 element(s) but source may have more. -!!! related TS6502 /.ts/lib.es5.d.ts:1538:24: The expected type comes from the return type of this signature. -!!! related TS6502 /.ts/lib.es5.d.ts:1544:27: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1462:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1468:27: The expected type comes from the return type of this signature. ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index 99e5fa0cbc232..df3a0bddf7f33 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt +++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt @@ -10,8 +10,8 @@ tests/cases/conformance/types/members/duplicateNumericIndexers.ts(24,5): error T tests/cases/conformance/types/members/duplicateNumericIndexers.ts(25,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(29,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(30,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(617,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(1558,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(541,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(1482,5): error TS2374: Duplicate index signature for type 'number'. ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ==== diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index e35136aa6c7f5..5bab58dd8ea7c 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -66,20 +66,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat var d=new XDate(); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. d.getDay(); d=new XDate(1978,2); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. n=XDate.UTC(1964,2,1); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:1027:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index a0f0c3db6b3dc..41379a772960e 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -7,5 +7,5 @@ tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error T tgt2 = src2; // Should error ~~~~ !!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. -!!! related TS2728 /.ts/lib.es5.d.ts:1383:5: 'length' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1307:5: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index 20ac5ffef67d1..315907236e47a 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ !!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1135:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1059:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index c12b61de8a744..d959bf75cd4fb 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1135:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1059:5: 'message' is declared here. } if (x instanceof Date) { @@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:883:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:807:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index a00ad8b1ea4ed..1accbd9fffca0 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1135:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1059:5: 'message' is declared here. } if (isDate(x)) { @@ -49,6 +49,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:883:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:807:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index 7f2dd67de8bb9..8774e9850396f 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo !!! error TS1005: ';' expected. ~~~~~~~~ !!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? -!!! related TS2728 /.ts/lib.es5.d.ts:630:13: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:554:13: 'String' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt index 780f0bc01eb28..612dfae43f32a 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt @@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1131:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1055:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt index d9e45d650866e..49473d1bfe1e9 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre (1) /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1131:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1055:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index cf90648a56ea0..5165bfaa2c146 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index ec66e3f78d5af..e1ddda588b95b 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index 9ec58161e2856..55efb45e24ef5 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index e35551841ed55..df0b359ff673c 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index ab44d383345d0..f282a155b8f6b 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 0e457a33f0bc3..b23ce9aea72de 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index bfd5d2c42cdbe..a496fd467f7ae 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1617:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index 8f52965950be7..c608420610369 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -5,4 +5,4 @@ tests/cases/compiler/redefineArray.ts(1,1): error TS2741: Property 'isArray' is Array = function (n:number, s:string) {return n;}; ~~~~~ !!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type 'ArrayConstructor'. -!!! related TS2728 /.ts/lib.es5.d.ts:1568:5: 'isArray' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:1492:5: 'isArray' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index 3d8ee5d8ec553..cfab522b77301 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index fe5dc5298dfa3..b83d9f54d6913 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index 04c976ac5bbc6..d7caaf6826de8 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1145:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/strictBindCallApply1.errors.txt b/tests/baselines/reference/strictBindCallApply1.errors.txt index b0137d9300be9..c569bdb829ac3 100644 --- a/tests/baselines/reference/strictBindCallApply1.errors.txt +++ b/tests/baselines/reference/strictBindCallApply1.errors.txt @@ -1,11 +1,4 @@ -tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2769: No overload matches this call. - Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error. - Argument of type 'number' is not assignable to parameter of type 'string'. - Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. - The 'this' context of type '(a: number, b: string) => string' is not assignable to method's 'this' of type '(this: undefined, ...args: (10 | 20)[]) => string'. - Types of parameters 'b' and 'args' are incompatible. - Type 'number' is not assignable to type 'string'. - Type 'number' is not assignable to type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(11,35): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(17,15): error TS2554: Expected 3 arguments, but got 2. tests/cases/conformance/functions/strictBindCallApply1.ts(18,35): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(19,44): error TS2554: Expected 3 arguments, but got 4. @@ -14,22 +7,12 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(22,32): error TS2345: tests/cases/conformance/functions/strictBindCallApply1.ts(23,37): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(24,32): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[a: number, b: string]'. Source has 3 element(s) but target allows only 2. -tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2769: No overload matches this call. - Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error. - Argument of type 'number' is not assignable to parameter of type 'string'. - Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. - The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (10 | 20)[]) => string'. - Types of parameters 'b' and 'args' are incompatible. - Type 'number' is not assignable to type 'string'. - Type 'number' is not assignable to type 'string'. -tests/cases/conformance/functions/strictBindCallApply1.ts(42,11): error TS2769: No overload matches this call. - Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. +tests/cases/conformance/functions/strictBindCallApply1.ts(41,29): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(42,22): error TS2769: No overload matches this call. + Overload 1 of 2, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type 'C'. + Overload 2 of 2, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. Argument of type 'undefined' is not assignable to parameter of type 'C'. - Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error. - The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (string | number)[]) => string'. - Types of parameters 'a' and 'args' are incompatible. - Type 'string | number' is not assignable to type 'number'. - Type 'string' is not assignable to type 'number'. tests/cases/conformance/functions/strictBindCallApply1.ts(48,17): error TS2554: Expected 3 arguments, but got 2. tests/cases/conformance/functions/strictBindCallApply1.ts(49,29): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(50,38): error TS2554: Expected 3 arguments, but got 4. @@ -40,16 +23,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(55,31): error TS2322: tests/cases/conformance/functions/strictBindCallApply1.ts(56,26): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[a: number, b: string]'. Source has 3 element(s) but target allows only 2. tests/cases/conformance/functions/strictBindCallApply1.ts(57,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. -tests/cases/conformance/functions/strictBindCallApply1.ts(62,11): error TS2769: No overload matches this call. - Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error. - Argument of type 'number' is not assignable to parameter of type 'string'. - Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error. - The 'this' context of type 'typeof C' is not assignable to method's 'this' of type 'new (...args: (10 | 20)[]) => C'. - Types of construct signatures are incompatible. - Type 'new (a: number, b: string) => C' is not assignable to type 'new (...args: (10 | 20)[]) => C'. - Types of parameters 'b' and 'args' are incompatible. - Type 'number' is not assignable to type 'string'. - Type 'number' is not assignable to type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(62,33): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(65,3): error TS2554: Expected 3 arguments, but got 2. tests/cases/conformance/functions/strictBindCallApply1.ts(66,15): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(67,24): error TS2554: Expected 3 arguments, but got 4. @@ -59,20 +33,20 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(71,17): error TS2322: tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[a: number, b: string]'. Source has 3 element(s) but target allows only 2. tests/cases/conformance/functions/strictBindCallApply1.ts(76,5): error TS2769: No overload matches this call. - Overload 1 of 6, '(this: (this: 1, ...args: T) => void, thisArg: 1): (...args: T) => void', gave the following error. + Overload 1 of 2, '(this: (this: 1, ...args: T) => void, thisArg: 1): (...args: T) => void', gave the following error. Argument of type '2' is not assignable to parameter of type '1'. - Overload 2 of 6, '(this: (this: 1, ...args: unknown[]) => void, thisArg: 1, ...args: unknown[]): (...args: unknown[]) => void', gave the following error. + Overload 2 of 2, '(this: (this: 1, ...args: unknown[]) => void, thisArg: 1): (...args: unknown[]) => void', gave the following error. The 'this' context of type '(this: 1, ...args: T) => void' is not assignable to method's 'this' of type '(this: 1, ...args: unknown[]) => void'. Types of parameters 'args' and 'args' are incompatible. Type 'unknown[]' is not assignable to type 'T'. 'unknown[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown[]'. tests/cases/conformance/functions/strictBindCallApply1.ts(81,5): error TS2769: No overload matches this call. - Overload 1 of 6, '(this: (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void, thisArg: 1): (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void', gave the following error. + Overload 1 of 2, '(this: (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void, thisArg: 1): (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void', gave the following error. Argument of type '2' is not assignable to parameter of type '1'. - Overload 2 of 6, '(this: (this: 1, ...args: unknown[]) => void, thisArg: 1, ...args: unknown[]): (...args: unknown[]) => void', gave the following error. - The 'this' context of type '(this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void' is not assignable to method's 'this' of type '(this: 1, ...args: unknown[]) => void'. - Types of parameters 'args' and 'args' are incompatible. - Type 'unknown[]' is not assignable to type 'T extends 1 ? [unknown] : [unknown, unknown]'. + Overload 2 of 2, '(this: (this: 1, args_0: unknown) => void, thisArg: 1): (args_0: unknown) => void', gave the following error. + The 'this' context of type '(this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void' is not assignable to method's 'this' of type '(this: 1, args_0: unknown) => void'. + Types of parameters 'args' and 'args_0' are incompatible. + Type '[unknown]' is not assignable to type 'T extends 1 ? [unknown] : [unknown, unknown]'. ==== tests/cases/conformance/functions/strictBindCallApply1.ts (26 errors) ==== @@ -87,15 +61,8 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(81,5): error TS2769: N let f01 = foo.bind(undefined, 10); let f02 = foo.bind(undefined, 10, "hello"); let f03 = foo.bind(undefined, 10, 20); // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error. -!!! error TS2769: Argument of type 'number' is not assignable to parameter of type 'string'. -!!! error TS2769: Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. -!!! error TS2769: The 'this' context of type '(a: number, b: string) => string' is not assignable to method's 'this' of type '(this: undefined, ...args: (10 | 20)[]) => string'. -!!! error TS2769: Types of parameters 'b' and 'args' are incompatible. -!!! error TS2769: Type 'number' is not assignable to type 'string'. -!!! error TS2769: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. let f04 = overloaded.bind(undefined); // typeof overloaded let f05 = generic.bind(undefined); // typeof generic @@ -140,25 +107,15 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(81,5): error TS2769: N let f11 = c.foo.bind(c, 10); let f12 = c.foo.bind(c, 10, "hello"); let f13 = c.foo.bind(c, 10, 20); // Error - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error. -!!! error TS2769: Argument of type 'number' is not assignable to parameter of type 'string'. -!!! error TS2769: Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. -!!! error TS2769: The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (10 | 20)[]) => string'. -!!! error TS2769: Types of parameters 'b' and 'args' are incompatible. -!!! error TS2769: Type 'number' is not assignable to type 'string'. -!!! error TS2769: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. let f14 = c.foo.bind(undefined); // Error - ~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~ !!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. +!!! error TS2769: Overload 1 of 2, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type 'C'. +!!! error TS2769: Overload 2 of 2, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. !!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type 'C'. -!!! error TS2769: Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error. -!!! error TS2769: The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (string | number)[]) => string'. -!!! error TS2769: Types of parameters 'a' and 'args' are incompatible. -!!! error TS2769: Type 'string | number' is not assignable to type 'number'. -!!! error TS2769: Type 'string' is not assignable to type 'number'. let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded let f16 = c.generic.bind(c); // typeof C.prototype.generic @@ -197,17 +154,8 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(81,5): error TS2769: N let f21 = C.bind(undefined, 10); let f22 = C.bind(undefined, 10, "hello"); let f23 = C.bind(undefined, 10, 20); // Error - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error. -!!! error TS2769: Argument of type 'number' is not assignable to parameter of type 'string'. -!!! error TS2769: Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error. -!!! error TS2769: The 'this' context of type 'typeof C' is not assignable to method's 'this' of type 'new (...args: (10 | 20)[]) => C'. -!!! error TS2769: Types of construct signatures are incompatible. -!!! error TS2769: Type 'new (a: number, b: string) => C' is not assignable to type 'new (...args: (10 | 20)[]) => C'. -!!! error TS2769: Types of parameters 'b' and 'args' are incompatible. -!!! error TS2769: Type 'number' is not assignable to type 'string'. -!!! error TS2769: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. C.call(c, 10, "hello"); C.call(c, 10); // Error @@ -238,9 +186,9 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(81,5): error TS2769: N callback.bind(2); // Error ~~~~~~~~~~~~~~~~ !!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 6, '(this: (this: 1, ...args: T) => void, thisArg: 1): (...args: T) => void', gave the following error. +!!! error TS2769: Overload 1 of 2, '(this: (this: 1, ...args: T) => void, thisArg: 1): (...args: T) => void', gave the following error. !!! error TS2769: Argument of type '2' is not assignable to parameter of type '1'. -!!! error TS2769: Overload 2 of 6, '(this: (this: 1, ...args: unknown[]) => void, thisArg: 1, ...args: unknown[]): (...args: unknown[]) => void', gave the following error. +!!! error TS2769: Overload 2 of 2, '(this: (this: 1, ...args: unknown[]) => void, thisArg: 1): (...args: unknown[]) => void', gave the following error. !!! error TS2769: The 'this' context of type '(this: 1, ...args: T) => void' is not assignable to method's 'this' of type '(this: 1, ...args: unknown[]) => void'. !!! error TS2769: Types of parameters 'args' and 'args' are incompatible. !!! error TS2769: Type 'unknown[]' is not assignable to type 'T'. @@ -252,12 +200,12 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(81,5): error TS2769: N callback.bind(2); // Error ~~~~~~~~~~~~~~~~ !!! error TS2769: No overload matches this call. -!!! error TS2769: Overload 1 of 6, '(this: (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void, thisArg: 1): (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void', gave the following error. +!!! error TS2769: Overload 1 of 2, '(this: (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void, thisArg: 1): (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void', gave the following error. !!! error TS2769: Argument of type '2' is not assignable to parameter of type '1'. -!!! error TS2769: Overload 2 of 6, '(this: (this: 1, ...args: unknown[]) => void, thisArg: 1, ...args: unknown[]): (...args: unknown[]) => void', gave the following error. -!!! error TS2769: The 'this' context of type '(this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void' is not assignable to method's 'this' of type '(this: 1, ...args: unknown[]) => void'. -!!! error TS2769: Types of parameters 'args' and 'args' are incompatible. -!!! error TS2769: Type 'unknown[]' is not assignable to type 'T extends 1 ? [unknown] : [unknown, unknown]'. +!!! error TS2769: Overload 2 of 2, '(this: (this: 1, args_0: unknown) => void, thisArg: 1): (args_0: unknown) => void', gave the following error. +!!! error TS2769: The 'this' context of type '(this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void' is not assignable to method's 'this' of type '(this: 1, args_0: unknown) => void'. +!!! error TS2769: Types of parameters 'args' and 'args_0' are incompatible. +!!! error TS2769: Type '[unknown]' is not assignable to type 'T extends 1 ? [unknown] : [unknown, unknown]'. } // Repro from #32964 diff --git a/tests/baselines/reference/strictBindCallApply1.symbols b/tests/baselines/reference/strictBindCallApply1.symbols index b35c0e19a082d..76a01f2008357 100644 --- a/tests/baselines/reference/strictBindCallApply1.symbols +++ b/tests/baselines/reference/strictBindCallApply1.symbols @@ -21,44 +21,44 @@ declare function generic(x: T): T; let f00 = foo.bind(undefined); >f00 : Symbol(f00, Decl(strictBindCallApply1.ts, 7, 3)) ->foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f01 = foo.bind(undefined, 10); >f01 : Symbol(f01, Decl(strictBindCallApply1.ts, 8, 3)) ->foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f02 = foo.bind(undefined, 10, "hello"); >f02 : Symbol(f02, Decl(strictBindCallApply1.ts, 9, 3)) ->foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f03 = foo.bind(undefined, 10, 20); // Error >f03 : Symbol(f03, Decl(strictBindCallApply1.ts, 10, 3)) ->foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f04 = overloaded.bind(undefined); // typeof overloaded >f04 : Symbol(f04, Decl(strictBindCallApply1.ts, 12, 3)) ->overloaded.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>overloaded.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >overloaded : Symbol(overloaded, Decl(strictBindCallApply1.ts, 0, 51), Decl(strictBindCallApply1.ts, 2, 47)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f05 = generic.bind(undefined); // typeof generic >f05 : Symbol(f05, Decl(strictBindCallApply1.ts, 13, 3)) ->generic.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>generic.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >generic : Symbol(generic, Decl(strictBindCallApply1.ts, 3, 47)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let c00 = foo.call(undefined, 10, "hello"); @@ -161,65 +161,65 @@ declare let obj: {}; let f10 = c.foo.bind(c); >f10 : Symbol(f10, Decl(strictBindCallApply1.ts, 37, 3)) ->c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) let f11 = c.foo.bind(c, 10); >f11 : Symbol(f11, Decl(strictBindCallApply1.ts, 38, 3)) ->c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) let f12 = c.foo.bind(c, 10, "hello"); >f12 : Symbol(f12, Decl(strictBindCallApply1.ts, 39, 3)) ->c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) let f13 = c.foo.bind(c, 10, 20); // Error >f13 : Symbol(f13, Decl(strictBindCallApply1.ts, 40, 3)) ->c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) let f14 = c.foo.bind(undefined); // Error >f14 : Symbol(f14, Decl(strictBindCallApply1.ts, 41, 3)) ->c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 26, 40)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded >f15 : Symbol(f15, Decl(strictBindCallApply1.ts, 43, 3)) ->c.overloaded.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.overloaded.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.overloaded : Symbol(C.overloaded, Decl(strictBindCallApply1.ts, 27, 63), Decl(strictBindCallApply1.ts, 28, 34), Decl(strictBindCallApply1.ts, 29, 34)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >overloaded : Symbol(C.overloaded, Decl(strictBindCallApply1.ts, 27, 63), Decl(strictBindCallApply1.ts, 28, 34), Decl(strictBindCallApply1.ts, 29, 34)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) let f16 = c.generic.bind(c); // typeof C.prototype.generic >f16 : Symbol(f16, Decl(strictBindCallApply1.ts, 44, 3)) ->c.generic.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.generic.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c.generic : Symbol(C.generic, Decl(strictBindCallApply1.ts, 30, 53)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) >generic : Symbol(C.generic, Decl(strictBindCallApply1.ts, 30, 53)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(strictBindCallApply1.ts, 34, 11)) let c10 = c.foo.call(c, 10, "hello"); @@ -314,30 +314,30 @@ let a14 = c.foo.apply(undefined, [10, "hello"]); // Error let f20 = C.bind(undefined); >f20 : Symbol(f20, Decl(strictBindCallApply1.ts, 58, 3)) ->C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >C : Symbol(C, Decl(strictBindCallApply1.ts, 23, 50)) ->bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f21 = C.bind(undefined, 10); >f21 : Symbol(f21, Decl(strictBindCallApply1.ts, 59, 3)) ->C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >C : Symbol(C, Decl(strictBindCallApply1.ts, 23, 50)) ->bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f22 = C.bind(undefined, 10, "hello"); >f22 : Symbol(f22, Decl(strictBindCallApply1.ts, 60, 3)) ->C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >C : Symbol(C, Decl(strictBindCallApply1.ts, 23, 50)) ->bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) let f23 = C.bind(undefined, 10, 20); // Error >f23 : Symbol(f23, Decl(strictBindCallApply1.ts, 61, 3)) ->C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >C : Symbol(C, Decl(strictBindCallApply1.ts, 23, 50)) ->bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) C.call(c, 10, "hello"); @@ -397,14 +397,14 @@ function bar(callback: (this: 1, ...args: T) => void) { >T : Symbol(T, Decl(strictBindCallApply1.ts, 73, 13)) callback.bind(1); ->callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >callback : Symbol(callback, Decl(strictBindCallApply1.ts, 73, 34)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) callback.bind(2); // Error ->callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >callback : Symbol(callback, Decl(strictBindCallApply1.ts, 73, 34)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } function baz(callback: (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void) { @@ -416,14 +416,14 @@ function baz(callback: (this: 1, ...args: T extends 1 ? [unknow >T : Symbol(T, Decl(strictBindCallApply1.ts, 78, 13)) callback.bind(1); ->callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >callback : Symbol(callback, Decl(strictBindCallApply1.ts, 78, 30)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) callback.bind(2); // Error ->callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>callback.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >callback : Symbol(callback, Decl(strictBindCallApply1.ts, 78, 30)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } // Repro from #32964 @@ -433,11 +433,11 @@ class Foo { constructor() { this.fn.bind(this); ->this.fn.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>this.fn.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >this.fn : Symbol(Foo.fn, Decl(strictBindCallApply1.ts, 87, 5)) >this : Symbol(Foo, Decl(strictBindCallApply1.ts, 81, 1)) >fn : Symbol(Foo.fn, Decl(strictBindCallApply1.ts, 87, 5)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >this : Symbol(Foo, Decl(strictBindCallApply1.ts, 81, 1)) } @@ -453,11 +453,11 @@ class Bar { constructor() { this.fn.bind(this); ->this.fn.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>this.fn.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >this.fn : Symbol(Bar.fn, Decl(strictBindCallApply1.ts, 95, 5)) >this : Symbol(Bar, Decl(strictBindCallApply1.ts, 90, 1)) >fn : Symbol(Bar.fn, Decl(strictBindCallApply1.ts, 95, 5)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >this : Symbol(Bar, Decl(strictBindCallApply1.ts, 90, 1)) } diff --git a/tests/baselines/reference/strictBindCallApply1.types b/tests/baselines/reference/strictBindCallApply1.types index e401d684492e2..fb28579f72853 100644 --- a/tests/baselines/reference/strictBindCallApply1.types +++ b/tests/baselines/reference/strictBindCallApply1.types @@ -19,26 +19,26 @@ declare function generic(x: T): T; let f00 = foo.bind(undefined); >f00 : (a: number, b: string) => string >foo.bind(undefined) : (a: number, b: string) => string ->foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >foo : (a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined let f01 = foo.bind(undefined, 10); >f01 : (b: string) => string >foo.bind(undefined, 10) : (b: string) => string ->foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >foo : (a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined >10 : 10 let f02 = foo.bind(undefined, 10, "hello"); >f02 : () => string >foo.bind(undefined, 10, "hello") : () => string ->foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >foo : (a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined >10 : 10 >"hello" : "hello" @@ -46,9 +46,9 @@ let f02 = foo.bind(undefined, 10, "hello"); let f03 = foo.bind(undefined, 10, 20); // Error >f03 : () => string >foo.bind(undefined, 10, 20) : () => string ->foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >foo : (a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined >10 : 10 >20 : 20 @@ -56,17 +56,17 @@ let f03 = foo.bind(undefined, 10, 20); // Error let f04 = overloaded.bind(undefined); // typeof overloaded >f04 : { (s: string): number; (n: number): string; } >overloaded.bind(undefined) : { (s: string): number; (n: number): string; } ->overloaded.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>overloaded.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >overloaded : { (s: string): number; (n: number): string; } ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined let f05 = generic.bind(undefined); // typeof generic >f05 : (x: T) => T >generic.bind(undefined) : (x: T) => T ->generic.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>generic.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >generic : (x: T) => T ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined let c00 = foo.call(undefined, 10, "hello"); @@ -196,32 +196,32 @@ declare let obj: {}; let f10 = c.foo.bind(c); >f10 : (a: number, b: string) => string >c.foo.bind(c) : (a: number, b: string) => string ->c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c : C let f11 = c.foo.bind(c, 10); >f11 : (b: string) => string >c.foo.bind(c, 10) : (b: string) => string ->c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c : C >10 : 10 let f12 = c.foo.bind(c, 10, "hello"); >f12 : () => string >c.foo.bind(c, 10, "hello") : () => string ->c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c : C >10 : 10 >"hello" : "hello" @@ -229,11 +229,11 @@ let f12 = c.foo.bind(c, 10, "hello"); let f13 = c.foo.bind(c, 10, 20); // Error >f13 : () => string >c.foo.bind(c, 10, 20) : () => string ->c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c : C >10 : 10 >20 : 20 @@ -241,31 +241,31 @@ let f13 = c.foo.bind(c, 10, 20); // Error let f14 = c.foo.bind(undefined); // Error >f14 : (a: number, b: string) => string >c.foo.bind(undefined) : (a: number, b: string) => string ->c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.foo : (this: C, a: number, b: string) => string >c : C >foo : (this: C, a: number, b: string) => string ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >undefined : undefined let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded >f15 : { (s: string): number; (n: number): string; } >c.overloaded.bind(c) : { (s: string): number; (n: number): string; } ->c.overloaded.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.overloaded.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.overloaded : { (s: string): number; (n: number): string; } >c : C >overloaded : { (s: string): number; (n: number): string; } ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c : C let f16 = c.generic.bind(c); // typeof C.prototype.generic >f16 : (x: T) => T >c.generic.bind(c) : (x: T) => T ->c.generic.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.generic.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c.generic : (x: T) => T >c : C >generic : (x: T) => T ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >c : C let c10 = c.foo.call(c, 10, "hello"); @@ -396,26 +396,26 @@ let a14 = c.foo.apply(undefined, [10, "hello"]); // Error let f20 = C.bind(undefined); >f20 : typeof C >C.bind(undefined) : typeof C ->C.bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C.bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >C : typeof C ->bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >undefined : undefined let f21 = C.bind(undefined, 10); >f21 : new (b: string) => C >C.bind(undefined, 10) : new (b: string) => C ->C.bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C.bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >C : typeof C ->bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >undefined : undefined >10 : 10 let f22 = C.bind(undefined, 10, "hello"); >f22 : new () => C >C.bind(undefined, 10, "hello") : new () => C ->C.bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C.bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >C : typeof C ->bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >undefined : undefined >10 : 10 >"hello" : "hello" @@ -423,9 +423,9 @@ let f22 = C.bind(undefined, 10, "hello"); let f23 = C.bind(undefined, 10, 20); // Error >f23 : new () => C >C.bind(undefined, 10, 20) : new () => C ->C.bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C.bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >C : typeof C ->bind : { (this: T, thisArg: any): T; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>bind : { (this: T, thisArg: any): T; (this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R; } >undefined : undefined >10 : 10 >20 : 20 @@ -514,16 +514,16 @@ function bar(callback: (this: 1, ...args: T) => void) { callback.bind(1); >callback.bind(1) : (...args: T) => void ->callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >callback : (this: 1, ...args: T) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >1 : 1 callback.bind(2); // Error >callback.bind(2) : (...args: T) => void ->callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >callback : (this: 1, ...args: T) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >2 : 2 } @@ -535,16 +535,16 @@ function baz(callback: (this: 1, ...args: T extends 1 ? [unknow callback.bind(1); >callback.bind(1) : (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void ->callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >callback : (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >1 : 1 callback.bind(2); // Error >callback.bind(2) : (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void ->callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>callback.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >callback : (this: 1, ...args: T extends 1 ? [unknown] : [unknown, unknown]) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >2 : 2 } @@ -555,11 +555,11 @@ class Foo { constructor() { this.fn.bind(this); >this.fn.bind(this) : (...args: T) => void ->this.fn.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>this.fn.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >this.fn : (...args: T) => void >this : this >fn : (...args: T) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >this : this } @@ -574,11 +574,11 @@ class Bar { constructor() { this.fn.bind(this); >this.fn.bind(this) : (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void ->this.fn.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>this.fn.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >this.fn : (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void >this : this >fn : (...args: T extends 1 ? [unknown] : [unknown, unknown]) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >this : this } diff --git a/tests/baselines/reference/strictBindCallApply2.symbols b/tests/baselines/reference/strictBindCallApply2.symbols index 015a796fb5186..213ef3e46622e 100644 --- a/tests/baselines/reference/strictBindCallApply2.symbols +++ b/tests/baselines/reference/strictBindCallApply2.symbols @@ -17,8 +17,8 @@ type Test = ThisParameterType; const fb = fn.bind({ blub: "blub" }); >fb : Symbol(fb, Decl(strictBindCallApply2.ts, 7, 5)) ->fn.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>fn.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >fn : Symbol(fn, Decl(strictBindCallApply2.ts, 2, 31)) ->bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >blub : Symbol(blub, Decl(strictBindCallApply2.ts, 7, 20)) diff --git a/tests/baselines/reference/strictBindCallApply2.types b/tests/baselines/reference/strictBindCallApply2.types index 6abb106e66b2f..29f52b62bd952 100644 --- a/tests/baselines/reference/strictBindCallApply2.types +++ b/tests/baselines/reference/strictBindCallApply2.types @@ -15,9 +15,9 @@ type Test = ThisParameterType; const fb = fn.bind({ blub: "blub" }); >fb : () => void >fn.bind({ blub: "blub" }) : () => void ->fn.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>fn.bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >fn : (this: Foo) => void ->bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>bind : { (this: T, thisArg: ThisParameterType): OmitThisParameter; (this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R; } >{ blub: "blub" } : { blub: string; } >blub : string >"blub" : "blub" diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 6a3c26fbf9514..58fcfec0851fd 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:708:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:632:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index daf75f0380cd1..aa893162857c0 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:708:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:632:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ From 23378a188591177f66dc8ed956f812dde83404c9 Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Tue, 12 Jul 2022 05:42:10 +0800 Subject: [PATCH 04/10] Fix Bugs and Add Tests --- src/lib/es2015.core.d.ts | 16 +- src/lib/es2015.iterable.d.ts | 54 +- src/lib/es2019.array.d.ts | 2 +- src/lib/es2020.bigint.d.ts | 8 +- src/lib/es5.d.ts | 121 +++- tests/baselines/reference/arrayCopyWithin.js | 79 +++ .../reference/arrayCopyWithin.symbols | 160 +++++ .../baselines/reference/arrayCopyWithin.types | 155 +++++ tests/baselines/reference/arrayFill.js | 79 +++ tests/baselines/reference/arrayFill.symbols | 160 +++++ tests/baselines/reference/arrayFill.types | 142 ++++ tests/baselines/reference/arrayFind.types | 8 +- .../reference/arrayMethodPredicates.js | 165 +++++ .../reference/arrayMethodPredicates.symbols | 506 ++++++++++++++ .../reference/arrayMethodPredicates.types | 625 ++++++++++++++++++ ...typeIsAssignableToReadonlyArray.errors.txt | 10 +- tests/baselines/reference/arrayReverse.js | 79 +++ .../baselines/reference/arrayReverse.symbols | 160 +++++ tests/baselines/reference/arrayReverse.types | 129 ++++ tests/baselines/reference/arraySort.js | 79 +++ tests/baselines/reference/arraySort.symbols | 208 ++++++ tests/baselines/reference/arraySort.types | 201 ++++++ ...aintOfJavascriptClassExpression.errors.txt | 2 +- .../completionEntryForUnionMethod.baseline | 110 ++- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/destructuringTuple.errors.txt | 4 +- .../duplicateNumericIndexers.errors.txt | 4 +- .../reference/externModule.errors.txt | 8 +- .../formatToPartsFractionalSecond.types | 4 +- .../reference/implementArrayInterface.js | 17 +- .../reference/implementArrayInterface.symbols | 328 +++++---- .../reference/implementArrayInterface.types | 78 ++- .../reference/invalidTypeOfTarget.errors.txt | 2 +- .../reference/keyofAndIndexedAccess.types | 6 +- .../mapConstructorOnReadonlyTuple.js | 9 +- .../mapConstructorOnReadonlyTuple.symbols | 6 +- .../mapConstructorOnReadonlyTuple.types | 25 +- .../reference/mappedTypeAsClauses.types | 4 +- ...ithAsClauseAndLateBoundProperty.errors.txt | 6 +- ...TypeWithAsClauseAndLateBoundProperty.types | 6 +- ...ypeWithAsClauseAndLateBoundProperty2.types | 6 +- ...wExceptionVariableInCatchClause.errors.txt | 2 +- .../narrowFromAnyWithInstanceof.errors.txt | 4 +- .../narrowFromAnyWithTypePredicate.errors.txt | 4 +- .../objectMethodNullability.errors.txt | 135 ++++ .../reference/objectMethodNullability.js | 95 +++ .../reference/objectMethodNullability.symbols | 225 +++++++ .../reference/objectMethodNullability.types | 297 +++++++++ ...erAccessAfterPostfixExpression1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity2.errors.txt | 2 +- .../reference/parserS7.2_A1.5_T2.errors.txt | 4 +- .../reference/parserS7.3_A1.1_T2.errors.txt | 2 +- .../reference/parserS7.6_A4.2_T1.errors.txt | 20 +- .../reference/parserUnicode1.errors.txt | 4 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../reference/redefineArray.errors.txt | 2 +- .../restElementWithNumberPropertyName.types | 2 +- .../reference/restInvalidArgumentType.types | 2 +- .../restParameterWithBindingPattern3.types | 2 +- .../restPropertyWithBindingPattern.types | 4 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.6_A4.2_T1.errors.txt | 20 +- .../reference/spreadInvalidArgumentType.types | 4 +- ...eStringsWithOverloadResolution1.errors.txt | 2 +- ...ingsWithOverloadResolution1_ES6.errors.txt | 2 +- tests/cases/compiler/arrayCopyWithin.ts | 51 ++ tests/cases/compiler/arrayFill.ts | 52 ++ tests/cases/compiler/arrayMethodPredicates.ts | 85 +++ tests/cases/compiler/arrayReverse.ts | 51 ++ tests/cases/compiler/arraySort.ts | 51 ++ .../cases/compiler/implementArrayInterface.ts | 19 +- .../compiler/mapConstructorOnReadonlyTuple.ts | 5 +- .../cases/compiler/objectMethodNullability.ts | 51 ++ 77 files changed, 4696 insertions(+), 294 deletions(-) create mode 100644 tests/baselines/reference/arrayCopyWithin.js create mode 100644 tests/baselines/reference/arrayCopyWithin.symbols create mode 100644 tests/baselines/reference/arrayCopyWithin.types create mode 100644 tests/baselines/reference/arrayFill.js create mode 100644 tests/baselines/reference/arrayFill.symbols create mode 100644 tests/baselines/reference/arrayFill.types create mode 100644 tests/baselines/reference/arrayMethodPredicates.js create mode 100644 tests/baselines/reference/arrayMethodPredicates.symbols create mode 100644 tests/baselines/reference/arrayMethodPredicates.types create mode 100644 tests/baselines/reference/arrayReverse.js create mode 100644 tests/baselines/reference/arrayReverse.symbols create mode 100644 tests/baselines/reference/arrayReverse.types create mode 100644 tests/baselines/reference/arraySort.js create mode 100644 tests/baselines/reference/arraySort.symbols create mode 100644 tests/baselines/reference/arraySort.types create mode 100644 tests/baselines/reference/objectMethodNullability.errors.txt create mode 100644 tests/baselines/reference/objectMethodNullability.js create mode 100644 tests/baselines/reference/objectMethodNullability.symbols create mode 100644 tests/baselines/reference/objectMethodNullability.types create mode 100644 tests/cases/compiler/arrayCopyWithin.ts create mode 100644 tests/cases/compiler/arrayFill.ts create mode 100644 tests/cases/compiler/arrayMethodPredicates.ts create mode 100644 tests/cases/compiler/arrayReverse.ts create mode 100644 tests/cases/compiler/arraySort.ts create mode 100644 tests/cases/compiler/objectMethodNullability.ts diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index 7700aa78f65ef..a0fff84d62003 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -8,7 +8,7 @@ interface Array { * @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: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; + find(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -19,7 +19,7 @@ interface Array { * @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: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; + find(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -30,7 +30,7 @@ interface Array { * @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: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number; + findIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array @@ -40,7 +40,7 @@ interface Array { * @param end index to stop filling the array at. If end is negative, it is treated as * length + end. */ - fill(value: T, start?: number, end?: number): this; + fill(value: T, start?: number, end?: number): T[]; /** * Returns the this object after copying a section of the array identified by start and end @@ -51,7 +51,7 @@ interface Array { * is treated as length + end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): T[]; } interface ArrayConstructor { @@ -346,7 +346,7 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined; + find(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -357,7 +357,7 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined; + find(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -368,7 +368,7 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number; + findIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number; } interface RegExp { diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index 0d6c53ee4f0d5..f01d12be889bd 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -223,15 +223,15 @@ interface String { interface Int8Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -257,15 +257,15 @@ interface Int8ArrayConstructor { interface Uint8Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -291,17 +291,17 @@ interface Uint8ArrayConstructor { interface Uint8ClampedArray { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -327,17 +327,17 @@ interface Uint8ClampedArrayConstructor { interface Int16Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -363,15 +363,15 @@ interface Int16ArrayConstructor { interface Uint16Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -397,15 +397,15 @@ interface Uint16ArrayConstructor { interface Int32Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -431,15 +431,15 @@ interface Int32ArrayConstructor { interface Uint32Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -465,15 +465,15 @@ interface Uint32ArrayConstructor { interface Float32Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } @@ -499,15 +499,15 @@ interface Float32ArrayConstructor { interface Float64Array { [Symbol.iterator](): IterableIterator; /** - * Returns an array of key, value pairs for every entry in the array + * Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, number]>; /** - * Returns an list of keys in the array + * Yields each index in the array. */ keys(): IterableIterator; /** - * Returns an list of values in the array + * Yields each value in the array. */ values(): IterableIterator; } diff --git a/src/lib/es2019.array.d.ts b/src/lib/es2019.array.d.ts index 02655a1bdad05..e507301c6cb4a 100644 --- a/src/lib/es2019.array.d.ts +++ b/src/lib/es2019.array.d.ts @@ -38,7 +38,7 @@ interface Array { * @param thisArg An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ - flatMap (callback: (value: T, index: number, array: T[]) => U | ReadonlyArray, thisArg?: any): U[] + flatMap(callback: (value: T, index: number, array: T[]) => U | ReadonlyArray, thisArg?: any): U[] /** * Returns a new array with all sub-array elements concatenated into it recursively up to the diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index 62caac7b0a480..24df17ab5b8c1 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -350,13 +350,13 @@ interface BigInt64Array { */ subarray(begin?: number, end?: number): BigInt64Array; - /** Converts the array to a string by using the current locale. */ + /** Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** Returns the primitive value of the array. */ valueOf(): BigInt64Array; /** Yields each value in the array. */ @@ -627,13 +627,13 @@ interface BigUint64Array { */ subarray(begin?: number, end?: number): BigUint64Array; - /** Converts the array to a string by using the current locale. */ + /** Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** Returns the primitive value of the array. */ valueOf(): BigUint64Array; /** Yields each value in the array. */ diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index e46d9d20dc92e..3050eaa94d66c 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -228,19 +228,37 @@ interface ObjectConstructor { * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. * @param o Object to test. */ - isSealed(o: any): boolean; + isSealed(o: object): boolean; + + /** + * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. + * @param o Object to test. + */ + isSealed(o: any): true; /** * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. * @param o Object to test. */ - isFrozen(o: any): boolean; + isFrozen(o: object): boolean; + + /** + * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object. + * @param o Object to test. + */ + isFrozen(o: any): true; + + /** + * Returns a value that indicates whether new properties can be added to an object. + * @param o Object to test. + */ + isExtensible(o: object): boolean; /** * Returns a value that indicates whether new properties can be added to an object. * @param o Object to test. */ - isExtensible(o: any): boolean; + isExtensible(o: any): false; /** * Returns the names of the enumerable string properties and methods of an object. @@ -594,13 +612,13 @@ interface NumberConstructor { /** * A value that is less than the largest negative number that can be represented in JavaScript. - * JavaScript displays NEGATIVE_INFINITY values as -infinity. + * JavaScript displays NEGATIVE_INFINITY values as -Infinity. */ readonly NEGATIVE_INFINITY: number; /** * A value greater than the largest number that can be represented in JavaScript. - * JavaScript displays POSITIVE_INFINITY values as infinity. + * JavaScript displays POSITIVE_INFINITY values as Infinity. */ readonly POSITIVE_INFINITY: number; } @@ -1154,13 +1172,17 @@ interface ReadonlyArray { */ readonly length: number; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + * Returns a string representation of the array. The elements are converted to string using their toLocaleString methods. */ toLocaleString(): string; + /** + * Returns the primitive value of the array. + */ + valueOf(): readonly T[]; /** * Combines two or more arrays. * @param items Additional items to add to the end of array1. @@ -1286,13 +1308,17 @@ interface Array { */ length: number; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; /** - * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods. + * Returns a string representation of the array. The elements are converted to string using their toLocaleString methods. */ toLocaleString(): string; + /** + * Returns the primitive value of the array. + */ + valueOf(): T[]; /** * Removes the last element from an array and returns it. * If the array is empty, undefined is returned and the array is not modified. @@ -2059,16 +2085,18 @@ interface Int8Array { subarray(begin?: number, end?: number): Int8Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Int8Array; [index: number]: number; @@ -2339,16 +2367,18 @@ interface Uint8Array { subarray(begin?: number, end?: number): Uint8Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Uint8Array; [index: number]: number; @@ -2619,16 +2649,18 @@ interface Uint8ClampedArray { subarray(begin?: number, end?: number): Uint8ClampedArray; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Uint8ClampedArray; [index: number]: number; @@ -2897,16 +2929,18 @@ interface Int16Array { subarray(begin?: number, end?: number): Int16Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Int16Array; [index: number]: number; @@ -3178,16 +3212,18 @@ interface Uint16Array { subarray(begin?: number, end?: number): Uint16Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Uint16Array; [index: number]: number; @@ -3458,16 +3494,18 @@ interface Int32Array { subarray(begin?: number, end?: number): Int32Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Int32Array; [index: number]: number; @@ -3737,16 +3775,18 @@ interface Uint32Array { subarray(begin?: number, end?: number): Uint32Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Uint32Array; [index: number]: number; @@ -4017,16 +4057,18 @@ interface Float32Array { subarray(begin?: number, end?: number): Float32Array; /** - * Converts a number to a string by using the current locale. + * Returns a string representation of the array in the current locale. */ toLocaleString(): string; /** - * Returns a string representation of an array. + * Returns a string representation of the array. */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Float32Array; [index: number]: number; @@ -4290,15 +4332,26 @@ interface Float64Array { sort(compareFn?: (a: number, b: number) => number): Float64Array; /** + * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements * at begin, inclusive, up to end, exclusive. * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ subarray(begin?: number, end?: number): Float64Array; + /** + * Returns a string representation of the array in the current locale. + */ + toLocaleString(): string; + + /** + * Returns a string representation of the array. + */ toString(): string; - /** Returns the primitive value of the specified object. */ + /** + * Returns the primitive value of the array. + */ valueOf(): Float64Array; [index: number]: number; diff --git a/tests/baselines/reference/arrayCopyWithin.js b/tests/baselines/reference/arrayCopyWithin.js new file mode 100644 index 0000000000000..f2901ac21d875 --- /dev/null +++ b/tests/baselines/reference/arrayCopyWithin.js @@ -0,0 +1,79 @@ +//// [arrayCopyWithin.ts] +var strTuple: ["foo", "bar", "baz"]; +strTuple.copyWithin(0, 0); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.copyWithin(0, 0); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.copyWithin(0, 0); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.copyWithin(0, 0); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.copyWithin(0, 0); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.copyWithin(0, 0); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.copyWithin(0, 0); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.copyWithin(0, 0); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.copyWithin(0, 0); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.copyWithin(0, 0); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.copyWithin(0, 0); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.copyWithin(0, 0); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.copyWithin(0, 0); // BigUint64Array + + +//// [arrayCopyWithin.js] +var strTuple; +strTuple.copyWithin(0, 0); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +var numTuple; +numTuple.copyWithin(0, 0); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +var int8Array; +int8Array.copyWithin(0, 0); // Int8Array +var uint8Array; +uint8Array.copyWithin(0, 0); // Uint8Array +var uint8ClampedArray; +uint8ClampedArray.copyWithin(0, 0); // Uint8ClampedArray +var int16Array; +int16Array.copyWithin(0, 0); // Int16Array +var uint16Array; +uint16Array.copyWithin(0, 0); // Uint16Array +var int32Array; +int32Array.copyWithin(0, 0); // Int32Array +var uint32Array; +uint32Array.copyWithin(0, 0); // Uint32Array +var float32Array; +float32Array.copyWithin(0, 0); // Float32Array +var float64Array; +float64Array.copyWithin(0, 0); // Float64Array +var bigInt64Array; +bigInt64Array.copyWithin(0, 0); // BigInt64Array +var bigUint64Array; +bigUint64Array.copyWithin(0, 0); // BigUint64Array diff --git a/tests/baselines/reference/arrayCopyWithin.symbols b/tests/baselines/reference/arrayCopyWithin.symbols new file mode 100644 index 0000000000000..f8031d1f460bf --- /dev/null +++ b/tests/baselines/reference/arrayCopyWithin.symbols @@ -0,0 +1,160 @@ +=== tests/cases/compiler/arrayCopyWithin.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : Symbol(strTuple, Decl(arrayCopyWithin.ts, 0, 3)) + +strTuple.copyWithin(0, 0); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.copyWithin : Symbol(Array.copyWithin, Decl(lib.es2015.core.d.ts, --, --)) +>strTuple : Symbol(strTuple, Decl(arrayCopyWithin.ts, 0, 3)) +>copyWithin : Symbol(Array.copyWithin, Decl(lib.es2015.core.d.ts, --, --)) + +var numTuple: [11, 2, 22, 1]; +>numTuple : Symbol(numTuple, Decl(arrayCopyWithin.ts, 3, 3)) + +numTuple.copyWithin(0, 0); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.copyWithin : Symbol(Array.copyWithin, Decl(lib.es2015.core.d.ts, --, --)) +>numTuple : Symbol(numTuple, Decl(arrayCopyWithin.ts, 3, 3)) +>copyWithin : Symbol(Array.copyWithin, Decl(lib.es2015.core.d.ts, --, --)) + +interface Int8ArrayExtension extends Int8Array {} +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arrayCopyWithin.ts, 4, 26)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int8Array: Int8ArrayExtension; +>int8Array : Symbol(int8Array, Decl(arrayCopyWithin.ts, 7, 3)) +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arrayCopyWithin.ts, 4, 26)) + +int8Array.copyWithin(0, 0); // Int8Array +>int8Array.copyWithin : Symbol(Int8Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayCopyWithin.ts, 7, 3)) +>copyWithin : Symbol(Int8Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Uint8ArrayExtension extends Uint8Array {} +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arrayCopyWithin.ts, 8, 27)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8Array: Uint8ArrayExtension; +>uint8Array : Symbol(uint8Array, Decl(arrayCopyWithin.ts, 11, 3)) +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arrayCopyWithin.ts, 8, 27)) + +uint8Array.copyWithin(0, 0); // Uint8Array +>uint8Array.copyWithin : Symbol(Uint8Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayCopyWithin.ts, 11, 3)) +>copyWithin : Symbol(Uint8Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arrayCopyWithin.ts, 12, 28)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayCopyWithin.ts, 15, 3)) +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arrayCopyWithin.ts, 12, 28)) + +uint8ClampedArray.copyWithin(0, 0); // Uint8ClampedArray +>uint8ClampedArray.copyWithin : Symbol(Uint8ClampedArray.copyWithin, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayCopyWithin.ts, 15, 3)) +>copyWithin : Symbol(Uint8ClampedArray.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Int16ArrayExtension extends Int16Array {} +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arrayCopyWithin.ts, 16, 35)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int16Array: Int16ArrayExtension; +>int16Array : Symbol(int16Array, Decl(arrayCopyWithin.ts, 19, 3)) +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arrayCopyWithin.ts, 16, 35)) + +int16Array.copyWithin(0, 0); // Int16Array +>int16Array.copyWithin : Symbol(Int16Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayCopyWithin.ts, 19, 3)) +>copyWithin : Symbol(Int16Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Uint16ArrayExtension extends Uint16Array {} +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arrayCopyWithin.ts, 20, 28)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint16Array: Uint16ArrayExtension; +>uint16Array : Symbol(uint16Array, Decl(arrayCopyWithin.ts, 23, 3)) +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arrayCopyWithin.ts, 20, 28)) + +uint16Array.copyWithin(0, 0); // Uint16Array +>uint16Array.copyWithin : Symbol(Uint16Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayCopyWithin.ts, 23, 3)) +>copyWithin : Symbol(Uint16Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Int32ArrayExtension extends Int32Array {} +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arrayCopyWithin.ts, 24, 29)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int32Array: Int32ArrayExtension; +>int32Array : Symbol(int32Array, Decl(arrayCopyWithin.ts, 27, 3)) +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arrayCopyWithin.ts, 24, 29)) + +int32Array.copyWithin(0, 0); // Int32Array +>int32Array.copyWithin : Symbol(Int32Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayCopyWithin.ts, 27, 3)) +>copyWithin : Symbol(Int32Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Uint32ArrayExtension extends Uint32Array {} +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arrayCopyWithin.ts, 28, 28)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint32Array: Uint32ArrayExtension; +>uint32Array : Symbol(uint32Array, Decl(arrayCopyWithin.ts, 31, 3)) +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arrayCopyWithin.ts, 28, 28)) + +uint32Array.copyWithin(0, 0); // Uint32Array +>uint32Array.copyWithin : Symbol(Uint32Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayCopyWithin.ts, 31, 3)) +>copyWithin : Symbol(Uint32Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Float32ArrayExtension extends Float32Array {} +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arrayCopyWithin.ts, 32, 29)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float32Array: Float32ArrayExtension; +>float32Array : Symbol(float32Array, Decl(arrayCopyWithin.ts, 35, 3)) +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arrayCopyWithin.ts, 32, 29)) + +float32Array.copyWithin(0, 0); // Float32Array +>float32Array.copyWithin : Symbol(Float32Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayCopyWithin.ts, 35, 3)) +>copyWithin : Symbol(Float32Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface Float64ArrayExtension extends Float64Array {} +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arrayCopyWithin.ts, 36, 30)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float64Array: Float64ArrayExtension; +>float64Array : Symbol(float64Array, Decl(arrayCopyWithin.ts, 39, 3)) +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arrayCopyWithin.ts, 36, 30)) + +float64Array.copyWithin(0, 0); // Float64Array +>float64Array.copyWithin : Symbol(Float64Array.copyWithin, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayCopyWithin.ts, 39, 3)) +>copyWithin : Symbol(Float64Array.copyWithin, Decl(lib.es5.d.ts, --, --)) + +interface BigInt64ArrayExtension extends BigInt64Array {} +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arrayCopyWithin.ts, 40, 30)) +>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayCopyWithin.ts, 43, 3)) +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arrayCopyWithin.ts, 40, 30)) + +bigInt64Array.copyWithin(0, 0); // BigInt64Array +>bigInt64Array.copyWithin : Symbol(BigInt64Array.copyWithin, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayCopyWithin.ts, 43, 3)) +>copyWithin : Symbol(BigInt64Array.copyWithin, Decl(lib.es2020.bigint.d.ts, --, --)) + +interface BigUint64ArrayExtension extends BigUint64Array {} +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arrayCopyWithin.ts, 44, 31)) +>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayCopyWithin.ts, 47, 3)) +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arrayCopyWithin.ts, 44, 31)) + +bigUint64Array.copyWithin(0, 0); // BigUint64Array +>bigUint64Array.copyWithin : Symbol(BigUint64Array.copyWithin, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayCopyWithin.ts, 47, 3)) +>copyWithin : Symbol(BigUint64Array.copyWithin, Decl(lib.es2020.bigint.d.ts, --, --)) + diff --git a/tests/baselines/reference/arrayCopyWithin.types b/tests/baselines/reference/arrayCopyWithin.types new file mode 100644 index 0000000000000..ba4b573e7e88e --- /dev/null +++ b/tests/baselines/reference/arrayCopyWithin.types @@ -0,0 +1,155 @@ +=== tests/cases/compiler/arrayCopyWithin.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : ["foo", "bar", "baz"] + +strTuple.copyWithin(0, 0); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.copyWithin(0, 0) : ("foo" | "bar" | "baz")[] +>strTuple.copyWithin : (target: number, start: number, end?: number) => ("foo" | "bar" | "baz")[] +>strTuple : ["foo", "bar", "baz"] +>copyWithin : (target: number, start: number, end?: number) => ("foo" | "bar" | "baz")[] +>0 : 0 +>0 : 0 + +var numTuple: [11, 2, 22, 1]; +>numTuple : [11, 2, 22, 1] + +numTuple.copyWithin(0, 0); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.copyWithin(0, 0) : (11 | 2 | 22 | 1)[] +>numTuple.copyWithin : (target: number, start: number, end?: number) => (11 | 2 | 22 | 1)[] +>numTuple : [11, 2, 22, 1] +>copyWithin : (target: number, start: number, end?: number) => (11 | 2 | 22 | 1)[] +>0 : 0 +>0 : 0 + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +>int8Array : Int8ArrayExtension + +int8Array.copyWithin(0, 0); // Int8Array +>int8Array.copyWithin(0, 0) : Int8Array +>int8Array.copyWithin : (target: number, start: number, end?: number) => Int8Array +>int8Array : Int8ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Int8Array +>0 : 0 +>0 : 0 + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +>uint8Array : Uint8ArrayExtension + +uint8Array.copyWithin(0, 0); // Uint8Array +>uint8Array.copyWithin(0, 0) : Uint8Array +>uint8Array.copyWithin : (target: number, start: number, end?: number) => Uint8Array +>uint8Array : Uint8ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Uint8Array +>0 : 0 +>0 : 0 + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Uint8ClampedArrayExtension + +uint8ClampedArray.copyWithin(0, 0); // Uint8ClampedArray +>uint8ClampedArray.copyWithin(0, 0) : Uint8ClampedArray +>uint8ClampedArray.copyWithin : (target: number, start: number, end?: number) => Uint8ClampedArray +>uint8ClampedArray : Uint8ClampedArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Uint8ClampedArray +>0 : 0 +>0 : 0 + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +>int16Array : Int16ArrayExtension + +int16Array.copyWithin(0, 0); // Int16Array +>int16Array.copyWithin(0, 0) : Int16Array +>int16Array.copyWithin : (target: number, start: number, end?: number) => Int16Array +>int16Array : Int16ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Int16Array +>0 : 0 +>0 : 0 + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +>uint16Array : Uint16ArrayExtension + +uint16Array.copyWithin(0, 0); // Uint16Array +>uint16Array.copyWithin(0, 0) : Uint16Array +>uint16Array.copyWithin : (target: number, start: number, end?: number) => Uint16Array +>uint16Array : Uint16ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Uint16Array +>0 : 0 +>0 : 0 + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +>int32Array : Int32ArrayExtension + +int32Array.copyWithin(0, 0); // Int32Array +>int32Array.copyWithin(0, 0) : Int32Array +>int32Array.copyWithin : (target: number, start: number, end?: number) => Int32Array +>int32Array : Int32ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Int32Array +>0 : 0 +>0 : 0 + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +>uint32Array : Uint32ArrayExtension + +uint32Array.copyWithin(0, 0); // Uint32Array +>uint32Array.copyWithin(0, 0) : Uint32Array +>uint32Array.copyWithin : (target: number, start: number, end?: number) => Uint32Array +>uint32Array : Uint32ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Uint32Array +>0 : 0 +>0 : 0 + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +>float32Array : Float32ArrayExtension + +float32Array.copyWithin(0, 0); // Float32Array +>float32Array.copyWithin(0, 0) : Float32Array +>float32Array.copyWithin : (target: number, start: number, end?: number) => Float32Array +>float32Array : Float32ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Float32Array +>0 : 0 +>0 : 0 + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +>float64Array : Float64ArrayExtension + +float64Array.copyWithin(0, 0); // Float64Array +>float64Array.copyWithin(0, 0) : Float64Array +>float64Array.copyWithin : (target: number, start: number, end?: number) => Float64Array +>float64Array : Float64ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => Float64Array +>0 : 0 +>0 : 0 + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : BigInt64ArrayExtension + +bigInt64Array.copyWithin(0, 0); // BigInt64Array +>bigInt64Array.copyWithin(0, 0) : BigInt64Array +>bigInt64Array.copyWithin : (target: number, start: number, end?: number) => BigInt64Array +>bigInt64Array : BigInt64ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => BigInt64Array +>0 : 0 +>0 : 0 + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : BigUint64ArrayExtension + +bigUint64Array.copyWithin(0, 0); // BigUint64Array +>bigUint64Array.copyWithin(0, 0) : BigUint64Array +>bigUint64Array.copyWithin : (target: number, start: number, end?: number) => BigUint64Array +>bigUint64Array : BigUint64ArrayExtension +>copyWithin : (target: number, start: number, end?: number) => BigUint64Array +>0 : 0 +>0 : 0 + diff --git a/tests/baselines/reference/arrayFill.js b/tests/baselines/reference/arrayFill.js new file mode 100644 index 0000000000000..aa13f1e28c8fd --- /dev/null +++ b/tests/baselines/reference/arrayFill.js @@ -0,0 +1,79 @@ +//// [arrayFill.ts] +var strTuple: ["foo", "bar", "baz"]; +strTuple.fill("foo"); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.fill(11); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.fill(0); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.fill(0); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.fill(0); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.fill(0); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.fill(0); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.fill(0); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.fill(0); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.fill(0); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.fill(0); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.fill(0n); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.fill(0n); // BigUint64Array + + +//// [arrayFill.js] +var strTuple; +strTuple.fill("foo"); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +var numTuple; +numTuple.fill(11); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +var int8Array; +int8Array.fill(0); // Int8Array +var uint8Array; +uint8Array.fill(0); // Uint8Array +var uint8ClampedArray; +uint8ClampedArray.fill(0); // Uint8ClampedArray +var int16Array; +int16Array.fill(0); // Int16Array +var uint16Array; +uint16Array.fill(0); // Uint16Array +var int32Array; +int32Array.fill(0); // Int32Array +var uint32Array; +uint32Array.fill(0); // Uint32Array +var float32Array; +float32Array.fill(0); // Float32Array +var float64Array; +float64Array.fill(0); // Float64Array +var bigInt64Array; +bigInt64Array.fill(0n); // BigInt64Array +var bigUint64Array; +bigUint64Array.fill(0n); // BigUint64Array diff --git a/tests/baselines/reference/arrayFill.symbols b/tests/baselines/reference/arrayFill.symbols new file mode 100644 index 0000000000000..e4b2c9c995a39 --- /dev/null +++ b/tests/baselines/reference/arrayFill.symbols @@ -0,0 +1,160 @@ +=== tests/cases/compiler/arrayFill.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : Symbol(strTuple, Decl(arrayFill.ts, 0, 3)) + +strTuple.fill("foo"); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.fill : Symbol(Array.fill, Decl(lib.es2015.core.d.ts, --, --)) +>strTuple : Symbol(strTuple, Decl(arrayFill.ts, 0, 3)) +>fill : Symbol(Array.fill, Decl(lib.es2015.core.d.ts, --, --)) + +var numTuple: [11, 2, 22, 1]; +>numTuple : Symbol(numTuple, Decl(arrayFill.ts, 3, 3)) + +numTuple.fill(11); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.fill : Symbol(Array.fill, Decl(lib.es2015.core.d.ts, --, --)) +>numTuple : Symbol(numTuple, Decl(arrayFill.ts, 3, 3)) +>fill : Symbol(Array.fill, Decl(lib.es2015.core.d.ts, --, --)) + +interface Int8ArrayExtension extends Int8Array {} +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arrayFill.ts, 4, 18)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int8Array: Int8ArrayExtension; +>int8Array : Symbol(int8Array, Decl(arrayFill.ts, 7, 3)) +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arrayFill.ts, 4, 18)) + +int8Array.fill(0); // Int8Array +>int8Array.fill : Symbol(Int8Array.fill, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayFill.ts, 7, 3)) +>fill : Symbol(Int8Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Uint8ArrayExtension extends Uint8Array {} +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arrayFill.ts, 8, 18)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8Array: Uint8ArrayExtension; +>uint8Array : Symbol(uint8Array, Decl(arrayFill.ts, 11, 3)) +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arrayFill.ts, 8, 18)) + +uint8Array.fill(0); // Uint8Array +>uint8Array.fill : Symbol(Uint8Array.fill, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayFill.ts, 11, 3)) +>fill : Symbol(Uint8Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arrayFill.ts, 12, 19)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayFill.ts, 15, 3)) +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arrayFill.ts, 12, 19)) + +uint8ClampedArray.fill(0); // Uint8ClampedArray +>uint8ClampedArray.fill : Symbol(Uint8ClampedArray.fill, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayFill.ts, 15, 3)) +>fill : Symbol(Uint8ClampedArray.fill, Decl(lib.es5.d.ts, --, --)) + +interface Int16ArrayExtension extends Int16Array {} +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arrayFill.ts, 16, 26)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int16Array: Int16ArrayExtension; +>int16Array : Symbol(int16Array, Decl(arrayFill.ts, 19, 3)) +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arrayFill.ts, 16, 26)) + +int16Array.fill(0); // Int16Array +>int16Array.fill : Symbol(Int16Array.fill, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayFill.ts, 19, 3)) +>fill : Symbol(Int16Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Uint16ArrayExtension extends Uint16Array {} +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arrayFill.ts, 20, 19)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint16Array: Uint16ArrayExtension; +>uint16Array : Symbol(uint16Array, Decl(arrayFill.ts, 23, 3)) +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arrayFill.ts, 20, 19)) + +uint16Array.fill(0); // Uint16Array +>uint16Array.fill : Symbol(Uint16Array.fill, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayFill.ts, 23, 3)) +>fill : Symbol(Uint16Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Int32ArrayExtension extends Int32Array {} +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arrayFill.ts, 24, 20)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int32Array: Int32ArrayExtension; +>int32Array : Symbol(int32Array, Decl(arrayFill.ts, 27, 3)) +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arrayFill.ts, 24, 20)) + +int32Array.fill(0); // Int32Array +>int32Array.fill : Symbol(Int32Array.fill, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayFill.ts, 27, 3)) +>fill : Symbol(Int32Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Uint32ArrayExtension extends Uint32Array {} +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arrayFill.ts, 28, 19)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint32Array: Uint32ArrayExtension; +>uint32Array : Symbol(uint32Array, Decl(arrayFill.ts, 31, 3)) +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arrayFill.ts, 28, 19)) + +uint32Array.fill(0); // Uint32Array +>uint32Array.fill : Symbol(Uint32Array.fill, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayFill.ts, 31, 3)) +>fill : Symbol(Uint32Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Float32ArrayExtension extends Float32Array {} +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arrayFill.ts, 32, 20)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float32Array: Float32ArrayExtension; +>float32Array : Symbol(float32Array, Decl(arrayFill.ts, 35, 3)) +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arrayFill.ts, 32, 20)) + +float32Array.fill(0); // Float32Array +>float32Array.fill : Symbol(Float32Array.fill, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayFill.ts, 35, 3)) +>fill : Symbol(Float32Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface Float64ArrayExtension extends Float64Array {} +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arrayFill.ts, 36, 21)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float64Array: Float64ArrayExtension; +>float64Array : Symbol(float64Array, Decl(arrayFill.ts, 39, 3)) +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arrayFill.ts, 36, 21)) + +float64Array.fill(0); // Float64Array +>float64Array.fill : Symbol(Float64Array.fill, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayFill.ts, 39, 3)) +>fill : Symbol(Float64Array.fill, Decl(lib.es5.d.ts, --, --)) + +interface BigInt64ArrayExtension extends BigInt64Array {} +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arrayFill.ts, 40, 21)) +>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayFill.ts, 43, 3)) +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arrayFill.ts, 40, 21)) + +bigInt64Array.fill(0n); // BigInt64Array +>bigInt64Array.fill : Symbol(BigInt64Array.fill, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayFill.ts, 43, 3)) +>fill : Symbol(BigInt64Array.fill, Decl(lib.es2020.bigint.d.ts, --, --)) + +interface BigUint64ArrayExtension extends BigUint64Array {} +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arrayFill.ts, 44, 23)) +>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayFill.ts, 47, 3)) +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arrayFill.ts, 44, 23)) + +bigUint64Array.fill(0n); // BigUint64Array +>bigUint64Array.fill : Symbol(BigUint64Array.fill, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayFill.ts, 47, 3)) +>fill : Symbol(BigUint64Array.fill, Decl(lib.es2020.bigint.d.ts, --, --)) + diff --git a/tests/baselines/reference/arrayFill.types b/tests/baselines/reference/arrayFill.types new file mode 100644 index 0000000000000..1fda958eba186 --- /dev/null +++ b/tests/baselines/reference/arrayFill.types @@ -0,0 +1,142 @@ +=== tests/cases/compiler/arrayFill.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : ["foo", "bar", "baz"] + +strTuple.fill("foo"); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.fill("foo") : ("foo" | "bar" | "baz")[] +>strTuple.fill : (value: "foo" | "bar" | "baz", start?: number, end?: number) => ("foo" | "bar" | "baz")[] +>strTuple : ["foo", "bar", "baz"] +>fill : (value: "foo" | "bar" | "baz", start?: number, end?: number) => ("foo" | "bar" | "baz")[] +>"foo" : "foo" + +var numTuple: [11, 2, 22, 1]; +>numTuple : [11, 2, 22, 1] + +numTuple.fill(11); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.fill(11) : (11 | 2 | 22 | 1)[] +>numTuple.fill : (value: 11 | 2 | 22 | 1, start?: number, end?: number) => (11 | 2 | 22 | 1)[] +>numTuple : [11, 2, 22, 1] +>fill : (value: 11 | 2 | 22 | 1, start?: number, end?: number) => (11 | 2 | 22 | 1)[] +>11 : 11 + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +>int8Array : Int8ArrayExtension + +int8Array.fill(0); // Int8Array +>int8Array.fill(0) : Int8Array +>int8Array.fill : (value: number, start?: number, end?: number) => Int8Array +>int8Array : Int8ArrayExtension +>fill : (value: number, start?: number, end?: number) => Int8Array +>0 : 0 + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +>uint8Array : Uint8ArrayExtension + +uint8Array.fill(0); // Uint8Array +>uint8Array.fill(0) : Uint8Array +>uint8Array.fill : (value: number, start?: number, end?: number) => Uint8Array +>uint8Array : Uint8ArrayExtension +>fill : (value: number, start?: number, end?: number) => Uint8Array +>0 : 0 + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Uint8ClampedArrayExtension + +uint8ClampedArray.fill(0); // Uint8ClampedArray +>uint8ClampedArray.fill(0) : Uint8ClampedArray +>uint8ClampedArray.fill : (value: number, start?: number, end?: number) => Uint8ClampedArray +>uint8ClampedArray : Uint8ClampedArrayExtension +>fill : (value: number, start?: number, end?: number) => Uint8ClampedArray +>0 : 0 + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +>int16Array : Int16ArrayExtension + +int16Array.fill(0); // Int16Array +>int16Array.fill(0) : Int16Array +>int16Array.fill : (value: number, start?: number, end?: number) => Int16Array +>int16Array : Int16ArrayExtension +>fill : (value: number, start?: number, end?: number) => Int16Array +>0 : 0 + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +>uint16Array : Uint16ArrayExtension + +uint16Array.fill(0); // Uint16Array +>uint16Array.fill(0) : Uint16Array +>uint16Array.fill : (value: number, start?: number, end?: number) => Uint16Array +>uint16Array : Uint16ArrayExtension +>fill : (value: number, start?: number, end?: number) => Uint16Array +>0 : 0 + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +>int32Array : Int32ArrayExtension + +int32Array.fill(0); // Int32Array +>int32Array.fill(0) : Int32Array +>int32Array.fill : (value: number, start?: number, end?: number) => Int32Array +>int32Array : Int32ArrayExtension +>fill : (value: number, start?: number, end?: number) => Int32Array +>0 : 0 + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +>uint32Array : Uint32ArrayExtension + +uint32Array.fill(0); // Uint32Array +>uint32Array.fill(0) : Uint32Array +>uint32Array.fill : (value: number, start?: number, end?: number) => Uint32Array +>uint32Array : Uint32ArrayExtension +>fill : (value: number, start?: number, end?: number) => Uint32Array +>0 : 0 + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +>float32Array : Float32ArrayExtension + +float32Array.fill(0); // Float32Array +>float32Array.fill(0) : Float32Array +>float32Array.fill : (value: number, start?: number, end?: number) => Float32Array +>float32Array : Float32ArrayExtension +>fill : (value: number, start?: number, end?: number) => Float32Array +>0 : 0 + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +>float64Array : Float64ArrayExtension + +float64Array.fill(0); // Float64Array +>float64Array.fill(0) : Float64Array +>float64Array.fill : (value: number, start?: number, end?: number) => Float64Array +>float64Array : Float64ArrayExtension +>fill : (value: number, start?: number, end?: number) => Float64Array +>0 : 0 + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : BigInt64ArrayExtension + +bigInt64Array.fill(0n); // BigInt64Array +>bigInt64Array.fill(0n) : BigInt64Array +>bigInt64Array.fill : (value: bigint, start?: number, end?: number) => BigInt64Array +>bigInt64Array : BigInt64ArrayExtension +>fill : (value: bigint, start?: number, end?: number) => BigInt64Array +>0n : 0n + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : BigUint64ArrayExtension + +bigUint64Array.fill(0n); // BigUint64Array +>bigUint64Array.fill(0n) : BigUint64Array +>bigUint64Array.fill : (value: bigint, start?: number, end?: number) => BigUint64Array +>bigUint64Array : BigUint64ArrayExtension +>fill : (value: bigint, start?: number, end?: number) => BigUint64Array +>0n : 0n + diff --git a/tests/baselines/reference/arrayFind.types b/tests/baselines/reference/arrayFind.types index 9ba393d76212c..68e0cff925568 100644 --- a/tests/baselines/reference/arrayFind.types +++ b/tests/baselines/reference/arrayFind.types @@ -24,9 +24,9 @@ const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true] const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); >foundNumber : number >arrayOfStringsNumbersAndBooleans.find(isNumber) : number ->arrayOfStringsNumbersAndBooleans.find : { (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>arrayOfStringsNumbersAndBooleans.find : { (predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >arrayOfStringsNumbersAndBooleans : (string | number | boolean)[] ->find : { (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>find : { (predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >isNumber : (x: any) => x is number const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; @@ -37,8 +37,8 @@ const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBoolean const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); >readonlyFoundNumber : number >readonlyArrayOfStringsNumbersAndBooleans.find(isNumber) : number ->readonlyArrayOfStringsNumbersAndBooleans.find : { (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>readonlyArrayOfStringsNumbersAndBooleans.find : { (predicate: (value: string | number | boolean, index: number, array: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, array: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >readonlyArrayOfStringsNumbersAndBooleans : readonly (string | number | boolean)[] ->find : { (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } +>find : { (predicate: (value: string | number | boolean, index: number, array: readonly (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, array: readonly (string | number | boolean)[]) => unknown, thisArg?: any): string | number | boolean; } >isNumber : (x: any) => x is number diff --git a/tests/baselines/reference/arrayMethodPredicates.js b/tests/baselines/reference/arrayMethodPredicates.js new file mode 100644 index 0000000000000..bb1d30dad7d1b --- /dev/null +++ b/tests/baselines/reference/arrayMethodPredicates.js @@ -0,0 +1,165 @@ +//// [arrayMethodPredicates.ts] +var array: number[]; +var readonlyArray: readonly number[]; +var int8Array: Int8Array; +var uint8Array: Uint8Array; +var uint8ClampedArray: Uint8ClampedArray; +var int16Array: Int16Array; +var uint16Array: Uint16Array; +var int32Array: Int32Array; +var uint32Array: Uint32Array; +var float32Array: Float32Array; +var float64Array: Float64Array; +var bigInt64Array: BigInt64Array; +var bigUint64Array: BigUint64Array; + +array.every(x => x); +readonlyArray.every(x => x); +int8Array.every(x => x); +uint8Array.every(x => x); +uint8ClampedArray.every(x => x); +int16Array.every(x => x); +uint16Array.every(x => x); +int32Array.every(x => x); +uint32Array.every(x => x); +float32Array.every(x => x); +float64Array.every(x => x); +bigInt64Array.every(x => x); +bigUint64Array.every(x => x); + +array.filter(x => x); +readonlyArray.filter(x => x); +int8Array.filter(x => x); +uint8Array.filter(x => x); +uint8ClampedArray.filter(x => x); +int16Array.filter(x => x); +uint16Array.filter(x => x); +int32Array.filter(x => x); +uint32Array.filter(x => x); +float32Array.filter(x => x); +float64Array.filter(x => x); +bigInt64Array.filter(x => x); +bigUint64Array.filter(x => x); + +array.find(x => x); +readonlyArray.find(x => x); +int8Array.find(x => x); +uint8Array.find(x => x); +uint8ClampedArray.find(x => x); +int16Array.find(x => x); +uint16Array.find(x => x); +int32Array.find(x => x); +uint32Array.find(x => x); +float32Array.find(x => x); +float64Array.find(x => x); +bigInt64Array.find(x => x); +bigUint64Array.find(x => x); + +array.findIndex(x => x); +readonlyArray.findIndex(x => x); +int8Array.findIndex(x => x); +uint8Array.findIndex(x => x); +uint8ClampedArray.findIndex(x => x); +int16Array.findIndex(x => x); +uint16Array.findIndex(x => x); +int32Array.findIndex(x => x); +uint32Array.findIndex(x => x); +float32Array.findIndex(x => x); +float64Array.findIndex(x => x); +bigInt64Array.findIndex(x => x); +bigUint64Array.findIndex(x => x); + +array.some(x => x); +readonlyArray.some(x => x); +int8Array.some(x => x); +uint8Array.some(x => x); +uint8ClampedArray.some(x => x); +int16Array.some(x => x); +uint16Array.some(x => x); +int32Array.some(x => x); +uint32Array.some(x => x); +float32Array.some(x => x); +float64Array.some(x => x); +bigInt64Array.some(x => x); +bigUint64Array.some(x => x); + + +//// [arrayMethodPredicates.js] +var array; +var readonlyArray; +var int8Array; +var uint8Array; +var uint8ClampedArray; +var int16Array; +var uint16Array; +var int32Array; +var uint32Array; +var float32Array; +var float64Array; +var bigInt64Array; +var bigUint64Array; +array.every(function (x) { return x; }); +readonlyArray.every(function (x) { return x; }); +int8Array.every(function (x) { return x; }); +uint8Array.every(function (x) { return x; }); +uint8ClampedArray.every(function (x) { return x; }); +int16Array.every(function (x) { return x; }); +uint16Array.every(function (x) { return x; }); +int32Array.every(function (x) { return x; }); +uint32Array.every(function (x) { return x; }); +float32Array.every(function (x) { return x; }); +float64Array.every(function (x) { return x; }); +bigInt64Array.every(function (x) { return x; }); +bigUint64Array.every(function (x) { return x; }); +array.filter(function (x) { return x; }); +readonlyArray.filter(function (x) { return x; }); +int8Array.filter(function (x) { return x; }); +uint8Array.filter(function (x) { return x; }); +uint8ClampedArray.filter(function (x) { return x; }); +int16Array.filter(function (x) { return x; }); +uint16Array.filter(function (x) { return x; }); +int32Array.filter(function (x) { return x; }); +uint32Array.filter(function (x) { return x; }); +float32Array.filter(function (x) { return x; }); +float64Array.filter(function (x) { return x; }); +bigInt64Array.filter(function (x) { return x; }); +bigUint64Array.filter(function (x) { return x; }); +array.find(function (x) { return x; }); +readonlyArray.find(function (x) { return x; }); +int8Array.find(function (x) { return x; }); +uint8Array.find(function (x) { return x; }); +uint8ClampedArray.find(function (x) { return x; }); +int16Array.find(function (x) { return x; }); +uint16Array.find(function (x) { return x; }); +int32Array.find(function (x) { return x; }); +uint32Array.find(function (x) { return x; }); +float32Array.find(function (x) { return x; }); +float64Array.find(function (x) { return x; }); +bigInt64Array.find(function (x) { return x; }); +bigUint64Array.find(function (x) { return x; }); +array.findIndex(function (x) { return x; }); +readonlyArray.findIndex(function (x) { return x; }); +int8Array.findIndex(function (x) { return x; }); +uint8Array.findIndex(function (x) { return x; }); +uint8ClampedArray.findIndex(function (x) { return x; }); +int16Array.findIndex(function (x) { return x; }); +uint16Array.findIndex(function (x) { return x; }); +int32Array.findIndex(function (x) { return x; }); +uint32Array.findIndex(function (x) { return x; }); +float32Array.findIndex(function (x) { return x; }); +float64Array.findIndex(function (x) { return x; }); +bigInt64Array.findIndex(function (x) { return x; }); +bigUint64Array.findIndex(function (x) { return x; }); +array.some(function (x) { return x; }); +readonlyArray.some(function (x) { return x; }); +int8Array.some(function (x) { return x; }); +uint8Array.some(function (x) { return x; }); +uint8ClampedArray.some(function (x) { return x; }); +int16Array.some(function (x) { return x; }); +uint16Array.some(function (x) { return x; }); +int32Array.some(function (x) { return x; }); +uint32Array.some(function (x) { return x; }); +float32Array.some(function (x) { return x; }); +float64Array.some(function (x) { return x; }); +bigInt64Array.some(function (x) { return x; }); +bigUint64Array.some(function (x) { return x; }); diff --git a/tests/baselines/reference/arrayMethodPredicates.symbols b/tests/baselines/reference/arrayMethodPredicates.symbols new file mode 100644 index 0000000000000..da650f0f27f9c --- /dev/null +++ b/tests/baselines/reference/arrayMethodPredicates.symbols @@ -0,0 +1,506 @@ +=== tests/cases/compiler/arrayMethodPredicates.ts === +var array: number[]; +>array : Symbol(array, Decl(arrayMethodPredicates.ts, 0, 3)) + +var readonlyArray: readonly number[]; +>readonlyArray : Symbol(readonlyArray, Decl(arrayMethodPredicates.ts, 1, 3)) + +var int8Array: Int8Array; +>int8Array : Symbol(int8Array, Decl(arrayMethodPredicates.ts, 2, 3)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8Array: Uint8Array; +>uint8Array : Symbol(uint8Array, Decl(arrayMethodPredicates.ts, 3, 3)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8ClampedArray: Uint8ClampedArray; +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayMethodPredicates.ts, 4, 3)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int16Array: Int16Array; +>int16Array : Symbol(int16Array, Decl(arrayMethodPredicates.ts, 5, 3)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint16Array: Uint16Array; +>uint16Array : Symbol(uint16Array, Decl(arrayMethodPredicates.ts, 6, 3)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int32Array: Int32Array; +>int32Array : Symbol(int32Array, Decl(arrayMethodPredicates.ts, 7, 3)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint32Array: Uint32Array; +>uint32Array : Symbol(uint32Array, Decl(arrayMethodPredicates.ts, 8, 3)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float32Array: Float32Array; +>float32Array : Symbol(float32Array, Decl(arrayMethodPredicates.ts, 9, 3)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float64Array: Float64Array; +>float64Array : Symbol(float64Array, Decl(arrayMethodPredicates.ts, 10, 3)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var bigInt64Array: BigInt64Array; +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayMethodPredicates.ts, 11, 3)) +>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigUint64Array: BigUint64Array; +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayMethodPredicates.ts, 12, 3)) +>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +array.every(x => x); +>array.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>array : Symbol(array, Decl(arrayMethodPredicates.ts, 0, 3)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 14, 12)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 14, 12)) + +readonlyArray.every(x => x); +>readonlyArray.every : Symbol(ReadonlyArray.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>readonlyArray : Symbol(readonlyArray, Decl(arrayMethodPredicates.ts, 1, 3)) +>every : Symbol(ReadonlyArray.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 15, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 15, 20)) + +int8Array.every(x => x); +>int8Array.every : Symbol(Int8Array.every, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayMethodPredicates.ts, 2, 3)) +>every : Symbol(Int8Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 16, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 16, 16)) + +uint8Array.every(x => x); +>uint8Array.every : Symbol(Uint8Array.every, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayMethodPredicates.ts, 3, 3)) +>every : Symbol(Uint8Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 17, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 17, 17)) + +uint8ClampedArray.every(x => x); +>uint8ClampedArray.every : Symbol(Uint8ClampedArray.every, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayMethodPredicates.ts, 4, 3)) +>every : Symbol(Uint8ClampedArray.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 18, 24)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 18, 24)) + +int16Array.every(x => x); +>int16Array.every : Symbol(Int16Array.every, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayMethodPredicates.ts, 5, 3)) +>every : Symbol(Int16Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 19, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 19, 17)) + +uint16Array.every(x => x); +>uint16Array.every : Symbol(Uint16Array.every, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayMethodPredicates.ts, 6, 3)) +>every : Symbol(Uint16Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 20, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 20, 18)) + +int32Array.every(x => x); +>int32Array.every : Symbol(Int32Array.every, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayMethodPredicates.ts, 7, 3)) +>every : Symbol(Int32Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 21, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 21, 17)) + +uint32Array.every(x => x); +>uint32Array.every : Symbol(Uint32Array.every, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayMethodPredicates.ts, 8, 3)) +>every : Symbol(Uint32Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 22, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 22, 18)) + +float32Array.every(x => x); +>float32Array.every : Symbol(Float32Array.every, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayMethodPredicates.ts, 9, 3)) +>every : Symbol(Float32Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 23, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 23, 19)) + +float64Array.every(x => x); +>float64Array.every : Symbol(Float64Array.every, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayMethodPredicates.ts, 10, 3)) +>every : Symbol(Float64Array.every, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 24, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 24, 19)) + +bigInt64Array.every(x => x); +>bigInt64Array.every : Symbol(BigInt64Array.every, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayMethodPredicates.ts, 11, 3)) +>every : Symbol(BigInt64Array.every, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 25, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 25, 20)) + +bigUint64Array.every(x => x); +>bigUint64Array.every : Symbol(BigUint64Array.every, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayMethodPredicates.ts, 12, 3)) +>every : Symbol(BigUint64Array.every, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 26, 21)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 26, 21)) + +array.filter(x => x); +>array.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>array : Symbol(array, Decl(arrayMethodPredicates.ts, 0, 3)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 28, 13)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 28, 13)) + +readonlyArray.filter(x => x); +>readonlyArray.filter : Symbol(ReadonlyArray.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>readonlyArray : Symbol(readonlyArray, Decl(arrayMethodPredicates.ts, 1, 3)) +>filter : Symbol(ReadonlyArray.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 29, 21)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 29, 21)) + +int8Array.filter(x => x); +>int8Array.filter : Symbol(Int8Array.filter, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayMethodPredicates.ts, 2, 3)) +>filter : Symbol(Int8Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 30, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 30, 17)) + +uint8Array.filter(x => x); +>uint8Array.filter : Symbol(Uint8Array.filter, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayMethodPredicates.ts, 3, 3)) +>filter : Symbol(Uint8Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 31, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 31, 18)) + +uint8ClampedArray.filter(x => x); +>uint8ClampedArray.filter : Symbol(Uint8ClampedArray.filter, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayMethodPredicates.ts, 4, 3)) +>filter : Symbol(Uint8ClampedArray.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 32, 25)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 32, 25)) + +int16Array.filter(x => x); +>int16Array.filter : Symbol(Int16Array.filter, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayMethodPredicates.ts, 5, 3)) +>filter : Symbol(Int16Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 33, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 33, 18)) + +uint16Array.filter(x => x); +>uint16Array.filter : Symbol(Uint16Array.filter, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayMethodPredicates.ts, 6, 3)) +>filter : Symbol(Uint16Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 34, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 34, 19)) + +int32Array.filter(x => x); +>int32Array.filter : Symbol(Int32Array.filter, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayMethodPredicates.ts, 7, 3)) +>filter : Symbol(Int32Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 35, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 35, 18)) + +uint32Array.filter(x => x); +>uint32Array.filter : Symbol(Uint32Array.filter, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayMethodPredicates.ts, 8, 3)) +>filter : Symbol(Uint32Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 36, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 36, 19)) + +float32Array.filter(x => x); +>float32Array.filter : Symbol(Float32Array.filter, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayMethodPredicates.ts, 9, 3)) +>filter : Symbol(Float32Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 37, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 37, 20)) + +float64Array.filter(x => x); +>float64Array.filter : Symbol(Float64Array.filter, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayMethodPredicates.ts, 10, 3)) +>filter : Symbol(Float64Array.filter, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 38, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 38, 20)) + +bigInt64Array.filter(x => x); +>bigInt64Array.filter : Symbol(BigInt64Array.filter, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayMethodPredicates.ts, 11, 3)) +>filter : Symbol(BigInt64Array.filter, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 39, 21)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 39, 21)) + +bigUint64Array.filter(x => x); +>bigUint64Array.filter : Symbol(BigUint64Array.filter, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayMethodPredicates.ts, 12, 3)) +>filter : Symbol(BigUint64Array.filter, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 40, 22)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 40, 22)) + +array.find(x => x); +>array.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>array : Symbol(array, Decl(arrayMethodPredicates.ts, 0, 3)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 42, 11)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 42, 11)) + +readonlyArray.find(x => x); +>readonlyArray.find : Symbol(ReadonlyArray.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>readonlyArray : Symbol(readonlyArray, Decl(arrayMethodPredicates.ts, 1, 3)) +>find : Symbol(ReadonlyArray.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 43, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 43, 19)) + +int8Array.find(x => x); +>int8Array.find : Symbol(Int8Array.find, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayMethodPredicates.ts, 2, 3)) +>find : Symbol(Int8Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 44, 15)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 44, 15)) + +uint8Array.find(x => x); +>uint8Array.find : Symbol(Uint8Array.find, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayMethodPredicates.ts, 3, 3)) +>find : Symbol(Uint8Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 45, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 45, 16)) + +uint8ClampedArray.find(x => x); +>uint8ClampedArray.find : Symbol(Uint8ClampedArray.find, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayMethodPredicates.ts, 4, 3)) +>find : Symbol(Uint8ClampedArray.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 46, 23)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 46, 23)) + +int16Array.find(x => x); +>int16Array.find : Symbol(Int16Array.find, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayMethodPredicates.ts, 5, 3)) +>find : Symbol(Int16Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 47, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 47, 16)) + +uint16Array.find(x => x); +>uint16Array.find : Symbol(Uint16Array.find, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayMethodPredicates.ts, 6, 3)) +>find : Symbol(Uint16Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 48, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 48, 17)) + +int32Array.find(x => x); +>int32Array.find : Symbol(Int32Array.find, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayMethodPredicates.ts, 7, 3)) +>find : Symbol(Int32Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 49, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 49, 16)) + +uint32Array.find(x => x); +>uint32Array.find : Symbol(Uint32Array.find, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayMethodPredicates.ts, 8, 3)) +>find : Symbol(Uint32Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 50, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 50, 17)) + +float32Array.find(x => x); +>float32Array.find : Symbol(Float32Array.find, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayMethodPredicates.ts, 9, 3)) +>find : Symbol(Float32Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 51, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 51, 18)) + +float64Array.find(x => x); +>float64Array.find : Symbol(Float64Array.find, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayMethodPredicates.ts, 10, 3)) +>find : Symbol(Float64Array.find, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 52, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 52, 18)) + +bigInt64Array.find(x => x); +>bigInt64Array.find : Symbol(BigInt64Array.find, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayMethodPredicates.ts, 11, 3)) +>find : Symbol(BigInt64Array.find, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 53, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 53, 19)) + +bigUint64Array.find(x => x); +>bigUint64Array.find : Symbol(BigUint64Array.find, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayMethodPredicates.ts, 12, 3)) +>find : Symbol(BigUint64Array.find, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 54, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 54, 20)) + +array.findIndex(x => x); +>array.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --)) +>array : Symbol(array, Decl(arrayMethodPredicates.ts, 0, 3)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 56, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 56, 16)) + +readonlyArray.findIndex(x => x); +>readonlyArray.findIndex : Symbol(ReadonlyArray.findIndex, Decl(lib.es2015.core.d.ts, --, --)) +>readonlyArray : Symbol(readonlyArray, Decl(arrayMethodPredicates.ts, 1, 3)) +>findIndex : Symbol(ReadonlyArray.findIndex, Decl(lib.es2015.core.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 57, 24)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 57, 24)) + +int8Array.findIndex(x => x); +>int8Array.findIndex : Symbol(Int8Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayMethodPredicates.ts, 2, 3)) +>findIndex : Symbol(Int8Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 58, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 58, 20)) + +uint8Array.findIndex(x => x); +>uint8Array.findIndex : Symbol(Uint8Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayMethodPredicates.ts, 3, 3)) +>findIndex : Symbol(Uint8Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 59, 21)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 59, 21)) + +uint8ClampedArray.findIndex(x => x); +>uint8ClampedArray.findIndex : Symbol(Uint8ClampedArray.findIndex, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayMethodPredicates.ts, 4, 3)) +>findIndex : Symbol(Uint8ClampedArray.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 60, 28)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 60, 28)) + +int16Array.findIndex(x => x); +>int16Array.findIndex : Symbol(Int16Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayMethodPredicates.ts, 5, 3)) +>findIndex : Symbol(Int16Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 61, 21)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 61, 21)) + +uint16Array.findIndex(x => x); +>uint16Array.findIndex : Symbol(Uint16Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayMethodPredicates.ts, 6, 3)) +>findIndex : Symbol(Uint16Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 62, 22)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 62, 22)) + +int32Array.findIndex(x => x); +>int32Array.findIndex : Symbol(Int32Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayMethodPredicates.ts, 7, 3)) +>findIndex : Symbol(Int32Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 63, 21)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 63, 21)) + +uint32Array.findIndex(x => x); +>uint32Array.findIndex : Symbol(Uint32Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayMethodPredicates.ts, 8, 3)) +>findIndex : Symbol(Uint32Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 64, 22)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 64, 22)) + +float32Array.findIndex(x => x); +>float32Array.findIndex : Symbol(Float32Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayMethodPredicates.ts, 9, 3)) +>findIndex : Symbol(Float32Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 65, 23)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 65, 23)) + +float64Array.findIndex(x => x); +>float64Array.findIndex : Symbol(Float64Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayMethodPredicates.ts, 10, 3)) +>findIndex : Symbol(Float64Array.findIndex, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 66, 23)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 66, 23)) + +bigInt64Array.findIndex(x => x); +>bigInt64Array.findIndex : Symbol(BigInt64Array.findIndex, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayMethodPredicates.ts, 11, 3)) +>findIndex : Symbol(BigInt64Array.findIndex, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 67, 24)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 67, 24)) + +bigUint64Array.findIndex(x => x); +>bigUint64Array.findIndex : Symbol(BigUint64Array.findIndex, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayMethodPredicates.ts, 12, 3)) +>findIndex : Symbol(BigUint64Array.findIndex, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 68, 25)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 68, 25)) + +array.some(x => x); +>array.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) +>array : Symbol(array, Decl(arrayMethodPredicates.ts, 0, 3)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 70, 11)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 70, 11)) + +readonlyArray.some(x => x); +>readonlyArray.some : Symbol(ReadonlyArray.some, Decl(lib.es5.d.ts, --, --)) +>readonlyArray : Symbol(readonlyArray, Decl(arrayMethodPredicates.ts, 1, 3)) +>some : Symbol(ReadonlyArray.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 71, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 71, 19)) + +int8Array.some(x => x); +>int8Array.some : Symbol(Int8Array.some, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayMethodPredicates.ts, 2, 3)) +>some : Symbol(Int8Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 72, 15)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 72, 15)) + +uint8Array.some(x => x); +>uint8Array.some : Symbol(Uint8Array.some, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayMethodPredicates.ts, 3, 3)) +>some : Symbol(Uint8Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 73, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 73, 16)) + +uint8ClampedArray.some(x => x); +>uint8ClampedArray.some : Symbol(Uint8ClampedArray.some, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayMethodPredicates.ts, 4, 3)) +>some : Symbol(Uint8ClampedArray.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 74, 23)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 74, 23)) + +int16Array.some(x => x); +>int16Array.some : Symbol(Int16Array.some, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayMethodPredicates.ts, 5, 3)) +>some : Symbol(Int16Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 75, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 75, 16)) + +uint16Array.some(x => x); +>uint16Array.some : Symbol(Uint16Array.some, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayMethodPredicates.ts, 6, 3)) +>some : Symbol(Uint16Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 76, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 76, 17)) + +int32Array.some(x => x); +>int32Array.some : Symbol(Int32Array.some, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayMethodPredicates.ts, 7, 3)) +>some : Symbol(Int32Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 77, 16)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 77, 16)) + +uint32Array.some(x => x); +>uint32Array.some : Symbol(Uint32Array.some, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayMethodPredicates.ts, 8, 3)) +>some : Symbol(Uint32Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 78, 17)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 78, 17)) + +float32Array.some(x => x); +>float32Array.some : Symbol(Float32Array.some, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayMethodPredicates.ts, 9, 3)) +>some : Symbol(Float32Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 79, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 79, 18)) + +float64Array.some(x => x); +>float64Array.some : Symbol(Float64Array.some, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayMethodPredicates.ts, 10, 3)) +>some : Symbol(Float64Array.some, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 80, 18)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 80, 18)) + +bigInt64Array.some(x => x); +>bigInt64Array.some : Symbol(BigInt64Array.some, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayMethodPredicates.ts, 11, 3)) +>some : Symbol(BigInt64Array.some, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 81, 19)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 81, 19)) + +bigUint64Array.some(x => x); +>bigUint64Array.some : Symbol(BigUint64Array.some, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayMethodPredicates.ts, 12, 3)) +>some : Symbol(BigUint64Array.some, Decl(lib.es2020.bigint.d.ts, --, --)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 82, 20)) +>x : Symbol(x, Decl(arrayMethodPredicates.ts, 82, 20)) + diff --git a/tests/baselines/reference/arrayMethodPredicates.types b/tests/baselines/reference/arrayMethodPredicates.types new file mode 100644 index 0000000000000..6a43058a1fcf2 --- /dev/null +++ b/tests/baselines/reference/arrayMethodPredicates.types @@ -0,0 +1,625 @@ +=== tests/cases/compiler/arrayMethodPredicates.ts === +var array: number[]; +>array : number[] + +var readonlyArray: readonly number[]; +>readonlyArray : readonly number[] + +var int8Array: Int8Array; +>int8Array : Int8Array + +var uint8Array: Uint8Array; +>uint8Array : Uint8Array + +var uint8ClampedArray: Uint8ClampedArray; +>uint8ClampedArray : Uint8ClampedArray + +var int16Array: Int16Array; +>int16Array : Int16Array + +var uint16Array: Uint16Array; +>uint16Array : Uint16Array + +var int32Array: Int32Array; +>int32Array : Int32Array + +var uint32Array: Uint32Array; +>uint32Array : Uint32Array + +var float32Array: Float32Array; +>float32Array : Float32Array + +var float64Array: Float64Array; +>float64Array : Float64Array + +var bigInt64Array: BigInt64Array; +>bigInt64Array : BigInt64Array + +var bigUint64Array: BigUint64Array; +>bigUint64Array : BigUint64Array + +array.every(x => x); +>array.every(x => x) : boolean +>array.every : { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; } +>array : number[] +>every : { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; } +>x => x : (x: number) => number +>x : number +>x : number + +readonlyArray.every(x => x); +>readonlyArray.every(x => x) : boolean +>readonlyArray.every : { (predicate: (value: number, index: number, array: readonly number[]) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any): boolean; } +>readonlyArray : readonly number[] +>every : { (predicate: (value: number, index: number, array: readonly number[]) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any): boolean; } +>x => x : (x: number) => number +>x : number +>x : number + +int8Array.every(x => x); +>int8Array.every(x => x) : boolean +>int8Array.every : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => boolean +>int8Array : Int8Array +>every : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint8Array.every(x => x); +>uint8Array.every(x => x) : boolean +>uint8Array.every : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => boolean +>uint8Array : Uint8Array +>every : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint8ClampedArray.every(x => x); +>uint8ClampedArray.every(x => x) : boolean +>uint8ClampedArray.every : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => boolean +>uint8ClampedArray : Uint8ClampedArray +>every : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +int16Array.every(x => x); +>int16Array.every(x => x) : boolean +>int16Array.every : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => boolean +>int16Array : Int16Array +>every : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint16Array.every(x => x); +>uint16Array.every(x => x) : boolean +>uint16Array.every : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => boolean +>uint16Array : Uint16Array +>every : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +int32Array.every(x => x); +>int32Array.every(x => x) : boolean +>int32Array.every : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => boolean +>int32Array : Int32Array +>every : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint32Array.every(x => x); +>uint32Array.every(x => x) : boolean +>uint32Array.every : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => boolean +>uint32Array : Uint32Array +>every : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +float32Array.every(x => x); +>float32Array.every(x => x) : boolean +>float32Array.every : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => boolean +>float32Array : Float32Array +>every : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +float64Array.every(x => x); +>float64Array.every(x => x) : boolean +>float64Array.every : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => boolean +>float64Array : Float64Array +>every : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +bigInt64Array.every(x => x); +>bigInt64Array.every(x => x) : boolean +>bigInt64Array.every : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => boolean +>bigInt64Array : BigInt64Array +>every : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => boolean +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +bigUint64Array.every(x => x); +>bigUint64Array.every(x => x) : boolean +>bigUint64Array.every : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => boolean +>bigUint64Array : BigUint64Array +>every : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => boolean +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +array.filter(x => x); +>array.filter(x => x) : number[] +>array.filter : { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; } +>array : number[] +>filter : { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; } +>x => x : (x: number) => number +>x : number +>x : number + +readonlyArray.filter(x => x); +>readonlyArray.filter(x => x) : number[] +>readonlyArray.filter : { (predicate: (value: number, index: number, array: readonly number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any): number[]; } +>readonlyArray : readonly number[] +>filter : { (predicate: (value: number, index: number, array: readonly number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any): number[]; } +>x => x : (x: number) => number +>x : number +>x : number + +int8Array.filter(x => x); +>int8Array.filter(x => x) : Int8Array +>int8Array.filter : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => Int8Array +>int8Array : Int8Array +>filter : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => Int8Array +>x => x : (x: number) => number +>x : number +>x : number + +uint8Array.filter(x => x); +>uint8Array.filter(x => x) : Uint8Array +>uint8Array.filter : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => Uint8Array +>uint8Array : Uint8Array +>filter : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => Uint8Array +>x => x : (x: number) => number +>x : number +>x : number + +uint8ClampedArray.filter(x => x); +>uint8ClampedArray.filter(x => x) : Uint8ClampedArray +>uint8ClampedArray.filter : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => Uint8ClampedArray +>uint8ClampedArray : Uint8ClampedArray +>filter : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => Uint8ClampedArray +>x => x : (x: number) => number +>x : number +>x : number + +int16Array.filter(x => x); +>int16Array.filter(x => x) : Int16Array +>int16Array.filter : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => Int16Array +>int16Array : Int16Array +>filter : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => Int16Array +>x => x : (x: number) => number +>x : number +>x : number + +uint16Array.filter(x => x); +>uint16Array.filter(x => x) : Uint16Array +>uint16Array.filter : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => Uint16Array +>uint16Array : Uint16Array +>filter : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => Uint16Array +>x => x : (x: number) => number +>x : number +>x : number + +int32Array.filter(x => x); +>int32Array.filter(x => x) : Int32Array +>int32Array.filter : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => Int32Array +>int32Array : Int32Array +>filter : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => Int32Array +>x => x : (x: number) => number +>x : number +>x : number + +uint32Array.filter(x => x); +>uint32Array.filter(x => x) : Uint32Array +>uint32Array.filter : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => Uint32Array +>uint32Array : Uint32Array +>filter : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => Uint32Array +>x => x : (x: number) => number +>x : number +>x : number + +float32Array.filter(x => x); +>float32Array.filter(x => x) : Float32Array +>float32Array.filter : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => Float32Array +>float32Array : Float32Array +>filter : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => Float32Array +>x => x : (x: number) => number +>x : number +>x : number + +float64Array.filter(x => x); +>float64Array.filter(x => x) : Float64Array +>float64Array.filter : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => Float64Array +>float64Array : Float64Array +>filter : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => Float64Array +>x => x : (x: number) => number +>x : number +>x : number + +bigInt64Array.filter(x => x); +>bigInt64Array.filter(x => x) : BigInt64Array +>bigInt64Array.filter : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => BigInt64Array +>bigInt64Array : BigInt64Array +>filter : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => BigInt64Array +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +bigUint64Array.filter(x => x); +>bigUint64Array.filter(x => x) : BigUint64Array +>bigUint64Array.filter : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => BigUint64Array +>bigUint64Array : BigUint64Array +>filter : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => BigUint64Array +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +array.find(x => x); +>array.find(x => x) : number +>array.find : { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; } +>array : number[] +>find : { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; } +>x => x : (x: number) => number +>x : number +>x : number + +readonlyArray.find(x => x); +>readonlyArray.find(x => x) : number +>readonlyArray.find : { (predicate: (value: number, index: number, array: readonly number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any): number; } +>readonlyArray : readonly number[] +>find : { (predicate: (value: number, index: number, array: readonly number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any): number; } +>x => x : (x: number) => number +>x : number +>x : number + +int8Array.find(x => x); +>int8Array.find(x => x) : number +>int8Array.find : (predicate: (value: number, index: number, obj: Int8Array) => unknown, thisArg?: any) => number +>int8Array : Int8Array +>find : (predicate: (value: number, index: number, obj: Int8Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint8Array.find(x => x); +>uint8Array.find(x => x) : number +>uint8Array.find : (predicate: (value: number, index: number, obj: Uint8Array) => unknown, thisArg?: any) => number +>uint8Array : Uint8Array +>find : (predicate: (value: number, index: number, obj: Uint8Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint8ClampedArray.find(x => x); +>uint8ClampedArray.find(x => x) : number +>uint8ClampedArray.find : (predicate: (value: number, index: number, obj: Uint8ClampedArray) => unknown, thisArg?: any) => number +>uint8ClampedArray : Uint8ClampedArray +>find : (predicate: (value: number, index: number, obj: Uint8ClampedArray) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +int16Array.find(x => x); +>int16Array.find(x => x) : number +>int16Array.find : (predicate: (value: number, index: number, obj: Int16Array) => unknown, thisArg?: any) => number +>int16Array : Int16Array +>find : (predicate: (value: number, index: number, obj: Int16Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint16Array.find(x => x); +>uint16Array.find(x => x) : number +>uint16Array.find : (predicate: (value: number, index: number, obj: Uint16Array) => unknown, thisArg?: any) => number +>uint16Array : Uint16Array +>find : (predicate: (value: number, index: number, obj: Uint16Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +int32Array.find(x => x); +>int32Array.find(x => x) : number +>int32Array.find : (predicate: (value: number, index: number, obj: Int32Array) => unknown, thisArg?: any) => number +>int32Array : Int32Array +>find : (predicate: (value: number, index: number, obj: Int32Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint32Array.find(x => x); +>uint32Array.find(x => x) : number +>uint32Array.find : (predicate: (value: number, index: number, obj: Uint32Array) => unknown, thisArg?: any) => number +>uint32Array : Uint32Array +>find : (predicate: (value: number, index: number, obj: Uint32Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +float32Array.find(x => x); +>float32Array.find(x => x) : number +>float32Array.find : (predicate: (value: number, index: number, obj: Float32Array) => unknown, thisArg?: any) => number +>float32Array : Float32Array +>find : (predicate: (value: number, index: number, obj: Float32Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +float64Array.find(x => x); +>float64Array.find(x => x) : number +>float64Array.find : (predicate: (value: number, index: number, obj: Float64Array) => unknown, thisArg?: any) => number +>float64Array : Float64Array +>find : (predicate: (value: number, index: number, obj: Float64Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +bigInt64Array.find(x => x); +>bigInt64Array.find(x => x) : bigint +>bigInt64Array.find : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => bigint +>bigInt64Array : BigInt64Array +>find : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => bigint +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +bigUint64Array.find(x => x); +>bigUint64Array.find(x => x) : bigint +>bigUint64Array.find : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => bigint +>bigUint64Array : BigUint64Array +>find : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => bigint +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +array.findIndex(x => x); +>array.findIndex(x => x) : number +>array.findIndex : (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number +>array : number[] +>findIndex : (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +readonlyArray.findIndex(x => x); +>readonlyArray.findIndex(x => x) : number +>readonlyArray.findIndex : (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any) => number +>readonlyArray : readonly number[] +>findIndex : (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +int8Array.findIndex(x => x); +>int8Array.findIndex(x => x) : number +>int8Array.findIndex : (predicate: (value: number, index: number, obj: Int8Array) => unknown, thisArg?: any) => number +>int8Array : Int8Array +>findIndex : (predicate: (value: number, index: number, obj: Int8Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint8Array.findIndex(x => x); +>uint8Array.findIndex(x => x) : number +>uint8Array.findIndex : (predicate: (value: number, index: number, obj: Uint8Array) => unknown, thisArg?: any) => number +>uint8Array : Uint8Array +>findIndex : (predicate: (value: number, index: number, obj: Uint8Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint8ClampedArray.findIndex(x => x); +>uint8ClampedArray.findIndex(x => x) : number +>uint8ClampedArray.findIndex : (predicate: (value: number, index: number, obj: Uint8ClampedArray) => unknown, thisArg?: any) => number +>uint8ClampedArray : Uint8ClampedArray +>findIndex : (predicate: (value: number, index: number, obj: Uint8ClampedArray) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +int16Array.findIndex(x => x); +>int16Array.findIndex(x => x) : number +>int16Array.findIndex : (predicate: (value: number, index: number, obj: Int16Array) => unknown, thisArg?: any) => number +>int16Array : Int16Array +>findIndex : (predicate: (value: number, index: number, obj: Int16Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint16Array.findIndex(x => x); +>uint16Array.findIndex(x => x) : number +>uint16Array.findIndex : (predicate: (value: number, index: number, obj: Uint16Array) => unknown, thisArg?: any) => number +>uint16Array : Uint16Array +>findIndex : (predicate: (value: number, index: number, obj: Uint16Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +int32Array.findIndex(x => x); +>int32Array.findIndex(x => x) : number +>int32Array.findIndex : (predicate: (value: number, index: number, obj: Int32Array) => unknown, thisArg?: any) => number +>int32Array : Int32Array +>findIndex : (predicate: (value: number, index: number, obj: Int32Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +uint32Array.findIndex(x => x); +>uint32Array.findIndex(x => x) : number +>uint32Array.findIndex : (predicate: (value: number, index: number, obj: Uint32Array) => unknown, thisArg?: any) => number +>uint32Array : Uint32Array +>findIndex : (predicate: (value: number, index: number, obj: Uint32Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +float32Array.findIndex(x => x); +>float32Array.findIndex(x => x) : number +>float32Array.findIndex : (predicate: (value: number, index: number, obj: Float32Array) => unknown, thisArg?: any) => number +>float32Array : Float32Array +>findIndex : (predicate: (value: number, index: number, obj: Float32Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +float64Array.findIndex(x => x); +>float64Array.findIndex(x => x) : number +>float64Array.findIndex : (predicate: (value: number, index: number, obj: Float64Array) => unknown, thisArg?: any) => number +>float64Array : Float64Array +>findIndex : (predicate: (value: number, index: number, obj: Float64Array) => unknown, thisArg?: any) => number +>x => x : (x: number) => number +>x : number +>x : number + +bigInt64Array.findIndex(x => x); +>bigInt64Array.findIndex(x => x) : number +>bigInt64Array.findIndex : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => number +>bigInt64Array : BigInt64Array +>findIndex : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => number +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +bigUint64Array.findIndex(x => x); +>bigUint64Array.findIndex(x => x) : number +>bigUint64Array.findIndex : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => number +>bigUint64Array : BigUint64Array +>findIndex : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => number +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +array.some(x => x); +>array.some(x => x) : boolean +>array.some : (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean +>array : number[] +>some : (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +readonlyArray.some(x => x); +>readonlyArray.some(x => x) : boolean +>readonlyArray.some : (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any) => boolean +>readonlyArray : readonly number[] +>some : (predicate: (value: number, index: number, array: readonly number[]) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +int8Array.some(x => x); +>int8Array.some(x => x) : boolean +>int8Array.some : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => boolean +>int8Array : Int8Array +>some : (predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint8Array.some(x => x); +>uint8Array.some(x => x) : boolean +>uint8Array.some : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => boolean +>uint8Array : Uint8Array +>some : (predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint8ClampedArray.some(x => x); +>uint8ClampedArray.some(x => x) : boolean +>uint8ClampedArray.some : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => boolean +>uint8ClampedArray : Uint8ClampedArray +>some : (predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +int16Array.some(x => x); +>int16Array.some(x => x) : boolean +>int16Array.some : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => boolean +>int16Array : Int16Array +>some : (predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint16Array.some(x => x); +>uint16Array.some(x => x) : boolean +>uint16Array.some : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => boolean +>uint16Array : Uint16Array +>some : (predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +int32Array.some(x => x); +>int32Array.some(x => x) : boolean +>int32Array.some : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => boolean +>int32Array : Int32Array +>some : (predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +uint32Array.some(x => x); +>uint32Array.some(x => x) : boolean +>uint32Array.some : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => boolean +>uint32Array : Uint32Array +>some : (predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +float32Array.some(x => x); +>float32Array.some(x => x) : boolean +>float32Array.some : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => boolean +>float32Array : Float32Array +>some : (predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +float64Array.some(x => x); +>float64Array.some(x => x) : boolean +>float64Array.some : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => boolean +>float64Array : Float64Array +>some : (predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any) => boolean +>x => x : (x: number) => number +>x : number +>x : number + +bigInt64Array.some(x => x); +>bigInt64Array.some(x => x) : boolean +>bigInt64Array.some : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => boolean +>bigInt64Array : BigInt64Array +>some : (predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any) => boolean +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + +bigUint64Array.some(x => x); +>bigUint64Array.some(x => x) : boolean +>bigUint64Array.some : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => boolean +>bigUint64Array : BigUint64Array +>some : (predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any) => boolean +>x => x : (x: bigint) => bigint +>x : bigint +>x : bigint + diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt index 66b3c2c869106..cc45fdef74f91 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt @@ -1,9 +1,8 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(13,1): error TS2322: Type 'A[]' is not assignable to type 'readonly B[]'. Property 'b' is missing in type 'A' but required in type 'B'. tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error TS2322: Type 'C' is not assignable to type 'readonly B[]'. - The types returned by 'concat(...)' are incompatible between these types. - Type 'A[]' is not assignable to type 'B[]'. - Type 'A' is not assignable to type 'B'. + The types returned by 'valueOf()' are incompatible between these types. + Type 'A[]' is not assignable to type 'readonly B[]'. ==== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts (2 errors) ==== @@ -31,7 +30,6 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T rrb = cra; // error: 'A' is not assignable to 'B' ~~~ !!! error TS2322: Type 'C' is not assignable to type 'readonly B[]'. -!!! error TS2322: The types returned by 'concat(...)' are incompatible between these types. -!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. +!!! error TS2322: The types returned by 'valueOf()' are incompatible between these types. +!!! error TS2322: Type 'A[]' is not assignable to type 'readonly B[]'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayReverse.js b/tests/baselines/reference/arrayReverse.js new file mode 100644 index 0000000000000..716eb55c03076 --- /dev/null +++ b/tests/baselines/reference/arrayReverse.js @@ -0,0 +1,79 @@ +//// [arrayReverse.ts] +var strTuple: ["foo", "bar", "baz"]; +strTuple.reverse(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.reverse(); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.reverse(); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.reverse(); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.reverse(); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.reverse(); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.reverse(); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.reverse(); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.reverse(); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.reverse(); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.reverse(); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.reverse(); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.reverse(); // BigUint64Array + + +//// [arrayReverse.js] +var strTuple; +strTuple.reverse(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +var numTuple; +numTuple.reverse(); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +var int8Array; +int8Array.reverse(); // Int8Array +var uint8Array; +uint8Array.reverse(); // Uint8Array +var uint8ClampedArray; +uint8ClampedArray.reverse(); // Uint8ClampedArray +var int16Array; +int16Array.reverse(); // Int16Array +var uint16Array; +uint16Array.reverse(); // Uint16Array +var int32Array; +int32Array.reverse(); // Int32Array +var uint32Array; +uint32Array.reverse(); // Uint32Array +var float32Array; +float32Array.reverse(); // Float32Array +var float64Array; +float64Array.reverse(); // Float64Array +var bigInt64Array; +bigInt64Array.reverse(); // BigInt64Array +var bigUint64Array; +bigUint64Array.reverse(); // BigUint64Array diff --git a/tests/baselines/reference/arrayReverse.symbols b/tests/baselines/reference/arrayReverse.symbols new file mode 100644 index 0000000000000..a4b2c21332200 --- /dev/null +++ b/tests/baselines/reference/arrayReverse.symbols @@ -0,0 +1,160 @@ +=== tests/cases/compiler/arrayReverse.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : Symbol(strTuple, Decl(arrayReverse.ts, 0, 3)) + +strTuple.reverse(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --)) +>strTuple : Symbol(strTuple, Decl(arrayReverse.ts, 0, 3)) +>reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --)) + +var numTuple: [11, 2, 22, 1]; +>numTuple : Symbol(numTuple, Decl(arrayReverse.ts, 3, 3)) + +numTuple.reverse(); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --)) +>numTuple : Symbol(numTuple, Decl(arrayReverse.ts, 3, 3)) +>reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Int8ArrayExtension extends Int8Array {} +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arrayReverse.ts, 4, 19)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int8Array: Int8ArrayExtension; +>int8Array : Symbol(int8Array, Decl(arrayReverse.ts, 7, 3)) +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arrayReverse.ts, 4, 19)) + +int8Array.reverse(); // Int8Array +>int8Array.reverse : Symbol(Int8Array.reverse, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arrayReverse.ts, 7, 3)) +>reverse : Symbol(Int8Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Uint8ArrayExtension extends Uint8Array {} +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arrayReverse.ts, 8, 20)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8Array: Uint8ArrayExtension; +>uint8Array : Symbol(uint8Array, Decl(arrayReverse.ts, 11, 3)) +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arrayReverse.ts, 8, 20)) + +uint8Array.reverse(); // Uint8Array +>uint8Array.reverse : Symbol(Uint8Array.reverse, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arrayReverse.ts, 11, 3)) +>reverse : Symbol(Uint8Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arrayReverse.ts, 12, 21)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayReverse.ts, 15, 3)) +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arrayReverse.ts, 12, 21)) + +uint8ClampedArray.reverse(); // Uint8ClampedArray +>uint8ClampedArray.reverse : Symbol(Uint8ClampedArray.reverse, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayReverse.ts, 15, 3)) +>reverse : Symbol(Uint8ClampedArray.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Int16ArrayExtension extends Int16Array {} +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arrayReverse.ts, 16, 28)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int16Array: Int16ArrayExtension; +>int16Array : Symbol(int16Array, Decl(arrayReverse.ts, 19, 3)) +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arrayReverse.ts, 16, 28)) + +int16Array.reverse(); // Int16Array +>int16Array.reverse : Symbol(Int16Array.reverse, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arrayReverse.ts, 19, 3)) +>reverse : Symbol(Int16Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Uint16ArrayExtension extends Uint16Array {} +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arrayReverse.ts, 20, 21)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint16Array: Uint16ArrayExtension; +>uint16Array : Symbol(uint16Array, Decl(arrayReverse.ts, 23, 3)) +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arrayReverse.ts, 20, 21)) + +uint16Array.reverse(); // Uint16Array +>uint16Array.reverse : Symbol(Uint16Array.reverse, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arrayReverse.ts, 23, 3)) +>reverse : Symbol(Uint16Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Int32ArrayExtension extends Int32Array {} +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arrayReverse.ts, 24, 22)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int32Array: Int32ArrayExtension; +>int32Array : Symbol(int32Array, Decl(arrayReverse.ts, 27, 3)) +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arrayReverse.ts, 24, 22)) + +int32Array.reverse(); // Int32Array +>int32Array.reverse : Symbol(Int32Array.reverse, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arrayReverse.ts, 27, 3)) +>reverse : Symbol(Int32Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Uint32ArrayExtension extends Uint32Array {} +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arrayReverse.ts, 28, 21)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint32Array: Uint32ArrayExtension; +>uint32Array : Symbol(uint32Array, Decl(arrayReverse.ts, 31, 3)) +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arrayReverse.ts, 28, 21)) + +uint32Array.reverse(); // Uint32Array +>uint32Array.reverse : Symbol(Uint32Array.reverse, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arrayReverse.ts, 31, 3)) +>reverse : Symbol(Uint32Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Float32ArrayExtension extends Float32Array {} +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arrayReverse.ts, 32, 22)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float32Array: Float32ArrayExtension; +>float32Array : Symbol(float32Array, Decl(arrayReverse.ts, 35, 3)) +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arrayReverse.ts, 32, 22)) + +float32Array.reverse(); // Float32Array +>float32Array.reverse : Symbol(Float32Array.reverse, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arrayReverse.ts, 35, 3)) +>reverse : Symbol(Float32Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface Float64ArrayExtension extends Float64Array {} +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arrayReverse.ts, 36, 23)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float64Array: Float64ArrayExtension; +>float64Array : Symbol(float64Array, Decl(arrayReverse.ts, 39, 3)) +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arrayReverse.ts, 36, 23)) + +float64Array.reverse(); // Float64Array +>float64Array.reverse : Symbol(Float64Array.reverse, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arrayReverse.ts, 39, 3)) +>reverse : Symbol(Float64Array.reverse, Decl(lib.es5.d.ts, --, --)) + +interface BigInt64ArrayExtension extends BigInt64Array {} +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arrayReverse.ts, 40, 23)) +>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayReverse.ts, 43, 3)) +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arrayReverse.ts, 40, 23)) + +bigInt64Array.reverse(); // BigInt64Array +>bigInt64Array.reverse : Symbol(BigInt64Array.reverse, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arrayReverse.ts, 43, 3)) +>reverse : Symbol(BigInt64Array.reverse, Decl(lib.es2020.bigint.d.ts, --, --)) + +interface BigUint64ArrayExtension extends BigUint64Array {} +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arrayReverse.ts, 44, 24)) +>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayReverse.ts, 47, 3)) +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arrayReverse.ts, 44, 24)) + +bigUint64Array.reverse(); // BigUint64Array +>bigUint64Array.reverse : Symbol(BigUint64Array.reverse, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arrayReverse.ts, 47, 3)) +>reverse : Symbol(BigUint64Array.reverse, Decl(lib.es2020.bigint.d.ts, --, --)) + diff --git a/tests/baselines/reference/arrayReverse.types b/tests/baselines/reference/arrayReverse.types new file mode 100644 index 0000000000000..359456bd859c7 --- /dev/null +++ b/tests/baselines/reference/arrayReverse.types @@ -0,0 +1,129 @@ +=== tests/cases/compiler/arrayReverse.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : ["foo", "bar", "baz"] + +strTuple.reverse(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.reverse() : ("foo" | "bar" | "baz")[] +>strTuple.reverse : () => ("foo" | "bar" | "baz")[] +>strTuple : ["foo", "bar", "baz"] +>reverse : () => ("foo" | "bar" | "baz")[] + +var numTuple: [11, 2, 22, 1]; +>numTuple : [11, 2, 22, 1] + +numTuple.reverse(); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.reverse() : (11 | 2 | 22 | 1)[] +>numTuple.reverse : () => (11 | 2 | 22 | 1)[] +>numTuple : [11, 2, 22, 1] +>reverse : () => (11 | 2 | 22 | 1)[] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +>int8Array : Int8ArrayExtension + +int8Array.reverse(); // Int8Array +>int8Array.reverse() : Int8Array +>int8Array.reverse : () => Int8Array +>int8Array : Int8ArrayExtension +>reverse : () => Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +>uint8Array : Uint8ArrayExtension + +uint8Array.reverse(); // Uint8Array +>uint8Array.reverse() : Uint8Array +>uint8Array.reverse : () => Uint8Array +>uint8Array : Uint8ArrayExtension +>reverse : () => Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Uint8ClampedArrayExtension + +uint8ClampedArray.reverse(); // Uint8ClampedArray +>uint8ClampedArray.reverse() : Uint8ClampedArray +>uint8ClampedArray.reverse : () => Uint8ClampedArray +>uint8ClampedArray : Uint8ClampedArrayExtension +>reverse : () => Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +>int16Array : Int16ArrayExtension + +int16Array.reverse(); // Int16Array +>int16Array.reverse() : Int16Array +>int16Array.reverse : () => Int16Array +>int16Array : Int16ArrayExtension +>reverse : () => Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +>uint16Array : Uint16ArrayExtension + +uint16Array.reverse(); // Uint16Array +>uint16Array.reverse() : Uint16Array +>uint16Array.reverse : () => Uint16Array +>uint16Array : Uint16ArrayExtension +>reverse : () => Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +>int32Array : Int32ArrayExtension + +int32Array.reverse(); // Int32Array +>int32Array.reverse() : Int32Array +>int32Array.reverse : () => Int32Array +>int32Array : Int32ArrayExtension +>reverse : () => Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +>uint32Array : Uint32ArrayExtension + +uint32Array.reverse(); // Uint32Array +>uint32Array.reverse() : Uint32Array +>uint32Array.reverse : () => Uint32Array +>uint32Array : Uint32ArrayExtension +>reverse : () => Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +>float32Array : Float32ArrayExtension + +float32Array.reverse(); // Float32Array +>float32Array.reverse() : Float32Array +>float32Array.reverse : () => Float32Array +>float32Array : Float32ArrayExtension +>reverse : () => Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +>float64Array : Float64ArrayExtension + +float64Array.reverse(); // Float64Array +>float64Array.reverse() : Float64Array +>float64Array.reverse : () => Float64Array +>float64Array : Float64ArrayExtension +>reverse : () => Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : BigInt64ArrayExtension + +bigInt64Array.reverse(); // BigInt64Array +>bigInt64Array.reverse() : BigInt64Array +>bigInt64Array.reverse : () => BigInt64Array +>bigInt64Array : BigInt64ArrayExtension +>reverse : () => BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : BigUint64ArrayExtension + +bigUint64Array.reverse(); // BigUint64Array +>bigUint64Array.reverse() : BigUint64Array +>bigUint64Array.reverse : () => BigUint64Array +>bigUint64Array : BigUint64ArrayExtension +>reverse : () => BigUint64Array + diff --git a/tests/baselines/reference/arraySort.js b/tests/baselines/reference/arraySort.js new file mode 100644 index 0000000000000..3bf7ba073bd55 --- /dev/null +++ b/tests/baselines/reference/arraySort.js @@ -0,0 +1,79 @@ +//// [arraySort.ts] +var strTuple: ["foo", "bar", "baz"]; +strTuple.sort(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.sort((a, b) => a - b); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.sort((a, b) => a - b); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.sort((a, b) => a - b); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.sort((a, b) => a - b); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.sort((a, b) => a - b); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.sort((a, b) => a - b); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.sort((a, b) => a - b); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.sort((a, b) => a - b); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.sort((a, b) => a - b); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.sort((a, b) => a - b); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.sort((a, b) => a - b); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.sort((a, b) => a - b); // BigUint64Array + + +//// [arraySort.js] +var strTuple; +strTuple.sort(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +var numTuple; +numTuple.sort(function (a, b) { return a - b; }); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +var int8Array; +int8Array.sort(function (a, b) { return a - b; }); // Int8Array +var uint8Array; +uint8Array.sort(function (a, b) { return a - b; }); // Uint8Array +var uint8ClampedArray; +uint8ClampedArray.sort(function (a, b) { return a - b; }); // Uint8ClampedArray +var int16Array; +int16Array.sort(function (a, b) { return a - b; }); // Int16Array +var uint16Array; +uint16Array.sort(function (a, b) { return a - b; }); // Uint16Array +var int32Array; +int32Array.sort(function (a, b) { return a - b; }); // Int32Array +var uint32Array; +uint32Array.sort(function (a, b) { return a - b; }); // Uint32Array +var float32Array; +float32Array.sort(function (a, b) { return a - b; }); // Float32Array +var float64Array; +float64Array.sort(function (a, b) { return a - b; }); // Float64Array +var bigInt64Array; +bigInt64Array.sort(function (a, b) { return a - b; }); // BigInt64Array +var bigUint64Array; +bigUint64Array.sort(function (a, b) { return a - b; }); // BigUint64Array diff --git a/tests/baselines/reference/arraySort.symbols b/tests/baselines/reference/arraySort.symbols new file mode 100644 index 0000000000000..4222bfa83acde --- /dev/null +++ b/tests/baselines/reference/arraySort.symbols @@ -0,0 +1,208 @@ +=== tests/cases/compiler/arraySort.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : Symbol(strTuple, Decl(arraySort.ts, 0, 3)) + +strTuple.sort(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.sort : Symbol(Array.sort, Decl(lib.es5.d.ts, --, --)) +>strTuple : Symbol(strTuple, Decl(arraySort.ts, 0, 3)) +>sort : Symbol(Array.sort, Decl(lib.es5.d.ts, --, --)) + +var numTuple: [11, 2, 22, 1]; +>numTuple : Symbol(numTuple, Decl(arraySort.ts, 3, 3)) + +numTuple.sort((a, b) => a - b); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.sort : Symbol(Array.sort, Decl(lib.es5.d.ts, --, --)) +>numTuple : Symbol(numTuple, Decl(arraySort.ts, 3, 3)) +>sort : Symbol(Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 4, 15)) +>b : Symbol(b, Decl(arraySort.ts, 4, 17)) +>a : Symbol(a, Decl(arraySort.ts, 4, 15)) +>b : Symbol(b, Decl(arraySort.ts, 4, 17)) + +interface Int8ArrayExtension extends Int8Array {} +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arraySort.ts, 4, 31)) +>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int8Array: Int8ArrayExtension; +>int8Array : Symbol(int8Array, Decl(arraySort.ts, 7, 3)) +>Int8ArrayExtension : Symbol(Int8ArrayExtension, Decl(arraySort.ts, 4, 31)) + +int8Array.sort((a, b) => a - b); // Int8Array +>int8Array.sort : Symbol(Int8Array.sort, Decl(lib.es5.d.ts, --, --)) +>int8Array : Symbol(int8Array, Decl(arraySort.ts, 7, 3)) +>sort : Symbol(Int8Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 8, 16)) +>b : Symbol(b, Decl(arraySort.ts, 8, 18)) +>a : Symbol(a, Decl(arraySort.ts, 8, 16)) +>b : Symbol(b, Decl(arraySort.ts, 8, 18)) + +interface Uint8ArrayExtension extends Uint8Array {} +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arraySort.ts, 8, 32)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8Array: Uint8ArrayExtension; +>uint8Array : Symbol(uint8Array, Decl(arraySort.ts, 11, 3)) +>Uint8ArrayExtension : Symbol(Uint8ArrayExtension, Decl(arraySort.ts, 8, 32)) + +uint8Array.sort((a, b) => a - b); // Uint8Array +>uint8Array.sort : Symbol(Uint8Array.sort, Decl(lib.es5.d.ts, --, --)) +>uint8Array : Symbol(uint8Array, Decl(arraySort.ts, 11, 3)) +>sort : Symbol(Uint8Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 12, 17)) +>b : Symbol(b, Decl(arraySort.ts, 12, 19)) +>a : Symbol(a, Decl(arraySort.ts, 12, 17)) +>b : Symbol(b, Decl(arraySort.ts, 12, 19)) + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arraySort.ts, 12, 33)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arraySort.ts, 15, 3)) +>Uint8ClampedArrayExtension : Symbol(Uint8ClampedArrayExtension, Decl(arraySort.ts, 12, 33)) + +uint8ClampedArray.sort((a, b) => a - b); // Uint8ClampedArray +>uint8ClampedArray.sort : Symbol(Uint8ClampedArray.sort, Decl(lib.es5.d.ts, --, --)) +>uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arraySort.ts, 15, 3)) +>sort : Symbol(Uint8ClampedArray.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 16, 24)) +>b : Symbol(b, Decl(arraySort.ts, 16, 26)) +>a : Symbol(a, Decl(arraySort.ts, 16, 24)) +>b : Symbol(b, Decl(arraySort.ts, 16, 26)) + +interface Int16ArrayExtension extends Int16Array {} +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arraySort.ts, 16, 40)) +>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int16Array: Int16ArrayExtension; +>int16Array : Symbol(int16Array, Decl(arraySort.ts, 19, 3)) +>Int16ArrayExtension : Symbol(Int16ArrayExtension, Decl(arraySort.ts, 16, 40)) + +int16Array.sort((a, b) => a - b); // Int16Array +>int16Array.sort : Symbol(Int16Array.sort, Decl(lib.es5.d.ts, --, --)) +>int16Array : Symbol(int16Array, Decl(arraySort.ts, 19, 3)) +>sort : Symbol(Int16Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 20, 17)) +>b : Symbol(b, Decl(arraySort.ts, 20, 19)) +>a : Symbol(a, Decl(arraySort.ts, 20, 17)) +>b : Symbol(b, Decl(arraySort.ts, 20, 19)) + +interface Uint16ArrayExtension extends Uint16Array {} +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arraySort.ts, 20, 33)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint16Array: Uint16ArrayExtension; +>uint16Array : Symbol(uint16Array, Decl(arraySort.ts, 23, 3)) +>Uint16ArrayExtension : Symbol(Uint16ArrayExtension, Decl(arraySort.ts, 20, 33)) + +uint16Array.sort((a, b) => a - b); // Uint16Array +>uint16Array.sort : Symbol(Uint16Array.sort, Decl(lib.es5.d.ts, --, --)) +>uint16Array : Symbol(uint16Array, Decl(arraySort.ts, 23, 3)) +>sort : Symbol(Uint16Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 24, 18)) +>b : Symbol(b, Decl(arraySort.ts, 24, 20)) +>a : Symbol(a, Decl(arraySort.ts, 24, 18)) +>b : Symbol(b, Decl(arraySort.ts, 24, 20)) + +interface Int32ArrayExtension extends Int32Array {} +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arraySort.ts, 24, 34)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var int32Array: Int32ArrayExtension; +>int32Array : Symbol(int32Array, Decl(arraySort.ts, 27, 3)) +>Int32ArrayExtension : Symbol(Int32ArrayExtension, Decl(arraySort.ts, 24, 34)) + +int32Array.sort((a, b) => a - b); // Int32Array +>int32Array.sort : Symbol(Int32Array.sort, Decl(lib.es5.d.ts, --, --)) +>int32Array : Symbol(int32Array, Decl(arraySort.ts, 27, 3)) +>sort : Symbol(Int32Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 28, 17)) +>b : Symbol(b, Decl(arraySort.ts, 28, 19)) +>a : Symbol(a, Decl(arraySort.ts, 28, 17)) +>b : Symbol(b, Decl(arraySort.ts, 28, 19)) + +interface Uint32ArrayExtension extends Uint32Array {} +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arraySort.ts, 28, 33)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var uint32Array: Uint32ArrayExtension; +>uint32Array : Symbol(uint32Array, Decl(arraySort.ts, 31, 3)) +>Uint32ArrayExtension : Symbol(Uint32ArrayExtension, Decl(arraySort.ts, 28, 33)) + +uint32Array.sort((a, b) => a - b); // Uint32Array +>uint32Array.sort : Symbol(Uint32Array.sort, Decl(lib.es5.d.ts, --, --)) +>uint32Array : Symbol(uint32Array, Decl(arraySort.ts, 31, 3)) +>sort : Symbol(Uint32Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 32, 18)) +>b : Symbol(b, Decl(arraySort.ts, 32, 20)) +>a : Symbol(a, Decl(arraySort.ts, 32, 18)) +>b : Symbol(b, Decl(arraySort.ts, 32, 20)) + +interface Float32ArrayExtension extends Float32Array {} +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arraySort.ts, 32, 34)) +>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float32Array: Float32ArrayExtension; +>float32Array : Symbol(float32Array, Decl(arraySort.ts, 35, 3)) +>Float32ArrayExtension : Symbol(Float32ArrayExtension, Decl(arraySort.ts, 32, 34)) + +float32Array.sort((a, b) => a - b); // Float32Array +>float32Array.sort : Symbol(Float32Array.sort, Decl(lib.es5.d.ts, --, --)) +>float32Array : Symbol(float32Array, Decl(arraySort.ts, 35, 3)) +>sort : Symbol(Float32Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 36, 19)) +>b : Symbol(b, Decl(arraySort.ts, 36, 21)) +>a : Symbol(a, Decl(arraySort.ts, 36, 19)) +>b : Symbol(b, Decl(arraySort.ts, 36, 21)) + +interface Float64ArrayExtension extends Float64Array {} +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arraySort.ts, 36, 35)) +>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) + +var float64Array: Float64ArrayExtension; +>float64Array : Symbol(float64Array, Decl(arraySort.ts, 39, 3)) +>Float64ArrayExtension : Symbol(Float64ArrayExtension, Decl(arraySort.ts, 36, 35)) + +float64Array.sort((a, b) => a - b); // Float64Array +>float64Array.sort : Symbol(Float64Array.sort, Decl(lib.es5.d.ts, --, --)) +>float64Array : Symbol(float64Array, Decl(arraySort.ts, 39, 3)) +>sort : Symbol(Float64Array.sort, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 40, 19)) +>b : Symbol(b, Decl(arraySort.ts, 40, 21)) +>a : Symbol(a, Decl(arraySort.ts, 40, 19)) +>b : Symbol(b, Decl(arraySort.ts, 40, 21)) + +interface BigInt64ArrayExtension extends BigInt64Array {} +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arraySort.ts, 40, 35)) +>BigInt64Array : Symbol(BigInt64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : Symbol(bigInt64Array, Decl(arraySort.ts, 43, 3)) +>BigInt64ArrayExtension : Symbol(BigInt64ArrayExtension, Decl(arraySort.ts, 40, 35)) + +bigInt64Array.sort((a, b) => a - b); // BigInt64Array +>bigInt64Array.sort : Symbol(BigInt64Array.sort, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigInt64Array : Symbol(bigInt64Array, Decl(arraySort.ts, 43, 3)) +>sort : Symbol(BigInt64Array.sort, Decl(lib.es2020.bigint.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 44, 20)) +>b : Symbol(b, Decl(arraySort.ts, 44, 22)) +>a : Symbol(a, Decl(arraySort.ts, 44, 20)) +>b : Symbol(b, Decl(arraySort.ts, 44, 22)) + +interface BigUint64ArrayExtension extends BigUint64Array {} +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arraySort.ts, 44, 36)) +>BigUint64Array : Symbol(BigUint64Array, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2022.array.d.ts, --, --)) + +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : Symbol(bigUint64Array, Decl(arraySort.ts, 47, 3)) +>BigUint64ArrayExtension : Symbol(BigUint64ArrayExtension, Decl(arraySort.ts, 44, 36)) + +bigUint64Array.sort((a, b) => a - b); // BigUint64Array +>bigUint64Array.sort : Symbol(BigUint64Array.sort, Decl(lib.es2020.bigint.d.ts, --, --)) +>bigUint64Array : Symbol(bigUint64Array, Decl(arraySort.ts, 47, 3)) +>sort : Symbol(BigUint64Array.sort, Decl(lib.es2020.bigint.d.ts, --, --)) +>a : Symbol(a, Decl(arraySort.ts, 48, 21)) +>b : Symbol(b, Decl(arraySort.ts, 48, 23)) +>a : Symbol(a, Decl(arraySort.ts, 48, 21)) +>b : Symbol(b, Decl(arraySort.ts, 48, 23)) + diff --git a/tests/baselines/reference/arraySort.types b/tests/baselines/reference/arraySort.types new file mode 100644 index 0000000000000..80650f3f43c14 --- /dev/null +++ b/tests/baselines/reference/arraySort.types @@ -0,0 +1,201 @@ +=== tests/cases/compiler/arraySort.ts === +var strTuple: ["foo", "bar", "baz"]; +>strTuple : ["foo", "bar", "baz"] + +strTuple.sort(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] +>strTuple.sort() : ("foo" | "bar" | "baz")[] +>strTuple.sort : (compareFn?: (a: "foo" | "bar" | "baz", b: "foo" | "bar" | "baz") => number) => ("foo" | "bar" | "baz")[] +>strTuple : ["foo", "bar", "baz"] +>sort : (compareFn?: (a: "foo" | "bar" | "baz", b: "foo" | "bar" | "baz") => number) => ("foo" | "bar" | "baz")[] + +var numTuple: [11, 2, 22, 1]; +>numTuple : [11, 2, 22, 1] + +numTuple.sort((a, b) => a - b); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] +>numTuple.sort((a, b) => a - b) : (11 | 2 | 22 | 1)[] +>numTuple.sort : (compareFn?: (a: 11 | 2 | 22 | 1, b: 11 | 2 | 22 | 1) => number) => (11 | 2 | 22 | 1)[] +>numTuple : [11, 2, 22, 1] +>sort : (compareFn?: (a: 11 | 2 | 22 | 1, b: 11 | 2 | 22 | 1) => number) => (11 | 2 | 22 | 1)[] +>(a, b) => a - b : (a: 11 | 2 | 22 | 1, b: 11 | 2 | 22 | 1) => number +>a : 11 | 2 | 22 | 1 +>b : 11 | 2 | 22 | 1 +>a - b : number +>a : 11 | 2 | 22 | 1 +>b : 11 | 2 | 22 | 1 + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +>int8Array : Int8ArrayExtension + +int8Array.sort((a, b) => a - b); // Int8Array +>int8Array.sort((a, b) => a - b) : Int8Array +>int8Array.sort : (compareFn?: (a: number, b: number) => number) => Int8Array +>int8Array : Int8ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Int8Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +>uint8Array : Uint8ArrayExtension + +uint8Array.sort((a, b) => a - b); // Uint8Array +>uint8Array.sort((a, b) => a - b) : Uint8Array +>uint8Array.sort : (compareFn?: (a: number, b: number) => number) => Uint8Array +>uint8Array : Uint8ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Uint8Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +>uint8ClampedArray : Uint8ClampedArrayExtension + +uint8ClampedArray.sort((a, b) => a - b); // Uint8ClampedArray +>uint8ClampedArray.sort((a, b) => a - b) : Uint8ClampedArray +>uint8ClampedArray.sort : (compareFn?: (a: number, b: number) => number) => Uint8ClampedArray +>uint8ClampedArray : Uint8ClampedArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Uint8ClampedArray +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +>int16Array : Int16ArrayExtension + +int16Array.sort((a, b) => a - b); // Int16Array +>int16Array.sort((a, b) => a - b) : Int16Array +>int16Array.sort : (compareFn?: (a: number, b: number) => number) => Int16Array +>int16Array : Int16ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Int16Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +>uint16Array : Uint16ArrayExtension + +uint16Array.sort((a, b) => a - b); // Uint16Array +>uint16Array.sort((a, b) => a - b) : Uint16Array +>uint16Array.sort : (compareFn?: (a: number, b: number) => number) => Uint16Array +>uint16Array : Uint16ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Uint16Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +>int32Array : Int32ArrayExtension + +int32Array.sort((a, b) => a - b); // Int32Array +>int32Array.sort((a, b) => a - b) : Int32Array +>int32Array.sort : (compareFn?: (a: number, b: number) => number) => Int32Array +>int32Array : Int32ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Int32Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +>uint32Array : Uint32ArrayExtension + +uint32Array.sort((a, b) => a - b); // Uint32Array +>uint32Array.sort((a, b) => a - b) : Uint32Array +>uint32Array.sort : (compareFn?: (a: number, b: number) => number) => Uint32Array +>uint32Array : Uint32ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Uint32Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +>float32Array : Float32ArrayExtension + +float32Array.sort((a, b) => a - b); // Float32Array +>float32Array.sort((a, b) => a - b) : Float32Array +>float32Array.sort : (compareFn?: (a: number, b: number) => number) => Float32Array +>float32Array : Float32ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Float32Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +>float64Array : Float64ArrayExtension + +float64Array.sort((a, b) => a - b); // Float64Array +>float64Array.sort((a, b) => a - b) : Float64Array +>float64Array.sort : (compareFn?: (a: number, b: number) => number) => Float64Array +>float64Array : Float64ArrayExtension +>sort : (compareFn?: (a: number, b: number) => number) => Float64Array +>(a, b) => a - b : (a: number, b: number) => number +>a : number +>b : number +>a - b : number +>a : number +>b : number + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +>bigInt64Array : BigInt64ArrayExtension + +bigInt64Array.sort((a, b) => a - b); // BigInt64Array +>bigInt64Array.sort((a, b) => a - b) : BigInt64Array +>bigInt64Array.sort : (compareFn?: (a: bigint, b: bigint) => number | bigint) => BigInt64Array +>bigInt64Array : BigInt64ArrayExtension +>sort : (compareFn?: (a: bigint, b: bigint) => number | bigint) => BigInt64Array +>(a, b) => a - b : (a: bigint, b: bigint) => bigint +>a : bigint +>b : bigint +>a - b : bigint +>a : bigint +>b : bigint + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +>bigUint64Array : BigUint64ArrayExtension + +bigUint64Array.sort((a, b) => a - b); // BigUint64Array +>bigUint64Array.sort((a, b) => a - b) : BigUint64Array +>bigUint64Array.sort : (compareFn?: (a: bigint, b: bigint) => number | bigint) => BigUint64Array +>bigUint64Array : BigUint64ArrayExtension +>sort : (compareFn?: (a: bigint, b: bigint) => number | bigint) => BigUint64Array +>(a, b) => a - b : (a: bigint, b: bigint) => bigint +>a : bigint +>b : bigint +>a - b : bigint +>a : bigint +>b : bigint + diff --git a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt index 59b3e74cc8112..0a6540c0a9280 100644 --- a/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt +++ b/tests/baselines/reference/checkIndexConstraintOfJavascriptClassExpression.errors.txt @@ -7,7 +7,7 @@ tests/cases/compiler/weird.js(9,17): error TS7006: Parameter 'error' implicitly someFunction(function(BaseClass) { ~~~~~~~~~~~~ !!! error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? -!!! related TS2728 /.ts/lib.es5.d.ts:324:13: 'Function' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:342:13: 'Function' is declared here. ~~~~~~~~~ !!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. 'use strict'; diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index d6108a9fc7db2..35d315e2a1182 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -5612,7 +5612,7 @@ ], "documentation": [ { - "text": "Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.", + "text": "Returns a string representation of the array. The elements are converted to string using their toLocaleString methods.", "kind": "text" } ] @@ -5686,7 +5686,7 @@ ], "documentation": [ { - "text": "Returns a string representation of an array.", + "text": "Returns a string representation of the array.", "kind": "text" } ] @@ -5807,6 +5807,112 @@ ] } ] + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Array", + "kind": "localName" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "T", + "kind": "typeParameterName" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "valueOf", + "kind": "propertyName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + } + ], + "documentation": [ + { + "text": "Returns the primitive value of the array.", + "kind": "text" + } + ] } ] } diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index 63e85086026c2..3a77d28fca8ab 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1496:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1522:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/destructuringTuple.errors.txt b/tests/baselines/reference/destructuringTuple.errors.txt index 74859621dab02..c70349b8c238d 100644 --- a/tests/baselines/reference/destructuringTuple.errors.txt +++ b/tests/baselines/reference/destructuringTuple.errors.txt @@ -33,8 +33,8 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat !!! error TS2769: Overload 2 of 2, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. !!! error TS2769: Type 'never[]' is not assignable to type '[]'. !!! error TS2769: Target allows only 0 element(s) but source may have more. -!!! related TS6502 /.ts/lib.es5.d.ts:1462:24: The expected type comes from the return type of this signature. -!!! related TS6502 /.ts/lib.es5.d.ts:1468:27: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1488:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1494:27: The expected type comes from the return type of this signature. ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index df3a0bddf7f33..32bd877da490f 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt +++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt @@ -10,8 +10,8 @@ tests/cases/conformance/types/members/duplicateNumericIndexers.ts(24,5): error T tests/cases/conformance/types/members/duplicateNumericIndexers.ts(25,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(29,5): error TS2374: Duplicate index signature for type 'number'. tests/cases/conformance/types/members/duplicateNumericIndexers.ts(30,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(541,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(1482,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(559,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(1508,5): error TS2374: Duplicate index signature for type 'number'. ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ==== diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 5bab58dd8ea7c..f27a01309ecfa 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -66,20 +66,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat var d=new XDate(); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:969:13: 'Date' is declared here. d.getDay(); d=new XDate(1978,2); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:969:13: 'Date' is declared here. d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:969:13: 'Date' is declared here. n=XDate.UTC(1964,2,1); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:951:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:969:13: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/formatToPartsFractionalSecond.types b/tests/baselines/reference/formatToPartsFractionalSecond.types index c50d9994aed81..11ff9f0af7f88 100644 --- a/tests/baselines/reference/formatToPartsFractionalSecond.types +++ b/tests/baselines/reference/formatToPartsFractionalSecond.types @@ -1,7 +1,7 @@ === tests/cases/compiler/formatToPartsFractionalSecond.ts === new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') >new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractionalSecond') : Intl.DateTimeFormatPart ->new Intl.DateTimeFormat().formatToParts().find : { (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } +>new Intl.DateTimeFormat().formatToParts().find : { (predicate: (value: Intl.DateTimeFormatPart, index: number, array: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, array: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } >new Intl.DateTimeFormat().formatToParts() : Intl.DateTimeFormatPart[] >new Intl.DateTimeFormat().formatToParts : (date?: number | Date) => Intl.DateTimeFormatPart[] >new Intl.DateTimeFormat() : Intl.DateTimeFormat @@ -9,7 +9,7 @@ new Intl.DateTimeFormat().formatToParts().find((val) => val.type === 'fractional >Intl : typeof Intl >DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions): string[]; readonly prototype: Intl.DateTimeFormat; } >formatToParts : (date?: number | Date) => Intl.DateTimeFormatPart[] ->find : { (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, obj: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } +>find : { (predicate: (value: Intl.DateTimeFormatPart, index: number, array: Intl.DateTimeFormatPart[]) => value is S, thisArg?: any): S; (predicate: (value: Intl.DateTimeFormatPart, index: number, array: Intl.DateTimeFormatPart[]) => unknown, thisArg?: any): Intl.DateTimeFormatPart; } >(val) => val.type === 'fractionalSecond' : (val: Intl.DateTimeFormatPart) => boolean >val : Intl.DateTimeFormatPart >val.type === 'fractionalSecond' : boolean diff --git a/tests/baselines/reference/implementArrayInterface.js b/tests/baselines/reference/implementArrayInterface.js index 733a861071bae..5463693971453 100644 --- a/tests/baselines/reference/implementArrayInterface.js +++ b/tests/baselines/reference/implementArrayInterface.js @@ -2,6 +2,7 @@ declare class MyArray implements Array { toString(): string; toLocaleString(): string; + valueOf(): T[]; concat(...items: U[]): T[]; concat(...items: T[]): T[]; join(separator?: string): string; @@ -10,7 +11,7 @@ declare class MyArray implements Array { reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; - sort(compareFn?: (a: T, b: T) => number): this; + sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; @@ -27,6 +28,20 @@ declare class MyArray implements Array { 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; + find(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T | undefined; + findIndex(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): number; + fill(value: T, start?: number, end?: number): T[]; + copyWithin(target: number, start: number, end?: number): T[]; + [Symbol.iterator](): IterableIterator; + entries(): IterableIterator<[number, T]>; + keys(): IterableIterator; + values(): IterableIterator; + [Symbol.unscopables]: any; + includes(searchElement: T, fromIndex?: number): boolean; + flatMap(callback: (value: T, index: number, array: T[]) => U | U[], thisArg?: any): U[] + flat(this: A, depth?: D): FlatArray[] + at(index: number): T | undefined; + length: number; [n: number]: T; diff --git a/tests/baselines/reference/implementArrayInterface.symbols b/tests/baselines/reference/implementArrayInterface.symbols index 4df065b57732a..706682dfaddc2 100644 --- a/tests/baselines/reference/implementArrayInterface.symbols +++ b/tests/baselines/reference/implementArrayInterface.symbols @@ -2,7 +2,7 @@ declare class MyArray implements Array { >MyArray : Symbol(MyArray, Decl(implementArrayInterface.ts, 0, 0)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) toString(): string; @@ -11,206 +11,312 @@ declare class MyArray implements Array { toLocaleString(): string; >toLocaleString : Symbol(MyArray.toLocaleString, Decl(implementArrayInterface.ts, 1, 23)) + valueOf(): T[]; +>valueOf : Symbol(MyArray.valueOf, Decl(implementArrayInterface.ts, 2, 29)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + concat(...items: U[]): T[]; ->concat : Symbol(MyArray.concat, Decl(implementArrayInterface.ts, 2, 29), Decl(implementArrayInterface.ts, 3, 46)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 3, 11)) +>concat : Symbol(MyArray.concat, Decl(implementArrayInterface.ts, 3, 19), Decl(implementArrayInterface.ts, 4, 46)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 4, 11)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->items : Symbol(items, Decl(implementArrayInterface.ts, 3, 26)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 3, 11)) +>items : Symbol(items, Decl(implementArrayInterface.ts, 4, 26)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 4, 11)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) concat(...items: T[]): T[]; ->concat : Symbol(MyArray.concat, Decl(implementArrayInterface.ts, 2, 29), Decl(implementArrayInterface.ts, 3, 46)) ->items : Symbol(items, Decl(implementArrayInterface.ts, 4, 11)) +>concat : Symbol(MyArray.concat, Decl(implementArrayInterface.ts, 3, 19), Decl(implementArrayInterface.ts, 4, 46)) +>items : Symbol(items, Decl(implementArrayInterface.ts, 5, 11)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) join(separator?: string): string; ->join : Symbol(MyArray.join, Decl(implementArrayInterface.ts, 4, 31)) ->separator : Symbol(separator, Decl(implementArrayInterface.ts, 5, 9)) +>join : Symbol(MyArray.join, Decl(implementArrayInterface.ts, 5, 31)) +>separator : Symbol(separator, Decl(implementArrayInterface.ts, 6, 9)) pop(): T; ->pop : Symbol(MyArray.pop, Decl(implementArrayInterface.ts, 5, 37)) +>pop : Symbol(MyArray.pop, Decl(implementArrayInterface.ts, 6, 37)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) push(...items: T[]): number; ->push : Symbol(MyArray.push, Decl(implementArrayInterface.ts, 6, 13)) ->items : Symbol(items, Decl(implementArrayInterface.ts, 7, 9)) +>push : Symbol(MyArray.push, Decl(implementArrayInterface.ts, 7, 13)) +>items : Symbol(items, Decl(implementArrayInterface.ts, 8, 9)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) reverse(): T[]; ->reverse : Symbol(MyArray.reverse, Decl(implementArrayInterface.ts, 7, 32)) +>reverse : Symbol(MyArray.reverse, Decl(implementArrayInterface.ts, 8, 32)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) shift(): T; ->shift : Symbol(MyArray.shift, Decl(implementArrayInterface.ts, 8, 19)) +>shift : Symbol(MyArray.shift, Decl(implementArrayInterface.ts, 9, 19)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) slice(start?: number, end?: number): T[]; ->slice : Symbol(MyArray.slice, Decl(implementArrayInterface.ts, 9, 15)) ->start : Symbol(start, Decl(implementArrayInterface.ts, 10, 10)) ->end : Symbol(end, Decl(implementArrayInterface.ts, 10, 25)) +>slice : Symbol(MyArray.slice, Decl(implementArrayInterface.ts, 10, 15)) +>start : Symbol(start, Decl(implementArrayInterface.ts, 11, 10)) +>end : Symbol(end, Decl(implementArrayInterface.ts, 11, 25)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) - sort(compareFn?: (a: T, b: T) => number): this; ->sort : Symbol(MyArray.sort, Decl(implementArrayInterface.ts, 10, 45)) ->compareFn : Symbol(compareFn, Decl(implementArrayInterface.ts, 11, 9)) ->a : Symbol(a, Decl(implementArrayInterface.ts, 11, 22)) + sort(compareFn?: (a: T, b: T) => number): T[]; +>sort : Symbol(MyArray.sort, Decl(implementArrayInterface.ts, 11, 45)) +>compareFn : Symbol(compareFn, Decl(implementArrayInterface.ts, 12, 9)) +>a : Symbol(a, Decl(implementArrayInterface.ts, 12, 22)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>b : Symbol(b, Decl(implementArrayInterface.ts, 12, 27)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->b : Symbol(b, Decl(implementArrayInterface.ts, 11, 27)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) splice(start: number): T[]; ->splice : Symbol(MyArray.splice, Decl(implementArrayInterface.ts, 11, 51), Decl(implementArrayInterface.ts, 12, 31)) ->start : Symbol(start, Decl(implementArrayInterface.ts, 12, 11)) +>splice : Symbol(MyArray.splice, Decl(implementArrayInterface.ts, 12, 50), Decl(implementArrayInterface.ts, 13, 31)) +>start : Symbol(start, Decl(implementArrayInterface.ts, 13, 11)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) splice(start: number, deleteCount: number, ...items: T[]): T[]; ->splice : Symbol(MyArray.splice, Decl(implementArrayInterface.ts, 11, 51), Decl(implementArrayInterface.ts, 12, 31)) ->start : Symbol(start, Decl(implementArrayInterface.ts, 13, 11)) ->deleteCount : Symbol(deleteCount, Decl(implementArrayInterface.ts, 13, 25)) ->items : Symbol(items, Decl(implementArrayInterface.ts, 13, 46)) +>splice : Symbol(MyArray.splice, Decl(implementArrayInterface.ts, 12, 50), Decl(implementArrayInterface.ts, 13, 31)) +>start : Symbol(start, Decl(implementArrayInterface.ts, 14, 11)) +>deleteCount : Symbol(deleteCount, Decl(implementArrayInterface.ts, 14, 25)) +>items : Symbol(items, Decl(implementArrayInterface.ts, 14, 46)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) unshift(...items: T[]): number; ->unshift : Symbol(MyArray.unshift, Decl(implementArrayInterface.ts, 13, 67)) ->items : Symbol(items, Decl(implementArrayInterface.ts, 14, 12)) +>unshift : Symbol(MyArray.unshift, Decl(implementArrayInterface.ts, 14, 67)) +>items : Symbol(items, Decl(implementArrayInterface.ts, 15, 12)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) indexOf(searchElement: T, fromIndex?: number): number; ->indexOf : Symbol(MyArray.indexOf, Decl(implementArrayInterface.ts, 14, 35)) ->searchElement : Symbol(searchElement, Decl(implementArrayInterface.ts, 16, 12)) +>indexOf : Symbol(MyArray.indexOf, Decl(implementArrayInterface.ts, 15, 35)) +>searchElement : Symbol(searchElement, Decl(implementArrayInterface.ts, 17, 12)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->fromIndex : Symbol(fromIndex, Decl(implementArrayInterface.ts, 16, 29)) +>fromIndex : Symbol(fromIndex, Decl(implementArrayInterface.ts, 17, 29)) lastIndexOf(searchElement: T, fromIndex?: number): number; ->lastIndexOf : Symbol(MyArray.lastIndexOf, Decl(implementArrayInterface.ts, 16, 58)) ->searchElement : Symbol(searchElement, Decl(implementArrayInterface.ts, 17, 16)) +>lastIndexOf : Symbol(MyArray.lastIndexOf, Decl(implementArrayInterface.ts, 17, 58)) +>searchElement : Symbol(searchElement, Decl(implementArrayInterface.ts, 18, 16)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->fromIndex : Symbol(fromIndex, Decl(implementArrayInterface.ts, 17, 33)) +>fromIndex : Symbol(fromIndex, Decl(implementArrayInterface.ts, 18, 33)) every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; ->every : Symbol(MyArray.every, Decl(implementArrayInterface.ts, 17, 62)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 18, 10)) ->value : Symbol(value, Decl(implementArrayInterface.ts, 18, 23)) +>every : Symbol(MyArray.every, Decl(implementArrayInterface.ts, 18, 62)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 19, 10)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 19, 23)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->index : Symbol(index, Decl(implementArrayInterface.ts, 18, 32)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 18, 47)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 19, 32)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 19, 47)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 18, 71)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 19, 71)) some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; ->some : Symbol(MyArray.some, Decl(implementArrayInterface.ts, 18, 96)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 19, 9)) ->value : Symbol(value, Decl(implementArrayInterface.ts, 19, 22)) +>some : Symbol(MyArray.some, Decl(implementArrayInterface.ts, 19, 96)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 20, 9)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 20, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->index : Symbol(index, Decl(implementArrayInterface.ts, 19, 31)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 19, 46)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 20, 31)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 20, 46)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 19, 70)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 20, 70)) forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; ->forEach : Symbol(MyArray.forEach, Decl(implementArrayInterface.ts, 19, 95)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 20, 12)) ->value : Symbol(value, Decl(implementArrayInterface.ts, 20, 25)) +>forEach : Symbol(MyArray.forEach, Decl(implementArrayInterface.ts, 20, 95)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 21, 12)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 21, 25)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->index : Symbol(index, Decl(implementArrayInterface.ts, 20, 34)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 20, 49)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 21, 34)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 21, 49)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 20, 70)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 21, 70)) map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; ->map : Symbol(MyArray.map, Decl(implementArrayInterface.ts, 20, 92)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 21, 8)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 21, 11)) ->value : Symbol(value, Decl(implementArrayInterface.ts, 21, 24)) ->T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->index : Symbol(index, Decl(implementArrayInterface.ts, 21, 33)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 21, 48)) ->T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 21, 8)) ->thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 21, 66)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 21, 8)) - - filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; ->filter : Symbol(MyArray.filter, Decl(implementArrayInterface.ts, 21, 87)) +>map : Symbol(MyArray.map, Decl(implementArrayInterface.ts, 21, 92)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 22, 8)) >callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 22, 11)) >value : Symbol(value, Decl(implementArrayInterface.ts, 22, 24)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >index : Symbol(index, Decl(implementArrayInterface.ts, 22, 33)) >array : Symbol(array, Decl(implementArrayInterface.ts, 22, 48)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 22, 72)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 22, 8)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 22, 66)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 22, 8)) + + filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[]; +>filter : Symbol(MyArray.filter, Decl(implementArrayInterface.ts, 22, 87)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 23, 11)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 23, 24)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 23, 33)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 23, 48)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 23, 72)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; ->reduce : Symbol(MyArray.reduce, Decl(implementArrayInterface.ts, 22, 93), Decl(implementArrayInterface.ts, 23, 120)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 23, 11)) ->previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 23, 24)) +>reduce : Symbol(MyArray.reduce, Decl(implementArrayInterface.ts, 23, 93), Decl(implementArrayInterface.ts, 24, 120)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 24, 11)) +>previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 24, 24)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 23, 41)) +>currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 24, 41)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 23, 58)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 23, 80)) +>currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 24, 58)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 24, 80)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 23, 98)) +>initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 24, 98)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; ->reduce : Symbol(MyArray.reduce, Decl(implementArrayInterface.ts, 22, 93), Decl(implementArrayInterface.ts, 23, 120)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 24, 11)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 24, 14)) ->previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 24, 27)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 24, 11)) ->currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 24, 44)) ->T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 24, 61)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 24, 83)) ->T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 24, 11)) ->initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 24, 101)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 24, 11)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 24, 11)) +>reduce : Symbol(MyArray.reduce, Decl(implementArrayInterface.ts, 23, 93), Decl(implementArrayInterface.ts, 24, 120)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 25, 11)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 25, 14)) +>previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 25, 27)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 25, 11)) +>currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 25, 44)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 25, 61)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 25, 83)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 25, 11)) +>initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 25, 101)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 25, 11)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 25, 11)) reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; ->reduceRight : Symbol(MyArray.reduceRight, Decl(implementArrayInterface.ts, 24, 122), Decl(implementArrayInterface.ts, 25, 125)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 25, 16)) ->previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 25, 29)) +>reduceRight : Symbol(MyArray.reduceRight, Decl(implementArrayInterface.ts, 25, 122), Decl(implementArrayInterface.ts, 26, 125)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 26, 16)) +>previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 26, 29)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 25, 46)) +>currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 26, 46)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 25, 63)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 25, 85)) +>currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 26, 63)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 26, 85)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 25, 103)) +>initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 26, 103)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; ->reduceRight : Symbol(MyArray.reduceRight, Decl(implementArrayInterface.ts, 24, 122), Decl(implementArrayInterface.ts, 25, 125)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 26, 16)) ->callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 26, 19)) ->previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 26, 32)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 26, 16)) ->currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 26, 49)) +>reduceRight : Symbol(MyArray.reduceRight, Decl(implementArrayInterface.ts, 25, 122), Decl(implementArrayInterface.ts, 26, 125)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 27, 16)) +>callbackfn : Symbol(callbackfn, Decl(implementArrayInterface.ts, 27, 19)) +>previousValue : Symbol(previousValue, Decl(implementArrayInterface.ts, 27, 32)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 27, 16)) +>currentValue : Symbol(currentValue, Decl(implementArrayInterface.ts, 27, 49)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 27, 66)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 27, 88)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 27, 16)) +>initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 27, 106)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 27, 16)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 27, 16)) + + find(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T | undefined; +>find : Symbol(MyArray.find, Decl(implementArrayInterface.ts, 27, 127)) +>predicate : Symbol(predicate, Decl(implementArrayInterface.ts, 29, 9)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 29, 21)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 29, 30)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 29, 45)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 29, 69)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->currentIndex : Symbol(currentIndex, Decl(implementArrayInterface.ts, 26, 66)) ->array : Symbol(array, Decl(implementArrayInterface.ts, 26, 88)) + + findIndex(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): number; +>findIndex : Symbol(MyArray.findIndex, Decl(implementArrayInterface.ts, 29, 100)) +>predicate : Symbol(predicate, Decl(implementArrayInterface.ts, 30, 14)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 30, 26)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 30, 35)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 30, 50)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 30, 74)) + + fill(value: T, start?: number, end?: number): T[]; +>fill : Symbol(MyArray.fill, Decl(implementArrayInterface.ts, 30, 98)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 31, 9)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>start : Symbol(start, Decl(implementArrayInterface.ts, 31, 18)) +>end : Symbol(end, Decl(implementArrayInterface.ts, 31, 34)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + + copyWithin(target: number, start: number, end?: number): T[]; +>copyWithin : Symbol(MyArray.copyWithin, Decl(implementArrayInterface.ts, 31, 54)) +>target : Symbol(target, Decl(implementArrayInterface.ts, 32, 15)) +>start : Symbol(start, Decl(implementArrayInterface.ts, 32, 30)) +>end : Symbol(end, Decl(implementArrayInterface.ts, 32, 45)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + + [Symbol.iterator](): IterableIterator; +>[Symbol.iterator] : Symbol(MyArray[Symbol.iterator], Decl(implementArrayInterface.ts, 32, 65)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + + entries(): IterableIterator<[number, T]>; +>entries : Symbol(MyArray.entries, Decl(implementArrayInterface.ts, 33, 45)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + + keys(): IterableIterator; +>keys : Symbol(MyArray.keys, Decl(implementArrayInterface.ts, 34, 45)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) + + values(): IterableIterator; +>values : Symbol(MyArray.values, Decl(implementArrayInterface.ts, 35, 37)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + + [Symbol.unscopables]: any; +>[Symbol.unscopables] : Symbol(MyArray[Symbol.unscopables], Decl(implementArrayInterface.ts, 36, 34)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) + + includes(searchElement: T, fromIndex?: number): boolean; +>includes : Symbol(MyArray.includes, Decl(implementArrayInterface.ts, 37, 30)) +>searchElement : Symbol(searchElement, Decl(implementArrayInterface.ts, 38, 13)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>fromIndex : Symbol(fromIndex, Decl(implementArrayInterface.ts, 38, 30)) + + flatMap(callback: (value: T, index: number, array: T[]) => U | U[], thisArg?: any): U[] +>flatMap : Symbol(MyArray.flatMap, Decl(implementArrayInterface.ts, 38, 60)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 39, 12)) +>callback : Symbol(callback, Decl(implementArrayInterface.ts, 39, 15)) +>value : Symbol(value, Decl(implementArrayInterface.ts, 39, 26)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 39, 35)) +>array : Symbol(array, Decl(implementArrayInterface.ts, 39, 50)) +>T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 39, 12)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 39, 12)) +>thisArg : Symbol(thisArg, Decl(implementArrayInterface.ts, 39, 74)) +>U : Symbol(U, Decl(implementArrayInterface.ts, 39, 12)) + + flat(this: A, depth?: D): FlatArray[] +>flat : Symbol(MyArray.flat, Decl(implementArrayInterface.ts, 39, 94)) +>A : Symbol(A, Decl(implementArrayInterface.ts, 40, 9)) +>D : Symbol(D, Decl(implementArrayInterface.ts, 40, 11)) +>this : Symbol(this, Decl(implementArrayInterface.ts, 40, 34)) +>A : Symbol(A, Decl(implementArrayInterface.ts, 40, 9)) +>depth : Symbol(depth, Decl(implementArrayInterface.ts, 40, 42)) +>D : Symbol(D, Decl(implementArrayInterface.ts, 40, 11)) +>FlatArray : Symbol(FlatArray, Decl(lib.es2019.array.d.ts, --, --)) +>A : Symbol(A, Decl(implementArrayInterface.ts, 40, 9)) +>D : Symbol(D, Decl(implementArrayInterface.ts, 40, 11)) + + at(index: number): T | undefined; +>at : Symbol(MyArray.at, Decl(implementArrayInterface.ts, 40, 72)) +>index : Symbol(index, Decl(implementArrayInterface.ts, 41, 7)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 26, 16)) ->initialValue : Symbol(initialValue, Decl(implementArrayInterface.ts, 26, 106)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 26, 16)) ->U : Symbol(U, Decl(implementArrayInterface.ts, 26, 16)) length: number; ->length : Symbol(MyArray.length, Decl(implementArrayInterface.ts, 26, 127)) +>length : Symbol(MyArray.length, Decl(implementArrayInterface.ts, 41, 37)) [n: number]: T; ->n : Symbol(n, Decl(implementArrayInterface.ts, 30, 5)) +>n : Symbol(n, Decl(implementArrayInterface.ts, 45, 5)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) } diff --git a/tests/baselines/reference/implementArrayInterface.types b/tests/baselines/reference/implementArrayInterface.types index 4d0a012a17f5e..821bf27f88e8d 100644 --- a/tests/baselines/reference/implementArrayInterface.types +++ b/tests/baselines/reference/implementArrayInterface.types @@ -8,6 +8,9 @@ declare class MyArray implements Array { toLocaleString(): string; >toLocaleString : () => string + valueOf(): T[]; +>valueOf : () => T[] + concat(...items: U[]): T[]; >concat : { (...items: U[]): T[]; (...items: T[]): T[]; } >items : U[] @@ -38,8 +41,8 @@ declare class MyArray implements Array { >start : number >end : number - sort(compareFn?: (a: T, b: T) => number): this; ->sort : (compareFn?: (a: T, b: T) => number) => this + sort(compareFn?: (a: T, b: T) => number): T[]; +>sort : (compareFn?: (a: T, b: T) => number) => T[] >compareFn : (a: T, b: T) => number >a : T >b : T @@ -144,6 +147,77 @@ declare class MyArray implements Array { >array : T[] >initialValue : U + find(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T | undefined; +>find : (predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any) => T | undefined +>predicate : (value: T, index: number, array: T[]) => boolean +>value : T +>index : number +>array : T[] +>thisArg : any + + findIndex(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): number; +>findIndex : (predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any) => number +>predicate : (value: T, index: number, array: T[]) => boolean +>value : T +>index : number +>array : T[] +>thisArg : any + + fill(value: T, start?: number, end?: number): T[]; +>fill : (value: T, start?: number, end?: number) => T[] +>value : T +>start : number +>end : number + + copyWithin(target: number, start: number, end?: number): T[]; +>copyWithin : (target: number, start: number, end?: number) => T[] +>target : number +>start : number +>end : number + + [Symbol.iterator](): IterableIterator; +>[Symbol.iterator] : () => IterableIterator +>Symbol.iterator : unique symbol +>Symbol : SymbolConstructor +>iterator : unique symbol + + entries(): IterableIterator<[number, T]>; +>entries : () => IterableIterator<[number, T]> + + keys(): IterableIterator; +>keys : () => IterableIterator + + values(): IterableIterator; +>values : () => IterableIterator + + [Symbol.unscopables]: any; +>[Symbol.unscopables] : any +>Symbol.unscopables : unique symbol +>Symbol : SymbolConstructor +>unscopables : unique symbol + + includes(searchElement: T, fromIndex?: number): boolean; +>includes : (searchElement: T, fromIndex?: number) => boolean +>searchElement : T +>fromIndex : number + + flatMap(callback: (value: T, index: number, array: T[]) => U | U[], thisArg?: any): U[] +>flatMap : (callback: (value: T, index: number, array: T[]) => U | U[], thisArg?: any) => U[] +>callback : (value: T, index: number, array: T[]) => U | U[] +>value : T +>index : number +>array : T[] +>thisArg : any + + flat(this: A, depth?: D): FlatArray[] +>flat : (this: A, depth?: D) => FlatArray[] +>this : A +>depth : D + + at(index: number): T | undefined; +>at : (index: number) => T | undefined +>index : number + length: number; >length : number diff --git a/tests/baselines/reference/invalidTypeOfTarget.errors.txt b/tests/baselines/reference/invalidTypeOfTarget.errors.txt index 2744688f81d26..7fbd582f154d0 100644 --- a/tests/baselines/reference/invalidTypeOfTarget.errors.txt +++ b/tests/baselines/reference/invalidTypeOfTarget.errors.txt @@ -36,7 +36,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts var x7: typeof function f() { }; ~~~~~~~~ !!! error TS2552: Cannot find name 'function'. Did you mean 'Function'? -!!! related TS2728 /.ts/lib.es5.d.ts:324:13: 'Function' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:342:13: 'Function' is declared here. ~ !!! error TS1005: ',' expected. ~ diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index d8498a08eb70a..07372bd3f2496 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -58,10 +58,10 @@ type K00 = keyof any; // string >K00 : string | number | symbol type K01 = keyof string; // "toString" | "charAt" | ... ->K01 : number | "length" | "toString" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" | "valueOf" +>K01 : number | "length" | "toString" | "valueOf" | "concat" | "slice" | "indexOf" | "lastIndexOf" | "charAt" | "charCodeAt" | "localeCompare" | "match" | "replace" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "substr" type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ... ->K02 : "toString" | "toLocaleString" | "toFixed" | "toExponential" | "toPrecision" | "valueOf" +>K02 : "toString" | "toLocaleString" | "valueOf" | "toFixed" | "toExponential" | "toPrecision" type K03 = keyof boolean; // "valueOf" >K03 : "valueOf" @@ -98,7 +98,7 @@ type K14 = keyof Object; // "constructor" | "toString" | ... >K14 : keyof Object type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ... ->K15 : "toString" | "toLocaleString" | "toFixed" | "toExponential" | "toPrecision" | "valueOf" +>K15 : "toString" | "toLocaleString" | "valueOf" | "toFixed" | "toExponential" | "toPrecision" type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ... >K16 : keyof [string, number] diff --git a/tests/baselines/reference/mapConstructorOnReadonlyTuple.js b/tests/baselines/reference/mapConstructorOnReadonlyTuple.js index af2a3b20b4cb8..4e158e568e477 100644 --- a/tests/baselines/reference/mapConstructorOnReadonlyTuple.js +++ b/tests/baselines/reference/mapConstructorOnReadonlyTuple.js @@ -1,7 +1,10 @@ //// [mapConstructorOnReadonlyTuple.ts] -const pairs = [['1', 1], ['2', 2]] as const -new Map(pairs); +const pairs = [[{}, 1], [{}, 2]] as const; +new Map(pairs); +new WeakMap(pairs); + //// [mapConstructorOnReadonlyTuple.js] -const pairs = [['1', 1], ['2', 2]]; +const pairs = [[{}, 1], [{}, 2]]; new Map(pairs); +new WeakMap(pairs); diff --git a/tests/baselines/reference/mapConstructorOnReadonlyTuple.symbols b/tests/baselines/reference/mapConstructorOnReadonlyTuple.symbols index 29426a8ec8ddb..c577de5c9fd04 100644 --- a/tests/baselines/reference/mapConstructorOnReadonlyTuple.symbols +++ b/tests/baselines/reference/mapConstructorOnReadonlyTuple.symbols @@ -1,5 +1,5 @@ === tests/cases/compiler/mapConstructorOnReadonlyTuple.ts === -const pairs = [['1', 1], ['2', 2]] as const +const pairs = [[{}, 1], [{}, 2]] as const; >pairs : Symbol(pairs, Decl(mapConstructorOnReadonlyTuple.ts, 0, 5)) >const : Symbol(const) @@ -7,3 +7,7 @@ new Map(pairs); >Map : Symbol(Map, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >pairs : Symbol(pairs, Decl(mapConstructorOnReadonlyTuple.ts, 0, 5)) +new WeakMap(pairs); +>WeakMap : Symbol(WeakMap, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>pairs : Symbol(pairs, Decl(mapConstructorOnReadonlyTuple.ts, 0, 5)) + diff --git a/tests/baselines/reference/mapConstructorOnReadonlyTuple.types b/tests/baselines/reference/mapConstructorOnReadonlyTuple.types index 44fc38fa797ab..8a024a3df84ab 100644 --- a/tests/baselines/reference/mapConstructorOnReadonlyTuple.types +++ b/tests/baselines/reference/mapConstructorOnReadonlyTuple.types @@ -1,17 +1,22 @@ === tests/cases/compiler/mapConstructorOnReadonlyTuple.ts === -const pairs = [['1', 1], ['2', 2]] as const ->pairs : readonly [readonly ["1", 1], readonly ["2", 2]] ->[['1', 1], ['2', 2]] as const : readonly [readonly ["1", 1], readonly ["2", 2]] ->[['1', 1], ['2', 2]] : readonly [readonly ["1", 1], readonly ["2", 2]] ->['1', 1] : readonly ["1", 1] ->'1' : "1" +const pairs = [[{}, 1], [{}, 2]] as const; +>pairs : readonly [readonly [{}, 1], readonly [{}, 2]] +>[[{}, 1], [{}, 2]] as const : readonly [readonly [{}, 1], readonly [{}, 2]] +>[[{}, 1], [{}, 2]] : readonly [readonly [{}, 1], readonly [{}, 2]] +>[{}, 1] : readonly [{}, 1] +>{} : {} >1 : 1 ->['2', 2] : readonly ["2", 2] ->'2' : "2" +>[{}, 2] : readonly [{}, 2] +>{} : {} >2 : 2 new Map(pairs); ->new Map(pairs) : Map<"1" | "2", 1 | 2> +>new Map(pairs) : Map<{}, 1 | 2> >Map : MapConstructor ->pairs : readonly [readonly ["1", 1], readonly ["2", 2]] +>pairs : readonly [readonly [{}, 1], readonly [{}, 2]] + +new WeakMap(pairs); +>new WeakMap(pairs) : WeakMap<{}, 1 | 2> +>WeakMap : WeakMapConstructor +>pairs : readonly [readonly [{}, 1], readonly [{}, 2]] diff --git a/tests/baselines/reference/mappedTypeAsClauses.types b/tests/baselines/reference/mappedTypeAsClauses.types index 9f561e45112cc..95b9acb1f883b 100644 --- a/tests/baselines/reference/mappedTypeAsClauses.types +++ b/tests/baselines/reference/mappedTypeAsClauses.types @@ -33,10 +33,10 @@ type TP1 = TypeFromDefs<{ name: 'a', type: string } | { name: 'b', type: number // No array or tuple type mapping when 'as N' clause present type TA1 = Getters; ->TA1 : { getConcat: () => { (...items: ConcatArray[]): string[]; (...items: (string | ConcatArray)[]): string[]; }; getIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => string[]; getLength: () => number; getToString: () => () => string; getToLocaleString: () => () => string; getPop: () => () => string | undefined; getPush: () => (...items: string[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => string[]; getShift: () => () => string | undefined; getSort: () => (compareFn?: ((a: string, b: string) => number) | undefined) => string[]; getSplice: () => { (start: number, deleteCount?: number | undefined): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; }; getUnshift: () => (...items: string[]) => number; getEvery: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[]; }; getReduce: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; } +>TA1 : { getConcat: () => { (...items: ConcatArray[]): string[]; (...items: (string | ConcatArray)[]): string[]; }; getIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: string, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => string[]; getLength: () => number; getToString: () => () => string; getToLocaleString: () => () => string; getValueOf: () => () => string[]; getPop: () => () => string | undefined; getPush: () => (...items: string[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => string[]; getShift: () => () => string | undefined; getSort: () => (compareFn?: ((a: string, b: string) => number) | undefined) => string[]; getSplice: () => { (start: number, deleteCount?: number | undefined): string[]; (start: number, deleteCount: number, ...items: string[]): string[]; }; getUnshift: () => (...items: string[]) => number; getEvery: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (predicate: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[]; }; getReduce: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string | undefined): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; }; } type TA2 = Getters<[number, boolean]>; ->TA2 : { getConcat: () => { (...items: ConcatArray[]): (number | boolean)[]; (...items: (number | boolean | ConcatArray)[]): (number | boolean)[]; }; getIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => (number | boolean)[]; getLength: () => 2; getToString: () => () => string; getToLocaleString: () => () => string; getPop: () => () => number | boolean | undefined; getPush: () => (...items: (number | boolean)[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => (number | boolean)[]; getShift: () => () => number | boolean | undefined; getSort: () => (compareFn?: ((a: number | boolean, b: number | boolean) => number) | undefined) => (number | boolean)[]; getSplice: () => { (start: number, deleteCount?: number | undefined): (number | boolean)[]; (start: number, deleteCount: number, ...items: (number | boolean)[]): (number | boolean)[]; }; getUnshift: () => (...items: (number | boolean)[]) => number; getEvery: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): (number | boolean)[]; }; getReduce: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue?: number | boolean | undefined): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue?: number | boolean | undefined): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; get0: () => number; get1: () => boolean; } +>TA2 : { getConcat: () => { (...items: ConcatArray[]): (number | boolean)[]; (...items: (number | boolean | ConcatArray)[]): (number | boolean)[]; }; getIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getLastIndexOf: () => (searchElement: number | boolean, fromIndex?: number | undefined) => number; getSlice: () => (start?: number | undefined, end?: number | undefined) => (number | boolean)[]; getLength: () => 2; getToString: () => () => string; getToLocaleString: () => () => string; getValueOf: () => () => (number | boolean)[]; getPop: () => () => number | boolean | undefined; getPush: () => (...items: (number | boolean)[]) => number; getJoin: () => (separator?: string | undefined) => string; getReverse: () => () => (number | boolean)[]; getShift: () => () => number | boolean | undefined; getSort: () => (compareFn?: ((a: number | boolean, b: number | boolean) => number) | undefined) => (number | boolean)[]; getSplice: () => { (start: number, deleteCount?: number | undefined): (number | boolean)[]; (start: number, deleteCount: number, ...items: (number | boolean)[]): (number | boolean)[]; }; getUnshift: () => (...items: (number | boolean)[]) => number; getEvery: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): boolean; }; getSome: () => (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any) => boolean; getForEach: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => void, thisArg?: any) => void; getMap: () => (callbackfn: (value: number | boolean, index: number, array: (number | boolean)[]) => U, thisArg?: any) => U[]; getFilter: () => { (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => value is S, thisArg?: any): S[]; (predicate: (value: number | boolean, index: number, array: (number | boolean)[]) => unknown, thisArg?: any): (number | boolean)[]; }; getReduce: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue?: number | boolean | undefined): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; getReduceRight: () => { (callbackfn: (previousValue: number | boolean, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => number | boolean, initialValue?: number | boolean | undefined): number | boolean; (callbackfn: (previousValue: U, currentValue: number | boolean, currentIndex: number, array: (number | boolean)[]) => U, initialValue: U): U; }; get0: () => number; get1: () => boolean; } // Filtering using 'as N' clause diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index 41379a772960e..023a505c5aaa6 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. +tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. ==== tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error T declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; tgt2 = src2; // Should error ~~~~ -!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. -!!! related TS2728 /.ts/lib.es5.d.ts:1307:5: 'length' is declared here. +!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. +!!! related TS2728 /.ts/lib.es5.d.ts:1329:5: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types index 50ee999820634..49d3bd0270aba 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types @@ -3,10 +3,10 @@ declare let tgt2: number[]; >tgt2 : number[] declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; ->src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } tgt2 = src2; // Should error ->tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } >tgt2 : number[] ->src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>src2 : { [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types index 7725cbed7ce36..1dad1c4fcc6ea 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types @@ -1,8 +1,8 @@ === tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts === export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); ->thing : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } ->(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } ->null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>thing : { [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } +>null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: () => string; valueOf: () => number[]; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (value: number, index: number, array: number[]) => U | readonly U[], thisArg?: any) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => IterableIterator; [Symbol.unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; } >null as any : any >null : null diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index 315907236e47a..6f29a39ba0e0b 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ !!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1077:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index d959bf75cd4fb..db532fc1dd81f 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1077:5: 'message' is declared here. } if (x instanceof Date) { @@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:807:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:825:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index 1accbd9fffca0..6fe07ccc7fa83 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1077:5: 'message' is declared here. } if (isDate(x)) { @@ -49,6 +49,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:807:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:825:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/objectMethodNullability.errors.txt b/tests/baselines/reference/objectMethodNullability.errors.txt new file mode 100644 index 0000000000000..570b7e758ea56 --- /dev/null +++ b/tests/baselines/reference/objectMethodNullability.errors.txt @@ -0,0 +1,135 @@ +tests/cases/compiler/objectMethodNullability.ts(3,15): error TS2769: No overload matches this call. + Overload 1 of 5, '(target: {}): {}', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type '{}'. + Overload 2 of 5, '(target: {}, ...sources: any[]): any', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(4,15): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'. +tests/cases/compiler/objectMethodNullability.ts(5,25): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object'. +tests/cases/compiler/objectMethodNullability.ts(6,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object'. +tests/cases/compiler/objectMethodNullability.ts(7,16): error TS2769: No overload matches this call. + Overload 1 of 2, '(o: { [s: string]: unknown; } | ArrayLike): [string, unknown][]', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type '{ [s: string]: unknown; } | ArrayLike'. + Overload 2 of 2, '(o: {}): [string, any][]', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(8,33): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(9,34): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(10,28): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(11,30): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(12,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(13,15): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(14,13): error TS2769: No overload matches this call. + Overload 1 of 2, '(o: {}): string[]', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type '{}'. + Overload 2 of 2, '(o: object): string[]', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type 'object'. +tests/cases/compiler/objectMethodNullability.ts(15,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(16,15): error TS2769: No overload matches this call. + Overload 1 of 2, '(o: ArrayLike | { [s: string]: unknown; }): unknown[]', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type 'ArrayLike | { [s: string]: unknown; }'. + Overload 2 of 2, '(o: {}): any[]', gave the following error. + Argument of type 'undefined' is not assignable to parameter of type '{}'. +tests/cases/compiler/objectMethodNullability.ts(18,15): error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. +tests/cases/compiler/objectMethodNullability.ts(19,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. +tests/cases/compiler/objectMethodNullability.ts(20,23): error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. + + +==== tests/cases/compiler/objectMethodNullability.ts (17 errors) ==== + // All of the following should produce an error: + + Object.assign(undefined); + ~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 5, '(target: {}): {}', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type '{}'. +!!! error TS2769: Overload 2 of 5, '(target: {}, ...sources: any[]): any', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.create(undefined); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'. + Object.defineProperties(undefined, {}); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object'. + Object.defineProperty(undefined, "foo", {}); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object'. + Object.entries(undefined); + ~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 2, '(o: { [s: string]: unknown; } | ArrayLike): [string, unknown][]', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type '{ [s: string]: unknown; } | ArrayLike'. +!!! error TS2769: Overload 2 of 2, '(o: {}): [string, any][]', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.getOwnPropertyDescriptor(undefined, "foo"); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.getOwnPropertyDescriptors(undefined); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.getOwnPropertyNames(undefined); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.getOwnPropertySymbols(undefined); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.getPrototypeOf(undefined); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.hasOwn(undefined, "foo"); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.keys(undefined); + ~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 2, '(o: {}): string[]', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type '{}'. +!!! error TS2769: Overload 2 of 2, '(o: object): string[]', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type 'object'. + Object.setPrototypeOf(undefined, {}); + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type '{}'. + Object.values(undefined); + ~~~~~~~~~ +!!! error TS2769: No overload matches this call. +!!! error TS2769: Overload 1 of 2, '(o: ArrayLike | { [s: string]: unknown; }): unknown[]', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type 'ArrayLike | { [s: string]: unknown; }'. +!!! error TS2769: Overload 2 of 2, '(o: {}): any[]', gave the following error. +!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type '{}'. + + Object.create(0); + ~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. + Object.defineProperties(0, {}); + ~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. + Object.defineProperty(0, "foo", {}); + ~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'object'. + + // While the following should not: + + Object.assign(0); + Object.entries(0); + Object.getOwnPropertyDescriptor(0, "foo"); + Object.getOwnPropertyDescriptors(0); + Object.getOwnPropertyNames(0); + Object.getOwnPropertySymbols(0); + Object.getPrototypeOf(0); + Object.hasOwn(0, "foo"); + Object.keys(0); + Object.setPrototypeOf(0, {}); + Object.values(0); + + Object.freeze(undefined); + Object.isExtensible(undefined); + Object.isFrozen(undefined); + Object.isSealed(undefined); + Object.preventExtensions(undefined); + Object.seal(undefined); + + Object.freeze(0); + Object.isExtensible(0); + Object.isFrozen(0); + Object.isSealed(0); + Object.preventExtensions(0); + Object.seal(0); + \ No newline at end of file diff --git a/tests/baselines/reference/objectMethodNullability.js b/tests/baselines/reference/objectMethodNullability.js new file mode 100644 index 0000000000000..0fbc2117922b2 --- /dev/null +++ b/tests/baselines/reference/objectMethodNullability.js @@ -0,0 +1,95 @@ +//// [objectMethodNullability.ts] +// All of the following should produce an error: + +Object.assign(undefined); +Object.create(undefined); +Object.defineProperties(undefined, {}); +Object.defineProperty(undefined, "foo", {}); +Object.entries(undefined); +Object.getOwnPropertyDescriptor(undefined, "foo"); +Object.getOwnPropertyDescriptors(undefined); +Object.getOwnPropertyNames(undefined); +Object.getOwnPropertySymbols(undefined); +Object.getPrototypeOf(undefined); +Object.hasOwn(undefined, "foo"); +Object.keys(undefined); +Object.setPrototypeOf(undefined, {}); +Object.values(undefined); + +Object.create(0); +Object.defineProperties(0, {}); +Object.defineProperty(0, "foo", {}); + +// While the following should not: + +Object.assign(0); +Object.entries(0); +Object.getOwnPropertyDescriptor(0, "foo"); +Object.getOwnPropertyDescriptors(0); +Object.getOwnPropertyNames(0); +Object.getOwnPropertySymbols(0); +Object.getPrototypeOf(0); +Object.hasOwn(0, "foo"); +Object.keys(0); +Object.setPrototypeOf(0, {}); +Object.values(0); + +Object.freeze(undefined); +Object.isExtensible(undefined); +Object.isFrozen(undefined); +Object.isSealed(undefined); +Object.preventExtensions(undefined); +Object.seal(undefined); + +Object.freeze(0); +Object.isExtensible(0); +Object.isFrozen(0); +Object.isSealed(0); +Object.preventExtensions(0); +Object.seal(0); + + +//// [objectMethodNullability.js] +"use strict"; +// All of the following should produce an error: +Object.assign(undefined); +Object.create(undefined); +Object.defineProperties(undefined, {}); +Object.defineProperty(undefined, "foo", {}); +Object.entries(undefined); +Object.getOwnPropertyDescriptor(undefined, "foo"); +Object.getOwnPropertyDescriptors(undefined); +Object.getOwnPropertyNames(undefined); +Object.getOwnPropertySymbols(undefined); +Object.getPrototypeOf(undefined); +Object.hasOwn(undefined, "foo"); +Object.keys(undefined); +Object.setPrototypeOf(undefined, {}); +Object.values(undefined); +Object.create(0); +Object.defineProperties(0, {}); +Object.defineProperty(0, "foo", {}); +// While the following should not: +Object.assign(0); +Object.entries(0); +Object.getOwnPropertyDescriptor(0, "foo"); +Object.getOwnPropertyDescriptors(0); +Object.getOwnPropertyNames(0); +Object.getOwnPropertySymbols(0); +Object.getPrototypeOf(0); +Object.hasOwn(0, "foo"); +Object.keys(0); +Object.setPrototypeOf(0, {}); +Object.values(0); +Object.freeze(undefined); +Object.isExtensible(undefined); +Object.isFrozen(undefined); +Object.isSealed(undefined); +Object.preventExtensions(undefined); +Object.seal(undefined); +Object.freeze(0); +Object.isExtensible(0); +Object.isFrozen(0); +Object.isSealed(0); +Object.preventExtensions(0); +Object.seal(0); diff --git a/tests/baselines/reference/objectMethodNullability.symbols b/tests/baselines/reference/objectMethodNullability.symbols new file mode 100644 index 0000000000000..b75d21644acf2 --- /dev/null +++ b/tests/baselines/reference/objectMethodNullability.symbols @@ -0,0 +1,225 @@ +=== tests/cases/compiler/objectMethodNullability.ts === +// All of the following should produce an error: + +Object.assign(undefined); +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.create(undefined); +>Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.defineProperties(undefined, {}); +>Object.defineProperties : Symbol(ObjectConstructor.defineProperties, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>defineProperties : Symbol(ObjectConstructor.defineProperties, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.defineProperty(undefined, "foo", {}); +>Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.entries(undefined); +>Object.entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.getOwnPropertyDescriptor(undefined, "foo"); +>Object.getOwnPropertyDescriptor : Symbol(ObjectConstructor.getOwnPropertyDescriptor, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertyDescriptor : Symbol(ObjectConstructor.getOwnPropertyDescriptor, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.getOwnPropertyDescriptors(undefined); +>Object.getOwnPropertyDescriptors : Symbol(ObjectConstructor.getOwnPropertyDescriptors, Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertyDescriptors : Symbol(ObjectConstructor.getOwnPropertyDescriptors, Decl(lib.es2017.object.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.getOwnPropertyNames(undefined); +>Object.getOwnPropertyNames : Symbol(ObjectConstructor.getOwnPropertyNames, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertyNames : Symbol(ObjectConstructor.getOwnPropertyNames, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.getOwnPropertySymbols(undefined); +>Object.getOwnPropertySymbols : Symbol(ObjectConstructor.getOwnPropertySymbols, Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertySymbols : Symbol(ObjectConstructor.getOwnPropertySymbols, Decl(lib.es2015.core.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.getPrototypeOf(undefined); +>Object.getPrototypeOf : Symbol(ObjectConstructor.getPrototypeOf, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getPrototypeOf : Symbol(ObjectConstructor.getPrototypeOf, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.hasOwn(undefined, "foo"); +>Object.hasOwn : Symbol(ObjectConstructor.hasOwn, Decl(lib.es2022.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>hasOwn : Symbol(ObjectConstructor.hasOwn, Decl(lib.es2022.object.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.keys(undefined); +>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.setPrototypeOf(undefined, {}); +>Object.setPrototypeOf : Symbol(ObjectConstructor.setPrototypeOf, Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>setPrototypeOf : Symbol(ObjectConstructor.setPrototypeOf, Decl(lib.es2015.core.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.values(undefined); +>Object.values : Symbol(ObjectConstructor.values, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>values : Symbol(ObjectConstructor.values, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.create(0); +>Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +Object.defineProperties(0, {}); +>Object.defineProperties : Symbol(ObjectConstructor.defineProperties, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>defineProperties : Symbol(ObjectConstructor.defineProperties, Decl(lib.es5.d.ts, --, --)) + +Object.defineProperty(0, "foo", {}); +>Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.es5.d.ts, --, --)) + +// While the following should not: + +Object.assign(0); +>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +Object.entries(0); +>Object.entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>entries : Symbol(ObjectConstructor.entries, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) + +Object.getOwnPropertyDescriptor(0, "foo"); +>Object.getOwnPropertyDescriptor : Symbol(ObjectConstructor.getOwnPropertyDescriptor, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertyDescriptor : Symbol(ObjectConstructor.getOwnPropertyDescriptor, Decl(lib.es5.d.ts, --, --)) + +Object.getOwnPropertyDescriptors(0); +>Object.getOwnPropertyDescriptors : Symbol(ObjectConstructor.getOwnPropertyDescriptors, Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertyDescriptors : Symbol(ObjectConstructor.getOwnPropertyDescriptors, Decl(lib.es2017.object.d.ts, --, --)) + +Object.getOwnPropertyNames(0); +>Object.getOwnPropertyNames : Symbol(ObjectConstructor.getOwnPropertyNames, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertyNames : Symbol(ObjectConstructor.getOwnPropertyNames, Decl(lib.es5.d.ts, --, --)) + +Object.getOwnPropertySymbols(0); +>Object.getOwnPropertySymbols : Symbol(ObjectConstructor.getOwnPropertySymbols, Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getOwnPropertySymbols : Symbol(ObjectConstructor.getOwnPropertySymbols, Decl(lib.es2015.core.d.ts, --, --)) + +Object.getPrototypeOf(0); +>Object.getPrototypeOf : Symbol(ObjectConstructor.getPrototypeOf, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>getPrototypeOf : Symbol(ObjectConstructor.getPrototypeOf, Decl(lib.es5.d.ts, --, --)) + +Object.hasOwn(0, "foo"); +>Object.hasOwn : Symbol(ObjectConstructor.hasOwn, Decl(lib.es2022.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>hasOwn : Symbol(ObjectConstructor.hasOwn, Decl(lib.es2022.object.d.ts, --, --)) + +Object.keys(0); +>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +Object.setPrototypeOf(0, {}); +>Object.setPrototypeOf : Symbol(ObjectConstructor.setPrototypeOf, Decl(lib.es2015.core.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>setPrototypeOf : Symbol(ObjectConstructor.setPrototypeOf, Decl(lib.es2015.core.d.ts, --, --)) + +Object.values(0); +>Object.values : Symbol(ObjectConstructor.values, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>values : Symbol(ObjectConstructor.values, Decl(lib.es2017.object.d.ts, --, --), Decl(lib.es2017.object.d.ts, --, --)) + +Object.freeze(undefined); +>Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.isExtensible(undefined); +>Object.isExtensible : Symbol(ObjectConstructor.isExtensible, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isExtensible : Symbol(ObjectConstructor.isExtensible, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.isFrozen(undefined); +>Object.isFrozen : Symbol(ObjectConstructor.isFrozen, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isFrozen : Symbol(ObjectConstructor.isFrozen, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.isSealed(undefined); +>Object.isSealed : Symbol(ObjectConstructor.isSealed, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isSealed : Symbol(ObjectConstructor.isSealed, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.preventExtensions(undefined); +>Object.preventExtensions : Symbol(ObjectConstructor.preventExtensions, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>preventExtensions : Symbol(ObjectConstructor.preventExtensions, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.seal(undefined); +>Object.seal : Symbol(ObjectConstructor.seal, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>seal : Symbol(ObjectConstructor.seal, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +Object.freeze(0); +>Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +Object.isExtensible(0); +>Object.isExtensible : Symbol(ObjectConstructor.isExtensible, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isExtensible : Symbol(ObjectConstructor.isExtensible, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +Object.isFrozen(0); +>Object.isFrozen : Symbol(ObjectConstructor.isFrozen, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isFrozen : Symbol(ObjectConstructor.isFrozen, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +Object.isSealed(0); +>Object.isSealed : Symbol(ObjectConstructor.isSealed, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isSealed : Symbol(ObjectConstructor.isSealed, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + +Object.preventExtensions(0); +>Object.preventExtensions : Symbol(ObjectConstructor.preventExtensions, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>preventExtensions : Symbol(ObjectConstructor.preventExtensions, Decl(lib.es5.d.ts, --, --)) + +Object.seal(0); +>Object.seal : Symbol(ObjectConstructor.seal, Decl(lib.es5.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>seal : Symbol(ObjectConstructor.seal, Decl(lib.es5.d.ts, --, --)) + diff --git a/tests/baselines/reference/objectMethodNullability.types b/tests/baselines/reference/objectMethodNullability.types new file mode 100644 index 0000000000000..f4a954e706de2 --- /dev/null +++ b/tests/baselines/reference/objectMethodNullability.types @@ -0,0 +1,297 @@ +=== tests/cases/compiler/objectMethodNullability.ts === +// All of the following should produce an error: + +Object.assign(undefined); +>Object.assign(undefined) : {} +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } +>Object : ObjectConstructor +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } +>undefined : undefined + +Object.create(undefined); +>Object.create(undefined) : any +>Object.create : { (o: object | null): any; (o: object | null, properties: PropertyDescriptorMap & ThisType): any; } +>Object : ObjectConstructor +>create : { (o: object | null): any; (o: object | null, properties: PropertyDescriptorMap & ThisType): any; } +>undefined : undefined + +Object.defineProperties(undefined, {}); +>Object.defineProperties(undefined, {}) : object +>Object.defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T +>Object : ObjectConstructor +>defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T +>undefined : undefined +>{} : {} + +Object.defineProperty(undefined, "foo", {}); +>Object.defineProperty(undefined, "foo", {}) : object +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object : ObjectConstructor +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>undefined : undefined +>"foo" : "foo" +>{} : {} + +Object.entries(undefined); +>Object.entries(undefined) : [string, unknown][] +>Object.entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +>Object : ObjectConstructor +>entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +>undefined : undefined + +Object.getOwnPropertyDescriptor(undefined, "foo"); +>Object.getOwnPropertyDescriptor(undefined, "foo") : PropertyDescriptor | undefined +>Object.getOwnPropertyDescriptor : (o: {}, p: PropertyKey) => PropertyDescriptor | undefined +>Object : ObjectConstructor +>getOwnPropertyDescriptor : (o: {}, p: PropertyKey) => PropertyDescriptor | undefined +>undefined : undefined +>"foo" : "foo" + +Object.getOwnPropertyDescriptors(undefined); +>Object.getOwnPropertyDescriptors(undefined) : {} & { [x: string]: PropertyDescriptor; } +>Object.getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>Object : ObjectConstructor +>getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>undefined : undefined + +Object.getOwnPropertyNames(undefined); +>Object.getOwnPropertyNames(undefined) : string[] +>Object.getOwnPropertyNames : (o: {}) => string[] +>Object : ObjectConstructor +>getOwnPropertyNames : (o: {}) => string[] +>undefined : undefined + +Object.getOwnPropertySymbols(undefined); +>Object.getOwnPropertySymbols(undefined) : symbol[] +>Object.getOwnPropertySymbols : (o: {}) => symbol[] +>Object : ObjectConstructor +>getOwnPropertySymbols : (o: {}) => symbol[] +>undefined : undefined + +Object.getPrototypeOf(undefined); +>Object.getPrototypeOf(undefined) : any +>Object.getPrototypeOf : (o: {}) => any +>Object : ObjectConstructor +>getPrototypeOf : (o: {}) => any +>undefined : undefined + +Object.hasOwn(undefined, "foo"); +>Object.hasOwn(undefined, "foo") : boolean +>Object.hasOwn : (o: {}, v: PropertyKey) => boolean +>Object : ObjectConstructor +>hasOwn : (o: {}, v: PropertyKey) => boolean +>undefined : undefined +>"foo" : "foo" + +Object.keys(undefined); +>Object.keys(undefined) : string[] +>Object.keys : { (o: object): string[]; (o: {}): string[]; } +>Object : ObjectConstructor +>keys : { (o: object): string[]; (o: {}): string[]; } +>undefined : undefined + +Object.setPrototypeOf(undefined, {}); +>Object.setPrototypeOf(undefined, {}) : any +>Object.setPrototypeOf : (o: {}, proto: object | null) => any +>Object : ObjectConstructor +>setPrototypeOf : (o: {}, proto: object | null) => any +>undefined : undefined +>{} : {} + +Object.values(undefined); +>Object.values(undefined) : unknown[] +>Object.values : { (o: { [s: string]: T; } | ArrayLike): T[]; (o: {}): any[]; } +>Object : ObjectConstructor +>values : { (o: { [s: string]: T; } | ArrayLike): T[]; (o: {}): any[]; } +>undefined : undefined + +Object.create(0); +>Object.create(0) : any +>Object.create : { (o: object | null): any; (o: object | null, properties: PropertyDescriptorMap & ThisType): any; } +>Object : ObjectConstructor +>create : { (o: object | null): any; (o: object | null, properties: PropertyDescriptorMap & ThisType): any; } +>0 : 0 + +Object.defineProperties(0, {}); +>Object.defineProperties(0, {}) : object +>Object.defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T +>Object : ObjectConstructor +>defineProperties : (o: T, properties: PropertyDescriptorMap & ThisType) => T +>0 : 0 +>{} : {} + +Object.defineProperty(0, "foo", {}); +>Object.defineProperty(0, "foo", {}) : object +>Object.defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>Object : ObjectConstructor +>defineProperty : (o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => T +>0 : 0 +>"foo" : "foo" +>{} : {} + +// While the following should not: + +Object.assign(0); +>Object.assign(0) : 0 +>Object.assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } +>Object : ObjectConstructor +>assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } +>0 : 0 + +Object.entries(0); +>Object.entries(0) : [string, any][] +>Object.entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +>Object : ObjectConstructor +>entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +>0 : 0 + +Object.getOwnPropertyDescriptor(0, "foo"); +>Object.getOwnPropertyDescriptor(0, "foo") : PropertyDescriptor | undefined +>Object.getOwnPropertyDescriptor : (o: {}, p: PropertyKey) => PropertyDescriptor | undefined +>Object : ObjectConstructor +>getOwnPropertyDescriptor : (o: {}, p: PropertyKey) => PropertyDescriptor | undefined +>0 : 0 +>"foo" : "foo" + +Object.getOwnPropertyDescriptors(0); +>Object.getOwnPropertyDescriptors(0) : number & { [x: string]: PropertyDescriptor; } +>Object.getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>Object : ObjectConstructor +>getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>0 : 0 + +Object.getOwnPropertyNames(0); +>Object.getOwnPropertyNames(0) : string[] +>Object.getOwnPropertyNames : (o: {}) => string[] +>Object : ObjectConstructor +>getOwnPropertyNames : (o: {}) => string[] +>0 : 0 + +Object.getOwnPropertySymbols(0); +>Object.getOwnPropertySymbols(0) : symbol[] +>Object.getOwnPropertySymbols : (o: {}) => symbol[] +>Object : ObjectConstructor +>getOwnPropertySymbols : (o: {}) => symbol[] +>0 : 0 + +Object.getPrototypeOf(0); +>Object.getPrototypeOf(0) : any +>Object.getPrototypeOf : (o: {}) => any +>Object : ObjectConstructor +>getPrototypeOf : (o: {}) => any +>0 : 0 + +Object.hasOwn(0, "foo"); +>Object.hasOwn(0, "foo") : boolean +>Object.hasOwn : (o: {}, v: PropertyKey) => boolean +>Object : ObjectConstructor +>hasOwn : (o: {}, v: PropertyKey) => boolean +>0 : 0 +>"foo" : "foo" + +Object.keys(0); +>Object.keys(0) : string[] +>Object.keys : { (o: object): string[]; (o: {}): string[]; } +>Object : ObjectConstructor +>keys : { (o: object): string[]; (o: {}): string[]; } +>0 : 0 + +Object.setPrototypeOf(0, {}); +>Object.setPrototypeOf(0, {}) : any +>Object.setPrototypeOf : (o: {}, proto: object | null) => any +>Object : ObjectConstructor +>setPrototypeOf : (o: {}, proto: object | null) => any +>0 : 0 +>{} : {} + +Object.values(0); +>Object.values(0) : any[] +>Object.values : { (o: { [s: string]: T; } | ArrayLike): T[]; (o: {}): any[]; } +>Object : ObjectConstructor +>values : { (o: { [s: string]: T; } | ArrayLike): T[]; (o: {}): any[]; } +>0 : 0 + +Object.freeze(undefined); +>Object.freeze(undefined) : undefined +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object : ObjectConstructor +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>undefined : undefined + +Object.isExtensible(undefined); +>Object.isExtensible(undefined) : false +>Object.isExtensible : { (o: object): boolean; (o: any): false; } +>Object : ObjectConstructor +>isExtensible : { (o: object): boolean; (o: any): false; } +>undefined : undefined + +Object.isFrozen(undefined); +>Object.isFrozen(undefined) : true +>Object.isFrozen : { (o: object): boolean; (o: any): true; } +>Object : ObjectConstructor +>isFrozen : { (o: object): boolean; (o: any): true; } +>undefined : undefined + +Object.isSealed(undefined); +>Object.isSealed(undefined) : true +>Object.isSealed : { (o: object): boolean; (o: any): true; } +>Object : ObjectConstructor +>isSealed : { (o: object): boolean; (o: any): true; } +>undefined : undefined + +Object.preventExtensions(undefined); +>Object.preventExtensions(undefined) : undefined +>Object.preventExtensions : (o: T) => T +>Object : ObjectConstructor +>preventExtensions : (o: T) => T +>undefined : undefined + +Object.seal(undefined); +>Object.seal(undefined) : undefined +>Object.seal : (o: T) => T +>Object : ObjectConstructor +>seal : (o: T) => T +>undefined : undefined + +Object.freeze(0); +>Object.freeze(0) : number +>Object.freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>Object : ObjectConstructor +>freeze : { (a: T): Readonly; (f: T): T; (o: T): Readonly; (o: T): Readonly; } +>0 : 0 + +Object.isExtensible(0); +>Object.isExtensible(0) : false +>Object.isExtensible : { (o: object): boolean; (o: any): false; } +>Object : ObjectConstructor +>isExtensible : { (o: object): boolean; (o: any): false; } +>0 : 0 + +Object.isFrozen(0); +>Object.isFrozen(0) : true +>Object.isFrozen : { (o: object): boolean; (o: any): true; } +>Object : ObjectConstructor +>isFrozen : { (o: object): boolean; (o: any): true; } +>0 : 0 + +Object.isSealed(0); +>Object.isSealed(0) : true +>Object.isSealed : { (o: object): boolean; (o: any): true; } +>Object : ObjectConstructor +>isSealed : { (o: object): boolean; (o: any): true; } +>0 : 0 + +Object.preventExtensions(0); +>Object.preventExtensions(0) : 0 +>Object.preventExtensions : (o: T) => T +>Object : ObjectConstructor +>preventExtensions : (o: T) => T +>0 : 0 + +Object.seal(0); +>Object.seal(0) : 0 +>Object.seal : (o: T) => T +>Object : ObjectConstructor +>seal : (o: T) => T +>0 : 0 + diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index 8774e9850396f..0dca80a96b5d4 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo !!! error TS1005: ';' expected. ~~~~~~~~ !!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? -!!! related TS2728 /.ts/lib.es5.d.ts:554:13: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:572:13: 'String' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt index 612dfae43f32a..78eadb233ee27 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt @@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1055:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1073:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt index 49473d1bfe1e9..353eba8f3e884 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre (1) /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1055:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1073:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index 5165bfaa2c146..bca83ec38b2a7 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index e1ddda588b95b..2b047aafa494a 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index 55efb45e24ef5..833a978b21173 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index df0b359ff673c..fa2bf31b8b7ed 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index f282a155b8f6b..43972fe2d08b8 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index b23ce9aea72de..669db36c221b6 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index a496fd467f7ae..a3974e0f37c9d 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1541:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index c608420610369..7bc981cee384d 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -5,4 +5,4 @@ tests/cases/compiler/redefineArray.ts(1,1): error TS2741: Property 'isArray' is Array = function (n:number, s:string) {return n;}; ~~~~~ !!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type 'ArrayConstructor'. -!!! related TS2728 /.ts/lib.es5.d.ts:1492:5: 'isArray' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:1518:5: 'isArray' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/restElementWithNumberPropertyName.types b/tests/baselines/reference/restElementWithNumberPropertyName.types index 0ff930eddf6e7..4144c6ef46a30 100644 --- a/tests/baselines/reference/restElementWithNumberPropertyName.types +++ b/tests/baselines/reference/restElementWithNumberPropertyName.types @@ -1,7 +1,7 @@ === tests/cases/compiler/restElementWithNumberPropertyName.ts === const { 0: a, ...b } = [0, 1, 2]; >a : number ->b : { [n: number]: number; 0: number; 1: number; 2: number; length: 3; toString(): string; toLocaleString(): string; pop(): number; push(...items: number[]): number; concat(...items: ConcatArray[]): number[]; concat(...items: (number | ConcatArray)[]): number[]; join(separator?: string): string; reverse(): number[]; shift(): number; slice(start?: number, end?: number): number[]; sort(compareFn?: (a: number, b: number) => number): number[]; splice(start: number, deleteCount?: number): number[]; splice(start: number, deleteCount: number, ...items: number[]): number[]; unshift(...items: number[]): number; indexOf(searchElement: number, fromIndex?: number): number; lastIndexOf(searchElement: number, fromIndex?: number): number; every(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; some(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any): void; map(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; filter(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b : { [n: number]: number; 0: number; 1: number; 2: number; length: 3; toString(): string; toLocaleString(): string; valueOf(): number[]; pop(): number; push(...items: number[]): number; concat(...items: ConcatArray[]): number[]; concat(...items: (number | ConcatArray)[]): number[]; join(separator?: string): string; reverse(): number[]; shift(): number; slice(start?: number, end?: number): number[]; sort(compareFn?: (a: number, b: number) => number): number[]; splice(start: number, deleteCount?: number): number[]; splice(start: number, deleteCount: number, ...items: number[]): number[]; unshift(...items: number[]): number; indexOf(searchElement: number, fromIndex?: number): number; lastIndexOf(searchElement: number, fromIndex?: number): number; every(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; some(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any): void; map(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; filter(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >[0, 1, 2] : [number, number, number] >0 : 0 >1 : 1 diff --git a/tests/baselines/reference/restInvalidArgumentType.types b/tests/baselines/reference/restInvalidArgumentType.types index 221b46cf9e98c..bd9f41dc69d0b 100644 --- a/tests/baselines/reference/restInvalidArgumentType.types +++ b/tests/baselines/reference/restInvalidArgumentType.types @@ -71,7 +71,7 @@ function f(p1: T, p2: T[]) { >p1 : T var {...r2} = p2; // OK ->r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } +>r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; valueOf(): T[]; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } >p2 : T[] var {...r3} = t; // Error, generic type paramter diff --git a/tests/baselines/reference/restParameterWithBindingPattern3.types b/tests/baselines/reference/restParameterWithBindingPattern3.types index f170fcb61647c..c5e58b3b3f94a 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern3.types +++ b/tests/baselines/reference/restParameterWithBindingPattern3.types @@ -31,5 +31,5 @@ function e(...{0: a = 1, 1: b = true, ...rest: rest}: [boolean, string, number]) >b : string >true : true >rest : any ->rest : { [n: number]: string | number | boolean; 0: boolean; 1: string; 2: number; length: 3; toString(): string; toLocaleString(): string; pop(): string | number | boolean; push(...items: (string | number | boolean)[]): number; concat(...items: ConcatArray[]): (string | number | boolean)[]; concat(...items: (string | number | boolean | ConcatArray)[]): (string | number | boolean)[]; join(separator?: string): string; reverse(): (string | number | boolean)[]; shift(): string | number | boolean; slice(start?: number, end?: number): (string | number | boolean)[]; sort(compareFn?: (a: string | number | boolean, b: string | number | boolean) => number): (string | number | boolean)[]; splice(start: number, deleteCount?: number): (string | number | boolean)[]; splice(start: number, deleteCount: number, ...items: (string | number | boolean)[]): (string | number | boolean)[]; unshift(...items: (string | number | boolean)[]): number; indexOf(searchElement: string | number | boolean, fromIndex?: number): number; lastIndexOf(searchElement: string | number | boolean, fromIndex?: number): number; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; some(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => void, thisArg?: any): void; map(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => U, thisArg?: any): U[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): (string | number | boolean)[]; reduce(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue?: string | number | boolean): string | number | boolean; reduce(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue?: string | number | boolean): string | number | boolean; reduceRight(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; } +>rest : { [n: number]: string | number | boolean; 0: boolean; 1: string; 2: number; length: 3; toString(): string; toLocaleString(): string; valueOf(): (string | number | boolean)[]; pop(): string | number | boolean; push(...items: (string | number | boolean)[]): number; concat(...items: ConcatArray[]): (string | number | boolean)[]; concat(...items: (string | number | boolean | ConcatArray)[]): (string | number | boolean)[]; join(separator?: string): string; reverse(): (string | number | boolean)[]; shift(): string | number | boolean; slice(start?: number, end?: number): (string | number | boolean)[]; sort(compareFn?: (a: string | number | boolean, b: string | number | boolean) => number): (string | number | boolean)[]; splice(start: number, deleteCount?: number): (string | number | boolean)[]; splice(start: number, deleteCount: number, ...items: (string | number | boolean)[]): (string | number | boolean)[]; unshift(...items: (string | number | boolean)[]): number; indexOf(searchElement: string | number | boolean, fromIndex?: number): number; lastIndexOf(searchElement: string | number | boolean, fromIndex?: number): number; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; some(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => void, thisArg?: any): void; map(callbackfn: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => U, thisArg?: any): U[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: string | number | boolean, index: number, array: (string | number | boolean)[]) => unknown, thisArg?: any): (string | number | boolean)[]; reduce(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue?: string | number | boolean): string | number | boolean; reduce(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: string | number | boolean, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => string | number | boolean, initialValue?: string | number | boolean): string | number | boolean; reduceRight(callbackfn: (previousValue: U, currentValue: string | number | boolean, currentIndex: number, array: (string | number | boolean)[]) => U, initialValue: U): U; } diff --git a/tests/baselines/reference/restPropertyWithBindingPattern.types b/tests/baselines/reference/restPropertyWithBindingPattern.types index 29a83e1182986..d2dbe624a43fb 100644 --- a/tests/baselines/reference/restPropertyWithBindingPattern.types +++ b/tests/baselines/reference/restPropertyWithBindingPattern.types @@ -17,14 +17,14 @@ ({...[]} = {}); >({...[]} = {}) : {} >{...[]} = {} : {} ->{...[]} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): never[]; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } +>{...[]} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; valueOf(): never[]; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): never[]; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } >[] : [] >{} : {} ({...([])} = {}); >({...([])} = {}) : {} >{...([])} = {} : {} ->{...([])} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): never[]; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } +>{...([])} : { [n: number]: never; length: 0; toString(): string; toLocaleString(): string; valueOf(): never[]; pop(): never; push(...items: never[]): number; concat(...items: ConcatArray[]): never[]; concat(...items: ConcatArray[]): never[]; join(separator?: string): string; reverse(): never[]; shift(): never; slice(start?: number, end?: number): never[]; sort(compareFn?: (a: never, b: never) => number): never[]; splice(start: number, deleteCount?: number): never[]; splice(start: number, deleteCount: number, ...items: never[]): never[]; unshift(...items: never[]): number; indexOf(searchElement: never, fromIndex?: number): number; lastIndexOf(searchElement: never, fromIndex?: number): number; every(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; some(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; forEach(callbackfn: (value: never, index: number, array: never[]) => void, thisArg?: any): void; map(callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any): U[]; filter(predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): never[]; reduce(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduce(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: never, currentValue: never, currentIndex: number, array: never[]) => never, initialValue?: never): never; reduceRight(callbackfn: (previousValue: U, currentValue: never, currentIndex: number, array: never[]) => U, initialValue: U): U; } >([]) : [] >[] : [] >{} : {} diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index cfab522b77301..5f05941b729a2 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index b83d9f54d6913..c534af8fb1fe4 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index d7caaf6826de8..f81b10d657290 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1069:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1087:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/spreadInvalidArgumentType.types b/tests/baselines/reference/spreadInvalidArgumentType.types index 72527abb0a1e8..77c14bdb5d09c 100644 --- a/tests/baselines/reference/spreadInvalidArgumentType.types +++ b/tests/baselines/reference/spreadInvalidArgumentType.types @@ -73,8 +73,8 @@ function f(p1: T, p2: T[]) { >p1 : T var o2 = { ...p2 }; // OK ->o2 : { [x: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } ->{ ...p2 } : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } +>o2 : { [x: number]: T; length: number; toString(): string; toLocaleString(): string; valueOf(): T[]; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } +>{ ...p2 } : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; valueOf(): T[]; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray[]): T[]; concat(...items: (T | ConcatArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[]; every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean; some(predicate: (value: T, index: number, array: T[]) => unknown, 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(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(predicate: (value: T, index: number, array: T[]) => unknown, 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; } >p2 : T[] var o3 = { ...t }; // OK, generic type paramter diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 58fcfec0851fd..da72391154153 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:632:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:650:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index aa893162857c0..757ec850652d8 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:632:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:650:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/cases/compiler/arrayCopyWithin.ts b/tests/cases/compiler/arrayCopyWithin.ts new file mode 100644 index 0000000000000..b1b60adc6aea2 --- /dev/null +++ b/tests/cases/compiler/arrayCopyWithin.ts @@ -0,0 +1,51 @@ +// @lib: esnext + +var strTuple: ["foo", "bar", "baz"]; +strTuple.copyWithin(0, 0); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.copyWithin(0, 0); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.copyWithin(0, 0); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.copyWithin(0, 0); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.copyWithin(0, 0); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.copyWithin(0, 0); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.copyWithin(0, 0); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.copyWithin(0, 0); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.copyWithin(0, 0); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.copyWithin(0, 0); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.copyWithin(0, 0); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.copyWithin(0, 0); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.copyWithin(0, 0); // BigUint64Array diff --git a/tests/cases/compiler/arrayFill.ts b/tests/cases/compiler/arrayFill.ts new file mode 100644 index 0000000000000..5b057703a499e --- /dev/null +++ b/tests/cases/compiler/arrayFill.ts @@ -0,0 +1,52 @@ +// @lib: esnext +// @target: esnext + +var strTuple: ["foo", "bar", "baz"]; +strTuple.fill("foo"); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.fill(11); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.fill(0); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.fill(0); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.fill(0); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.fill(0); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.fill(0); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.fill(0); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.fill(0); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.fill(0); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.fill(0); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.fill(0n); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.fill(0n); // BigUint64Array diff --git a/tests/cases/compiler/arrayMethodPredicates.ts b/tests/cases/compiler/arrayMethodPredicates.ts new file mode 100644 index 0000000000000..d50ed08123902 --- /dev/null +++ b/tests/cases/compiler/arrayMethodPredicates.ts @@ -0,0 +1,85 @@ +// @lib: esnext + +var array: number[]; +var readonlyArray: readonly number[]; +var int8Array: Int8Array; +var uint8Array: Uint8Array; +var uint8ClampedArray: Uint8ClampedArray; +var int16Array: Int16Array; +var uint16Array: Uint16Array; +var int32Array: Int32Array; +var uint32Array: Uint32Array; +var float32Array: Float32Array; +var float64Array: Float64Array; +var bigInt64Array: BigInt64Array; +var bigUint64Array: BigUint64Array; + +array.every(x => x); +readonlyArray.every(x => x); +int8Array.every(x => x); +uint8Array.every(x => x); +uint8ClampedArray.every(x => x); +int16Array.every(x => x); +uint16Array.every(x => x); +int32Array.every(x => x); +uint32Array.every(x => x); +float32Array.every(x => x); +float64Array.every(x => x); +bigInt64Array.every(x => x); +bigUint64Array.every(x => x); + +array.filter(x => x); +readonlyArray.filter(x => x); +int8Array.filter(x => x); +uint8Array.filter(x => x); +uint8ClampedArray.filter(x => x); +int16Array.filter(x => x); +uint16Array.filter(x => x); +int32Array.filter(x => x); +uint32Array.filter(x => x); +float32Array.filter(x => x); +float64Array.filter(x => x); +bigInt64Array.filter(x => x); +bigUint64Array.filter(x => x); + +array.find(x => x); +readonlyArray.find(x => x); +int8Array.find(x => x); +uint8Array.find(x => x); +uint8ClampedArray.find(x => x); +int16Array.find(x => x); +uint16Array.find(x => x); +int32Array.find(x => x); +uint32Array.find(x => x); +float32Array.find(x => x); +float64Array.find(x => x); +bigInt64Array.find(x => x); +bigUint64Array.find(x => x); + +array.findIndex(x => x); +readonlyArray.findIndex(x => x); +int8Array.findIndex(x => x); +uint8Array.findIndex(x => x); +uint8ClampedArray.findIndex(x => x); +int16Array.findIndex(x => x); +uint16Array.findIndex(x => x); +int32Array.findIndex(x => x); +uint32Array.findIndex(x => x); +float32Array.findIndex(x => x); +float64Array.findIndex(x => x); +bigInt64Array.findIndex(x => x); +bigUint64Array.findIndex(x => x); + +array.some(x => x); +readonlyArray.some(x => x); +int8Array.some(x => x); +uint8Array.some(x => x); +uint8ClampedArray.some(x => x); +int16Array.some(x => x); +uint16Array.some(x => x); +int32Array.some(x => x); +uint32Array.some(x => x); +float32Array.some(x => x); +float64Array.some(x => x); +bigInt64Array.some(x => x); +bigUint64Array.some(x => x); diff --git a/tests/cases/compiler/arrayReverse.ts b/tests/cases/compiler/arrayReverse.ts new file mode 100644 index 0000000000000..73eeade073a4f --- /dev/null +++ b/tests/cases/compiler/arrayReverse.ts @@ -0,0 +1,51 @@ +// @lib: esnext + +var strTuple: ["foo", "bar", "baz"]; +strTuple.reverse(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.reverse(); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.reverse(); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.reverse(); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.reverse(); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.reverse(); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.reverse(); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.reverse(); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.reverse(); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.reverse(); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.reverse(); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.reverse(); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.reverse(); // BigUint64Array diff --git a/tests/cases/compiler/arraySort.ts b/tests/cases/compiler/arraySort.ts new file mode 100644 index 0000000000000..c8233ca21c758 --- /dev/null +++ b/tests/cases/compiler/arraySort.ts @@ -0,0 +1,51 @@ +// @lib: esnext + +var strTuple: ["foo", "bar", "baz"]; +strTuple.sort(); // Type should be ("foo" | "bar" | "baz")[] instead of ["foo", "bar", "baz"] + +var numTuple: [11, 2, 22, 1]; +numTuple.sort((a, b) => a - b); // Type should be (11 | 2 | 22 | 1)[] instead of [11, 2, 22, 1] + +interface Int8ArrayExtension extends Int8Array {} +var int8Array: Int8ArrayExtension; +int8Array.sort((a, b) => a - b); // Int8Array + +interface Uint8ArrayExtension extends Uint8Array {} +var uint8Array: Uint8ArrayExtension; +uint8Array.sort((a, b) => a - b); // Uint8Array + +interface Uint8ClampedArrayExtension extends Uint8ClampedArray {} +var uint8ClampedArray: Uint8ClampedArrayExtension; +uint8ClampedArray.sort((a, b) => a - b); // Uint8ClampedArray + +interface Int16ArrayExtension extends Int16Array {} +var int16Array: Int16ArrayExtension; +int16Array.sort((a, b) => a - b); // Int16Array + +interface Uint16ArrayExtension extends Uint16Array {} +var uint16Array: Uint16ArrayExtension; +uint16Array.sort((a, b) => a - b); // Uint16Array + +interface Int32ArrayExtension extends Int32Array {} +var int32Array: Int32ArrayExtension; +int32Array.sort((a, b) => a - b); // Int32Array + +interface Uint32ArrayExtension extends Uint32Array {} +var uint32Array: Uint32ArrayExtension; +uint32Array.sort((a, b) => a - b); // Uint32Array + +interface Float32ArrayExtension extends Float32Array {} +var float32Array: Float32ArrayExtension; +float32Array.sort((a, b) => a - b); // Float32Array + +interface Float64ArrayExtension extends Float64Array {} +var float64Array: Float64ArrayExtension; +float64Array.sort((a, b) => a - b); // Float64Array + +interface BigInt64ArrayExtension extends BigInt64Array {} +var bigInt64Array: BigInt64ArrayExtension; +bigInt64Array.sort((a, b) => a - b); // BigInt64Array + +interface BigUint64ArrayExtension extends BigUint64Array {} +var bigUint64Array: BigUint64ArrayExtension; +bigUint64Array.sort((a, b) => a - b); // BigUint64Array diff --git a/tests/cases/compiler/implementArrayInterface.ts b/tests/cases/compiler/implementArrayInterface.ts index 79ba68bdc4279..f0ee5169305aa 100644 --- a/tests/cases/compiler/implementArrayInterface.ts +++ b/tests/cases/compiler/implementArrayInterface.ts @@ -1,6 +1,9 @@ +// @lib: esnext + declare class MyArray implements Array { toString(): string; toLocaleString(): string; + valueOf(): T[]; concat(...items: U[]): T[]; concat(...items: T[]): T[]; join(separator?: string): string; @@ -9,7 +12,7 @@ declare class MyArray implements Array { reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; - sort(compareFn?: (a: T, b: T) => number): this; + sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; @@ -26,6 +29,20 @@ declare class MyArray implements Array { 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; + find(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T | undefined; + findIndex(predicate: (value: T, index: number, array: T[]) => boolean, thisArg?: any): number; + fill(value: T, start?: number, end?: number): T[]; + copyWithin(target: number, start: number, end?: number): T[]; + [Symbol.iterator](): IterableIterator; + entries(): IterableIterator<[number, T]>; + keys(): IterableIterator; + values(): IterableIterator; + [Symbol.unscopables]: any; + includes(searchElement: T, fromIndex?: number): boolean; + flatMap(callback: (value: T, index: number, array: T[]) => U | U[], thisArg?: any): U[] + flat(this: A, depth?: D): FlatArray[] + at(index: number): T | undefined; + length: number; [n: number]: T; diff --git a/tests/cases/compiler/mapConstructorOnReadonlyTuple.ts b/tests/cases/compiler/mapConstructorOnReadonlyTuple.ts index f4914e67def20..2aa2824f4cf82 100644 --- a/tests/cases/compiler/mapConstructorOnReadonlyTuple.ts +++ b/tests/cases/compiler/mapConstructorOnReadonlyTuple.ts @@ -1,4 +1,5 @@ // @target: es2015 -const pairs = [['1', 1], ['2', 2]] as const -new Map(pairs); \ No newline at end of file +const pairs = [[{}, 1], [{}, 2]] as const; +new Map(pairs); +new WeakMap(pairs); diff --git a/tests/cases/compiler/objectMethodNullability.ts b/tests/cases/compiler/objectMethodNullability.ts new file mode 100644 index 0000000000000..4c3038be83c7e --- /dev/null +++ b/tests/cases/compiler/objectMethodNullability.ts @@ -0,0 +1,51 @@ +// @lib: esnext +// @strict: true + +// All of the following should produce an error: + +Object.assign(undefined); +Object.create(undefined); +Object.defineProperties(undefined, {}); +Object.defineProperty(undefined, "foo", {}); +Object.entries(undefined); +Object.getOwnPropertyDescriptor(undefined, "foo"); +Object.getOwnPropertyDescriptors(undefined); +Object.getOwnPropertyNames(undefined); +Object.getOwnPropertySymbols(undefined); +Object.getPrototypeOf(undefined); +Object.hasOwn(undefined, "foo"); +Object.keys(undefined); +Object.setPrototypeOf(undefined, {}); +Object.values(undefined); + +Object.create(0); +Object.defineProperties(0, {}); +Object.defineProperty(0, "foo", {}); + +// While the following should not: + +Object.assign(0); +Object.entries(0); +Object.getOwnPropertyDescriptor(0, "foo"); +Object.getOwnPropertyDescriptors(0); +Object.getOwnPropertyNames(0); +Object.getOwnPropertySymbols(0); +Object.getPrototypeOf(0); +Object.hasOwn(0, "foo"); +Object.keys(0); +Object.setPrototypeOf(0, {}); +Object.values(0); + +Object.freeze(undefined); +Object.isExtensible(undefined); +Object.isFrozen(undefined); +Object.isSealed(undefined); +Object.preventExtensions(undefined); +Object.seal(undefined); + +Object.freeze(0); +Object.isExtensible(0); +Object.isFrozen(0); +Object.isSealed(0); +Object.preventExtensions(0); +Object.seal(0); From 9439e2f65115d2538ca57f9cdad87b00a91e410c Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Tue, 12 Jul 2022 05:57:34 +0800 Subject: [PATCH 05/10] Fix fourslash Tests --- tests/cases/fourslash/completionListOfGenericSymbol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cases/fourslash/completionListOfGenericSymbol.ts b/tests/cases/fourslash/completionListOfGenericSymbol.ts index 6d17cd06d159d..6b91502b54c19 100644 --- a/tests/cases/fourslash/completionListOfGenericSymbol.ts +++ b/tests/cases/fourslash/completionListOfGenericSymbol.ts @@ -18,7 +18,7 @@ verify.completions({ { name: "toString", text: "(method) Array.toString(): string", - documentation: "Returns a string representation of an array.", + documentation: "Returns a string representation of the array.", kind: "method", kindModifiers: "declare", }, From f23c66493f272a43376f7f75231940771407c858 Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Wed, 3 Aug 2022 10:24:11 +0800 Subject: [PATCH 06/10] Reflect suggestions from review --- src/lib/es2017.object.d.ts | 2 +- src/lib/es2019.object.d.ts | 2 +- .../reference/objectFromEntries.types | 36 +++++++++---------- .../reference/objectMethodNullability.types | 12 +++---- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/lib/es2017.object.d.ts b/src/lib/es2017.object.d.ts index d0a85b406a1c5..3e5dcc95629fe 100644 --- a/src/lib/es2017.object.d.ts +++ b/src/lib/es2017.object.d.ts @@ -27,5 +27,5 @@ interface ObjectConstructor { * Returns an object containing all own property descriptors of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor } & { [x: string]: PropertyDescriptor }; + getOwnPropertyDescriptors(o: T): { [P in keyof T]: TypedPropertyDescriptor } & PropertyDescriptorMap; } diff --git a/src/lib/es2019.object.d.ts b/src/lib/es2019.object.d.ts index e3518b7b9d689..7efcb4b861f13 100644 --- a/src/lib/es2019.object.d.ts +++ b/src/lib/es2019.object.d.ts @@ -5,7 +5,7 @@ interface ObjectConstructor { * Returns an object created by key-value entries for properties and methods * @param entries An iterable object that contains key-value entries for properties and methods. */ - fromEntries(entries: Iterable): { [k: string]: T }; + fromEntries(entries: Iterable): { [k: PropertyKey]: T }; /** * Returns an object created by key-value entries for properties and methods diff --git a/tests/baselines/reference/objectFromEntries.types b/tests/baselines/reference/objectFromEntries.types index a87598d06e5bf..b8fb202523a0e 100644 --- a/tests/baselines/reference/objectFromEntries.types +++ b/tests/baselines/reference/objectFromEntries.types @@ -1,10 +1,10 @@ === tests/cases/compiler/objectFromEntries.ts === const o = Object.fromEntries([['a', 1], ['b', 2], ['c', 3]]); ->o : { [k: string]: number; } ->Object.fromEntries([['a', 1], ['b', 2], ['c', 3]]) : { [k: string]: number; } ->Object.fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>o : { [k: string]: number; [k: number]: number; [k: symbol]: number; } +>Object.fromEntries([['a', 1], ['b', 2], ['c', 3]]) : { [k: string]: number; [k: number]: number; [k: symbol]: number; } +>Object.fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >Object : ObjectConstructor ->fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >[['a', 1], ['b', 2], ['c', 3]] : [string, number][] >['a', 1] : [string, number] >'a' : "a" @@ -17,20 +17,20 @@ const o = Object.fromEntries([['a', 1], ['b', 2], ['c', 3]]); >3 : 3 const o2 = Object.fromEntries(new URLSearchParams()); ->o2 : { [k: string]: string; } ->Object.fromEntries(new URLSearchParams()) : { [k: string]: string; } ->Object.fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>o2 : { [k: string]: string; [k: number]: string; [k: symbol]: string; } +>Object.fromEntries(new URLSearchParams()) : { [k: string]: string; [k: number]: string; [k: symbol]: string; } +>Object.fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >Object : ObjectConstructor ->fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >new URLSearchParams() : URLSearchParams >URLSearchParams : { new (init?: string | URLSearchParams | string[][] | Record): URLSearchParams; prototype: URLSearchParams; toString(): string; } const o3 = Object.fromEntries(new Map([[Symbol("key"), "value"]])); ->o3 : { [k: string]: string; } ->Object.fromEntries(new Map([[Symbol("key"), "value"]])) : { [k: string]: string; } ->Object.fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>o3 : { [k: string]: string; [k: number]: string; [k: symbol]: string; } +>Object.fromEntries(new Map([[Symbol("key"), "value"]])) : { [k: string]: string; [k: number]: string; [k: symbol]: string; } +>Object.fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >Object : ObjectConstructor ->fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >new Map([[Symbol("key"), "value"]]) : Map >Map : MapConstructor >[[Symbol("key"), "value"]] : [symbol, string][] @@ -60,9 +60,9 @@ const frozenArray = Object.freeze([['a', 1], ['b', 2], ['c', 3]]); const o4 = Object.fromEntries(frozenArray); >o4 : any >Object.fromEntries(frozenArray) : any ->Object.fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>Object.fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >Object : ObjectConstructor ->fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >frozenArray : readonly (string | number)[][] const frozenArray2: readonly [string, number][] = Object.freeze([['a', 1], ['b', 2], ['c', 3]]); @@ -83,10 +83,10 @@ const frozenArray2: readonly [string, number][] = Object.freeze([['a', 1], ['b', >3 : 3 const o5 = Object.fromEntries(frozenArray2); ->o5 : { [k: string]: number; } ->Object.fromEntries(frozenArray2) : { [k: string]: number; } ->Object.fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>o5 : { [k: string]: number; [k: number]: number; [k: symbol]: number; } +>Object.fromEntries(frozenArray2) : { [k: string]: number; [k: number]: number; [k: symbol]: number; } +>Object.fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >Object : ObjectConstructor ->fromEntries : { (entries: Iterable): { [k: string]: T; }; (entries: Iterable): any; } +>fromEntries : { (entries: Iterable): { [k: string]: T; [k: number]: T; [k: symbol]: T; }; (entries: Iterable): any; } >frozenArray2 : readonly [string, number][] diff --git a/tests/baselines/reference/objectMethodNullability.types b/tests/baselines/reference/objectMethodNullability.types index f4a954e706de2..4acb625bbeff9 100644 --- a/tests/baselines/reference/objectMethodNullability.types +++ b/tests/baselines/reference/objectMethodNullability.types @@ -48,10 +48,10 @@ Object.getOwnPropertyDescriptor(undefined, "foo"); >"foo" : "foo" Object.getOwnPropertyDescriptors(undefined); ->Object.getOwnPropertyDescriptors(undefined) : {} & { [x: string]: PropertyDescriptor; } ->Object.getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>Object.getOwnPropertyDescriptors(undefined) : {} & PropertyDescriptorMap +>Object.getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & PropertyDescriptorMap >Object : ObjectConstructor ->getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & PropertyDescriptorMap >undefined : undefined Object.getOwnPropertyNames(undefined); @@ -154,10 +154,10 @@ Object.getOwnPropertyDescriptor(0, "foo"); >"foo" : "foo" Object.getOwnPropertyDescriptors(0); ->Object.getOwnPropertyDescriptors(0) : number & { [x: string]: PropertyDescriptor; } ->Object.getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>Object.getOwnPropertyDescriptors(0) : number & PropertyDescriptorMap +>Object.getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & PropertyDescriptorMap >Object : ObjectConstructor ->getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & { [x: string]: PropertyDescriptor; } +>getOwnPropertyDescriptors : (o: T) => { [P in keyof T]: TypedPropertyDescriptor; } & PropertyDescriptorMap >0 : 0 Object.getOwnPropertyNames(0); From b2ecf5688d3bb087ed4b39e02ae45d4c5591fbbf Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Wed, 3 Aug 2022 11:34:04 +0800 Subject: [PATCH 07/10] Combine Overloads --- src/harness/fourslashInterfaceImpl.ts | 2 + src/lib/es2015.core.d.ts | 4 +- src/lib/es2015.iterable.d.ts | 182 +-------------- src/lib/es2020.bigint.d.ts | 12 +- src/lib/es5.d.ts | 60 ++--- tests/baselines/reference/arrayFrom.symbols | 44 ++-- tests/baselines/reference/arrayFrom.types | 44 ++-- .../reference/bigintWithLib.errors.txt | 16 +- .../intersectionTypeInference3.symbols | 8 +- .../intersectionTypeInference3.types | 8 +- ...ibrary_NoErrorDuplicateLibOptions1.symbols | 4 +- ...eLibrary_NoErrorDuplicateLibOptions1.types | 4 +- ...ibrary_NoErrorDuplicateLibOptions2.symbols | 4 +- ...eLibrary_NoErrorDuplicateLibOptions2.types | 4 +- ...larizeLibrary_TargetES5UsingES6Lib.symbols | 4 +- ...dularizeLibrary_TargetES5UsingES6Lib.types | 4 +- ...larizeLibrary_TargetES6UsingES6Lib.symbols | 4 +- ...dularizeLibrary_TargetES6UsingES6Lib.types | 4 +- .../reference/neverInference.symbols | 8 +- .../baselines/reference/neverInference.types | 8 +- tests/baselines/reference/typedArrays.symbols | 216 +++++++++--------- tests/baselines/reference/typedArrays.types | 216 +++++++++--------- 22 files changed, 347 insertions(+), 513 deletions(-) diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 46cedb90b6e99..36c85dc0e0ffa 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1165,6 +1165,8 @@ namespace FourSlashInterface { interfaceEntry("Promise"), typeEntry("Awaited"), interfaceEntry("ArrayLike"), + interfaceEntry("ArrayLikeOrIterableTypes"), + typeEntry("ArrayLikeOrIterable"), typeEntry("Partial"), typeEntry("Required"), typeEntry("Readonly"), diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index a0fff84d62003..320b4f2edeb78 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -59,7 +59,7 @@ interface ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): T[]; + from(source: ArrayLikeOrIterable): T[]; /** * Creates an array from an array-like or iterable object. @@ -67,7 +67,7 @@ interface ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; /** * Returns a new array from a set of elements. diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index f01d12be889bd..326ba4f429f64 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -35,6 +35,10 @@ interface IterableIterator extends Iterator { [Symbol.iterator](): IterableIterator; } +interface ArrayLikeOrIterableTypes { + iterable: Iterable +} + interface Array { /** Iterator */ [Symbol.iterator](): IterableIterator; @@ -55,22 +59,6 @@ interface Array { values(): IterableIterator; } -interface ArrayConstructor { - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: Iterable | ArrayLike): T[]; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; -} - interface ReadonlyArray { /** Iterator of values in the array. */ [Symbol.iterator](): IterableIterator; @@ -236,24 +224,6 @@ interface Int8Array { values(): IterableIterator; } -interface Int8ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Int8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Int8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; -} - interface Uint8Array { [Symbol.iterator](): IterableIterator; /** @@ -270,24 +240,6 @@ interface Uint8Array { values(): IterableIterator; } -interface Uint8ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Uint8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Uint8Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; -} - interface Uint8ClampedArray { [Symbol.iterator](): IterableIterator; /** @@ -306,24 +258,6 @@ interface Uint8ClampedArray { values(): IterableIterator; } -interface Uint8ClampedArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Uint8ClampedArray; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Uint8ClampedArray; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; -} - interface Int16Array { [Symbol.iterator](): IterableIterator; /** @@ -342,24 +276,6 @@ interface Int16Array { values(): IterableIterator; } -interface Int16ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Int16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Int16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; -} - interface Uint16Array { [Symbol.iterator](): IterableIterator; /** @@ -376,24 +292,6 @@ interface Uint16Array { values(): IterableIterator; } -interface Uint16ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Uint16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Uint16Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; -} - interface Int32Array { [Symbol.iterator](): IterableIterator; /** @@ -410,24 +308,6 @@ interface Int32Array { values(): IterableIterator; } -interface Int32ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Int32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Int32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; -} - interface Uint32Array { [Symbol.iterator](): IterableIterator; /** @@ -444,24 +324,6 @@ interface Uint32Array { values(): IterableIterator; } -interface Uint32ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Uint32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Uint32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; -} - interface Float32Array { [Symbol.iterator](): IterableIterator; /** @@ -478,24 +340,6 @@ interface Float32Array { values(): IterableIterator; } -interface Float32ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Float32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Float32Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; -} - interface Float64Array { [Symbol.iterator](): IterableIterator; /** @@ -511,21 +355,3 @@ interface Float64Array { */ values(): IterableIterator; } - -interface Float64ArrayConstructor { - new (array: ArrayLike | Iterable | ArrayBufferLike): Float64Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - */ - from(source: ArrayLike | Iterable): Float64Array; - - /** - * Creates an array from an array-like or iterable object. - * @param source An array-like or iterable object to convert to an array. - * @param mapfn A mapping function to call on every element of the array. - * @param thisArg Value of 'this' used to invoke the mapfn. - */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; -} diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index 24df17ab5b8c1..67135b9a45ca5 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -372,7 +372,7 @@ interface BigInt64Array { interface BigInt64ArrayConstructor { readonly prototype: BigInt64Array; new(length?: number): BigInt64Array; - new(array: ArrayLike | Iterable | ArrayBufferLike): BigInt64Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): BigInt64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array; /** The size in bytes of each element in the array. */ @@ -388,7 +388,7 @@ interface BigInt64ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike | Iterable): BigInt64Array; + from(source: ArrayLikeOrIterable): BigInt64Array; /** * Creates an array from an array-like or iterable object. @@ -396,7 +396,7 @@ interface BigInt64ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array; } declare var BigInt64Array: BigInt64ArrayConstructor; @@ -649,7 +649,7 @@ interface BigUint64Array { interface BigUint64ArrayConstructor { readonly prototype: BigUint64Array; new(length?: number): BigUint64Array; - new(array: ArrayLike | Iterable | ArrayBufferLike): BigUint64Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): BigUint64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array; /** The size in bytes of each element in the array. */ @@ -665,7 +665,7 @@ interface BigUint64ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike | Iterable): BigUint64Array; + from(source: ArrayLikeOrIterable): BigUint64Array; /** * Creates an array from an array-like or iterable object. @@ -673,7 +673,7 @@ interface BigUint64ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(source: ArrayLike | Iterable, mapfn: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array; } declare var BigUint64Array: BigUint64ArrayConstructor; diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 3050eaa94d66c..dbd6498dc3a02 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1563,6 +1563,12 @@ interface ArrayLike { readonly [n: number]: T; } +interface ArrayLikeOrIterableTypes { + arrayLike: ArrayLike; +} + +type ArrayLikeOrIterable = ArrayLikeOrIterableTypes[keyof ArrayLikeOrIterableTypes]; + /** * Make all properties in T optional */ @@ -2104,7 +2110,7 @@ interface Int8Array { interface Int8ArrayConstructor { readonly prototype: Int8Array; new(length?: number): Int8Array; - new(array: ArrayLike | ArrayBufferLike): Int8Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Int8Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; /** @@ -2122,7 +2128,7 @@ interface Int8ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Int8Array; + from(source: ArrayLikeOrIterable): Int8Array; /** * Creates an array from an array-like or iterable object. @@ -2130,7 +2136,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } @@ -2387,7 +2393,7 @@ interface Uint8Array { interface Uint8ArrayConstructor { readonly prototype: Uint8Array; new(length?: number): Uint8Array; - new(array: ArrayLike | ArrayBufferLike): Uint8Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Uint8Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; /** @@ -2405,7 +2411,7 @@ interface Uint8ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Uint8Array; + from(source: ArrayLikeOrIterable): Uint8Array; /** * Creates an array from an array-like or iterable object. @@ -2413,7 +2419,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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; @@ -2669,7 +2675,7 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { readonly prototype: Uint8ClampedArray; new(length?: number): Uint8ClampedArray; - new(array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Uint8ClampedArray; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; /** @@ -2687,7 +2693,7 @@ interface Uint8ClampedArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Uint8ClampedArray; + from(source: ArrayLikeOrIterable): Uint8ClampedArray; /** * Creates an array from an array-like or iterable object. @@ -2695,7 +2701,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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -2949,7 +2955,7 @@ interface Int16Array { interface Int16ArrayConstructor { readonly prototype: Int16Array; new(length?: number): Int16Array; - new(array: ArrayLike | ArrayBufferLike): Int16Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Int16Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; /** @@ -2967,7 +2973,7 @@ interface Int16ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Int16Array; + from(source: ArrayLikeOrIterable): Int16Array; /** * Creates an array from an array-like or iterable object. @@ -2975,7 +2981,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } @@ -3232,7 +3238,7 @@ interface Uint16Array { interface Uint16ArrayConstructor { readonly prototype: Uint16Array; new(length?: number): Uint16Array; - new(array: ArrayLike | ArrayBufferLike): Uint16Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Uint16Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; /** @@ -3250,7 +3256,7 @@ interface Uint16ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Uint16Array; + from(source: ArrayLikeOrIterable): Uint16Array; /** * Creates an array from an array-like or iterable object. @@ -3258,7 +3264,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } @@ -3514,7 +3520,7 @@ interface Int32Array { interface Int32ArrayConstructor { readonly prototype: Int32Array; new(length?: number): Int32Array; - new(array: ArrayLike | ArrayBufferLike): Int32Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Int32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; /** @@ -3532,7 +3538,7 @@ interface Int32ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Int32Array; + from(source: ArrayLikeOrIterable): Int32Array; /** * Creates an array from an array-like or iterable object. @@ -3540,7 +3546,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } declare var Int32Array: Int32ArrayConstructor; @@ -3795,7 +3801,7 @@ interface Uint32Array { interface Uint32ArrayConstructor { readonly prototype: Uint32Array; new(length?: number): Uint32Array; - new(array: ArrayLike | ArrayBufferLike): Uint32Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Uint32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; /** @@ -3813,7 +3819,7 @@ interface Uint32ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Uint32Array; + from(source: ArrayLikeOrIterable): Uint32Array; /** * Creates an array from an array-like or iterable object. @@ -3821,7 +3827,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; @@ -4077,7 +4083,7 @@ interface Float32Array { interface Float32ArrayConstructor { readonly prototype: Float32Array; new(length?: number): Float32Array; - new(array: ArrayLike | ArrayBufferLike): Float32Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Float32Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; /** @@ -4095,7 +4101,7 @@ interface Float32ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Float32Array; + from(source: ArrayLikeOrIterable): Float32Array; /** * Creates an array from an array-like or iterable object. @@ -4103,7 +4109,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } @@ -4360,7 +4366,7 @@ interface Float64Array { interface Float64ArrayConstructor { readonly prototype: Float64Array; new(length?: number): Float64Array; - new(array: ArrayLike | ArrayBufferLike): Float64Array; + new(array: ArrayLikeOrIterable | ArrayBufferLike): Float64Array; new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; /** @@ -4378,7 +4384,7 @@ interface Float64ArrayConstructor { * Creates an array from an array-like or iterable object. * @param source An array-like or iterable object to convert to an array. */ - from(source: ArrayLike): Float64Array; + from(source: ArrayLikeOrIterable): Float64Array; /** * Creates an array from an array-like or iterable object. @@ -4386,7 +4392,7 @@ 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(source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; + from(source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } declare var Float64Array: Float64ArrayConstructor; diff --git a/tests/baselines/reference/arrayFrom.symbols b/tests/baselines/reference/arrayFrom.symbols index 29ccb93a2e6bf..691ae02f2e1ed 100644 --- a/tests/baselines/reference/arrayFrom.symbols +++ b/tests/baselines/reference/arrayFrom.symbols @@ -44,17 +44,17 @@ const inputASet = new Set(); const result1: A[] = Array.from(inputA); >result1 : Symbol(result1, Decl(arrayFrom.ts, 17, 5)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputA : Symbol(inputA, Decl(arrayFrom.ts, 11, 5)) const result2: A[] = Array.from(inputA.values()); >result2 : Symbol(result2, Decl(arrayFrom.ts, 18, 5)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputA.values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) >inputA : Symbol(inputA, Decl(arrayFrom.ts, 11, 5)) >values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) @@ -62,9 +62,9 @@ const result2: A[] = Array.from(inputA.values()); const result3: B[] = Array.from(inputA.values()); // expect error >result3 : Symbol(result3, Decl(arrayFrom.ts, 19, 5)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputA.values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) >inputA : Symbol(inputA, Decl(arrayFrom.ts, 11, 5)) >values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) @@ -72,9 +72,9 @@ const result3: B[] = Array.from(inputA.values()); // expect error const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); >result4 : Symbol(result4, Decl(arrayFrom.ts, 20, 5)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputB : Symbol(inputB, Decl(arrayFrom.ts, 12, 5)) >b : Symbol(b, Decl(arrayFrom.ts, 20, 42)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) @@ -84,25 +84,25 @@ const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); const result5: A[] = Array.from(inputALike); >result5 : Symbol(result5, Decl(arrayFrom.ts, 21, 5)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputALike : Symbol(inputALike, Decl(arrayFrom.ts, 13, 5)) const result6: B[] = Array.from(inputALike); // expect error >result6 : Symbol(result6, Decl(arrayFrom.ts, 22, 5)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputALike : Symbol(inputALike, Decl(arrayFrom.ts, 13, 5)) const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); >result7 : Symbol(result7, Decl(arrayFrom.ts, 23, 5)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputALike : Symbol(inputALike, Decl(arrayFrom.ts, 13, 5)) >a : Symbol(a, Decl(arrayFrom.ts, 23, 46)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) @@ -112,17 +112,17 @@ const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); const result8: A[] = Array.from(inputARand); >result8 : Symbol(result8, Decl(arrayFrom.ts, 24, 5)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputARand : Symbol(inputARand, Decl(arrayFrom.ts, 14, 5)) const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); >result9 : Symbol(result9, Decl(arrayFrom.ts, 25, 5)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputARand : Symbol(inputARand, Decl(arrayFrom.ts, 14, 5)) >a : Symbol(a, Decl(arrayFrom.ts, 25, 46)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) @@ -132,18 +132,18 @@ const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); const result10: A[] = Array.from(new Set()); >result10 : Symbol(result10, Decl(arrayFrom.ts, 26, 5)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >A : Symbol(A, Decl(arrayFrom.ts, 0, 0)) const result11: B[] = Array.from(inputASet, ({ a }): B => ({ b: a })); >result11 : Symbol(result11, Decl(arrayFrom.ts, 27, 5)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >inputASet : Symbol(inputASet, Decl(arrayFrom.ts, 15, 5)) >a : Symbol(a, Decl(arrayFrom.ts, 27, 46)) >B : Symbol(B, Decl(arrayFrom.ts, 5, 1)) diff --git a/tests/baselines/reference/arrayFrom.types b/tests/baselines/reference/arrayFrom.types index 17ef10842b65b..4a6aeeb2d5b0f 100644 --- a/tests/baselines/reference/arrayFrom.types +++ b/tests/baselines/reference/arrayFrom.types @@ -41,17 +41,17 @@ const inputASet = new Set(); const result1: A[] = Array.from(inputA); >result1 : A[] >Array.from(inputA) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputA : A[] const result2: A[] = Array.from(inputA.values()); >result2 : A[] >Array.from(inputA.values()) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputA.values() : IterableIterator >inputA.values : () => IterableIterator >inputA : A[] @@ -60,9 +60,9 @@ const result2: A[] = Array.from(inputA.values()); const result3: B[] = Array.from(inputA.values()); // expect error >result3 : B[] >Array.from(inputA.values()) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputA.values() : IterableIterator >inputA.values : () => IterableIterator >inputA : A[] @@ -71,9 +71,9 @@ const result3: B[] = Array.from(inputA.values()); // expect error const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); >result4 : A[] >Array.from(inputB, ({ b }): A => ({ a: b })) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputB : B[] >({ b }): A => ({ a: b }) : ({ b }: B) => A >b : string @@ -85,25 +85,25 @@ const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); const result5: A[] = Array.from(inputALike); >result5 : A[] >Array.from(inputALike) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputALike : ArrayLike const result6: B[] = Array.from(inputALike); // expect error >result6 : B[] >Array.from(inputALike) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputALike : ArrayLike const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); >result7 : B[] >Array.from(inputALike, ({ a }): B => ({ b: a })) : B[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputALike : ArrayLike >({ a }): B => ({ b: a }) : ({ a }: A) => B >a : string @@ -115,17 +115,17 @@ const result7: B[] = Array.from(inputALike, ({ a }): B => ({ b: a })); const result8: A[] = Array.from(inputARand); >result8 : A[] >Array.from(inputARand) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputARand : ArrayLike | Iterable const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); >result9 : B[] >Array.from(inputARand, ({ a }): B => ({ b: a })) : B[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputARand : ArrayLike | Iterable >({ a }): B => ({ b: a }) : ({ a }: A) => B >a : string @@ -137,18 +137,18 @@ const result9: B[] = Array.from(inputARand, ({ a }): B => ({ b: a })); const result10: A[] = Array.from(new Set()); >result10 : A[] >Array.from(new Set()) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >new Set() : Set >Set : SetConstructor const result11: B[] = Array.from(inputASet, ({ a }): B => ({ b: a })); >result11 : B[] >Array.from(inputASet, ({ a }): B => ({ b: a })) : B[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >inputASet : Set >({ a }): B => ({ b: a }) : ({ a }: A) => B >a : string diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index a35a090165b84..affbde16cd701 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -2,8 +2,8 @@ tests/cases/compiler/bigintWithLib.ts(4,1): error TS2350: Only a void function c tests/cases/compiler/bigintWithLib.ts(19,33): error TS2769: No overload matches this call. Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. - Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigInt64Array', gave the following error. - Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. + Overload 2 of 3, '(array: ArrayLikeOrIterable | ArrayBufferLike): BigInt64Array', gave the following error. + Argument of type 'number[]' is not assignable to parameter of type 'ArrayLikeOrIterable | ArrayBufferLike'. Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. @@ -12,8 +12,8 @@ tests/cases/compiler/bigintWithLib.ts(24,13): error TS2540: Cannot assign to 'le tests/cases/compiler/bigintWithLib.ts(31,35): error TS2769: No overload matches this call. Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. - Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigUint64Array', gave the following error. - Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. + Overload 2 of 3, '(array: ArrayLikeOrIterable | ArrayBufferLike): BigUint64Array', gave the following error. + Argument of type 'number[]' is not assignable to parameter of type 'ArrayLikeOrIterable | ArrayBufferLike'. Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. tests/cases/compiler/bigintWithLib.ts(36,13): error TS2540: Cannot assign to 'length' because it is a read-only property. @@ -47,8 +47,8 @@ tests/cases/compiler/bigintWithLib.ts(46,26): error TS2345: Argument of type 'nu !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! error TS2769: Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigInt64Array', gave the following error. -!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. +!!! error TS2769: Overload 2 of 3, '(array: ArrayLikeOrIterable | ArrayBufferLike): BigInt64Array', gave the following error. +!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLikeOrIterable | ArrayBufferLike'. !!! error TS2769: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] !!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. @@ -71,8 +71,8 @@ tests/cases/compiler/bigintWithLib.ts(46,26): error TS2345: Argument of type 'nu !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! error TS2769: Overload 2 of 3, '(array: ArrayLike | Iterable | ArrayBufferLike): BigUint64Array', gave the following error. -!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLike | Iterable | ArrayBufferLike'. +!!! error TS2769: Overload 2 of 3, '(array: ArrayLikeOrIterable | ArrayBufferLike): BigUint64Array', gave the following error. +!!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayLikeOrIterable | ArrayBufferLike'. !!! error TS2769: Overload 3 of 3, '(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array', gave the following error. !!! error TS2769: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBufferLike'. bigUintArray = new BigUint64Array(new ArrayBuffer(80)); diff --git a/tests/baselines/reference/intersectionTypeInference3.symbols b/tests/baselines/reference/intersectionTypeInference3.symbols index 7c851010e0153..60f9e1bb852ac 100644 --- a/tests/baselines/reference/intersectionTypeInference3.symbols +++ b/tests/baselines/reference/intersectionTypeInference3.symbols @@ -33,14 +33,14 @@ declare const b: Set; const c1 = Array.from(a).concat(Array.from(b)); >c1 : Symbol(c1, Decl(intersectionTypeInference3.ts, 11, 5)) >Array.from(a).concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >a : Symbol(a, Decl(intersectionTypeInference3.ts, 8, 13)) >concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >b : Symbol(b, Decl(intersectionTypeInference3.ts, 9, 13)) // Simpler repro diff --git a/tests/baselines/reference/intersectionTypeInference3.types b/tests/baselines/reference/intersectionTypeInference3.types index 1a70861dbc6bf..af3287ba23458 100644 --- a/tests/baselines/reference/intersectionTypeInference3.types +++ b/tests/baselines/reference/intersectionTypeInference3.types @@ -26,15 +26,15 @@ const c1 = Array.from(a).concat(Array.from(b)); >Array.from(a).concat(Array.from(b)) : A[] >Array.from(a).concat : { (...items: ConcatArray[]): A[]; (...items: (A | ConcatArray)[]): A[]; } >Array.from(a) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >a : Set >concat : { (...items: ConcatArray[]): A[]; (...items: (A | ConcatArray)[]): A[]; } >Array.from(b) : A[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >b : Set // Simpler repro diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols index e6990000e2b96..e3de35a53b016 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 1, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types index 9c1874e9c3202..323aea8b976dc 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols index 98c20e30f6163..37051fd7fc3bc 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 1, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types index 55d6e665a9563..1d2b1fa7e7298 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols index 0f213813411f3..b45bb8e5389dc 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 1, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types index 5ca53166506c6..ba6a417569b0e 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols index 634ec17844df6..b9acb8df534a3 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols +++ b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_TargetES6UsingES6Lib.ts, 1, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types index 7ede33b46a567..6affffb77edd1 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/neverInference.symbols b/tests/baselines/reference/neverInference.symbols index b5e22441b9fd5..4f0dbbba9961d 100644 --- a/tests/baselines/reference/neverInference.symbols +++ b/tests/baselines/reference/neverInference.symbols @@ -91,9 +91,9 @@ declare function f2(as1: a[], as2: a[], cmp: (a1: a, a2: a) => number): void; f2(Array.from([0]), [], (a1, a2) => a1 - a2); >f2 : Symbol(f2, Decl(neverInference.ts, 21, 60)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >a1 : Symbol(a1, Decl(neverInference.ts, 26, 25)) >a2 : Symbol(a2, Decl(neverInference.ts, 26, 28)) >a1 : Symbol(a1, Decl(neverInference.ts, 26, 25)) @@ -101,9 +101,9 @@ f2(Array.from([0]), [], (a1, a2) => a1 - a2); f2(Array.from([]), [0], (a1, a2) => a1 - a2); >f2 : Symbol(f2, Decl(neverInference.ts, 21, 60)) ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >a1 : Symbol(a1, Decl(neverInference.ts, 27, 25)) >a2 : Symbol(a2, Decl(neverInference.ts, 27, 28)) >a1 : Symbol(a1, Decl(neverInference.ts, 27, 25)) diff --git a/tests/baselines/reference/neverInference.types b/tests/baselines/reference/neverInference.types index 87baae237b751..cf5e8bc19cb9a 100644 --- a/tests/baselines/reference/neverInference.types +++ b/tests/baselines/reference/neverInference.types @@ -71,9 +71,9 @@ f2(Array.from([0]), [], (a1, a2) => a1 - a2); >f2(Array.from([0]), [], (a1, a2) => a1 - a2) : void >f2 : (as1: a[], as2: a[], cmp: (a1: a, a2: a) => number) => void >Array.from([0]) : number[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >[0] : number[] >0 : 0 >[] : never[] @@ -88,9 +88,9 @@ f2(Array.from([]), [0], (a1, a2) => a1 - a2); >f2(Array.from([]), [0], (a1, a2) => a1 - a2) : void >f2 : (as1: a[], as2: a[], cmp: (a1: a, a2: a) => number) => void >Array.from([]) : never[] ->Array.from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>Array.from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >Array : ArrayConstructor ->from : { (source: ArrayLike): T[]; (source: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (source: Iterable | ArrayLike): T[]; (source: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } +>from : { (source: ArrayLikeOrIterable): T[]; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } >[] : never[] >[0] : number[] >0 : 0 diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index 351e0703ef01f..23c24f3e22d84 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 60, 47)) return typedArrays; @@ -460,73 +460,73 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) 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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 105, 40)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 105, 57)) @@ -547,73 +547,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >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.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 120, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 120, 58)) @@ -635,81 +635,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 136, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 135, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 135, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 135, 98)) @@ -735,81 +735,81 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 151, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.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.es5.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 150, 42)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 150, 59)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 150, 92)) diff --git a/tests/baselines/reference/typedArrays.types b/tests/baselines/reference/typedArrays.types index 6cd60d0b62203..004557862b1d2 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 : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): 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 : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : number[] return typedArrays; @@ -384,9 +384,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >0 : 0 >Int8Array.from(obj) : Int8Array ->Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike typedArrays[1] = Uint8Array.from(obj); @@ -395,9 +395,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >1 : 1 >Uint8Array.from(obj) : Uint8Array ->Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike typedArrays[2] = Int16Array.from(obj); @@ -406,9 +406,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >2 : 2 >Int16Array.from(obj) : Int16Array ->Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike typedArrays[3] = Uint16Array.from(obj); @@ -417,9 +417,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >3 : 3 >Uint16Array.from(obj) : Uint16Array ->Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike typedArrays[4] = Int32Array.from(obj); @@ -428,9 +428,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >4 : 4 >Int32Array.from(obj) : Int32Array ->Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike typedArrays[5] = Uint32Array.from(obj); @@ -439,9 +439,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >5 : 5 >Uint32Array.from(obj) : Uint32Array ->Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike typedArrays[6] = Float32Array.from(obj); @@ -450,9 +450,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >6 : 6 >Float32Array.from(obj) : Float32Array ->Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike typedArrays[7] = Float64Array.from(obj); @@ -461,9 +461,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >7 : 7 >Float64Array.from(obj) : Float64Array ->Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike typedArrays[8] = Uint8ClampedArray.from(obj); @@ -472,9 +472,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj) : Uint8ClampedArray ->Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike return typedArrays; @@ -755,9 +755,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn) : Int8Array ->Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -767,9 +767,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn) : Uint8Array ->Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -779,9 +779,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn) : Int16Array ->Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -791,9 +791,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn) : Uint16Array ->Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -803,9 +803,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn) : Int32Array ->Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -815,9 +815,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn) : Uint32Array ->Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -827,9 +827,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn) : Float32Array ->Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -839,9 +839,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn) : Float64Array ->Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -851,9 +851,9 @@ function CreateTypedArraysFromMapFn2(obj:ArrayLike, mapFn: (n:T, v:number) >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray ->Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: T, v: number) => number @@ -878,9 +878,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn) : Int8Array ->Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -890,9 +890,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn) : Uint8Array ->Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -902,9 +902,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn) : Int16Array ->Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -914,9 +914,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn) : Uint16Array ->Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -926,9 +926,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn) : Int32Array ->Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -938,9 +938,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn) : Uint32Array ->Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -950,9 +950,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn) : Float32Array ->Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -962,9 +962,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn) : Float64Array ->Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -974,9 +974,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray ->Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -1002,9 +1002,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn, thisArg) : Int8Array ->Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1015,9 +1015,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn, thisArg) : Uint8Array ->Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1028,9 +1028,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn, thisArg) : Int16Array ->Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1041,9 +1041,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn, thisArg) : Uint16Array ->Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1054,9 +1054,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn, thisArg) : Int32Array ->Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1067,9 +1067,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn, thisArg) : Uint32Array ->Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1080,9 +1080,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn, thisArg) : Float32Array ->Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1093,9 +1093,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn, thisArg) : Float64Array ->Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1106,9 +1106,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray ->Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -1135,9 +1135,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn, thisArg) : Int8Array ->Int8Array.from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (source: ArrayLike): Int8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; (source: ArrayLike | Iterable): Int8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } +>from : { (source: ArrayLikeOrIterable): Int8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1148,9 +1148,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn, thisArg) : Uint8Array ->Uint8Array.from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (source: ArrayLike): Uint8Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; (source: ArrayLike | Iterable): Uint8Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (source: ArrayLikeOrIterable): Uint8Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1161,9 +1161,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn, thisArg) : Int16Array ->Int16Array.from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (source: ArrayLike): Int16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; (source: ArrayLike | Iterable): Int16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } +>from : { (source: ArrayLikeOrIterable): Int16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1174,9 +1174,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn, thisArg) : Uint16Array ->Uint16Array.from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (source: ArrayLike): Uint16Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; (source: ArrayLike | Iterable): Uint16Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (source: ArrayLikeOrIterable): Uint16Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1187,9 +1187,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn, thisArg) : Int32Array ->Int32Array.from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (source: ArrayLike): Int32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; (source: ArrayLike | Iterable): Int32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } +>from : { (source: ArrayLikeOrIterable): Int32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1200,9 +1200,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn, thisArg) : Uint32Array ->Uint32Array.from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (source: ArrayLike): Uint32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; (source: ArrayLike | Iterable): Uint32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (source: ArrayLikeOrIterable): Uint32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1213,9 +1213,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn, thisArg) : Float32Array ->Float32Array.from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (source: ArrayLike): Float32Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; (source: ArrayLike | Iterable): Float32Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } +>from : { (source: ArrayLikeOrIterable): Float32Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1226,9 +1226,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn, thisArg) : Float64Array ->Float64Array.from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (source: ArrayLike): Float64Array; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; (source: ArrayLike | Iterable): Float64Array; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } +>from : { (source: ArrayLikeOrIterable): Float64Array; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} @@ -1239,9 +1239,9 @@ function CreateTypedArraysFromThisObj2(obj:ArrayLike, mapFn: (n:T, v:numbe >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray ->Uint8ClampedArray.from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (source: ArrayLike): Uint8ClampedArray; (source: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; (source: ArrayLike | Iterable): Uint8ClampedArray; (source: ArrayLike | Iterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (source: ArrayLikeOrIterable): Uint8ClampedArray; (source: ArrayLikeOrIterable, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: T, v: number) => number >thisArg : {} From 43a60e61c51c907cd4ae42e8eeff5800495f5ecc Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Thu, 4 Aug 2022 02:52:32 +0800 Subject: [PATCH 08/10] `Array.isArray` for readonly array --- src/harness/fourslashInterfaceImpl.ts | 1 + src/lib/es2015.iterable.d.ts | 2 +- src/lib/es5.d.ts | 15 +- .../arrayDestructuringInSwitch1.types | 4 +- .../reference/arrayTypeOfTypeOf.types | 4 +- ...InternalTypesProduceUniqueTypeParams.types | 4 +- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/fixSignatureCaching.types | 8 +- .../reference/instantiationExpressions.types | 12 +- tests/baselines/reference/isArray.types | 4 +- .../baselines/reference/isArrayConformance.js | 107 +++++++++++ .../reference/isArrayConformance.symbols | 156 ++++++++++++++++ .../reference/isArrayConformance.types | 169 ++++++++++++++++++ ...riptThisAssignmentInStaticBlock.errors.txt | 8 +- ...avascriptThisAssignmentInStaticBlock.types | 8 +- ...teralFreshnessPropagationOnNarrowing.types | 8 +- tests/baselines/reference/malformedTags.types | 4 +- ...ssignmentReadonlyRespectsAssertion.symbols | 4 +- ...gAssignmentReadonlyRespectsAssertion.types | 24 +-- .../noIterationTypeErrorsInCFA.types | 4 +- .../reference/parserRealSource12.errors.txt | 40 ++--- .../reference/parserRealSource13.errors.txt | 40 ++--- .../reference/parserRealSource5.errors.txt | 16 +- .../reference/parserRealSource6.errors.txt | 4 +- .../reference/parserRealSource7.errors.txt | 4 +- .../reference/parserRealSource8.errors.txt | 4 +- tests/baselines/reference/parserharness.types | 8 +- .../partiallyDiscriminantedUnions.types | 4 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../spreadBooleanRespectsFreshness.types | 4 +- .../reference/unknownControlFlow.types | 8 +- tests/cases/compiler/isArrayConformance.ts | 58 ++++++ 34 files changed, 625 insertions(+), 121 deletions(-) create mode 100644 tests/baselines/reference/isArrayConformance.js create mode 100644 tests/baselines/reference/isArrayConformance.symbols create mode 100644 tests/baselines/reference/isArrayConformance.types create mode 100644 tests/cases/compiler/isArrayConformance.ts diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 36c85dc0e0ffa..6918f790c0f81 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1175,6 +1175,7 @@ namespace FourSlashInterface { typeEntry("Record"), typeEntry("Exclude"), typeEntry("Extract"), + typeEntry("Cast"), typeEntry("Omit"), typeEntry("NonNullable"), typeEntry("Parameters"), diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index 326ba4f429f64..6dc2cfc0fa822 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -36,7 +36,7 @@ interface IterableIterator extends Iterator { } interface ArrayLikeOrIterableTypes { - iterable: Iterable + iterable: Iterable; } interface Array { diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index dbd6498dc3a02..c86a22cce0b44 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1495,7 +1495,15 @@ interface ArrayConstructor { (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: T): arg is + T extends unknown ? + true extends false & T ? Cast : + T extends readonly any[] ? T : + T extends string ? never : + T extends ArrayLikeOrIterable ? Cast : + unknown[] extends T ? unknown[] : + never + : never; readonly prototype: any[]; } @@ -1621,6 +1629,11 @@ type Exclude = T extends U ? never : T; */ type Extract = T extends U ? T : never; +/** + * Make sure T is at least assignable to U + */ +type Cast = T extends U ? T : U; + /** * Construct a type with the properties of T except for those in type K. */ diff --git a/tests/baselines/reference/arrayDestructuringInSwitch1.types b/tests/baselines/reference/arrayDestructuringInSwitch1.types index 56d48f6a30075..d82ae05177ab3 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch1.types +++ b/tests/baselines/reference/arrayDestructuringInSwitch1.types @@ -11,9 +11,9 @@ export function evaluate(expression: Expression): boolean { if (Array.isArray(expression)) { >Array.isArray(expression) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >expression : Expression const [operator, ...operands] = expression; diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.types b/tests/baselines/reference/arrayTypeOfTypeOf.types index 60eec5fbba21b..c4027e2778585 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.types +++ b/tests/baselines/reference/arrayTypeOfTypeOf.types @@ -14,11 +14,11 @@ var xs2: typeof Array; >Array : ArrayConstructor var xs3: typeof Array; ->xs3 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: any): arg is any[]; readonly prototype: any[]; } +>xs3 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } >Array : ArrayConstructor var xs4: typeof Array; ->xs4 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: any): arg is any[]; readonly prototype: any[]; } +>xs4 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } >Array : ArrayConstructor >x : number diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types index 1bef7f2379546..c0ace78993d00 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types @@ -67,9 +67,9 @@ export const updateIfChanged = (t: T) => { >assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Array.isArray(u) ? [] : {} : undefined[] | {} >Array.isArray(u) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never >u : U >[] : undefined[] >{} : {} diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index 3a77d28fca8ab..feb1af9920a1b 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1522:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1530:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/fixSignatureCaching.types b/tests/baselines/reference/fixSignatureCaching.types index 06ab4f3df7eee..82241a178d35f 100644 --- a/tests/baselines/reference/fixSignatureCaching.types +++ b/tests/baselines/reference/fixSignatureCaching.types @@ -1109,9 +1109,9 @@ define(function () { >Array : ArrayConstructor Array.isArray : function (value) { return Object.prototype.toString.call(value) === '[object Array]'; }; ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >function (value) { return Object.prototype.toString.call(value) === '[object Array]'; } : (value: any) => boolean >value : any >Object.prototype.toString.call(value) === '[object Array]' : boolean @@ -1150,9 +1150,9 @@ define(function () { >'[object Array]' : "[object Array]" : Array.isArray; ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never function equalIC(a, b) { >equalIC : (a: any, b: any) => boolean diff --git a/tests/baselines/reference/instantiationExpressions.types b/tests/baselines/reference/instantiationExpressions.types index 75fe72fc441bc..1f54a03637b91 100644 --- a/tests/baselines/reference/instantiationExpressions.types +++ b/tests/baselines/reference/instantiationExpressions.types @@ -61,13 +61,13 @@ function f2() { >Array : ArrayConstructor const A1 = Array; // new (...) => string[] ->A1 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: any): arg is any[]; readonly prototype: any[]; } ->Array : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: any): arg is any[]; readonly prototype: any[]; } +>A1 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>Array : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } >Array : ArrayConstructor const A2 = Array; // Error ->A2 : { isArray(arg: any): arg is any[]; readonly prototype: any[]; } ->Array : { isArray(arg: any): arg is any[]; readonly prototype: any[]; } +>A2 : { isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>Array : { isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } >Array : ArrayConstructor } @@ -76,11 +76,11 @@ type T20 = typeof Array<>; // Error >Array : ArrayConstructor type T21 = typeof Array; // new (...) => string[] ->T21 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: any): arg is any[]; readonly prototype: any[]; } +>T21 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } >Array : ArrayConstructor type T22 = typeof Array; // Error ->T22 : { isArray(arg: any): arg is any[]; readonly prototype: any[]; } +>T22 : { isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } >Array : ArrayConstructor declare class C { diff --git a/tests/baselines/reference/isArray.types b/tests/baselines/reference/isArray.types index bc452b12bef01..b7460c81d5e3c 100644 --- a/tests/baselines/reference/isArray.types +++ b/tests/baselines/reference/isArray.types @@ -5,9 +5,9 @@ var maybeArray: number | number[]; if (Array.isArray(maybeArray)) { >Array.isArray(maybeArray) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >maybeArray : number | number[] maybeArray.length; // OK diff --git a/tests/baselines/reference/isArrayConformance.js b/tests/baselines/reference/isArrayConformance.js new file mode 100644 index 0000000000000..e9d7201dce498 --- /dev/null +++ b/tests/baselines/reference/isArrayConformance.js @@ -0,0 +1,107 @@ +//// [isArrayConformance.ts] +function f1(a: any) { + if (Array.isArray(a)) { + a; // Expected: any[] + } +} + +function f2(a: unknown) { + if (Array.isArray(a)) { + a; // Expected: unknown[] + } +} + +function f3(a: string | readonly string[] | number[]) { + if (Array.isArray(a)) { + var b: readonly string[] | number[] = a; // OK + a[0]; // Expected: string | number + } +} + +function f4(a: T) { + if (Array.isArray(a)) { + var b: readonly string[] | number[] = a; // OK + a[0]; // Expected: string | number + } +} + +// Repro from #41808 + +function f5(a: T) { + if (Array.isArray(a)) { + a[0]; // Expected: string + } +} + +function f6(a: (number[] | null | "loading")[]) { + a.filter(Array.isArray); // Expected: number[][] +} + +function f7(a: {} | null) { + if (Array.isArray(a)) { + a; // Expected: unknown[] + } +} + +function f8 | Iterable | readonly string[] | null>(a: T) { + if (Array.isArray(a)) { + var b: readonly string[] | number[] | boolean[] = a; // OK + a[0]; // Expected: string | number | boolean + } +} + +function f9(a: number | null) { + if (Array.isArray(a)) { + a; // Expected: never + } +} + + +//// [isArrayConformance.js] +function f1(a) { + if (Array.isArray(a)) { + a; // Expected: any[] + } +} +function f2(a) { + if (Array.isArray(a)) { + a; // Expected: unknown[] + } +} +function f3(a) { + if (Array.isArray(a)) { + var b = a; // OK + a[0]; // Expected: string | number + } +} +function f4(a) { + if (Array.isArray(a)) { + var b = a; // OK + a[0]; // Expected: string | number + } +} +// Repro from #41808 +function f5(a) { + if (Array.isArray(a)) { + a[0]; // Expected: string + } +} +function f6(a) { + a.filter(Array.isArray); // Expected: number[][] +} +function f7(a) { + if (Array.isArray(a)) { + a; // Expected: unknown[] + } +} +function f8(a) { + if (Array.isArray(a)) { + var b = a; // OK + a[0]; // Expected: string | number | boolean + } +} +function f9(a) { + if (Array.isArray(a)) { + a; // Expected: never + } +} diff --git a/tests/baselines/reference/isArrayConformance.symbols b/tests/baselines/reference/isArrayConformance.symbols new file mode 100644 index 0000000000000..7b05ce46b0968 --- /dev/null +++ b/tests/baselines/reference/isArrayConformance.symbols @@ -0,0 +1,156 @@ +=== tests/cases/compiler/isArrayConformance.ts === +function f1(a: any) { +>f1 : Symbol(f1, Decl(isArrayConformance.ts, 0, 0)) +>a : Symbol(a, Decl(isArrayConformance.ts, 0, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 0, 12)) + + a; // Expected: any[] +>a : Symbol(a, Decl(isArrayConformance.ts, 0, 12)) + } +} + +function f2(a: unknown) { +>f2 : Symbol(f2, Decl(isArrayConformance.ts, 4, 1)) +>a : Symbol(a, Decl(isArrayConformance.ts, 6, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 6, 12)) + + a; // Expected: unknown[] +>a : Symbol(a, Decl(isArrayConformance.ts, 6, 12)) + } +} + +function f3(a: string | readonly string[] | number[]) { +>f3 : Symbol(f3, Decl(isArrayConformance.ts, 10, 1)) +>a : Symbol(a, Decl(isArrayConformance.ts, 12, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 12, 12)) + + var b: readonly string[] | number[] = a; // OK +>b : Symbol(b, Decl(isArrayConformance.ts, 14, 5)) +>a : Symbol(a, Decl(isArrayConformance.ts, 12, 12)) + + a[0]; // Expected: string | number +>a : Symbol(a, Decl(isArrayConformance.ts, 12, 12)) + } +} + +function f4(a: T) { +>f4 : Symbol(f4, Decl(isArrayConformance.ts, 17, 1)) +>T : Symbol(T, Decl(isArrayConformance.ts, 19, 12)) +>a : Symbol(a, Decl(isArrayConformance.ts, 19, 61)) +>T : Symbol(T, Decl(isArrayConformance.ts, 19, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 19, 61)) + + var b: readonly string[] | number[] = a; // OK +>b : Symbol(b, Decl(isArrayConformance.ts, 21, 5)) +>a : Symbol(a, Decl(isArrayConformance.ts, 19, 61)) + + a[0]; // Expected: string | number +>a : Symbol(a, Decl(isArrayConformance.ts, 19, 61)) + } +} + +// Repro from #41808 + +function f5(a: T) { +>f5 : Symbol(f5, Decl(isArrayConformance.ts, 24, 1)) +>T : Symbol(T, Decl(isArrayConformance.ts, 28, 12)) +>a : Symbol(a, Decl(isArrayConformance.ts, 28, 53)) +>T : Symbol(T, Decl(isArrayConformance.ts, 28, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 28, 53)) + + a[0]; // Expected: string +>a : Symbol(a, Decl(isArrayConformance.ts, 28, 53)) + } +} + +function f6(a: (number[] | null | "loading")[]) { +>f6 : Symbol(f6, Decl(isArrayConformance.ts, 32, 1)) +>a : Symbol(a, Decl(isArrayConformance.ts, 34, 12)) + + a.filter(Array.isArray); // Expected: number[][] +>a.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 34, 12)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +} + +function f7(a: {} | null) { +>f7 : Symbol(f7, Decl(isArrayConformance.ts, 36, 1)) +>a : Symbol(a, Decl(isArrayConformance.ts, 38, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 38, 12)) + + a; // Expected: unknown[] +>a : Symbol(a, Decl(isArrayConformance.ts, 38, 12)) + } +} + +function f8 | Iterable | readonly string[] | null>(a: T) { +>f8 : Symbol(f8, Decl(isArrayConformance.ts, 42, 1)) +>T : Symbol(T, Decl(isArrayConformance.ts, 44, 12)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.es5.d.ts, --, --)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 44, 88)) +>T : Symbol(T, Decl(isArrayConformance.ts, 44, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 44, 88)) + + var b: readonly string[] | number[] | boolean[] = a; // OK +>b : Symbol(b, Decl(isArrayConformance.ts, 46, 5)) +>a : Symbol(a, Decl(isArrayConformance.ts, 44, 88)) + + a[0]; // Expected: string | number | boolean +>a : Symbol(a, Decl(isArrayConformance.ts, 44, 88)) + } +} + +function f9(a: number | null) { +>f9 : Symbol(f9, Decl(isArrayConformance.ts, 49, 1)) +>a : Symbol(a, Decl(isArrayConformance.ts, 51, 12)) + + if (Array.isArray(a)) { +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(isArrayConformance.ts, 51, 12)) + + a; // Expected: never +>a : Symbol(a, Decl(isArrayConformance.ts, 51, 12)) + } +} + diff --git a/tests/baselines/reference/isArrayConformance.types b/tests/baselines/reference/isArrayConformance.types new file mode 100644 index 0000000000000..5eb479d045291 --- /dev/null +++ b/tests/baselines/reference/isArrayConformance.types @@ -0,0 +1,169 @@ +=== tests/cases/compiler/isArrayConformance.ts === +function f1(a: any) { +>f1 : (a: any) => void +>a : any + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : any + + a; // Expected: any[] +>a : any[] + } +} + +function f2(a: unknown) { +>f2 : (a: unknown) => void +>a : unknown + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : unknown + + a; // Expected: unknown[] +>a : unknown[] + } +} + +function f3(a: string | readonly string[] | number[]) { +>f3 : (a: string | readonly string[] | number[]) => void +>a : string | readonly string[] | number[] + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : string | readonly string[] | number[] + + var b: readonly string[] | number[] = a; // OK +>b : readonly string[] | number[] +>a : readonly string[] | number[] + + a[0]; // Expected: string | number +>a[0] : string | number +>a : readonly string[] | number[] +>0 : 0 + } +} + +function f4(a: T) { +>f4 : (a: T) => void +>a : T + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : T + + var b: readonly string[] | number[] = a; // OK +>b : readonly string[] | number[] +>a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never + + a[0]; // Expected: string | number +>a[0] : string | number +>a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>0 : 0 + } +} + +// Repro from #41808 + +function f5(a: T) { +>f5 : (a: T) => void +>a : T + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : T + + a[0]; // Expected: string +>a[0] : string +>a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>0 : 0 + } +} + +function f6(a: (number[] | null | "loading")[]) { +>f6 : (a: (number[] | null | "loading")[]) => void +>a : (number[] | "loading")[] +>null : null + + a.filter(Array.isArray); // Expected: number[][] +>a.filter(Array.isArray) : number[][] +>a.filter : { (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => value is S, thisArg?: any): S[]; (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => unknown, thisArg?: any): (number[] | "loading")[]; } +>a : (number[] | "loading")[] +>filter : { (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => value is S, thisArg?: any): S[]; (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => unknown, thisArg?: any): (number[] | "loading")[]; } +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +} + +function f7(a: {} | null) { +>f7 : (a: {} | null) => void +>a : {} +>null : null + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : {} + + a; // Expected: unknown[] +>a : unknown[] + } +} + +function f8 | Iterable | readonly string[] | null>(a: T) { +>f8 : | Iterable>(a: T) => void +>null : null +>a : T + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : T + + var b: readonly string[] | number[] | boolean[] = a; // OK +>b : readonly string[] | number[] | boolean[] +>a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never + + a[0]; // Expected: string | number | boolean +>a[0] : string | number | boolean +>a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>0 : 0 + } +} + +function f9(a: number | null) { +>f9 : (a: number | null) => void +>a : number +>null : null + + if (Array.isArray(a)) { +>Array.isArray(a) : boolean +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array : ArrayConstructor +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>a : number + + a; // Expected: never +>a : never + } +} + diff --git a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt index a4729d56ef55b..2a3d4773de49a 100644 --- a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt +++ b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt @@ -1,6 +1,6 @@ -/src/a.js(10,7): error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: any): arg is any[]; readonly prototype: any[]; }'. +/src/a.js(10,7): error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; }'. Types of property 'isArray' are incompatible. - Type '(arg: any) => boolean' is not assignable to type '(arg: any) => arg is any[]'. + Type '(arg: any) => boolean' is not assignable to type '(arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never'. Signature '(arg: any): boolean' must be a type predicate. @@ -16,9 +16,9 @@ // GH#46468 class ElementsArray extends Array { ~~~~~~~~~~~~~ -!!! error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: any): arg is any[]; readonly prototype: any[]; }'. +!!! error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; }'. !!! error TS2417: Types of property 'isArray' are incompatible. -!!! error TS2417: Type '(arg: any) => boolean' is not assignable to type '(arg: any) => arg is any[]'. +!!! error TS2417: Type '(arg: any) => boolean' is not assignable to type '(arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never'. !!! error TS2417: Signature '(arg: any): boolean' must be a type predicate. static { const superisArray = super.isArray; diff --git a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types index bbb41f4ea47fd..d8f984e1486ad 100644 --- a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types +++ b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types @@ -25,17 +25,17 @@ class ElementsArray extends Array { static { const superisArray = super.isArray; ->superisArray : (arg: any) => arg is any[] ->super.isArray : (arg: any) => arg is any[] +>superisArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>super.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >super : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never const customIsArray = (arg)=> superisArray(arg); >customIsArray : (arg: any) => boolean >(arg)=> superisArray(arg) : (arg: any) => boolean >arg : any >superisArray(arg) : boolean ->superisArray : (arg: any) => arg is any[] +>superisArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >arg : any this.isArray = customIsArray; diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types index fd3858baebc68..5023c1760215e 100644 --- a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types @@ -66,9 +66,9 @@ function f2() { >a4 : (string | false) | (string | false)[] >Array.isArray(elOrA) ? elOrA : [elOrA] : (string | false)[] >Array.isArray(elOrA) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >elOrA : (string | false) | (string | false)[] >elOrA : (string | false)[] >[elOrA] : (string | false)[] @@ -83,9 +83,9 @@ function f2() { >...Array.isArray(elOrA) ? elOrA : [elOrA] : string | false >Array.isArray(elOrA) ? elOrA : [elOrA] : (string | false)[] >Array.isArray(elOrA) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >elOrA : (string | false) | (string | false)[] >elOrA : (string | false)[] >[elOrA] : (string | false)[] diff --git a/tests/baselines/reference/malformedTags.types b/tests/baselines/reference/malformedTags.types index c3af959586790..b56e727f015cd 100644 --- a/tests/baselines/reference/malformedTags.types +++ b/tests/baselines/reference/malformedTags.types @@ -6,7 +6,7 @@ */ var isArray = Array.isArray; >isArray : Function ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never diff --git a/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.symbols b/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.symbols index 8b7fcfebae44f..268a658b8f0c7 100644 --- a/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.symbols +++ b/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.symbols @@ -91,9 +91,9 @@ function testFunc() { const reversedVal1 = val1.slice().reverse(); >reversedVal1 : Symbol(reversedVal1, Decl(narrowingAssignmentReadonlyRespectsAssertion.ts, 29, 15)) >val1.slice().reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --)) ->val1.slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --)) +>val1.slice : Symbol(ReadonlyArray.slice, Decl(lib.es5.d.ts, --, --)) >val1 : Symbol(val1, Decl(narrowingAssignmentReadonlyRespectsAssertion.ts, 26, 26)) ->slice : Symbol(Array.slice, Decl(lib.es5.d.ts, --, --)) +>slice : Symbol(ReadonlyArray.slice, Decl(lib.es5.d.ts, --, --)) >reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --)) console.log(reversedVal1); diff --git a/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types b/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types index 9fd13d661027a..78c8c652a7408 100644 --- a/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types +++ b/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types @@ -100,28 +100,28 @@ function testFunc() { if (Array.isArray(val1)) { >Array.isArray(val1) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >val1 : string | number | readonly (string | number)[] // This should retain val1 as being an array const reversedVal1 = val1.slice().reverse(); ->reversedVal1 : any[] ->val1.slice().reverse() : any[] ->val1.slice().reverse : () => any[] ->val1.slice() : any[] ->val1.slice : (start?: number, end?: number) => any[] ->val1 : any[] ->slice : (start?: number, end?: number) => any[] ->reverse : () => any[] +>reversedVal1 : (string | number)[] +>val1.slice().reverse() : (string | number)[] +>val1.slice().reverse : () => (string | number)[] +>val1.slice() : (string | number)[] +>val1.slice : (start?: number, end?: number) => (string | number)[] +>val1 : readonly (string | number)[] +>slice : (start?: number, end?: number) => (string | number)[] +>reverse : () => (string | number)[] console.log(reversedVal1); >console.log(reversedVal1) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->reversedVal1 : any[] +>reversedVal1 : (string | number)[] } else { console.log(val1); @@ -129,7 +129,7 @@ function testFunc() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->val1 : string | number | readonly (string | number)[] +>val1 : string | number } console.log(val2); >console.log(val2) : void diff --git a/tests/baselines/reference/noIterationTypeErrorsInCFA.types b/tests/baselines/reference/noIterationTypeErrorsInCFA.types index 9d0122627ffae..2bd44f5faa622 100644 --- a/tests/baselines/reference/noIterationTypeErrorsInCFA.types +++ b/tests/baselines/reference/noIterationTypeErrorsInCFA.types @@ -10,9 +10,9 @@ export function doRemove(dds: F | F[]) { if (!Array.isArray(dds)) { >!Array.isArray(dds) : boolean >Array.isArray(dds) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never >dds : F | F[] dds = [dds] diff --git a/tests/baselines/reference/parserRealSource12.errors.txt b/tests/baselines/reference/parserRealSource12.errors.txt index a1e959d38ccd3..008bcd120bc22 100644 --- a/tests/baselines/reference/parserRealSource12.errors.txt +++ b/tests/baselines/reference/parserRealSource12.errors.txt @@ -1,14 +1,14 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(4,21): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,19): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,32): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,38): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,15): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,28): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,54): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,18): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,31): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,26): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,39): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,19): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,32): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,38): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,15): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,28): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,54): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,18): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,31): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,26): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,39): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,45): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(77,26): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(77,119): error TS2304: Cannot find name 'AST'. @@ -221,11 +221,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(524,30): error export interface IAstWalker { walk(ast: AST, parent: AST): AST; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? options: AstWalkOptions; state: any; // user state object } @@ -244,19 +244,19 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(524,30): error export interface IAstWalkCallback { (ast: AST, parent: AST, walker: IAstWalker): AST; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? } export interface IAstWalkChildren { (preAst: AST, parent: AST, walker: IAstWalker): void; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? } class AstWalker implements IAstWalker { @@ -270,9 +270,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(524,30): error public walk(ast: AST, parent: AST): AST { ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ !!! error TS2304: Cannot find name 'AST'. var preAst = this.pre(ast, parent, this); diff --git a/tests/baselines/reference/parserRealSource13.errors.txt b/tests/baselines/reference/parserRealSource13.errors.txt index a77c57624053b..5d9bd72e78e00 100644 --- a/tests/baselines/reference/parserRealSource13.errors.txt +++ b/tests/baselines/reference/parserRealSource13.errors.txt @@ -1,14 +1,14 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(4,21): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(8,35): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(9,39): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(10,34): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(11,35): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(12,34): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(13,35): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(14,37): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(15,35): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(16,34): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(17,38): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(8,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(9,39): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(10,34): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(11,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(12,34): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(13,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(14,37): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(15,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(16,34): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(17,38): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(18,39): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(19,34): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(20,35): error TS2304: Cannot find name 'AST'. @@ -128,34 +128,34 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(135,36): error export interface AstWalkerDetailCallback { EmptyCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? EmptyExprCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? TrueCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? FalseCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ThisCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? SuperCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? QStringCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? RegexCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? NullCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ArrayLitCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ObjectLitCallback? (pre, ast: AST): boolean; ~~~ !!! error TS2304: Cannot find name 'AST'. diff --git a/tests/baselines/reference/parserRealSource5.errors.txt b/tests/baselines/reference/parserRealSource5.errors.txt index c3f9c9f3115d1..a3579322006e7 100644 --- a/tests/baselines/reference/parserRealSource5.errors.txt +++ b/tests/baselines/reference/parserRealSource5.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(4,21): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(14,66): error TS2304: Cannot find name 'Parser'. tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(27,17): error TS2304: Cannot find name 'CompilerDiagnostics'. -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,38): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,51): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,38): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,51): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,64): error TS2304: Cannot find name 'IAstWalker'. -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,39): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,52): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,39): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,52): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,65): error TS2304: Cannot find name 'IAstWalker'. @@ -69,9 +69,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,65): error TS export function prePrintAST(ast: AST, parent: AST, walker: IAstWalker) { ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~~~~~~~~ !!! error TS2304: Cannot find name 'IAstWalker'. var pc: PrintContext = walker.state; @@ -84,9 +84,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,65): error TS export function postPrintAST(ast: AST, parent: AST, walker: IAstWalker) { ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~~~~~~~~ !!! error TS2304: Cannot find name 'IAstWalker'. var pc: PrintContext = walker.state; diff --git a/tests/baselines/reference/parserRealSource6.errors.txt b/tests/baselines/reference/parserRealSource6.errors.txt index 36902234cdd80..944344447c9ee 100644 --- a/tests/baselines/reference/parserRealSource6.errors.txt +++ b/tests/baselines/reference/parserRealSource6.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(8,24): error TS2 tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(10,41): error TS2304: Cannot find name 'ScopeChain'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(10,69): error TS2304: Cannot find name 'TypeChecker'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(15,22): error TS2304: Cannot find name 'Type'. -tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(16,21): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(16,21): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(17,23): error TS2304: Cannot find name 'SymbolScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(18,30): error TS2304: Cannot find name 'AstWalkOptions'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(20,35): error TS2304: Cannot find name 'TypeFlow'. @@ -88,7 +88,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(215,20): error T !!! error TS2304: Cannot find name 'Type'. public ast: AST = null; ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? public scope: SymbolScope; ~~~~~~~~~~~ !!! error TS2304: Cannot find name 'SymbolScope'. diff --git a/tests/baselines/reference/parserRealSource7.errors.txt b/tests/baselines/reference/parserRealSource7.errors.txt index a6dd2559d73f1..c2e5a1d378de1 100644 --- a/tests/baselines/reference/parserRealSource7.errors.txt +++ b/tests/baselines/reference/parserRealSource7.errors.txt @@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(21,36): error TS tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,29): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,45): error TS2552: Cannot find name 'TypeDeclaration'. Did you mean 'CSSStyleDeclaration'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,43): error TS2304: Cannot find name 'Type'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,54): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,54): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,68): error TS2304: Cannot find name 'TypeCollectionContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(35,25): error TS2304: Cannot find name 'ValueLocation'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(36,30): error TS2304: Cannot find name 'TypeLink'. @@ -361,7 +361,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T ~~~~ !!! error TS2304: Cannot find name 'Type'. ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeCollectionContext'. var field = new ValueLocation(); diff --git a/tests/baselines/reference/parserRealSource8.errors.txt b/tests/baselines/reference/parserRealSource8.errors.txt index ca995c1742859..67df23b007877 100644 --- a/tests/baselines/reference/parserRealSource8.errors.txt +++ b/tests/baselines/reference/parserRealSource8.errors.txt @@ -9,7 +9,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(19,14): error TS tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(21,25): error TS2304: Cannot find name 'ScopeChain'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(33,33): error TS2339: Property 'isInstanceProperty' does not exist on type 'Symbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(42,18): error TS2339: Property 'isInstanceProperty' does not exist on type 'Symbol'. -tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(69,48): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(69,48): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(70,27): error TS2304: Cannot find name 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(71,26): error TS2304: Cannot find name 'SymbolTableScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(72,23): error TS2304: Cannot find name 'SymbolAggregateScope'. @@ -223,7 +223,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(454,35): error T export function preAssignModuleScopes(ast: AST, context: AssignScopeContext) { ~~~ -!!! error TS2304: Cannot find name 'AST'. +!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? var moduleDecl = ast; ~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'ModuleDeclaration'. diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index c8c323cb378df..b2febd25c11f4 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -3068,13 +3068,13 @@ module Harness { >(Array.isArray && Array.isArray(arg)) || arg instanceof Array : boolean >(Array.isArray && Array.isArray(arg)) : boolean >Array.isArray && Array.isArray(arg) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array.isArray(arg) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >arg : any >arg instanceof Array : boolean >arg : any diff --git a/tests/baselines/reference/partiallyDiscriminantedUnions.types b/tests/baselines/reference/partiallyDiscriminantedUnions.types index bc2ee1bf23586..59f972cda9f11 100644 --- a/tests/baselines/reference/partiallyDiscriminantedUnions.types +++ b/tests/baselines/reference/partiallyDiscriminantedUnions.types @@ -77,9 +77,9 @@ function isShape(s : Shapes): s is Shape { return !Array.isArray(s); >!Array.isArray(s) : boolean >Array.isArray(s) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >s : Shapes } diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 43972fe2d08b8..49c650f3afd93 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 669db36c221b6..5ba1721c86e21 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index a3974e0f37c9d..061eb6c004a0f 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1567:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/spreadBooleanRespectsFreshness.types b/tests/baselines/reference/spreadBooleanRespectsFreshness.types index 3ccc42b24e3ce..892d9e86978a5 100644 --- a/tests/baselines/reference/spreadBooleanRespectsFreshness.types +++ b/tests/baselines/reference/spreadBooleanRespectsFreshness.types @@ -22,9 +22,9 @@ foo1 = [...Array.isArray(foo2) ? foo2 : [foo2]]; >...Array.isArray(foo2) ? foo2 : [foo2] : FooBase >Array.isArray(foo2) ? foo2 : [foo2] : FooArray >Array.isArray(foo2) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >foo2 : Foo >foo2 : FooArray >[foo2] : FooBase[] diff --git a/tests/baselines/reference/unknownControlFlow.types b/tests/baselines/reference/unknownControlFlow.types index bd1d851c5b3a9..8faad2cf9f208 100644 --- a/tests/baselines/reference/unknownControlFlow.types +++ b/tests/baselines/reference/unknownControlFlow.types @@ -660,14 +660,14 @@ function deepEquals(a: T, b: T): boolean { if (Array.isArray(a) || Array.isArray(b)) { >Array.isArray(a) || Array.isArray(b) : boolean >Array.isArray(a) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >a : T & object >Array.isArray(b) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never >b : T & object return false; diff --git a/tests/cases/compiler/isArrayConformance.ts b/tests/cases/compiler/isArrayConformance.ts new file mode 100644 index 0000000000000..b1aa66a4ee6e2 --- /dev/null +++ b/tests/cases/compiler/isArrayConformance.ts @@ -0,0 +1,58 @@ +// @lib: esnext + +function f1(a: any) { + if (Array.isArray(a)) { + a; // Expected: any[] + } +} + +function f2(a: unknown) { + if (Array.isArray(a)) { + a; // Expected: unknown[] + } +} + +function f3(a: string | readonly string[] | number[]) { + if (Array.isArray(a)) { + var b: readonly string[] | number[] = a; // OK + a[0]; // Expected: string | number + } +} + +function f4(a: T) { + if (Array.isArray(a)) { + var b: readonly string[] | number[] = a; // OK + a[0]; // Expected: string | number + } +} + +// Repro from #41808 + +function f5(a: T) { + if (Array.isArray(a)) { + a[0]; // Expected: string + } +} + +function f6(a: (number[] | null | "loading")[]) { + a.filter(Array.isArray); // Expected: number[][] +} + +function f7(a: {} | null) { + if (Array.isArray(a)) { + a; // Expected: unknown[] + } +} + +function f8 | Iterable | readonly string[] | null>(a: T) { + if (Array.isArray(a)) { + var b: readonly string[] | number[] | boolean[] = a; // OK + a[0]; // Expected: string | number | boolean + } +} + +function f9(a: number | null) { + if (Array.isArray(a)) { + a; // Expected: never + } +} From b565321976f8c7a072d84f835a974d0dc0ee2b8c Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Sun, 7 Aug 2022 20:16:10 +0800 Subject: [PATCH 09/10] Solution without `Cast` --- src/harness/fourslashInterfaceImpl.ts | 1 - src/lib/es5.d.ts | 16 ++----- .../arrayDestructuringInSwitch1.types | 4 +- .../reference/arrayTypeOfTypeOf.types | 4 +- ...InternalTypesProduceUniqueTypeParams.types | 4 +- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/fixSignatureCaching.types | 8 ++-- .../reference/instantiationExpressions.types | 12 ++--- tests/baselines/reference/isArray.types | 4 +- .../reference/isArrayConformance.types | 46 +++++++++---------- ...riptThisAssignmentInStaticBlock.errors.txt | 8 ++-- ...avascriptThisAssignmentInStaticBlock.types | 8 ++-- ...teralFreshnessPropagationOnNarrowing.types | 8 ++-- tests/baselines/reference/malformedTags.types | 4 +- ...gAssignmentReadonlyRespectsAssertion.types | 4 +- .../noIterationTypeErrorsInCFA.types | 4 +- .../reference/parserRealSource12.errors.txt | 40 ++++++++-------- .../reference/parserRealSource13.errors.txt | 40 ++++++++-------- .../reference/parserRealSource5.errors.txt | 16 +++---- .../reference/parserRealSource6.errors.txt | 4 +- .../reference/parserRealSource7.errors.txt | 4 +- .../reference/parserRealSource8.errors.txt | 4 +- tests/baselines/reference/parserharness.types | 8 ++-- .../partiallyDiscriminantedUnions.types | 4 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../spreadBooleanRespectsFreshness.types | 4 +- .../reference/unknownControlFlow.types | 8 ++-- 29 files changed, 135 insertions(+), 142 deletions(-) diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 6918f790c0f81..36c85dc0e0ffa 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -1175,7 +1175,6 @@ namespace FourSlashInterface { typeEntry("Record"), typeEntry("Exclude"), typeEntry("Extract"), - typeEntry("Cast"), typeEntry("Omit"), typeEntry("NonNullable"), typeEntry("Parameters"), diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index c86a22cce0b44..f935361b6b764 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1496,14 +1496,13 @@ interface ArrayConstructor { (arrayLength: number): T[]; (...items: T[]): T[]; isArray(arg: T): arg is - T extends unknown ? - true extends false & T ? Cast : + T extends any ? Extract< + true extends false & T ? any[] : T extends readonly any[] ? T : T extends string ? never : - T extends ArrayLikeOrIterable ? Cast : - unknown[] extends T ? unknown[] : - never - : never; + T extends ArrayLikeOrIterable ? U[] : + unknown[], T + > : never; readonly prototype: any[]; } @@ -1629,11 +1628,6 @@ type Exclude = T extends U ? never : T; */ type Extract = T extends U ? T : never; -/** - * Make sure T is at least assignable to U - */ -type Cast = T extends U ? T : U; - /** * Construct a type with the properties of T except for those in type K. */ diff --git a/tests/baselines/reference/arrayDestructuringInSwitch1.types b/tests/baselines/reference/arrayDestructuringInSwitch1.types index d82ae05177ab3..13cc44bbb1b8e 100644 --- a/tests/baselines/reference/arrayDestructuringInSwitch1.types +++ b/tests/baselines/reference/arrayDestructuringInSwitch1.types @@ -11,9 +11,9 @@ export function evaluate(expression: Expression): boolean { if (Array.isArray(expression)) { >Array.isArray(expression) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >expression : Expression const [operator, ...operands] = expression; diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.types b/tests/baselines/reference/arrayTypeOfTypeOf.types index c4027e2778585..fd4cab76a1191 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.types +++ b/tests/baselines/reference/arrayTypeOfTypeOf.types @@ -14,11 +14,11 @@ var xs2: typeof Array; >Array : ArrayConstructor var xs3: typeof Array; ->xs3 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>xs3 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } >Array : ArrayConstructor var xs4: typeof Array; ->xs4 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>xs4 : { (arrayLength: number): number[]; (...items: number[]): number[]; new (arrayLength: number): number[]; new (...items: number[]): number[]; isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } >Array : ArrayConstructor >x : number diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types index c0ace78993d00..74e385e5aa3a3 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types @@ -67,9 +67,9 @@ export const updateIfChanged = (t: T) => { >assign : { (target: T): T; (target: T, source: U): T & Writable; (target: T, source1: U, source2: V): T & Writable & Writable; (target: T, source1: U, source2: V, source3: W): T & Writable & Writable & Writable; (target: {}, ...sources: any[]): any; } >Array.isArray(u) ? [] : {} : undefined[] | {} >Array.isArray(u) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >u : U >[] : undefined[] >{} : {} diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index feb1af9920a1b..e6cc55c4ef3ae 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1530:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1529:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/fixSignatureCaching.types b/tests/baselines/reference/fixSignatureCaching.types index 82241a178d35f..ebb926be2a212 100644 --- a/tests/baselines/reference/fixSignatureCaching.types +++ b/tests/baselines/reference/fixSignatureCaching.types @@ -1109,9 +1109,9 @@ define(function () { >Array : ArrayConstructor Array.isArray : function (value) { return Object.prototype.toString.call(value) === '[object Array]'; }; ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >function (value) { return Object.prototype.toString.call(value) === '[object Array]'; } : (value: any) => boolean >value : any >Object.prototype.toString.call(value) === '[object Array]' : boolean @@ -1150,9 +1150,9 @@ define(function () { >'[object Array]' : "[object Array]" : Array.isArray; ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never function equalIC(a, b) { >equalIC : (a: any, b: any) => boolean diff --git a/tests/baselines/reference/instantiationExpressions.types b/tests/baselines/reference/instantiationExpressions.types index 1f54a03637b91..ff783d6f0532b 100644 --- a/tests/baselines/reference/instantiationExpressions.types +++ b/tests/baselines/reference/instantiationExpressions.types @@ -61,13 +61,13 @@ function f2() { >Array : ArrayConstructor const A1 = Array; // new (...) => string[] ->A1 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } ->Array : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>A1 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } +>Array : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } >Array : ArrayConstructor const A2 = Array; // Error ->A2 : { isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } ->Array : { isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>A2 : { isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } +>Array : { isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } >Array : ArrayConstructor } @@ -76,11 +76,11 @@ type T20 = typeof Array<>; // Error >Array : ArrayConstructor type T21 = typeof Array; // new (...) => string[] ->T21 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>T21 : { (arrayLength: number): string[]; (...items: string[]): string[]; new (arrayLength: number): string[]; new (...items: string[]): string[]; isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } >Array : ArrayConstructor type T22 = typeof Array; // Error ->T22 : { isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; } +>T22 : { isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; } >Array : ArrayConstructor declare class C { diff --git a/tests/baselines/reference/isArray.types b/tests/baselines/reference/isArray.types index b7460c81d5e3c..5cf4c67e3b790 100644 --- a/tests/baselines/reference/isArray.types +++ b/tests/baselines/reference/isArray.types @@ -5,9 +5,9 @@ var maybeArray: number | number[]; if (Array.isArray(maybeArray)) { >Array.isArray(maybeArray) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >maybeArray : number | number[] maybeArray.length; // OK diff --git a/tests/baselines/reference/isArrayConformance.types b/tests/baselines/reference/isArrayConformance.types index 5eb479d045291..97fb03efb8aa9 100644 --- a/tests/baselines/reference/isArrayConformance.types +++ b/tests/baselines/reference/isArrayConformance.types @@ -5,9 +5,9 @@ function f1(a: any) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : any a; // Expected: any[] @@ -21,9 +21,9 @@ function f2(a: unknown) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : unknown a; // Expected: unknown[] @@ -37,9 +37,9 @@ function f3(a: string | readonly string[] | number[]) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : string | readonly string[] | number[] var b: readonly string[] | number[] = a; // OK @@ -59,18 +59,18 @@ function f4(a: T) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : T var b: readonly string[] | number[] = a; // OK >b : readonly string[] | number[] ->a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>a : T extends any ? Extract ? U[] : unknown[], T> : never a[0]; // Expected: string | number >a[0] : string | number ->a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>a : T extends any ? Extract ? U[] : unknown[], T> : never >0 : 0 } } @@ -83,14 +83,14 @@ function f5(a: T) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : T a[0]; // Expected: string >a[0] : string ->a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>a : T extends any ? Extract ? U[] : unknown[], T> : never >0 : 0 } } @@ -105,9 +105,9 @@ function f6(a: (number[] | null | "loading")[]) { >a.filter : { (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => value is S, thisArg?: any): S[]; (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => unknown, thisArg?: any): (number[] | "loading")[]; } >a : (number[] | "loading")[] >filter : { (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => value is S, thisArg?: any): S[]; (predicate: (value: number[] | "loading", index: number, array: (number[] | "loading")[]) => unknown, thisArg?: any): (number[] | "loading")[]; } ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never } function f7(a: {} | null) { @@ -117,9 +117,9 @@ function f7(a: {} | null) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : {} a; // Expected: unknown[] @@ -134,18 +134,18 @@ function f8 | Iterable | readonly string[] if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : T var b: readonly string[] | number[] | boolean[] = a; // OK >b : readonly string[] | number[] | boolean[] ->a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>a : T extends any ? Extract ? U[] : unknown[], T> : never a[0]; // Expected: string | number | boolean >a[0] : string | number | boolean ->a : T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? T & unknown[] : never : never +>a : T extends any ? Extract ? U[] : unknown[], T> : never >0 : 0 } } @@ -157,9 +157,9 @@ function f9(a: number | null) { if (Array.isArray(a)) { >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : number a; // Expected: never diff --git a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt index 2a3d4773de49a..aed3585e4d8b3 100644 --- a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt +++ b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.errors.txt @@ -1,6 +1,6 @@ -/src/a.js(10,7): error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; }'. +/src/a.js(10,7): error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; }'. Types of property 'isArray' are incompatible. - Type '(arg: any) => boolean' is not assignable to type '(arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never'. + Type '(arg: any) => boolean' is not assignable to type '(arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never'. Signature '(arg: any): boolean' must be a type predicate. @@ -16,9 +16,9 @@ // GH#46468 class ElementsArray extends Array { ~~~~~~~~~~~~~ -!!! error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: T): arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never; readonly prototype: any[]; }'. +!!! error TS2417: Class static side 'typeof ElementsArray' incorrectly extends base class static side '{ isArray(arg: T): arg is T extends any ? Extract ? U[] : unknown[], T> : never; readonly prototype: any[]; }'. !!! error TS2417: Types of property 'isArray' are incompatible. -!!! error TS2417: Type '(arg: any) => boolean' is not assignable to type '(arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never'. +!!! error TS2417: Type '(arg: any) => boolean' is not assignable to type '(arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never'. !!! error TS2417: Signature '(arg: any): boolean' must be a type predicate. static { const superisArray = super.isArray; diff --git a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types index d8f984e1486ad..8556a3b246a20 100644 --- a/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types +++ b/tests/baselines/reference/javascriptThisAssignmentInStaticBlock.types @@ -25,17 +25,17 @@ class ElementsArray extends Array { static { const superisArray = super.isArray; ->superisArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never ->super.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>superisArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never +>super.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >super : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never const customIsArray = (arg)=> superisArray(arg); >customIsArray : (arg: any) => boolean >(arg)=> superisArray(arg) : (arg: any) => boolean >arg : any >superisArray(arg) : boolean ->superisArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>superisArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >arg : any this.isArray = customIsArray; diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types index 5023c1760215e..75764453653dc 100644 --- a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types @@ -66,9 +66,9 @@ function f2() { >a4 : (string | false) | (string | false)[] >Array.isArray(elOrA) ? elOrA : [elOrA] : (string | false)[] >Array.isArray(elOrA) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >elOrA : (string | false) | (string | false)[] >elOrA : (string | false)[] >[elOrA] : (string | false)[] @@ -83,9 +83,9 @@ function f2() { >...Array.isArray(elOrA) ? elOrA : [elOrA] : string | false >Array.isArray(elOrA) ? elOrA : [elOrA] : (string | false)[] >Array.isArray(elOrA) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >elOrA : (string | false) | (string | false)[] >elOrA : (string | false)[] >[elOrA] : (string | false)[] diff --git a/tests/baselines/reference/malformedTags.types b/tests/baselines/reference/malformedTags.types index b56e727f015cd..e8a922a56cbf0 100644 --- a/tests/baselines/reference/malformedTags.types +++ b/tests/baselines/reference/malformedTags.types @@ -6,7 +6,7 @@ */ var isArray = Array.isArray; >isArray : Function ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never diff --git a/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types b/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types index 78c8c652a7408..c3e1a48cc0aa2 100644 --- a/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types +++ b/tests/baselines/reference/narrowingAssignmentReadonlyRespectsAssertion.types @@ -100,9 +100,9 @@ function testFunc() { if (Array.isArray(val1)) { >Array.isArray(val1) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >val1 : string | number | readonly (string | number)[] // This should retain val1 as being an array diff --git a/tests/baselines/reference/noIterationTypeErrorsInCFA.types b/tests/baselines/reference/noIterationTypeErrorsInCFA.types index 2bd44f5faa622..e411e9e5b26ab 100644 --- a/tests/baselines/reference/noIterationTypeErrorsInCFA.types +++ b/tests/baselines/reference/noIterationTypeErrorsInCFA.types @@ -10,9 +10,9 @@ export function doRemove(dds: F | F[]) { if (!Array.isArray(dds)) { >!Array.isArray(dds) : boolean >Array.isArray(dds) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLikeOrIterable ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >dds : F | F[] dds = [dds] diff --git a/tests/baselines/reference/parserRealSource12.errors.txt b/tests/baselines/reference/parserRealSource12.errors.txt index 008bcd120bc22..a1e959d38ccd3 100644 --- a/tests/baselines/reference/parserRealSource12.errors.txt +++ b/tests/baselines/reference/parserRealSource12.errors.txt @@ -1,14 +1,14 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(4,21): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,19): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,32): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,38): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,15): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,28): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,54): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,18): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,31): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,26): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,39): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,19): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,32): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(8,38): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,15): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,28): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(25,54): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,18): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(29,31): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,26): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,39): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(41,45): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(77,26): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(77,119): error TS2304: Cannot find name 'AST'. @@ -221,11 +221,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(524,30): error export interface IAstWalker { walk(ast: AST, parent: AST): AST; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. options: AstWalkOptions; state: any; // user state object } @@ -244,19 +244,19 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(524,30): error export interface IAstWalkCallback { (ast: AST, parent: AST, walker: IAstWalker): AST; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. } export interface IAstWalkChildren { (preAst: AST, parent: AST, walker: IAstWalker): void; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. } class AstWalker implements IAstWalker { @@ -270,9 +270,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts(524,30): error public walk(ast: AST, parent: AST): AST { ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ !!! error TS2304: Cannot find name 'AST'. var preAst = this.pre(ast, parent, this); diff --git a/tests/baselines/reference/parserRealSource13.errors.txt b/tests/baselines/reference/parserRealSource13.errors.txt index 5d9bd72e78e00..a77c57624053b 100644 --- a/tests/baselines/reference/parserRealSource13.errors.txt +++ b/tests/baselines/reference/parserRealSource13.errors.txt @@ -1,14 +1,14 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(4,21): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(8,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(9,39): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(10,34): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(11,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(12,34): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(13,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(14,37): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(15,35): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(16,34): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(17,38): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(8,35): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(9,39): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(10,34): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(11,35): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(12,34): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(13,35): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(14,37): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(15,35): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(16,34): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(17,38): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(18,39): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(19,34): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(20,35): error TS2304: Cannot find name 'AST'. @@ -128,34 +128,34 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(135,36): error export interface AstWalkerDetailCallback { EmptyCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. EmptyExprCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. TrueCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. FalseCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ThisCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. SuperCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. QStringCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. RegexCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. NullCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ArrayLitCallback? (pre, ast: AST): boolean; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ObjectLitCallback? (pre, ast: AST): boolean; ~~~ !!! error TS2304: Cannot find name 'AST'. diff --git a/tests/baselines/reference/parserRealSource5.errors.txt b/tests/baselines/reference/parserRealSource5.errors.txt index a3579322006e7..c3f9c9f3115d1 100644 --- a/tests/baselines/reference/parserRealSource5.errors.txt +++ b/tests/baselines/reference/parserRealSource5.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(4,21): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(14,66): error TS2304: Cannot find name 'Parser'. tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(27,17): error TS2304: Cannot find name 'CompilerDiagnostics'. -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,38): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,51): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,38): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,51): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(52,64): error TS2304: Cannot find name 'IAstWalker'. -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,39): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? -tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,52): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,39): error TS2304: Cannot find name 'AST'. +tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,52): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,65): error TS2304: Cannot find name 'IAstWalker'. @@ -69,9 +69,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,65): error TS export function prePrintAST(ast: AST, parent: AST, walker: IAstWalker) { ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~~~~~~~~ !!! error TS2304: Cannot find name 'IAstWalker'. var pc: PrintContext = walker.state; @@ -84,9 +84,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts(61,65): error TS export function postPrintAST(ast: AST, parent: AST, walker: IAstWalker) { ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~~~~~~~~ !!! error TS2304: Cannot find name 'IAstWalker'. var pc: PrintContext = walker.state; diff --git a/tests/baselines/reference/parserRealSource6.errors.txt b/tests/baselines/reference/parserRealSource6.errors.txt index 944344447c9ee..36902234cdd80 100644 --- a/tests/baselines/reference/parserRealSource6.errors.txt +++ b/tests/baselines/reference/parserRealSource6.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(8,24): error TS2 tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(10,41): error TS2304: Cannot find name 'ScopeChain'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(10,69): error TS2304: Cannot find name 'TypeChecker'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(15,22): error TS2304: Cannot find name 'Type'. -tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(16,21): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(16,21): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(17,23): error TS2304: Cannot find name 'SymbolScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(18,30): error TS2304: Cannot find name 'AstWalkOptions'. tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(20,35): error TS2304: Cannot find name 'TypeFlow'. @@ -88,7 +88,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts(215,20): error T !!! error TS2304: Cannot find name 'Type'. public ast: AST = null; ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. public scope: SymbolScope; ~~~~~~~~~~~ !!! error TS2304: Cannot find name 'SymbolScope'. diff --git a/tests/baselines/reference/parserRealSource7.errors.txt b/tests/baselines/reference/parserRealSource7.errors.txt index c2e5a1d378de1..a6dd2559d73f1 100644 --- a/tests/baselines/reference/parserRealSource7.errors.txt +++ b/tests/baselines/reference/parserRealSource7.errors.txt @@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(21,36): error TS tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,29): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,45): error TS2552: Cannot find name 'TypeDeclaration'. Did you mean 'CSSStyleDeclaration'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,43): error TS2304: Cannot find name 'Type'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,54): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,54): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,68): error TS2304: Cannot find name 'TypeCollectionContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(35,25): error TS2304: Cannot find name 'ValueLocation'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(36,30): error TS2304: Cannot find name 'TypeLink'. @@ -361,7 +361,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T ~~~~ !!! error TS2304: Cannot find name 'Type'. ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. ~~~~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeCollectionContext'. var field = new ValueLocation(); diff --git a/tests/baselines/reference/parserRealSource8.errors.txt b/tests/baselines/reference/parserRealSource8.errors.txt index 67df23b007877..ca995c1742859 100644 --- a/tests/baselines/reference/parserRealSource8.errors.txt +++ b/tests/baselines/reference/parserRealSource8.errors.txt @@ -9,7 +9,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(19,14): error TS tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(21,25): error TS2304: Cannot find name 'ScopeChain'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(33,33): error TS2339: Property 'isInstanceProperty' does not exist on type 'Symbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(42,18): error TS2339: Property 'isInstanceProperty' does not exist on type 'Symbol'. -tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(69,48): error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(69,48): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(70,27): error TS2304: Cannot find name 'ModuleDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(71,26): error TS2304: Cannot find name 'SymbolTableScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(72,23): error TS2304: Cannot find name 'SymbolAggregateScope'. @@ -223,7 +223,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(454,35): error T export function preAssignModuleScopes(ast: AST, context: AssignScopeContext) { ~~~ -!!! error TS2552: Cannot find name 'AST'. Did you mean 'Cast'? +!!! error TS2304: Cannot find name 'AST'. var moduleDecl = ast; ~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'ModuleDeclaration'. diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index b2febd25c11f4..3e6dce1ecf480 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -3068,13 +3068,13 @@ module Harness { >(Array.isArray && Array.isArray(arg)) || arg instanceof Array : boolean >(Array.isArray && Array.isArray(arg)) : boolean >Array.isArray && Array.isArray(arg) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array.isArray(arg) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >arg : any >arg instanceof Array : boolean >arg : any diff --git a/tests/baselines/reference/partiallyDiscriminantedUnions.types b/tests/baselines/reference/partiallyDiscriminantedUnions.types index 59f972cda9f11..d64531417ac2a 100644 --- a/tests/baselines/reference/partiallyDiscriminantedUnions.types +++ b/tests/baselines/reference/partiallyDiscriminantedUnions.types @@ -77,9 +77,9 @@ function isShape(s : Shapes): s is Shape { return !Array.isArray(s); >!Array.isArray(s) : boolean >Array.isArray(s) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >s : Shapes } diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 49c650f3afd93..cb7c75471d0a0 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1574:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 5ba1721c86e21..ad4f08603b326 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1574:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 061eb6c004a0f..01c66a941c87a 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1574:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1575:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1574:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/spreadBooleanRespectsFreshness.types b/tests/baselines/reference/spreadBooleanRespectsFreshness.types index 892d9e86978a5..09b488c73af59 100644 --- a/tests/baselines/reference/spreadBooleanRespectsFreshness.types +++ b/tests/baselines/reference/spreadBooleanRespectsFreshness.types @@ -22,9 +22,9 @@ foo1 = [...Array.isArray(foo2) ? foo2 : [foo2]]; >...Array.isArray(foo2) ? foo2 : [foo2] : FooBase >Array.isArray(foo2) ? foo2 : [foo2] : FooArray >Array.isArray(foo2) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >foo2 : Foo >foo2 : FooArray >[foo2] : FooBase[] diff --git a/tests/baselines/reference/unknownControlFlow.types b/tests/baselines/reference/unknownControlFlow.types index 8faad2cf9f208..d25e9f9745375 100644 --- a/tests/baselines/reference/unknownControlFlow.types +++ b/tests/baselines/reference/unknownControlFlow.types @@ -660,14 +660,14 @@ function deepEquals(a: T, b: T): boolean { if (Array.isArray(a) || Array.isArray(b)) { >Array.isArray(a) || Array.isArray(b) : boolean >Array.isArray(a) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >a : T & object >Array.isArray(b) : boolean ->Array.isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>Array.isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >Array : ArrayConstructor ->isArray : (arg: T) => arg is T extends unknown ? true extends false & T ? Cast : T extends readonly any[] ? T : T extends string ? never : T extends ArrayLike ? Cast : unknown[] extends T ? unknown[] : never : never +>isArray : (arg: T) => arg is T extends any ? Extract ? U[] : unknown[], T> : never >b : T & object return false; From a167ba92747fbc7c06a5c4f5e0c87f4676d5b566 Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Wed, 9 Nov 2022 10:07:31 +0800 Subject: [PATCH 10/10] TypeScript bug discovered --- src/testRunner/parallel/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testRunner/parallel/worker.ts b/src/testRunner/parallel/worker.ts index 57538ea26b81c..33b91b6f4ea33 100644 --- a/src/testRunner/parallel/worker.ts +++ b/src/testRunner/parallel/worker.ts @@ -185,7 +185,7 @@ export function start() { newSuite.addTest(test); root.addSuite(newSuite); Object.setPrototypeOf(newSuite.ctx, root.ctx); - Object.setPrototypeOf(test.ctx, root.ctx); + Object.setPrototypeOf(test.ctx!, root.ctx); test.parent = newSuite; suite = newSuite; }