dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.44k stars 10.02k forks source link

NPM package @microsoft/dotnet-js-interop needs a README file #47789

Open Flachdachs opened 1 year ago

Flachdachs commented 1 year ago

Is your feature request related to a problem? Please describe the problem.

See https://github.com/dotnet/AspNetCore.Docs/issues/28923

The page for the npm package @microsoft/dotnet-js-interop is quite empty. When I searched for TypeScript and Blazor the other day I got no helpful results that could have point me to this package.

The link to the Repository also needs an update.

Describe the solution you'd like

A README.md should be added so that search engines have something to read, and developers something to find. For the start it doesn't need to be a full-fledged article about how to use TypeScript in Blazor, but some keywords and a link to the documentation https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/ would be very useful.

guardrex commented 1 year ago

Thanks @Flachdachs for opening this piece over here.

The cross-link to the section added by the docs PR (if the section name doesn't change during the docs PR review), the link can include the section id ...

https://learn.microsoft.com/aspnet/core/blazor/javascript-interoperability/#javascript-interop-abstractions-and-features-package
ghost commented 1 year ago

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

mkArtakMSFT commented 1 year ago

Based on the download rates of this package we should consider to stop publishing it.

guardrex commented 1 year ago

I'm 👂 if that's what happens, as it will require removing the cross-link in the open PR at https://github.com/dotnet/AspNetCore.Docs/pull/29025.

Flachdachs commented 1 year ago

Based on the download rates of this package we should consider to stop publishing it.

I'm not surprised that nobody downloads it, because due to the lack of keywords no search engine presents you this package. That's why I made the proposal, to make it more visible, or visible at all.

Flachdachs commented 1 year ago

When you decide to remove this package, what is the alternative? How can a developer write type-safe JS interop code in TypeScript? Is there a better way than NPM repositories to provide and get TypeScript declaration files?

Let me extend the topic a bit. How can you write type-safe code for Blazor startup? Afaik there is no package containing a .d.ts file for the Blazor object. It's a hassle to find the right place in the documentation where the options are described. It's spread over several topics. I couldn't find a place where this object is documented at whole, like the documentation of all C# classes. E.g. there is a API page for the C# JSRuntime class, but where is the API documentation of its counterpart, the JavaScript DotNet object? When I write C# code I have a lot of coding support in my IDE like auto completion / IntelliSense and static syntax check. But when it comes to the JavaScript part I have nothing. I'm on my own to write the code correctly. That's why the invention of TypeScript was such a huge step forward. With TypeScript my IDE can support me when I write the code for the JavaScript part. I don't care that much about the API documentation, that would be only half of the truth. It is much more important to have coding support in the IDEs.

I ask you to not remove this package without a usable alternative. In fact I ask you to go a step further and to also publish TypeScript declarations for other things that a developer of Blazor apps has to work with with, like the Blazor object.

ghost commented 1 year ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

ghost commented 11 months ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

mkArtakMSFT commented 10 months ago

If we publish this automatically, @wtgodbe can you disable publishing the package? Otherwise, we'll just not publish an updated package going forward.

SteveSandersonMS commented 10 months ago

When you decide to remove this package, what is the alternative? How can a developer write type-safe JS interop code in TypeScript? Is there a better way than NPM repositories to provide and get TypeScript declaration files?

We have a different issues tracking publishing to NPM with .d.ts (https://github.com/dotnet/aspnetcore/issues/10124, https://github.com/dotnet/aspnetcore/issues/53215). This issue is only about adding a README.