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
These packages cannot even be used from TypeScript without types. I couldn't care less about how accurate the types are, I just need something that allows me to import and use it from a TypeScript file. I know you've said it doesn't make sense to add types for something as dynamically/loosely typed as these libraries, but that's okay: that's what any/unknown are for. TypeScript's type system is extremely flexible and makes no compromises. You can express just about anything, and when you can't, just use any.
I've tried adding types myself, but I'll just say it's not going well. Happy to send you the files I have so far if you want to expand on them, but I think the underlying library may need to export the default export as a named function instead of an anonymous closure, which is where I got stuck and why I'm stopping now. Default exports are generally bad anyway. (The default export doesn't have to go away, you can export it in two places)
Please let me know how I can help! If I can change your mind here, I will gladly sponsor you as well, happy that I can soon use this awesome library from TypeScript.
The text was updated successfully, but these errors were encountered:
These packages cannot even be used from TypeScript without types. I couldn't care less about how accurate the types are, I just need something that allows me to import and use it from a TypeScript file. I know you've said it doesn't make sense to add types for something as dynamically/loosely typed as these libraries, but that's okay: that's what
any
/unknown
are for. TypeScript's type system is extremely flexible and makes no compromises. You can express just about anything, and when you can't, just useany
.I've tried adding types myself, but I'll just say it's not going well. Happy to send you the files I have so far if you want to expand on them, but I think the underlying library may need to export the default export as a named function instead of an anonymous closure, which is where I got stuck and why I'm stopping now. Default exports are generally bad anyway. (The default export doesn't have to go away, you can export it in two places)
Please let me know how I can help! If I can change your mind here, I will gladly sponsor you as well, happy that I can soon use this awesome library from TypeScript.
The text was updated successfully, but these errors were encountered: