Open thejackshelton opened 3 months ago
Qwik Runtime
useComputed$ used to have a read-only type. As a result, TypeScript would properly tell the consumers in the IDE that they are modifying something that is read-only.
This has led to bugs from new contributors in Qwik UI
https://qwik.dev/playground/#f=Q0o0JqbG2BKNDkoKBvMgdTGYCS7lKE5XkEBKBJoLDCS4BRqGQDfCJJPQJY2QJJPhkoisBjEdZKYeMKsCC2FtsBkQjiYXUC%2B88kc4REEBWDuVgIqjYmCFCSzxQc7NAVenwDYKsITydHHVUUhKTU4EagaWpMBiFBiViSm6%2BXk5lXpARcUlQJ5CeSqoJAVWsArBwUEKwAI5v0gPZroriGel4JyYlwdME7ml4IonMxfEANYa0MoArBjkK6jbbRVMQb6tBbsbkQurEUpqR%2FPhUM6HAA
1) Create a signal from a useComputed$ hook. 2) Modify that signal
N/A
No response
I can try this one
In this case. TS has already hinted. @thejackshelton Could you tell me what you expect ?
@JerryWu1234 strange, in the playground it doesn't error
Which component is affected?
Qwik Runtime
Describe the bug
useComputed$ used to have a read-only type. As a result, TypeScript would properly tell the consumers in the IDE that they are modifying something that is read-only.
This has led to bugs from new contributors in Qwik UI
Reproduction
https://qwik.dev/playground/#f=Q0o0JqbG2BKNDkoKBvMgdTGYCS7lKE5XkEBKBJoLDCS4BRqGQDfCJJPQJY2QJJPhkoisBjEdZKYeMKsCC2FtsBkQjiYXUC%2B88kc4REEBWDuVgIqjYmCFCSzxQc7NAVenwDYKsITydHHVUUhKTU4EagaWpMBiFBiViSm6%2BXk5lXpARcUlQJ5CeSqoJAVWsArBwUEKwAI5v0gPZroriGel4JyYlwdME7ml4IonMxfEANYa0MoArBjkK6jbbRVMQb6tBbsbkQurEUpqR%2FPhUM6HAA
Steps to reproduce
1) Create a signal from a useComputed$ hook. 2) Modify that signal
System Info
Additional Information
No response