Hyperlinkv0.8.0-beta.28

SchemaRepresentation

SchemaRepresentation.Revivertypeeffect/SchemaRepresentation.ts:1737
(declaration: Declaration, recur: (representation: Representation) => T):
  | T
  | undefined

A callback that handles Declaration nodes during reconstruction (toSchema) or code generation (toCodeDocument).

Details

Return a value to handle the declaration. Return undefined to fall back to default behavior, which uses encodedSchema for toSchema or the generation annotation for toCodeDocument. recur processes child representations recursively.

export type Reviver<T> = (declaration: Declaration, recur: (representation: Representation) => T) => T | undefined
Referenced by 3 symbols