Table of Contents

Class TsNew

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

Creates an instance of a type, e.g. new ElementEndpoint<Contact>(this, "./contacts").

public sealed class TsNew : TsExpression
Inheritance
object
TsNew
Inherited Members

Constructors

TsNew(TsIdentifier)

Creates an instance of a type, e.g. new ElementEndpoint<Contact>(this, "./contacts").

public TsNew(TsIdentifier type)

Parameters

type TsIdentifier

The type to instantiate.

Properties

Arguments

The arguments to pass to the constructor.

public List<TsExpression> Arguments { get; }

Property Value

List<TsExpression>

Type

The type to instantiate.

public TsIdentifier Type { get; }

Property Value

TsIdentifier

Methods

GetImports()

Returns all imports needed by this expression.

public override IEnumerable<TsImport> GetImports()

Returns

IEnumerable<TsImport>

ToCode()

Returns the TypeScript code for this expression.

public override string ToCode()

Returns

string