From 2417c158ce2b284bc54fc5ea40b8a841bbae73fa Mon Sep 17 00:00:00 2001 From: Varixo Date: Thu, 22 Aug 2024 09:50:09 +0200 Subject: [PATCH] add untrackedValue setter --- packages/qwik/src/core/v2/signal/v2-signal.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/qwik/src/core/v2/signal/v2-signal.ts b/packages/qwik/src/core/v2/signal/v2-signal.ts index 8596c988823..9f28ace94b4 100644 --- a/packages/qwik/src/core/v2/signal/v2-signal.ts +++ b/packages/qwik/src/core/v2/signal/v2-signal.ts @@ -161,6 +161,11 @@ export class Signal2 extends Subscriber implements ISignal2 { 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) {