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

Wrong StateDeclaration override #2

Closed
daneget opened this issue Jul 21, 2017 · 3 comments
Closed

Wrong StateDeclaration override #2

daneget opened this issue Jul 21, 2017 · 3 comments
Milestone

Comments

@daneget
Copy link
Contributor

daneget commented Jul 21, 2017

I have included this library in a typescript project and tsc has started throwing compile errors because I'm using missing fields in StateDeclaration.

This doesn't happend with sticky-states which I've included before this one, so after looking at StateDeclaration overrides in two project I've seen that StateDeclaration it's defined with different module names:

StateDeclaration in @uirouter/dsr

declare module "@uirouter/core" {
  interface StateDeclaration {
    dsr?: any;
    deepStateRedirect?: any;
  }
}

StateDeclaration in @uirouter/sticky-states

declare module "@uirouter/core/lib/state/interface" {
  interface StateDeclaration {
    sticky?: boolean;
    onInactivate?: TransitionStateHookFn;
    onReactivate?: TransitionStateHookFn;
  }
}

I suggest to modify this declaration to have the same module name as in sticky-states module, because with that change tsc would compile projects correctly

@daneget
Copy link
Contributor Author

daneget commented Aug 7, 2017

Added pull request #3 to fix this issue

@kuhnroyal
Copy link

I am running into this problem, can I somehow overwrite it locally until this is merged?

@longedok
Copy link

longedok commented Sep 5, 2017

Same issue here, would really appreciate @daneget's fix merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants