Aspnetcore: Tooling for JavaScript interop

Created on 5 Feb 2018  路  7Comments  路  Source: dotnet/aspnetcore

  • [ ] Tooling to generate strongly typed C# wrappers for JavaScript libraries (ex based on TypeScript definitions)
area-blazor

Most helpful comment

This is the module where we started work on generating C# types for JavaScript APIs based on DefinitelyTyped:

https://github.com/mono/TsToCSharp

All 7 comments

Could you also use JSDoc to achieve the same thing? I believe TypeScript does this to infer some basic type information.

or even use eslint https://medium.com/javascript-scene/you-might-not-need-typescript-or-static-types-aa7cb670a77b :)

Unfortunately, the Retyped tooling is not OSS at this time, so not much can be leveraged there. But Fable has support, and although it's F#, there's pby lots that can be adapted from there: https://github.com/fable-compiler/ts2fable

@ebekker I鈥檝e connected with the developers of Retyped and they are moving to open sourcing the tools and resulting generated c# code, they have replied with interest in blazor

This is the module where we started work on generating C# types for JavaScript APIs based on DefinitelyTyped:

https://github.com/mono/TsToCSharp

Closing as this is being handled by https://github.com/mono/TsToCSharp

Was this page helpful?
0 / 5 - 0 ratings