aurelia / dialog

A dialog plugin for Aurelia.
MIT License
106 stars 115 forks source link

Error when building #356

Closed ormasoftchile closed 5 years ago

ormasoftchile commented 5 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior:

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.

StrahilKazlachev commented 5 years ago

The aurelia-templating typings got a fix, but I forgot the usage here, fixed.