minca
ApiSchemasNamespacesfragmentsFunctions

Function: typed()

function typed<T>(): <C>(definition) => C & Typed<T>;

Defined in: packages/core/src/schemas/fragments.ts:18

A definition that also carries its records' type, so querying or writing with it is typed — include: { votes: { rel: 'about', from: vote } } gives votes as Vote. The schemas here are plain JSON Schema, so the type is said alongside rather than worked out.

Type Parameters

Type Parameter
T

Returns

<C>(definition) => C & Typed<T>

On this page