Merge pull request #439 from IgorBabkin/collection-typings

Add generic variable to Collection
This commit is contained in:
Anton Lavrenov 2018-08-22 18:11:02 +07:00 committed by GitHub
commit f453ddbd5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
konva.d.ts vendored
View File

@ -1137,12 +1137,13 @@ declare namespace Konva {
fontStyle(fontStyle: string): this;
}
class Collection {
[i: number]: any;
static toCollection(arr: any[]): Collection;
each(f: (el: Node) => void): void;
toArray(): any[];
class Collection<T extends Node = Node> {
[i: number]: T;
each(f: (el: T) => void): void;
toArray(): T[];
length: number;
static toCollection<T extends Node = Node>(arr: T[]): Collection<T>;
}
class Transform {