Function: isObject()
isObject(input, constructorType)
isObject(
input:unknown,constructorType?:ObjectConstructor):input is object
Verify if the input is an object literal (or class).
Parameters
| Parameter | Type | Description |
|---|---|---|
input | unknown | The object to verify |
constructorType? | ObjectConstructor | The type of the constructor of the object. Use this if you want a class of your choosing to pass the check as well. |
Returns
input is object
Defined in
isObject(input, constructorType)
isObject<
T>(input:unknown,constructorType:T):input is InstanceType<T>
Type Parameters
| Type Parameter |
|---|
T extends Constructor<unknown> |
Parameters
| Parameter | Type |
|---|---|
input | unknown |
constructorType | T |
Returns
input is InstanceType<T>