No error when closure doesn't return a value
eladb opened this issue · 1 comments
eladb commented
I tried this
bring cloud;
resource WebHook {
api: cloud.Api;
init() {
this.api = new cloud.Api();
this.api.post("/", inflight (req: cloud.ApiRequest): cloud.ApiResponse => {
log(Json.stringify(req));
});
}
}
I expected this:
A compiler error that tells me that the inflight closure must return a value of type cloud.ApiResponse
Instead, this happened
No error
Is there a workaround?
N/A
Component
Compiler
Wing Version
No response
Wing Console Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
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.
staycoolcall911 commented
This seems to be a duplicate of #457