neilff / redux-ui-router

ngRedux bindings for Angular UI Router
MIT License
143 stars 48 forks source link

Better TypeScript declarations #97

Closed bensgroi closed 6 years ago

bensgroi commented 6 years ago

The existing TypeScript declarations make use of Object for several types, making them limited in their usefulness. A better choice would be "any".

This PR adds a type interface for route states, and changes several types from "Object" to "any"

bensgroi commented 6 years ago

Right now, this is a TS compile error:

// Error: Property 'name' does not exist on type 'Object'
const stateName = $ngRedux.getState().router.currentState.name;

This PR would fix that issue. Any chance we can get this merged?

hally9k commented 6 years ago

@bensgroi - Released in 0.7.3 - Let me know if you have any issues...