Search


Search something to see results

instanceOf

Type Parameters

  • T
  • Input = unknown

Parameters

  • constructor: Object

Returns Schema<T, Input>

import * as x from 'unhoax'

const schema = x.instanceOf(Date)

class User {}

x.instanceOf(User).parse(new User()) // succeeds