Skip to content

Commit

Permalink
Merge pull request #655 from alper-batioglu/patch-2
Browse files Browse the repository at this point in the history
Collection made generic & type to Group.children
  • Loading branch information
jonobr1 authored Aug 14, 2022
2 parents 56e1e7d + f7f60df commit 18dc99b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ declare module "two.js/src/collection" {
* @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.
*/
export class Collection extends Array<any> {
export class Collection<T = any> extends Array<T> {
constructor(...args: any[]);
/**
* @private
Expand All @@ -1162,7 +1162,7 @@ declare module "two.js/src/children" {
* @description A children collection which is accesible both by index and by object `id`.
*/
export class Children extends Collection {
export class Children extends Collection<TwoElement> {
constructor(children?: TwoElement[]);
constructor(...args: TwoElement[]);
/**
Expand Down Expand Up @@ -1384,7 +1384,7 @@ declare module "two.js/src/group" {
* @description A list of all the children in the scenegraph.
* @nota-bene Ther order of this list indicates the order each element is rendered to the screen.
*/
children: any;
children: Children;
/**
* @name Two.Group#toObject
* @function
Expand Down

0 comments on commit 18dc99b

Please sign in to comment.