Codegen w/ regex pattern #673
-
Hello, Wanting to use codegen to create string type confirming to regex pattern, like so:
Output results in:
No luck escaping. Any ideas?
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@rolanday Hi, This should be fixed on both the workbench and the /**
* @pattern '^[a-z0-9]{16}$'
*/
export type Cuid = string; Cheers! |
Beta Was this translation helpful? Give feedback.
-
Thank you so much!! :-) Works like a charm now. |
Beta Was this translation helpful? Give feedback.
@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
Cheers!
S