Class
Hierarchy
↳ Pattern
Pattern
↳ Class
Implements
- Pattern
 - Pattern
 
Index
Constructors
Properties
Accessors
Methods
- describe
 - getInitializer
 - getKind
 - hasInitializer
 - hasOwnProperty
 - isPrototypeOf
 - propertyIsEnumerable
 - setInitializer
 - toLocaleString
 - toString
 - valueOf
 - getDescriber
 - setDescriber
 
Constructors
constructor
+ new Class(type: any, properties: Type): Class
Overrides Pattern.constructor
Creates an instance of an Class(pattern). Creates an instance of an Class(pattern).
throws {InvalidTypeError}
Thrown if provided type is invalid(is not a class).
throws {InvalidDefinitionError}
Thrown if provided properties are invalid(is not an plain object or instance of Collection pattern).
throws {InvalidTypeError}
Thrown if provided type is invalid(is not a class).
throws {InvalidDefinitionError}
Thrown if provided properties are invalid(is not an plain object or instance of Collection pattern).
Parameters:
| Name | Type | Description | 
|---|---|---|
type | any | Type constructor. | 
properties | Type | Properties that describes class. | 
Returns: Class
Properties
properties
• properties: Record‹keyof any, any› | Collection
type
• type: Class
Static describer
▪ describer: Describer
Inherited from Pattern.describer
Overrides void
Static kind
▪ kind: KINDS = KINDS.CLASS
Accessors
isOptional
• get isOptional(): Optional
Inherited from Pattern.isOptional
Overrides void
Returns: Optional
isRequired
• get isRequired(): any
Inherited from Pattern.isRequired
Overrides void
Returns: any
Methods
describe
▸ describe(value: any): string
Inherited from Pattern.describe
Overrides void
Parameters:
| Name | Type | 
|---|---|
value | any | 
Returns: string
getInitializer
▸ getInitializer(): any | undefined
Implementation of Pattern
Inherited from Pattern.getInitializer
Overrides void
Returns: any | undefined
getKind
▸ getKind(): string
Implementation of Pattern
Inherited from Pattern.getKind
Overrides void
Returns: string
hasInitializer
▸ hasInitializer(): boolean
Implementation of Pattern
Inherited from Pattern.hasInitializer
Overrides void
Returns: boolean
hasOwnProperty
▸ hasOwnProperty(v: PropertyKey): boolean
Inherited from Pattern.hasOwnProperty
Overrides Pattern.hasOwnProperty
Determines whether an object has a property with the specified name.
Parameters:
| Name | Type | Description | 
|---|---|---|
v | PropertyKey | A property name. | 
Returns: boolean
isPrototypeOf
▸ isPrototypeOf(v: Object): boolean
Inherited from Pattern.isPrototypeOf
Overrides Pattern.isPrototypeOf
Determines whether an object exists in another object's prototype chain.
Parameters:
| Name | Type | Description | 
|---|---|---|
v | Object | Another object whose prototype chain is to be checked. | 
Returns: boolean
propertyIsEnumerable
▸ propertyIsEnumerable(v: PropertyKey): boolean
Inherited from Pattern.propertyIsEnumerable
Overrides Pattern.propertyIsEnumerable
Determines whether a specified property is enumerable.
Parameters:
| Name | Type | Description | 
|---|---|---|
v | PropertyKey | A property name. | 
Returns: boolean
setInitializer
▸ setInitializer(initializer: any): void
Implementation of Pattern
Inherited from Pattern.setInitializer
Overrides void
Parameters:
| Name | Type | 
|---|---|
initializer | any | 
Returns: void
toLocaleString
▸ toLocaleString(): string
Inherited from Pattern.toLocaleString
Overrides Pattern.toLocaleString
Returns a date converted to a string using the current locale.
Returns: string
toString
▸ toString(): string
Inherited from Pattern.toString
Returns a string representation of an object.
Returns: string
valueOf
▸ valueOf(): Object
Inherited from Pattern.valueOf
Returns the primitive value of the specified object.
Returns: Object
Static getDescriber
▸ getDescriber(): Describer
Inherited from Pattern.getDescriber
Overrides void
Returns: Describer
Static setDescriber
▸ setDescriber(describer: Describer): void
Inherited from Pattern.setDescriber
Overrides void
Parameters:
| Name | Type | 
|---|---|
describer | Describer | 
Returns: void