Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 651 Bytes

csharp-to-typescript.md

File metadata and controls

27 lines (19 loc) · 651 Bytes

csharp to typescript

  • add package reference to the project
dotnet add package Reinforced.Typings
  • create an helper rtcli.sh as follow ( change version as needed ) then chmod +x rtcli.sh
#!/bin/bash
dotnet ~/.nuget/packages/reinforced.typings/1.5.2/tools/netcoreapp2.1/rtcli.dll $@
  • apply [TsInterface] attributes to csharp classes to export and run

  • build copying related dlls within dotnet build /p:CopyLocalLockFileAssemblies=true

  • run the tool

./rtcli.sh \
	SourceAssemblies="fullpath-project/bin/Debug/netcoreapp2.1/mylib.dll" \
	TargetDirectory="fullpath-target-directory" \
	Hierarchy="true"