noggin

bindNogginVerbs

Attach bound verb methods (push, add, move, ...) onto a noggin instance. Providers call this in their constructors so consumers can use the ergonomic noggin.push(opts) form without an explicit adapter.

function bindNogginVerbs<T>(noggin: T): T & Noggin;

Attach bound verb methods (push, add, move, ...) onto a noggin instance, returning it with the wider Noggin surface added. Each method forwards to the matching verbs.*(noggin, opts) free function with the noggin pre-bound.

The input only needs to satisfy the parts the verbs use at runtime — accessors + apply(ops) (i.e. the non-verb parts of NogginStore). Providers call this in their constructors so consumers can use the convenient noggin.push(opts) form without an explicit adapter. Idempotent — methods are own-properties, so re-attaching is safe.

Type Parameters

Type Parameter
T

Parameters

ParameterType
nogginT

Returns

T & Noggin