-
Notifications
You must be signed in to change notification settings - Fork 70
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
Expand documentation on exporting Spicy types #252
Conversation
8e63eef
to
fc46532
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now!
export SPICY_ID [with { [SIPCY_FIELD_NAME [&log], ]... }]; | ||
export SPICY_ID [as ZEEK_ID [ with { [SIPCY_FIELD_NAME [&log], ]...] }]; | ||
export SPICY_ID [without { [SIPCY_FIELD_NAME, ]... }]; | ||
export SPICY_ID [as ZEEK_ID [ without { [SIPCY_FIELD_NAME, ]...] }]; | ||
export SPICY_ID &log; | ||
export SPICY_ID as ZEEK_ID &log; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd still try to compress this into a single line but may be matter of taste.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I initially tried, but it always overflowed the box in the rendered pages so it required horizontal scrolling, and also required a lot of nesting. I was unsure whether adding line breaks for readability would be confusing to readers. The full expression was
export SPICY_ID [&log | with { [SPICY_FIELD_NAME [&log], ]...} | without { [SPICY_FIELD_NAME, ]... } | as ZEEK_ID [&log | { [SPICY_FIELD_NAME [&log], ]...} | without { [SPICY_FIELD_NAME, ]...}]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd still try to compress this into a single line but may be matter of taste.
How about this:
export SPICY_ID [as ZEEK_ID] [with/without { SPICY_FIELD_NAME [&log], ...}] [&log]
The field &log
isn't 100% correct (doesn't apply to without
), but seems good enough?
No description provided.