Table of Contents

Class TsProperty

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

A property of a TsInterface.

public sealed class TsProperty
Inheritance
object
TsProperty

Constructors

TsProperty(string, TsIdentifier)

A property of a TsInterface.

public TsProperty(string name, TsIdentifier type)

Parameters

name string

The name of the property. This is the literal name used on the wire, not an identifier.

type TsIdentifier

The type of the property.

Properties

Deprecated

Marks the property as deprecated.

public bool Deprecated { get; set; }

Property Value

bool

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

string

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

bool

Summary

A description of the property for a JSDoc comment.

public string? Summary { get; set; }

Property Value

string

Type

The type of the property.

public TsIdentifier Type { get; }

Property Value

TsIdentifier