Skip to content

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

Closed
@sebastianhaeni

Description

@sebastianhaeni

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions