Skip to content

Commit 18dc99b

Browse files
authored
Merge pull request #655 from alper-batioglu/patch-2
Collection made generic & type to Group.children
2 parents 56e1e7d + f7f60df commit 18dc99b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

types.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ declare module "two.js/src/collection" {
11351135
11361136
* @description An `Array` like object with additional event propagation on actions. `pop`, `shift`, and `splice` trigger `removed` events. `push`, `unshift`, and `splice` with more than 2 arguments trigger 'inserted'. Finally, `sort` and `reverse` trigger `order` events.
11371137
*/
1138-
export class Collection extends Array<any> {
1138+
export class Collection<T = any> extends Array<T> {
11391139
constructor(...args: any[]);
11401140
/**
11411141
* @private
@@ -1162,7 +1162,7 @@ declare module "two.js/src/children" {
11621162
11631163
* @description A children collection which is accesible both by index and by object `id`.
11641164
*/
1165-
export class Children extends Collection {
1165+
export class Children extends Collection<TwoElement> {
11661166
constructor(children?: TwoElement[]);
11671167
constructor(...args: TwoElement[]);
11681168
/**
@@ -1384,7 +1384,7 @@ declare module "two.js/src/group" {
13841384
* @description A list of all the children in the scenegraph.
13851385
* @nota-bene Ther order of this list indicates the order each element is rendered to the screen.
13861386
*/
1387-
children: any;
1387+
children: Children;
13881388
/**
13891389
* @name Two.Group#toObject
13901390
* @function

0 commit comments

Comments
 (0)