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:
Teoxoy
2018-09-20 03:01:56 +02:00
committed by GitHub
parent 14d0a6329a
commit 08373d3373

View File

@@ -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;