-
Notifications
You must be signed in to change notification settings - Fork 35
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
List of ASCII symbols in cheatsheet #1653
Conversation
civet.dev/cheatsheet.md
Outdated
| Symbol | Meanings | | ||
|--------|----------| | ||
| space | Function call | | ||
| `?` | Non-null test `x?`; non-null access `x?.y`, `x?y`, `x?(...)`, `x?[...]`; null coalescing `x ?? y` (`x ? y` with `coffeeBinaryExistential`); TypeScript optionals `(x?: number) => x`; if/then/else ternary `x ? y : z` | |
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.
Optional types number?
, number??
, optional declarations let x?: number
, optional check if x? := foo()
As an aside, let x?
with no type annotation is currently left alone during compilation.
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 wonder what let x?
should mean. I think most intuitively it would say "allow x
to be unassigned on first access" but I'm not sure this is possible in TypeScript. Perhaps a helpful error message for now.
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.
Awesome, I’ve always wanted something like this! Eventually we can also add a search/filter box so we can type in a symbol and see what it could be.
This started as an exercise to see which symbols we use the least (e.g.
~
). But I think it could be helpful also as:#
mean here?)I'm open to better ideas of where to put it, though. Also let me know if I missed some!