elringus / bootsharp

Compile C# solution into single-file ES module with auto-generated JavaScript bindings and type definitions

Home Page:https://bootsharp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non Program methods not generated

promontis opened this issue · comments

I've noticed that methods are not generated for classes other than Program. So, if for example Program has a method that returns an object of type Foo, and Foo has a method Bar(), Bar() isn't generated for the typescript definition.

Is that by design or am I doing something wrong?

Bindings are only generated for static methods annotated with the interop attributes. It's also possible to interop with instances, but that's entirely on the .NET side, this project has nothing extra for the case.

So, the surface area for any .net API should be fully expressed as ONLY static methods (annotated with the interop attribute) in the Program class?

Class doesn't matter.