-
Notifications
You must be signed in to change notification settings - Fork 15
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
Named parameters #141
Named parameters #141
Conversation
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.
Looking good! Got a few initial questions
|
||
### `rets` | ||
|
||
This field determines the data that is sent back to the client from the server. It can be any [Zap type](./types.md). | ||
|
||
- If the server doesn't return any data, the `rets` field should be excluded. | ||
- Unlike `args`, `rets` cannot be named. |
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.
Maybe we need a better error (sorry) then
error[2002]: expected ")", ",", "?", "["
┌─ net.zap:4:16
│
4 │ rets: (test: enum { Success, Fail }, bar: string)
│ ^ unexpected token
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.
Other than the comment above - LGTM
Improved error for named rets: error[3016]: rets cannot be named
┌─ net.zap:88:12
│
88 │ rets: (foo: f64, boolean),
│ ^^^ must be removed |
Thank you! |
TODO: