- any :
Symbol
A wildcard to match any value.
- Interface(...expected) ⇒
Object
Returns a type to check value against with the
instanceof
operator.- match(expected, values) ⇒
Array.<*>
Ensures the given values match the expected interfaces.
A wildcard to match any value.
Returns a type to check value against with the instanceof
operator.
Kind: global function
Returns: Object
- A type to verify value against with the instanceof
operator.
Param | Type | Description |
---|---|---|
...expected | * |
The value expected types. |
Ensures the given values match the expected interfaces.
Kind: global function
Returns: Array.<*>
- The matched values or their default values.
Throws:
TypeError
Whenever not enough values are given and no default values are available to complete.TypeError
Whenever a value does not match any of its interfaces and no default value is available.
Param | Type | Description |
---|---|---|
expected | Array.<(*|Array.<*>)> |
An array-like of interfaces w/ optional default, to match the values against. |
values | Array.<*> |
An array-like of values to match. |