Skip to content

Codegen w/ regex pattern #673

Closed Answered by sinclairzx81
rolanday asked this question in Q&A
Discussion options

You must be logged in to vote

@rolanday Hi,

This should be fixed on both the workbench and the typebox-codegen project. Note: You will need to quote the pattern as the - character terminates the string (where the jsdoc parser assumes a comment will follow)

Workbench Link Here

/**
 * @pattern '^[a-z0-9]{16}$'
 */
export type Cuid = string;

Cheers!
S

Replies: 3 comments

Comment options

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

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