Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Use Fable to generate JS and TypeScript Declarations #39

Closed
panesofglass opened this issue Apr 12, 2017 · 0 comments
Closed

Use Fable to generate JS and TypeScript Declarations #39

panesofglass opened this issue Apr 12, 2017 · 0 comments

Comments

@panesofglass
Copy link
Contributor

panesofglass commented Apr 12, 2017

The Gluon compiler and serializer supports a very limited number of F# and .NET types (see #32 for an example). Fable provides support for quite a lot of F# and .NET but currently does not generate TypeScript source or declaration files (see fable-compiler/Fable#805).

This issue proposes transforming Gluon into a client generator using Fable for JS compilation and (de)serialization. The idea is similar to that presented in Statically Typed Client-Server Communication with F#: Proof of Concept but using standard F# modules and attributed let-bound functions as the definitions. We could investigate use of interfaces or other options as a future enhancement.

This issue requires adding TypeScript support to Fable. As noted in the issue linked above, TypeScript 2.3 provides a TypeScript emitter from its AST. We could add support to Fable to generate TypeScript from the Fable AST as an alternative to Babel. Babel is also considering support for generating .d.ts files. Both avenues should be explored.

@panesofglass panesofglass changed the title Consider using Fable to generate JS client Use Fable to generate JS and TypeScript Declarations Apr 29, 2017
@panesofglass panesofglass added this to the 5.0 milestone Apr 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant