Class TsProperty
- Namespace
- TypedRest.CodeGeneration.TypeScript.Model
- Assembly
- TypedRest.CodeGeneration.TypeScript.dll
A property of a TsInterface.
public sealed class TsProperty
- Inheritance
-
objectTsProperty
Constructors
TsProperty(string, TsIdentifier)
A property of a TsInterface.
public TsProperty(string name, TsIdentifier type)
Parameters
namestringThe name of the property. This is the literal name used on the wire, not an identifier.
typeTsIdentifierThe type of the property.
Properties
Deprecated
Marks the property as deprecated.
public bool Deprecated { get; set; }
Property Value
Name
The name of the property. This is the literal name used on the wire and gets quoted if it is not a valid TypeScript identifier.
public string Name { get; }
Property Value
Remarks
TypedRest for TypeScript deserializes with JSON.parse() and a cast, so there is no way to map a
property to a differently named field.
Optional
Indicates whether the property may be absent.
public bool Optional { get; set; }
Property Value
Summary
A description of the property for a JSDoc comment.
public string? Summary { get; set; }
Property Value
Type
The type of the property.
public TsIdentifier Type { get; }