Class TsFile
- Namespace
- TypedRest.CodeGeneration.TypeScript.Model
- Assembly
- TypedRest.CodeGeneration.TypeScript.dll
A generated TypeScript source file holding one or more type declarations.
public sealed class TsFile : IGeneratedFile
- Inheritance
-
objectTsFile
- Implements
- Extension Methods
Constructors
TsFile(string)
A generated TypeScript source file holding one or more type declarations.
public TsFile(string path)
Parameters
pathstringThe path of the file relative to the output directory, e.g.
dtos/Contact.ts.
Fields
Header
The header written at the top of every generated file.
public const string Header = "// Generated by TypedRest.CodeGeneration. Do not edit."
Field Value
Properties
Encoding
The encoding to use when writing the file to disk.
public Encoding Encoding { get; }
Property Value
Path
The path of the file relative to the output directory, using / as the separator, including the extension.
public string Path { get; }
Property Value
Types
The types declared in this file.
public List<ITsType> Types { get; }
Property Value
Methods
WriteTo(TextWriter)
Writes the content of the file.
public void WriteTo(TextWriter textWriter)
Parameters
textWriterTextWriter