Interface: Family()<TInput, TNode>
Defined in: packages/core/src/family.ts:99
The callable a family returns: call it to get (or reuse) a member.
Callable + namespaced, like the provider factories (openai, anthropic).
Type Parameters
TInput
TInput
TNode
TNode
Family(
input):TNode
Defined in: packages/core/src/family.ts:100
The callable a family returns: call it to get (or reuse) a member.
Callable + namespaced, like the provider factories (openai, anthropic).
Parameters
input
TInput
Returns
TNode
Properties
familyId
readonlyfamilyId:string
Defined in: packages/core/src/family.ts:102
The stable id the registry and family-wide overrides key on.
Methods
clear()
clear():
void
Defined in: packages/core/src/family.ts:123
Drop all memoized members. The next call rebuilds.
Returns
void
keys()
keys():
string[]
Defined in: packages/core/src/family.ts:112
Member keys built so far, oldest first — i.e. in the order max would
evict them.
That is insertion order for an unbounded family, and least-recently-used
order once max is set, because a hit on a bounded family re-inserts to
keep recency honest. Stated as eviction order rather than either of those
so one description stays true both ways.
Returns
string[]
peek()
peek(
input):TNode|undefined
Defined in: packages/core/src/family.ts:121
The already-built member for this input, or undefined.
Total by construction: it never builds, and it never throws — an input the key derivation refuses is simply not present, which is the honest answer to "do you have this one?". The one method whose job is to be safe to call has to actually be safe to call.
Parameters
input
TInput
Returns
TNode | undefined