diff --git a/tests/baselines/reference/complexRecursiveCollections.errors.txt b/tests/baselines/reference/complexRecursiveCollections.errors.txt index 38f66b7456a..495fca2e651 100644 --- a/tests/baselines/reference/complexRecursiveCollections.errors.txt +++ b/tests/baselines/reference/complexRecursiveCollections.errors.txt @@ -1,110 +1,15 @@ -tests/cases/compiler/immutable.d.ts(25,39): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(46,20): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(47,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(48,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(49,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(50,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(51,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(52,26): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(58,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(60,63): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(68,41): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(69,38): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(69,47): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(78,21): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(79,21): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(89,20): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(90,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(91,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(92,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(93,23): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(94,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(95,26): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(101,42): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(106,58): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(113,48): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(114,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(114,54): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(120,42): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(125,58): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(134,33): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(134,42): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(135,29): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(135,38): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(139,38): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(155,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(157,62): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(169,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(172,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(174,62): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(188,40): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(195,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(198,19): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(205,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(207,63): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(217,30): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(218,34): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(226,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(227,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(234,48): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(235,52): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(236,109): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(237,109): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(242,22): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(243,25): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(244,24): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(245,28): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(246,25): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(247,25): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(258,8): error TS2304: Cannot find name 'Symbol'. -tests/cases/compiler/immutable.d.ts(258,28): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(266,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(274,44): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(279,60): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(288,44): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(293,47): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(295,65): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(304,40): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(309,47): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(311,64): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(320,38): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(329,58): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(339,45): error TS2304: Cannot find name 'Iterable'. tests/cases/compiler/immutable.d.ts(341,22): error TS2430: Interface 'Keyed' incorrectly extends interface 'Collection'. Types of property 'toSeq' are incompatible. Type '() => Keyed' is not assignable to type '() => this'. Type 'Keyed' is not assignable to type 'this'. -tests/cases/compiler/immutable.d.ts(347,44): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(352,60): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(355,8): error TS2304: Cannot find name 'Symbol'. -tests/cases/compiler/immutable.d.ts(355,28): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(358,44): error TS2304: Cannot find name 'Iterable'. tests/cases/compiler/immutable.d.ts(359,22): error TS2430: Interface 'Indexed' incorrectly extends interface 'Collection'. Types of property 'toSeq' are incompatible. Type '() => Indexed' is not assignable to type '() => this'. Type 'Indexed' is not assignable to type 'this'. -tests/cases/compiler/immutable.d.ts(382,47): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(384,65): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(387,8): error TS2304: Cannot find name 'Symbol'. -tests/cases/compiler/immutable.d.ts(387,28): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(390,40): error TS2304: Cannot find name 'Iterable'. tests/cases/compiler/immutable.d.ts(391,22): error TS2430: Interface 'Set' incorrectly extends interface 'Collection'. Types of property 'toSeq' are incompatible. Type '() => Set' is not assignable to type '() => this'. Type 'Set' is not assignable to type 'this'. -tests/cases/compiler/immutable.d.ts(396,47): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(398,64): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(401,8): error TS2304: Cannot find name 'Symbol'. -tests/cases/compiler/immutable.d.ts(401,28): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(405,45): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(420,26): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(421,26): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(442,13): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(443,15): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(444,16): error TS2304: Cannot find name 'IterableIterator'. -tests/cases/compiler/immutable.d.ts(476,58): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(503,20): error TS2304: Cannot find name 'Iterable'. -tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Iterable'. ==== tests/cases/compiler/complex.d.ts (0 errors) ==== @@ -128,7 +33,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N2; toSeq(): N2; } -==== tests/cases/compiler/immutable.d.ts (98 errors) ==== +==== tests/cases/compiler/immutable.d.ts (3 errors) ==== // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. @@ -154,8 +59,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function List(): List; export function List(): List; export function List(collection: Iterable): List; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface List extends Collection.Indexed { // Persistent changes set(index: number, value: T): List; @@ -177,38 +80,20 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite setSize(size: number): List; // Deep persistent changes setIn(keyPath: Iterable, value: any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. deleteIn(keyPath: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. removeIn(keyPath: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. updateIn(keyPath: Iterable, notSetValue: any, updater: (value: any) => any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. updateIn(keyPath: Iterable, updater: (value: any) => any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeIn(keyPath: Iterable, ...collections: Array): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeDeepIn(keyPath: Iterable, ...collections: Array): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. // Transient changes withMutations(mutator: (mutable: this) => any): this; asMutable(): this; asImmutable(): this; // Sequence algorithms concat(...valuesOrCollections: Array | C>): List; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: number, iter: this) => M, context?: any): List; flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): List; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): List; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } @@ -217,13 +102,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite function of(...keyValues: Array): Map; } export function Map(collection: Iterable<[K, V]>): Map; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function Map(collection: Iterable>): Map; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function Map(obj: {[key: string]: V}): Map; export function Map(): Map; export function Map(): Map; @@ -233,11 +112,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite delete(key: K): this; remove(key: K): this; deleteAll(keys: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. removeAll(keys: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. clear(): this; update(key: K, notSetValue: V, updater: (value: V) => V): this; update(key: K, updater: (value: V) => V): this; @@ -248,41 +123,23 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite mergeDeepWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; // Deep persistent changes setIn(keyPath: Iterable, value: any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. deleteIn(keyPath: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. removeIn(keyPath: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. updateIn(keyPath: Iterable, notSetValue: any, updater: (value: any) => any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. updateIn(keyPath: Iterable, updater: (value: any) => any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeIn(keyPath: Iterable, ...collections: Array): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeDeepIn(keyPath: Iterable, ...collections: Array): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. // Transient changes withMutations(mutator: (mutable: this) => any): this; asMutable(): this; asImmutable(): this; // Sequence algorithms concat(...collections: Array>): Map; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. concat(...collections: Array<{[key: string]: C}>): Map; map(mapper: (value: V, key: K, iter: this) => M, context?: any): Map; mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Map; mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Map; flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Map; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Map; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } @@ -290,28 +147,18 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; } export function OrderedMap(collection: Iterable<[K, V]>): OrderedMap; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function OrderedMap(collection: Iterable>): OrderedMap; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function OrderedMap(obj: {[key: string]: V}): OrderedMap; export function OrderedMap(): OrderedMap; export function OrderedMap(): OrderedMap; export interface OrderedMap extends Map { // Sequence algorithms concat(...collections: Array>): OrderedMap; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. concat(...collections: Array<{[key: string]: C}>): OrderedMap; map(mapper: (value: V, key: K, iter: this) => M, context?: any): OrderedMap; mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): OrderedMap; mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): OrderedMap; flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): OrderedMap; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): OrderedMap; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } @@ -321,21 +168,11 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite function fromKeys(iter: Collection): Set; function fromKeys(obj: {[key: string]: any}): Set; function intersect(sets: Iterable>): Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. function union(sets: Iterable>): Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. } export function Set(): Set; export function Set(): Set; export function Set(collection: Iterable): Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface Set extends Collection.Set { // Persistent changes add(value: T): this; @@ -352,12 +189,8 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite asImmutable(): this; // Sequence algorithms concat(...valuesOrCollections: Array | C>): Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: never, iter: this) => M, context?: any): Set; flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Set; filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; } @@ -370,17 +203,11 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function OrderedSet(): OrderedSet; export function OrderedSet(): OrderedSet; export function OrderedSet(collection: Iterable): OrderedSet; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface OrderedSet extends Set { // Sequence algorithms concat(...valuesOrCollections: Array | C>): OrderedSet; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: never, iter: this) => M, context?: any): OrderedSet; flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): OrderedSet; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): OrderedSet; filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; zip(...collections: Array>): OrderedSet; @@ -395,8 +222,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function Stack(): Stack; export function Stack(): Stack; export function Stack(collection: Iterable): Stack; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface Stack extends Collection.Indexed { // Reading values peek(): T | undefined; @@ -404,13 +229,9 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite clear(): Stack; unshift(...values: Array): Stack; unshiftAll(iter: Iterable): Stack; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. shift(): Stack; push(...values: Array): Stack; pushAll(iter: Iterable): Stack; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. pop(): Stack; // Transient changes withMutations(mutator: (mutable: this) => any): this; @@ -418,12 +239,8 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite asImmutable(): this; // Sequence algorithms concat(...valuesOrCollections: Array | C>): Stack; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: number, iter: this) => M, context?: any): Stack; flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Stack; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Set; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } @@ -434,11 +251,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function getDescriptiveName(record: Instance): string; export interface Class { (values?: Partial | Iterable<[string, any]>): Instance & Readonly; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. new (values?: Partial | Iterable<[string, any]>): Instance & Readonly; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. } export interface Instance { readonly size: number; @@ -447,11 +260,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite get(key: K): T[K]; // Reading deep values hasIn(keyPath: Iterable): boolean; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. getIn(keyPath: Iterable): any; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. // Value equality equals(other: any): boolean; hashCode(): number; @@ -459,39 +268,19 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite set(key: K, value: T[K]): this; update(key: K, updater: (value: T[K]) => T[K]): this; merge(...collections: Array | Iterable<[string, any]>>): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeDeep(...collections: Array | Iterable<[string, any]>>): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeWith(merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: Array | Iterable<[string, any]>>): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeDeepWith(merger: (oldVal: any, newVal: any, key: any) => any, ...collections: Array | Iterable<[string, any]>>): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. delete(key: K): this; remove(key: K): this; clear(): this; // Deep persistent changes setIn(keyPath: Iterable, value: any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. updateIn(keyPath: Iterable, updater: (value: any) => any): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeIn(keyPath: Iterable, ...collections: Array): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. mergeDeepIn(keyPath: Iterable, ...collections: Array): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. deleteIn(keyPath: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. removeIn(keyPath: Iterable): this; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. // Conversion to JavaScript types toJS(): { [K in keyof T]: any }; toJSON(): T; @@ -503,10 +292,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite // Sequence algorithms toSeq(): Seq.Keyed; [Symbol.iterator](): IterableIterator<[keyof T, T[keyof T]]>; - ~~~~~~ -!!! error TS2304: Cannot find name 'Symbol'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. } } export function Record(defaultValues: T, name?: string): Record.Class; @@ -515,8 +300,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite function of(...values: Array): Seq.Indexed; export module Keyed {} export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function Keyed(obj: {[key: string]: V}): Seq.Keyed; export function Keyed(): Seq.Keyed; export function Keyed(): Seq.Keyed; @@ -525,15 +308,11 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite toJSON(): { [key: string]: V }; toSeq(): this; concat(...collections: Array>): Seq.Keyed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. concat(...collections: Array<{[key: string]: C}>): Seq.Keyed; map(mapper: (value: V, key: K, iter: this) => M, context?: any): Seq.Keyed; mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Seq.Keyed; mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Seq.Keyed; flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Seq.Keyed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } @@ -543,19 +322,13 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function Indexed(): Seq.Indexed; export function Indexed(): Seq.Indexed; export function Indexed(collection: Iterable): Seq.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface Indexed extends Seq, Collection.Indexed { toJS(): Array; toJSON(): Array; toSeq(): this; concat(...valuesOrCollections: Array | C>): Seq.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: number, iter: this) => M, context?: any): Seq.Indexed; flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Seq.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Seq.Indexed; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } @@ -565,19 +338,13 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function Set(): Seq.Set; export function Set(): Seq.Set; export function Set(collection: Iterable): Seq.Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface Set extends Seq, Collection.Set { toJS(): Array; toJSON(): Array; toSeq(): this; concat(...valuesOrCollections: Array | C>): Seq.Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: never, iter: this) => M, context?: any): Seq.Set; flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Seq.Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Seq.Set; filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; } @@ -587,8 +354,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite export function Seq(collection: Collection.Indexed): Seq.Indexed; export function Seq(collection: Collection.Set): Seq.Set; export function Seq(collection: Iterable): Seq.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function Seq(obj: {[key: string]: V}): Seq.Keyed; export function Seq(): Seq; export interface Seq extends Collection { @@ -598,8 +363,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite // Sequence algorithms map(mapper: (value: V, key: K, iter: this) => M, context?: any): Seq; flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Seq; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } @@ -610,8 +373,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite function isOrdered(maybeOrdered: any): boolean; export module Keyed {} export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function Keyed(obj: {[key: string]: V}): Collection.Keyed; export interface Keyed extends Collection { ~~~~~ @@ -625,27 +386,17 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite // Sequence functions flip(): this; concat(...collections: Array>): Collection.Keyed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. concat(...collections: Array<{[key: string]: C}>): Collection.Keyed; map(mapper: (value: V, key: K, iter: this) => M, context?: any): Collection.Keyed; mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Collection.Keyed; mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Collection.Keyed; flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Collection.Keyed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection.Keyed; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator<[K, V]>; - ~~~~~~ -!!! error TS2304: Cannot find name 'Symbol'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. } export module Indexed {} export function Indexed(collection: Iterable): Collection.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface Indexed extends Collection { ~~~~~~~ !!! error TS2430: Interface 'Indexed' incorrectly extends interface 'Collection'. @@ -675,24 +426,14 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite findLastIndex(predicate: (value: T, index: number, iter: this) => boolean, context?: any): number; // Sequence algorithms concat(...valuesOrCollections: Array | C>): Collection.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: number, iter: this) => M, context?: any): Collection.Indexed; flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Collection.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Collection.Indexed; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator; - ~~~~~~ -!!! error TS2304: Cannot find name 'Symbol'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. } export module Set {} export function Set(collection: Iterable): Collection.Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export interface Set extends Collection { ~~~ !!! error TS2430: Interface 'Set' incorrectly extends interface 'Collection'. @@ -704,25 +445,15 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite toSeq(): Seq.Set; // Sequence algorithms concat(...valuesOrCollections: Array | C>): Collection.Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. map(mapper: (value: T, key: never, iter: this) => M, context?: any): Collection.Set; flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Collection.Set; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Collection.Set; filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator; - ~~~~~~ -!!! error TS2304: Cannot find name 'Symbol'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. } } export function Collection>(collection: I): I; export function Collection(collection: Iterable): Collection.Indexed; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. export function Collection(obj: {[key: string]: V}): Collection.Keyed; export interface Collection extends ValueObject { // Value equality @@ -738,11 +469,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite last(): V | undefined; // Reading deep values getIn(searchKeyPath: Iterable, notSetValue?: any): any; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. hasIn(searchKeyPath: Iterable): boolean; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. // Persistent changes update(updater: (value: this) => R): R; // Conversion to JavaScript types @@ -764,14 +491,8 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite toSetSeq(): Seq.Set; // Iterators keys(): IterableIterator; - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. values(): IterableIterator; - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. entries(): IterableIterator<[K, V]>; - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IterableIterator'. // Collections (Seq) keySeq(): Seq.Indexed; valueSeq(): Seq.Indexed; @@ -804,8 +525,6 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite flatten(depth?: number): Collection; flatten(shallow?: boolean): Collection; flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Collection; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. // Reducing a value reduce(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; @@ -833,11 +552,7 @@ tests/cases/compiler/immutable.d.ts(504,22): error TS2304: Cannot find name 'Ite minBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): V | undefined; // Comparison isSubset(iter: Iterable): boolean; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. isSuperset(iter: Iterable): boolean; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Iterable'. readonly size: number; } } diff --git a/tests/cases/compiler/complexRecursiveCollections.ts b/tests/cases/compiler/complexRecursiveCollections.ts index a79b429f204..68054aac0f9 100644 --- a/tests/cases/compiler/complexRecursiveCollections.ts +++ b/tests/cases/compiler/complexRecursiveCollections.ts @@ -1,3 +1,4 @@ +// @lib: es6 // @Filename: complex.d.ts interface Ara { t: T } interface Collection {