INNER CODE UNIT · TypeScript

GNumber

stepci/garph · src/index.ts:287

class GNumber<T extends GarphType> extends Type<number, T> {
  constructor(type: 'Int' | 'Float' = 'Int') {
    super()
    this.typeDef = {
      type
    }
  }

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

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

  list() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…