Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript error: 'onChange' in type 'BaseLocationServices' is not assignable to the same property in base type 'LocationServices' #229

Closed
sebastianhaeni opened this issue Aug 13, 2018 · 8 comments · May be fixed by Matthelonianxl/lisk-explorer#1, maxiplux/mum.cs425.project#5 or maxiplux/mum.cs425.project#7

Comments

@sebastianhaeni
Copy link

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
Copy link

I am using angular-hybrid 6.0.2and 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
Copy link

Same here with "@uirouter/angular-hybrid": "^6.0.2"

@tommck
Copy link

tommck commented Jan 18, 2019

Ugh.. I assumed this would be fixed in 5.0.22

@tommck
Copy link

tommck commented Jan 18, 2019

yikes, that change set was marked as "(docs)", but was NOT just docs. It changed code

@renaldas-kerpe-arria
Copy link

Ping @christopherthielen

@christopherthielen christopherthielen pinned this issue Jan 28, 2019
@christopherthielen
Copy link
Member

christopherthielen commented Jan 28, 2019

How do I reproduce this typescript error?

edit: downstream project using "strict": true in tsconfig.json, thanks tommck for the details on gitter

@tommck
Copy link

tommck commented Jan 28, 2019 via email

@christopherthielen christopherthielen unpinned this issue Jan 28, 2019
@renaldas-kerpe-arria
Copy link

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment