assignPrototypeAPIs
function assignPrototypeAPIs<TFeatures, TData, TDeps, TDepArgs>(
feature,
prototype,
table,
apis): void;Defined in: utils.ts:584
Assigns API methods to a prototype object for memory-efficient method sharing. All instances created with this prototype will share the same method references.
For memoized methods, the memo state is lazily created and stored on each instance. This provides the best of both worlds: shared method code + per-instance caching.
Type Parameters
TFeatures
TFeatures extends TableFeatures
TData
TData extends RowData
TDeps
TDeps extends readonly any[]
TDepArgs
TDepArgs
Parameters
feature
keyof TFeatures & string
prototype
Record<string, any>
table
Table_Internal<TFeatures, TData>
apis
PrototypeAPIObject<TDeps, NoInfer<TDepArgs>>
Returns
void