Skip to main content

ShapeDefinition

An abstract class that extends Serializable and implements the IShapeDefinition interface. This class provides a base definition for shapes that can be serialized into an array or JSON string.

Extends

Extended by

Implements

Constructors

new ShapeDefinition()

new ShapeDefinition(): ShapeDefinition

Returns

ShapeDefinition

Inherited from

Serializable.constructor

Methods

toArray()

toArray(): any[]

Converts the object's properties to an array. If any of the properties are objects that implement ISerializable, their toArray method is called.

Returns

any[]

An array representation of the object's properties.

Implementation of

IShapeDefinition.toArray

Inherited from

Serializable.toArray

Defined in

common/Serializable.ts:16


toJson()

toJson(): string

Converts the object to a JSON string. If any of the properties are objects that implement ISerializable, their toJson method is called. Underscores e.g. of private members are trimmed when setting the serialized name.

Returns

string

A JSON string representation of the object.

Implementation of

IShapeDefinition.toJson

Inherited from

Serializable.toJson

Defined in

common/Serializable.ts:32