Serializable TypeAlias
Used to constrain a type 'T' to types that Fluid can intrinsically serialize. Produces a compile-time error if T contains non-serializable members.
This API is provided for existing users, but is not recommended for new users.
To use, import via @fluidframework/datastore-definitions/legacy.
For more information about our API support guarantees, see here.
Signature
export type Serializable<T> = Jsonable<T, IFluidHandle>;
Type Parameters
| Parameter | Description |
|---|---|
| T |
Remarks
See Jsonable for caveats regarding serialization of undefined, non-finite numbers, and circular references.
Important: T extends Serializable<T> is generally incorrect. (Any value of T extends the serializable subset of itself.)
Example
Typical usage
function serialize<T>(value: Serializable<T>) { ... }