Table of Contents

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
object
TsFile
Implements
Extension Methods

Constructors

TsFile(string)

A generated TypeScript source file holding one or more type declarations.

public TsFile(string path)

Parameters

path string

The 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

string

Properties

Encoding

The encoding to use when writing the file to disk.

public Encoding Encoding { get; }

Property Value

Encoding

Path

The path of the file relative to the output directory, using / as the separator, including the extension.

public string Path { get; }

Property Value

string

Types

The types declared in this file.

public List<ITsType> Types { get; }

Property Value

List<ITsType>

Methods

WriteTo(TextWriter)

Writes the content of the file.

public void WriteTo(TextWriter textWriter)

Parameters

textWriter TextWriter