NetjsC# 转成 JavaScript 编译器

联合创作 · 2023-10-02 01:26

Netjs 是一个 .NET 到 TypeScript 和 JavaScript 的编译器。

该软件目前还有一些限制:

  • 忽略命名空间

  • mscorlib.ts is a tiny subset of the full BCL

  • Overloaded methods generally work, but have trouble with:

    • One overload being virtual and another not (it hurts my head trying to get this to work)

    • Overloads that have the same argument count and accept values that can be null (runtime type checking is used)

    • Overloaded constuctors that call different base constructors probably don't work

  • Async does not work

  • Gotos only sometimes work

  • Regexes have some problems:

    • Named groups don't work (we rely on the browser's regex implementation)

    • Match Group Index only works if you capture everything

  • Integer casts with the expectation of performing a Truncate operation don't work ()

  • Seriously, watch it with those overloads

浏览 5
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报