You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's really hard to get the types right and when they're wrong, it is quite annoying to use. I suppose people using the library in TypeScript will want some types anyway, so it's convenient that they come with the library, but it increases the bar for contributors. The types get quite complex and still aren't perfect as is. I wouldn't be opposed to a different style for the library where the main code is in JS and there are accompanying .d.ts files with it. I would prefer not to use DefinitelyTyped.
But if we are writing the .d.ts files anyway, why not just write it all in ts?
Right now I'm using ts-toolbelt to help resolve some types for better intellisense (which still is very rough) and it has to be added as a dependency to the lib. This is unfortunate for js users who get an additional dependency that does nothing for them (compiled out at least, but still it would be better to not be there).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It's really hard to get the types right and when they're wrong, it is quite annoying to use. I suppose people using the library in TypeScript will want some types anyway, so it's convenient that they come with the library, but it increases the bar for contributors. The types get quite complex and still aren't perfect as is. I wouldn't be opposed to a different style for the library where the main code is in JS and there are accompanying .d.ts files with it. I would prefer not to use DefinitelyTyped.
But if we are writing the .d.ts files anyway, why not just write it all in ts?
Right now I'm using ts-toolbelt to help resolve some types for better intellisense (which still is very rough) and it has to be added as a dependency to the lib. This is unfortunate for js users who get an additional dependency that does nothing for them (compiled out at least, but still it would be better to not be there).
Beta Was this translation helpful? Give feedback.
All reactions