Skip to content
Discussion options

You must be logged in to vote

@sleewoo Hi!

Suddenly Options refinements stopped working in Type.Script after updating to 1.3.x. Is the with keyword the new official way to add JSON schema refinements inside Type.Script?

Yes, sorry about the change, I was a bit uneasy about making it. However the new with keyword syntax does replace Options and will be the final syntax moving forward.

// --------------------------------------------------------------------
// 1.0
// --------------------------------------------------------------------
const T = Type.Options(Type.String(), { format: 'email' })     // Type.*
const S = Type.Script(`Options<string, { format: 'email' }>`)  // Script

// -------------------------------------…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sleewoo
Comment options

You must be logged in to vote
0 replies
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