I want to be able to define a sim.Resource without a stopping method:
let resource = new sim.Resource(inflight (ctx) => {
log("initializing...");
ctx.resolveToken("foo", "bar");
});
let foo = resource.createToken("foo");
Proposed Solution
The factory closure that sim.Resource should not require a return value. If none is provided, then it should behave as if there's simply no onStop method.
Implementation Notes
No response
Component
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.
If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
Use Case
I want to be able to define a
sim.Resource
without a stopping method:Proposed Solution
The factory closure that
sim.Resource
should not require a return value. If none is provided, then it should behave as if there's simply noonStop
method.Implementation Notes
No response
Component
No response
Community Notes