Class: Type
The class for deep checking Types
Constructors
new Type()
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
value | unknown | undefined | The value to generate a deep Type of |
parent | null | Type | null | The parent value used in recursion |
Returns
Source
Properties
childKeys
The child keys of this Type
Source
childValues
The child values of this Type
Source
is
is:
string
The shallow type of this
Source
parent
privatereadonlyparent:null|Type
The parent of this Type
Source
value
readonlyvalue:unknown
The value to generate a deep Type of
Source
Accessors
childTypes
getprivatechildTypes():string
The type string for the children of this Type
Returns
string
Source
Methods
addEntry()
privateaddEntry(entry: [string,unknown]):void
The subtype to create based on this.value's entries.
Parameters
| Parameter | Type | Description |
|---|---|---|
entry | [string, unknown] | The entry |
Returns
void
Source
addValue()
privateaddValue(value:unknown):void
The subtype to create based on this.value's sub value.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | The sub value |
Returns
void
Source
check()
privatecheck():void
Get the deep type name that defines the input.
Returns
void
Source
isCircular()
privateisCircular():boolean
Checks if the value of this Type is a circular reference to any parent.
Returns
boolean
Source
parents()
privateparents():IterableIterator<Type>
Walks the linked list backwards, for checking circulars.
Returns
IterableIterator <Type>
Source
toString()
toString():
string
The full type string generated.
Returns
string
Source
list()
Joins the list of child types.
Parameters
| Parameter | Type | Description |
|---|---|---|
values | Map<string, Type> | The values to list |
Returns
string
Source
resolve()
staticresolve(value:any):string
Resolves the type name that defines the input.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | The value to get the type name of |
Returns
string