Typescript types for external types #2312
vonagam
started this conversation in
Ideas & suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Right now this from stdlib:
Generates this in ts:
Making those descriptions for functions:
The same as:
So losing most of the gains of typing.
I think it makes sense to have some way to provide typescript type for external js implementation. As an example it can be something like this with existing annotation:
Where instead of generating a type definition of
any
, an external specified type will be imported and aliased with gleam's expected name. So forMap
it will be:Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions