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

`boot()` function typings are not matching with `<EmbedBinaries>false</EmbedBinaries>`

DanielHabenicht opened this issue · comments

If the project gets published with <EmbedBinaries>false</EmbedBinaries> the generated dotnet.d.ts file does not match the requested function signature.

It is generating this line:

export declare function boot(): Promise<void>;

instead of:

export declare function boot(bootData: BootData): Promise<void>;

Seems to be about this line:
https://github.com/Elringus/DotNetJS/blob/4c7235770c4b78a43276b86b52e195f0903a23a0/DotNet/Packer/DeclarationGenerator/DeclarationGenerator.cs#L69
I don't know when it gets called.

I tried to implement it but running into issues with your tests.
Are you already generating a whole Declaration file? The Variable (GeneratedDeclaration) here only contains a \n:
https://github.com/Elringus/DotNetJS/blob/34000c08310b7ace865863da2e2968d20f3b4380/DotNet/Packer.Test/PublishTest.cs#L16-L20

Thanks, I'll look into that.

Thanks!