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

[cli] Add a type helper to rules #557

Merged
merged 3 commits into from
Nov 27, 2024
Merged

[cli] Add a type helper to rules #557

merged 3 commits into from
Nov 27, 2024

Conversation

stopachka
Copy link
Contributor

Previously, rules had no type information. This made it a bit annoying to write it out, because you would get no intellisense.

I made an InstantRules type, which helps with autocomplete when writing out the rules.

CleanShot 2024-11-26 at 15 51 39@2x

@dwwoelfel @nezaj

@stopachka stopachka changed the base branch from main to rules-imp November 26, 2024 23:52
Copy link
Contributor

@dwwoelfel dwwoelfel left a comment

Choose a reason for hiding this comment

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

Nice! Does this also work on the dashboard?

Copy link

View Vercel preview at instant-www-js-InstantRulesType-jsv.vercel.app.

Base automatically changed from rules-imp to main November 27, 2024 00:39
@stopachka
Copy link
Contributor Author

stopachka commented Nov 27, 2024

re: dashboard

CleanShot 2024-11-26 at 16 42 25@2x

We still use a .json editor for the rules, so we can't quite use the typescript type. However, we actually use a monaco schema , to give the same kind of intellisense:

@stopachka stopachka merged commit 189027f into main Nov 27, 2024
26 checks passed
@stopachka stopachka deleted the InstantRulesType branch November 27, 2024 00:44
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