Typescript error: 'onChange' in type 'BaseLocationServices' is not assignable to the same property in base type 'LocationServices'
sebastianhaeni opened this issue · 8 comments
sebastianhaeni commented
Since version 5.0.21
I'm getting the following TypeScript error when compiling:
node_modules/@uirouter/core/lib/vanilla/baseLocationService.d.ts:43:5 - error TS2416: Property 'onChange' in type 'BaseLocationServices' is not assignable to the same property in base type 'LocationServices'.
Type '(cb: EventListener) => () => Function[]' is not assignable to type '(callback: Function) => Function'.
Types of parameters 'cb' and 'callback' are incompatible.
Type 'Function' is not assignable to type 'EventListener'.
Type 'Function' provides no match for the signature '(evt: Event): void'.
43: onChange(cb: EventListener): () => Function[];
~~~~~~~~
Is there something wrong with my configuration or my imports? It worked with 5.0.20
.
Seems like the change was made in 095f531 .
robertomatute commented
I am using angular-hybrid 6.0.2
and getting the same error:
ERROR in node_modules/@uirouter/core/lib/vanilla/baseLocationService.d.ts(43,5): error TS2416: Property 'onChange' in type 'BaseLocationServices' is not assignable to the same property in base type 'LocationServices'.
Type '(cb: EventListener) => () => Function[]' is not assignable to type '(callback: Function) => Function'.
Types of parameters 'cb' and 'callback' are incompatible.
Type 'Function' is not assignable to type 'EventListener'.
Type 'Function' provides no match for the signature '(evt: Event): void'.
This module uses the same core version 5.0.21
.
renaldas-kerpe-arria commented
Same here with "@uirouter/angular-hybrid": "^6.0.2"
tommck commented
Ugh.. I assumed this would be fixed in 5.0.22
tommck commented
yikes, that change set was marked as "(docs)", but was NOT just docs. It changed code
renaldas-kerpe-arria commented
Ping @christopherthielen
christopherthielen commented
How do I reproduce this typescript error?
edit: downstream project using "strict": true
in tsconfig.json
, thanks tommck for the details on gitter
tommck commented
You rock!
…On Mon, Jan 28, 2019, 5:12 PM Chris Thielen ***@***.*** wrote:
Closed #229 <#229> via 961ed0f
<961ed0f>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#229 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA77xaAiIez9VmehnhScM4V1qMVIswBkks5vH3XogaJpZM4V6Sxo>
.
renaldas-kerpe-arria commented
🎉