node-dextrin - v0.1.0
    Preparing search index...

    Function compile

    • Compiles every entry of a decoded .dxns document into baseRegistry — a struct schema for each %schema{} entry, a named type_expr for every other entry. predicates resolves refine-fn: names — a plain object, not the struct registry itself, since a refine-fn is a validity check, not a decoder.

      Named types defined in this document may reference any type already known to baseRegistry (from an earlier compile call), but not one declared alongside them in the same document — .dxns's own map type has no ordering guarantee to resolve forward references against. A schema's fields, compiled afterwards, can freely use any named type from either source.

      Parameters

      • schemaDoc: unknown

        a decoded .dxns document (see decode).

      • baseRegistry: export=
      • Optionalpredicates: { [name: string]: RefineFn } = {}

      Returns export=