Skip to main content

JsonCompatible TypeAlias

Use for Json compatible data.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/tree/alpha.

For more information about our API support guarantees, see here.

Signature

export type JsonCompatible<TExtra = never> = string | number | boolean | null | JsonCompatible<TExtra>[] | JsonCompatibleObject<TExtra> | TExtra;

Type Parameters

Parameter Default Description
TExtra never Type permitted in addition to the normal JSON types. Commonly used for to allow @fluidframework/core-interfaces#IFluidHandle within the otherwise JSON compatible content.

Remarks

This does not robustly forbid non json comparable data via type checking, but instead mostly restricts access to it.