Interface LegacyStoreCompat
Defined in: warp-drive-packages/legacy/src/compat.ts:31
No Inherit Doc Legacy
Extends the signature of Store with additional methods available when using the legacy network layer.
Extends
Store
Indexable
[key: string]: anyMethods
adapterFor()
Call Signature
adapterFor(this, modelName): MinimumAdapterInterface;Defined in: warp-drive-packages/legacy/src/compat.ts:41
Returns the adapter instance for the given model type, instantiating it (and caching the instance) if necessary. See adapterFor.
Parameters
this
Store
modelName
string
Returns
Call Signature
adapterFor(
this,
modelName,
_allowMissing): MinimumAdapterInterface | undefined;Defined in: warp-drive-packages/legacy/src/compat.ts:47
Same as the single-argument overload, but returns undefined instead of throwing/asserting when _allowMissing is true and no adapter is found.
Parameters
this
Store
modelName
string
_allowMissing
true
Returns
MinimumAdapterInterface | undefined
normalize()
normalize(modelName, payload): ObjectValue;Defined in: warp-drive-packages/legacy/src/compat.ts:59
Normalizes a payload for the given model type using its serializer. See normalize.
Parameters
modelName
string
payload
Returns
pushPayload()
pushPayload(modelName, payload): void;Defined in: warp-drive-packages/legacy/src/compat.ts:65
Pushes a payload into the store using the appropriate serializer to normalize it first. See pushPayload.
Parameters
modelName
string
payload
Returns
void
serializeRecord()
serializeRecord(record, options?): unknown;Defined in: warp-drive-packages/legacy/src/compat.ts:70
Serializes a record using its serializer. See serializeRecord.
Parameters
record
unknown
options?
Returns
unknown
serializerFor()
serializerFor<K>(modelName, _allowMissing?): MinimumSerializerInterface | null;Defined in: warp-drive-packages/legacy/src/compat.ts:53
Returns the serializer instance for the given model type, instantiating it (and caching the instance) if necessary. See serializerFor.
Type Parameters
K
K extends string
Parameters
modelName
K
_allowMissing?
boolean
Returns
MinimumSerializerInterface | null