Which component is affected?
Types
Describe the bug
With
const signal1 = useSignal("signal1") as ReadonlySignal<string>;
const signal2 = useSignal("signal2");
useTask$(({ track }) => {
const tracked = track(signal1);
signal2.value = tracked;
});
type of tracked will be ReadonlySignal<string> instead of string. With a Signal<string>, the type of tracked is properly infered as string.
Reproduction
https://qwikdev-build-v2.qwik-8nx.pages.dev/playground/#f=Q0o0pmZm8IgCyiMSgA6QFwS0KD8vpxJSDYNE4HUylAMu73S4oNGhhNpwUQIGCJ4UBjQBETQgq8HtArDphsBgg1uloQQVVNIElilojrKBNDGAiRHdDCNsZhgpAUMApBLeBtCohtbotUhugZkElgHWnLYQlgbUIVAzFGA26QGLBWCBD1WVmgKRBuUOMAMl2pEiHtoyy1T4MH9iN6JBht58AwHnxDz1EgVwNVcCagykKpRnJJYoVOaXQlo1kMoIFPqKSLpskooQiQEEPIDRDmqnpQCDTA9hGawFCAHVKL6qhacliAqw32t1uHBmfUNLpMYtKVkfJe2MZnxaZHwA
Steps to reproduce
No response
System Info
Additional Information
No response
Which component is affected?
Types
Describe the bug
With
type of
trackedwill beReadonlySignal<string>instead ofstring. With aSignal<string>, the type oftrackedis properly infered asstring.Reproduction
https://qwikdev-build-v2.qwik-8nx.pages.dev/playground/#f=Q0o0pmZm8IgCyiMSgA6QFwS0KD8vpxJSDYNE4HUylAMu73S4oNGhhNpwUQIGCJ4UBjQBETQgq8HtArDphsBgg1uloQQVVNIElilojrKBNDGAiRHdDCNsZhgpAUMApBLeBtCohtbotUhugZkElgHWnLYQlgbUIVAzFGA26QGLBWCBD1WVmgKRBuUOMAMl2pEiHtoyy1T4MH9iN6JBht58AwHnxDz1EgVwNVcCagykKpRnJJYoVOaXQlo1kMoIFPqKSLpskooQiQEEPIDRDmqnpQCDTA9hGawFCAHVKL6qhacliAqw32t1uHBmfUNLpMYtKVkfJe2MZnxaZHwA
Steps to reproduce
No response
System Info
Additional Information
No response