MTT 0.3.0
See the version list below for details.
dotnet add package MTT --version 0.3.0
NuGet\Install-Package MTT -Version 0.3.0
<PackageReference Include="MTT" Version="0.3.0" />
paket add MTT --version 0.3.0
#r "nuget: MTT, 0.3.0"
// Install MTT as a Cake Addin #addin nuget:?package=MTT&version=0.3.0 // Install MTT as a Cake Tool #tool nuget:?package=MTT&version=0.3.0
Models To Typescript
-- Converts c# classes to typescript interfaces
-- Only looks for public properties
-- Ignores c# constructors
-- Applies Inheritence
-- Imports all required dependencies for typescript models
-- Matches the directory structure of the dto's, however it only checks 1 lower directory from Working Directory
Options
WorkingDirectory is the input directory of the cs dtos
ConvertDirectory is the output directory of the ts interfaces
AutoGeneratedTag (default true) show "/* Auto Generated */" at the top of every file
Example .csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MTT" Version="0.3.0" PrivateAssets="All" />
</ItemGroup>
<Target Name="Convert" BeforeTargets="PrepareForBuild">
<ConvertMain WorkingDirectory="Resources/" ConvertDirectory="models/"/>
</Target>
</Project>
Types
It correctly converts the following C# types to the equivalent typescript:
- byte
- sbyte
- decimal
- double
- float
- int
- uint
- long
- ulong
- short
- ushort
- bool
- string
- DateTime
- IEnumerable
- ICollection
Notes
If a Convert Directory is supplied, it will be deleted everytime script is ran and will be remade
Tested on Windows 10 and macOS High Sierra
Follows the case and naming conventions of each language.
Thanks to natemcmaster this project really helped me out!
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETStandard 1.6
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MTT:
Package | Downloads |
---|---|
BindOpen.Messages.IO.Dtos
A package to easily deal with feeds. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.7.2 | 42,221 | 8/15/2021 |
0.7.1 | 17,038 | 6/25/2021 |
0.7.0 | 4,067 | 4/5/2021 |
0.6.5 | 32,101 | 2/16/2020 |
0.6.3 | 1,783 | 11/17/2019 |
0.6.1 | 2,086 | 8/8/2019 |
0.6.0 | 840 | 8/5/2019 |
0.5.9 | 795 | 7/24/2019 |
0.5.8 | 841 | 7/11/2019 |
0.5.7 | 3,077 | 5/31/2019 |
0.5.6 | 881 | 4/24/2019 |
0.5.5 | 1,252 | 4/7/2019 |
0.5.4 | 30,419 | 10/18/2018 |
0.5.3 | 1,479 | 9/8/2018 |
0.5.2 | 1,014 | 9/8/2018 |
0.5.1 | 1,047 | 9/8/2018 |
0.5.0 | 1,085 | 9/8/2018 |
0.4.7 | 1,384 | 8/6/2018 |
0.4.6 | 1,270 | 7/9/2018 |
0.4.5 | 1,133 | 6/21/2018 |
0.4.4 | 2,485 | 6/14/2018 |
0.4.3 | 1,399 | 4/13/2018 |
0.4.1 | 1,268 | 4/12/2018 |
0.4.0 | 1,289 | 4/11/2018 |
0.3.3 | 1,208 | 3/16/2018 |
0.3.2 | 1,290 | 3/9/2018 |
0.3.1 | 1,497 | 3/6/2018 |
0.3.0 | 1,581 | 3/5/2018 |
0.2.3 | 1,107 | 2/22/2018 |
0.2.2 | 1,257 | 2/11/2018 |
0.2.1 | 1,313 | 2/10/2018 |
0.2.0 | 1,233 | 2/10/2018 |
0.1.6 | 1,244 | 2/8/2018 |
0.1.5 | 1,282 | 2/8/2018 |
0.1.4 | 1,226 | 2/8/2018 |
0.1.1 | 1,241 | 2/2/2018 |
0.1.0 | 1,158 | 2/2/2018 |