Table of Contents

Class TsClass

Namespace
TypedRest.CodeGeneration.TypeScript.Model
Assembly
TypedRest.CodeGeneration.TypeScript.dll

A TypeScript class declaration.

public sealed class TsClass : ITsType
Inheritance
object
TsClass
Implements

Constructors

TsClass(TsIdentifier)

A TypeScript class declaration.

public TsClass(TsIdentifier identifier)

Parameters

identifier TsIdentifier

The name of the class and the module it is declared in.

Properties

BaseType

The type this class derives from.

public TsIdentifier? BaseType { get; set; }

Property Value

TsIdentifier

Constructor

The constructor of the class. Leave this null to inherit the base constructor.

public TsConstructor? Constructor { get; set; }

Property Value

TsConstructor

Deprecated

Marks the type as deprecated.

public bool Deprecated { get; set; }

Property Value

bool

Getters

The child endpoints exposed by the class.

public List<TsGetter> Getters { get; }

Property Value

List<TsGetter>

Identifier

The name of the type and the module it is declared in.

public TsIdentifier Identifier { get; }

Property Value

TsIdentifier

Summary

A description of the type for a JSDoc comment.

public string? Summary { get; set; }

Property Value

string

Methods

GetImports()

Returns all imports needed by the declaration of the type.

public IEnumerable<TsImport> GetImports()

Returns

IEnumerable<TsImport>

Write(TsWriter)

Writes the declaration of the type.

public void Write(TsWriter writer)

Parameters

writer TsWriter