Public function

Signature
function createShapeValidator<
  Type extends string,
  Props extends JsonObject,
  Meta extends JsonObject,
>(
  type: Type,
  props?: {
    [K in keyof Props]: T.Validatable<Props[K]>
  },
  meta?: {
    [K in keyof Meta]: T.Validatable<Meta[K]>
  }
): T.ObjectValidator<TLBaseShape<Type, Props>>
Parameters
NameDescription

type

Type

props

{
  [K in keyof Props]: T.Validatable<Props[K]>
}

meta

{
  [K in keyof Meta]: T.Validatable<Meta[K]>
}
Returns
T.ObjectValidator<TLBaseShape<Type, Props>>
References

T.ObjectValidator, TLBaseShape

Source

packages/tlschema/src/shapes/TLBaseShape.ts

createShapeIdcreateTLSchema