Closed MichalBryxi closed 2 months ago
One more note that might be important: With the signatures above, the use of the propert is also complicated. TS hints that:
<Refresher as |r|>
{{log r.current.percentage.current}}
</Refresher>
is incorrect because:
But the .current
is IMO correct. The code above holds the correct value I'd expect, for the .percentage
property.
Some questions:
{{yield Clock}}
(is this sample code simplifying a bigger problem?)As I look in to this, of note, you may find the @use
decorator better for classes and yielding, as the use
function does return a Reactive
, and I was confused when responding on my phone in Discord.
I've made a PR for fixes here: #1129 -- questions and review would be most appreciated!
Yes, I cut out non-interesting parts. The clock itself needed access to a service, so I believe it needs to live inside a component?
Assuming following code:
The line
clock = use(this, Clock);
reports following error:And line
<template>{{yield this.clock}}</template>
reports following error: