You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going through the tutorial on /learn and getting to step 5
This happened:
errors in the inflight call due to it expecting a json input and the example providing a string input
`error: Expected type to be "inflight (event: Json?): Json?", but got "inflight (s: str?): unknown" instead
--> wing/main.w:5:20
|
5 | new cloud.Function(inflight (s: str?) => {
| /--------------------^
6 | | log("Function was called with '{s!}'");
7 | | // (type 'q.' to see the available methods)
8 | | });
| -^
`
I expected this:
I expected the example code to work as is
Is there a workaround?
if I change inflight to expect json instead I can move forward but that has a chain effect with all the future examples as 1 they still provide str instead of json and 2 things like queue push are expecting str instead of json. I can continue working around it by converting things to and from json and string but it's not very friendly for someone new trying to learn.
Anything else?
No response
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes
Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.
The text was updated successfully, but these errors were encountered:
I tried this:
Going through the tutorial on /learn and getting to step 5
This happened:
errors in the inflight call due to it expecting a json input and the example providing a string input
`error: Expected type to be "inflight (event: Json?): Json?", but got "inflight (s: str?): unknown" instead
--> wing/main.w:5:20
|
5 | new cloud.Function(inflight (s: str?) => {
| /--------------------^
6 | | log("Function was called with '{s!}'");
7 | | // (type 'q.' to see the available methods)
8 | | });
| -^
`
I expected this:
I expected the example code to work as is
Is there a workaround?
if I change inflight to expect json instead I can move forward but that has a chain effect with all the future examples as 1 they still provide str instead of json and 2 things like queue push are expecting str instead of json. I can continue working around it by converting things to and from json and string but it's not very friendly for someone new trying to learn.
Anything else?
No response
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Community Notes
The text was updated successfully, but these errors were encountered: