When cloning the master branch, and after npm i, when building, I get this error:
npm run build
[3] src/dialog-composition-engine.ts(27,7): error TS2322: Type '{ animateView(): void; add(): void; insert(): void; move(): void; remove(): void; removeAt(): any...' is not assignable to type 'ViewSlot'.
[3] Types of property 'remove' are incompatible.
[3] Type '() => void' is not assignable to type '(view: View, returnToCache?: boolean | undefined, skipAnimation?: boolean | undefined) => View | ...'.
[3] Type 'void' is not assignable to type 'View | Promise'.
In the Aurelia-templating.d.ts file, the ViewSlot class has the remove() method which is declared as returning a View.
Usage in dialog-composition-engine declares it as void, which causes the error.
If I modify ViewSlot.remove to return void|View, the error disappears.
I'm submitting a bug report
Please tell us about your environment:
Operating System: OSX 10.13.6
Node Version: v9.11.1
NPM Version: 6.0.0
Browser: all
Language: TypeScript X.X
Current behavior:
When cloning the master branch, and after npm i, when building, I get this error:
[3] src/dialog-composition-engine.ts(27,7): error TS2322: Type '{ animateView(): void; add(): void; insert(): void; move(): void; remove(): void; removeAt(): any...' is not assignable to type 'ViewSlot'. [3] Types of property 'remove' are incompatible. [3] Type '() => void' is not assignable to type '(view: View, returnToCache?: boolean | undefined, skipAnimation?: boolean | undefined) => View | ...'. [3] Type 'void' is not assignable to type 'View | Promise'.
In the Aurelia-templating.d.ts file, the ViewSlot class has the remove() method which is declared as returning a View.
Usage in dialog-composition-engine declares it as void, which causes the error. If I modify ViewSlot.remove to return void|View, the error disappears.