TypeScript definitions
jimthedev opened this issue · 4 comments
It would be cool to have typescript types for this so that it imports correctly.
I think it would be as simple as creating an index.d.ts file and then putting the following in it (I am not a TS expert):
declare module 'react-aux' {
var Aux: any;
export = Aux;
}
Then you'd just publish to npm. Any chance you'd be open to this?
More on publishing types here: http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
Whats the purpose of a such a generic type? any
effectively kills type checking.
You're right, we could put an array of generic react components instead. I was more seeing if you'd be open to releasing the types on npm or if not then they could go on Definitely Typed.
Considering how simple this package is, I wouldn't mind adding the TS definitions.