code: function partial(schema, defaults, options) {
    if (kindOf(schema) !== 'object') {
      if (process.env.NODE_ENV !== 'production') {
        throw new Error(
          `Partial structs must be defined as an object, but you passed: ${schema}`
        )
      } else {
        throw new Error(`Invalid schema: ${schema}`)
      }
    }
  
    const obj = scalar('object', undefined, options)
    const ks = []
    const properties = {}
  
    for (const key in schema) {
      ks.push(key)
      const s = schema[key]
      const kind = any(s, undefined, options)
      properties[key] = kind
    }
  
    const name = 'partial'
    const type = `{${ks.join()},...}`
    const validate = (value = resolveDefaults(defaults)) => {
      const [error] = obj.validate(value)
  
      if (error) {
        error.type = type
        return [error]
      }
  
      const errors = []
      const ret = {}
  
      for (const key in properties) {
        let v = value[key]
        const kind = properties[key]
  
        if (v === undefined) {
          const d = defaults && defaults[key]
          v = resolveDefaults(d, value)
        }
  
        const [e, r] = kind.validate(v, value)
  
        if (e) {
          const allE = e.errors || [e]
          allE.forEach(singleE => {
            singleE.path = [key].concat(singleE.path)
            singleE.data = value
            errors.push(singleE)
          })
          continue
        }
  
        if (key in value || r !== undefined) {
          ret[key] = r
        }
      }
  
      if (errors.length) {
        const first = errors[0]
        first.errors = errors
        return [first]
      }
  
      return [undefined, ret]
    }
  
    return new Kind(name, type, validate)
  }
docs: Partial.
  
  @param {Object} schema
  @param {Object} defaults
  @param {Object} options