有没有一种方法可以将打字稿定义转换为 C#,以便在 Bridge 中使用?

Is there a way of converting typescript definitions to C#, for use in Bridge?

有没有办法将 typescript 定义转换为 C#,以便在 Bridge 中使用?

如果我有:

class L
{
    value():string;
}

它将转换为:

class L
{
    public string Value ();
}

Is there a way of converting typescript definitions to C#

这不是 TypeScript 团队的目标,因此任何解决方案都必须来自社区。快速搜索会准确显示您的要求:https://github.com/michaelcheers/TypeScriptToCS

您可以试试 TypedocConverter,它可以用作 TypeScript 到 C# 的转换器。

https://github.com/hez2010/TypedocConverter