Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for generating regexes #57

Merged
merged 2 commits into from
Jul 14, 2022
Merged

Add support for generating regexes #57

merged 2 commits into from
Jul 14, 2022

Conversation

sdboyer
Copy link
Contributor

@sdboyer sdboyer commented Jul 12, 2022

We don't currently support CUE regex kinds. There's no corresponding support on the TypeScript side (proposal here microsoft/TypeScript#41160), so this simple fix just lets us fall back to strings.

TODO some tests

@sdboyer sdboyer merged commit 964848c into main Jul 14, 2022
@sdboyer sdboyer deleted the regex branch July 14, 2022 16:38
@sdboyer
Copy link
Contributor Author

sdboyer commented Jul 14, 2022

Tests are done!

When doing #50, it'll probably be worth generating a comment on a regex type that indicates the regex constraint. Eventually, maybe even another type, analogous to how the default gets generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant