Closed arjunt24 closed 2 years ago
Hi, Check the web extension sample, it consumes the library in TypeScript.
Thanks for the response. I checked the web extension sample, but it has the same line that is breaking for me ("dotnet.HelloWorld.GetHostName = () => "VS Code""). When I debug it, the "dotnet" object doesn't have a "HelloWorld" property, which is why "dotnet.HelloWorld.GetHostName" is breaking.
Do you have emit types enabled in the project config?
I didn't, but I added it and rebuilt the project and am still getting the same error.
Well, it's working on my end. You're probably missing something. Try cloning the repo and follow the sample instructions closely.
There was an issue with the formatting of my C# file, it works now that I fixed that. Thanks for your help!
Hi, thank you so much for creating this helpful project! I am trying to implement the simple HelloWorld example from the ReadMe in my Typescript project, and I'm getting an error. Here are the relevant files:
HelloWorld.cs:
HelloWorld.csproj:
MyTsFunction:
I ran dotnet publish to create the dotnet.js file and I am able to import the module, but there is an error on the " dotnet.HelloWorld.GetHostName = () => "Node.js"; " line:
Do you have any ideas on how I could fix this?