Skip to content

Commit

Permalink
add untrackedValue setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Varixo committed Aug 22, 2024
1 parent d10846b commit 2417c15
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/qwik/src/core/v2/signal/v2-signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ export class Signal2<T = any> extends Subscriber implements ISignal2<T> {
return this.$untrackedValue$;
}

// TODO: should we disallow setting the value directly?
set untrackedValue(value: T) {
this.$untrackedValue$ = value;
}

get value() {
const ctx = tryGetInvokeContext();
if (ctx) {
Expand Down

0 comments on commit 2417c15

Please sign in to comment.