Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate TypeScript Definition Files #29

Closed
paf31 opened this issue Oct 23, 2013 · 8 comments
Closed

Generate TypeScript Definition Files #29

paf31 opened this issue Oct 23, 2013 · 8 comments

Comments

@paf31
Copy link
Contributor

paf31 commented Oct 23, 2013

To expose a PureScript library to TypeScript, we can generate .d.ts files from an externs file.

@paf31
Copy link
Contributor Author

paf31 commented Oct 30, 2013

Would be nice to have, but not essential for a first release. Also, I'm not sure what to do with things like

foo :: forall r. { a :: A | r } -> { b :: B | r }

@paf31 paf31 closed this as completed Oct 30, 2013
@paf31 paf31 reopened this Oct 30, 2013
@paf31 paf31 changed the title Generate .d.ts files Generate TypeScript Definition Files Jul 8, 2014
@paf31
Copy link
Contributor Author

paf31 commented Jul 8, 2014

Closing this as wontfix. The type system really won't help with things like rows.

@minoki
Copy link

minoki commented Feb 18, 2018

In case anyone is interested in this topic: I've written a tool to do this. See https://github.com/minoki/purescript-tsd-gen

@i-am-tom
Copy link
Contributor

I think @justinwoo has also worked on some stuff around this!

@justinwoo
Copy link
Contributor

My thing is just a PureScript library in the end though https://github.com/justinwoo/purescript-ohyes

@babakness
Copy link

If PureScript compiled to TypeScript and could read TypeScript definitions, it would take over the front-end world.

@garyb
Copy link
Member

garyb commented Apr 15, 2019

That'd be nice, but TS can't (directly) express a lot of PS types and vice versa. Plus there's effects to consider.

I think tools that assist with some cases is the best we'll get really.

@muratg
Copy link

muratg commented May 21, 2019

I think this would be really nice. It would make it much nicer to make libraries with purescript and make them usable with the typescript/javascript world. But also in integrating purescript components into existing TypeScript codebases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants