mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
updated Container.addChild
If you pass the args to addChild via spread operator over an array you will get: [ts] Expected at least 1 arguments, but got 0 or more. I think this is the best way to solve it.
This commit is contained in:
3
types/pixi.js/index.d.ts
vendored
3
types/pixi.js/index.d.ts
vendored
@@ -290,8 +290,7 @@ declare namespace PIXI {
|
||||
|
||||
protected onChildrenChange: (...args: any[]) => void;
|
||||
addChild<T extends DisplayObject>(
|
||||
child: T,
|
||||
...additionalChildren: DisplayObject[]
|
||||
...children: T[]
|
||||
): T;
|
||||
addChildAt<T extends DisplayObject>(child: T, index: number): T;
|
||||
swapChildren(child: DisplayObject, child2: DisplayObject): void;
|
||||
|
||||
Reference in New Issue
Block a user