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

⚙️ Allow min/max/number on template types #774

Merged
merged 2 commits into from
Nov 23, 2023
Merged

Conversation

rowanc1
Copy link
Collaborator

@rowanc1 rowanc1 commented Nov 22, 2023

This adds the min/max/integer options to the template defs, for example in #773 we need an integer number with bounds.

Copy link
Collaborator

@fwkoch fwkoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so these are already supported on the actual option validation side - https://github.com/executablebooks/mystmd/blob/main/packages/myst-templates/src/validators.ts#L83 - they just were never added to the template option validation. 🤔

Looks good - there are a few more simple tests we could add if we want coverage of all the error cases introduced here... but those aren't a huge deal.

packages/myst-templates/src/validators.ts Show resolved Hide resolved
packages/myst-templates/src/validators.ts Show resolved Hide resolved
packages/myst-templates/src/validators.ts Show resolved Hide resolved
@rowanc1 rowanc1 merged commit a63bc6a into main Nov 23, 2023
4 checks passed
@rowanc1 rowanc1 deleted the feat/min-max-integer branch November 23, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants