Options
All
  • Public
  • Public/Protected
  • All
Menu

jtdc

Index

Type aliases

JtdNode

Type parameters

  • M

Variables

Const jtdDialectOptions

jtdDialectOptions: Required<IJtdcDialectOptions<any>> = ...

Global default options used by createJtdDialect.

Const jtdTsPrimitiveTypeMap

jtdTsPrimitiveTypeMap: Record<string, string> = ...

Mapping from the JTD standard data types to TypeScript primitive types.

Const tsTypesCompilerOptions

tsTypesCompilerOptions: Required<ITsTypesCompilerOptions<any>> = ...

Global default options used by compileTsTypes.

Const validatorCompilerOptions

validatorCompilerOptions: Required<IValidatorCompilerOptions<any, any>> = ...

Functions

compileTsModules

compileTsTypes

compileValidators

createJtdDialect

dialectFactory

parseJtd

parseJtdDefinitions

  • parseJtdDefinitions<M>(jtdDefinitions: Record<string, IJtd<M>>): Record<string, JtdNode<M>>
  • Converts JTD dependencies to a map of nodes where key is ref and value is a parsed node.

    Type parameters

    • M

    Parameters

    • jtdDefinitions: Record<string, IJtd<M>>

      The dictionary of ref-JTD pairs.

    Returns Record<string, JtdNode<M>>

    The map from ref to a parsed node.

parseJtdRoot

  • parseJtdRoot<M>(ref: string, jtdRoot: IJtdRoot<M>): Record<string, JtdNode<M>>
  • Converts JTD and its dependencies to a map of nodes where key is ref and value is a parsed node.

    Type parameters

    • M

    Parameters

    • ref: string

      The ref of the root JTD.

    • jtdRoot: IJtdRoot<M>

      The JTD to parse.

    Returns Record<string, JtdNode<M>>

    The map from ref to a parsed node.

visitJtdNode

Generated using TypeDoc