INNER CODE UNIT · TypeScript

GOmitResolver

stepci/garph · src/index.ts:559

class GOmitResolver<T extends AnyType> extends Type<T, 'OmitResolver'> {
  constructor(shape: T) {
    super()
    this.typeDef = shape.typeDef
  }

  optional() {
    return new GOptional<this>(this)
  }

  required() {
    this.typeDef.isRequired = true
    return this
  }

  default(value: InferRaw<T>) {
    this.typeDef.defaultValue = value
    return this

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…