universal-ember / reactiveweb

Reactive primitives for the web
https://reactive.nullvoxpopuli.com
MIT License
11 stars 5 forks source link

trackedFunction return types seem wonky. #103

Closed RobbieTheWagner closed 1 month ago

RobbieTheWagner commented 5 months ago

It seems to think it returns {} and does not factor in isLoading etc, so glint cannot find those State props.

NullVoxPopuli commented 5 months ago

Any chance you can repro in https://tsplay.dev/ ?

NullVoxPopuli commented 5 months ago

I came up with this, and it seems like it works as expected:

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzjKBDAxgawKYBMBiArgHbozATEA0yAnmNnAMoyoyMC+cAZlBCHADkUbBnIA3bAHdsAIwD03EmQrFBAbgBQoSLERxsADwZkAKvWwB5bnC69+QoyZgBaGBY2bNT6PCWlySjh8CAgACmBcAC44YkIQWWwoAEpETQBIERhCKGJkNCw8IgDVMNQAZ1pSODDUgF4APjT09NQpVGB4AAYtFqycvKRI216OZK0OLydsMwtrAB4AJWxs3PMGefcGCBsQiAaG2oA6GAgAUQBHQlQAG3WrbnmWNmx5gAU+EGBy16Ho2PiiSgtgOh3G3mMMxg9wWy1WxHumwsO2CoQaAG1BN8ADIQVC4YDEADmggAumCTucrrcYY9ZKEbqJiGCtEA

maybe you could modify it to be closer to your use case?

NullVoxPopuli commented 1 month ago

Gonna close -- please lemme know if there is still an issue, and we can re-open!