Posts

Posts mit dem Label "ASP.NET Core" werden angezeigt.

ASP.NET Core, TypeScript, import & WebPack

Bild
In one of my current ASP.NET Core project I am using TypeScript for my clientside coding. I set up the project in Visual Studio 2022 regarding the MSDN description to enable TypeScript support: Tutorial: Create an ASP.NET Core app with TypeScript in Visual Studio Regarding the Tutorial everything worked as expected. I could write TypeScript and I used different TypeScript definition files imported via package.json as devDependencies. The big problem come up as I  tried to use another library, in my case the "jsoneditor Rel. 9.10.2. I included the package and tried to use the JSONEditor class. Of course, at first TypeScript was not aware about this type. Then I included the Typscript definition file for the editor. Still same error: JSONEditor is unknown and cannot be resolved. Then I tried to reference the typescript definition file with /// <reference path="../libs...."/> no luck.  After a lot of trial and errors the Visual Studio recommend me to use...