Class TsTypeRef
- Namespace
- TypedRest.CodeGeneration.TypeScript.Model
- Assembly
- TypedRest.CodeGeneration.TypeScript.dll
References a type as a value, e.g. to pass a class to a constructor expecting a factory.
public sealed class TsTypeRef : TsExpression
- Inheritance
-
objectTsTypeRef
- Inherited Members
Constructors
TsTypeRef(TsIdentifier)
References a type as a value, e.g. to pass a class to a constructor expecting a factory.
public TsTypeRef(TsIdentifier type)
Parameters
typeTsIdentifierThe type to reference. Any generic type arguments are dropped.
Properties
Type
The type to reference.
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()