Skip to content

are custom (function) types possible? #529

Discussion options

You must be logged in to vote

Would the following work?

const T = Type.Unsafe<{x: 1, y: 2}>(Type.Any()) // a TAny type that infers as { x: 1, y: 2 }

Value.Check(T, 1)                               // true
Value.Check(T, false)                           // true
Value.Check(T, () => true)                      // true

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@samuelstroschein
Comment options

@sinclairzx81
Comment options

@samuelstroschein
Comment options

@sinclairzx81
Comment options

Answer selected by samuelstroschein
@samuelstroschein
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants