Skip to content

PoolableEntity

PoolableEntity = Entity & object

Defined in: EntityPool.ts:15

An entity class a pool can hand out: it declares its own onAcquire.

The base Entity.onAcquire is optional, and an optional method does not satisfy a required one — so a class that never declares the hook fails this constraint at the EntityPool constructor instead of silently skipping its per-reuse reset. A member that needs no reset states that with an empty onAcquire() {}.

onAcquire(…args): void

never[]

void