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
-
objectTsNew
- Inherited Members
Constructors
TsNew(TsIdentifier)
Creates an instance of a type, e.g. new ElementEndpoint<Contact>(this, "./contacts").
public TsNew(TsIdentifier type)
Parameters
typeTsIdentifierThe type to instantiate.
Properties
Arguments
The arguments to pass to the constructor.
public List<TsExpression> Arguments { get; }
Property Value
Type
The type to instantiate.
public TsIdentifier Type { get; }
Property Value
Methods
GetImports()
Returns all imports needed by this expression.
public override IEnumerable<TsImport> GetImports()
Returns
ToCode()
Returns the TypeScript code for this expression.
public override string ToCode()