Skip to main content

instanceOf

@quik/entity


@quik/entity / EntityStore / instanceOf

Function: instanceOf()

instanceOf<TEntity>(entity, constructor): boolean

Defined in: entity/src/store.ts:301

Checks if a given object is an instance of the given Entity.

Type Parameters

TEntity

TEntity extends QEntity

Parameters

entity

any

The entity to be checked.

constructor

string | Constructor<TEntity>

The constructor/name of the entity which we want to check.

Returns

boolean