Skip to content
module@warp-drive/legacy/compat @legacy

Function serializerFor() ​

ts
function serializerFor(this: Store$1, modelName: string): 
  | MinimumSerializerInterface
  | null;

Defined in: warp-drive-packages/legacy/src/compat.ts:209

Returns an instance of the serializer for a given type. For example, serializerFor('person') will return an instance of App.PersonSerializer.

If no App.PersonSerializer is found, this method will look for an App.ApplicationSerializer (the default serializer for your entire application).

If a serializer cannot be found on the adapter, it will fall back to an instance of JSONSerializer.

Parameters ​

this ​

Store$1

modelName ​

string

the record to serialize

Returns ​

| MinimumSerializerInterface | null

Released under the MIT License.