From e7e7e2e99b315ccf3be1c4473facccd0c463ee88 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Sat, 18 Apr 2026 17:47:42 -0400 Subject: [PATCH] docs: #232 document signals typescript support --- docs/pages/docs.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/pages/docs.md b/docs/pages/docs.md index d239bf8..f9a29d1 100644 --- a/docs/pages/docs.md +++ b/docs/pages/docs.md @@ -620,6 +620,8 @@ So taking the above counter example, enable the inferred observability behavior +#### Signals Support + It is required to setup `Signal` as a global in the browser, and add import maps for the polyfill and WCC's `effect` function in the `` of your HTML page(s): @@ -646,7 +648,26 @@ It is required to setup `Signal` as a global in the browser, and add import maps -Some notes / limitations: +For TypeScript support, you'll need to expose the Signal type-definition globally: + + + + + + ```ts + // alias Signal to avoid name conflicts with the global Signal type + import { Signal as SignalInterface } from "signal-polyfill"; + + declare global { + const Signal: typeof SignalInterface; + } + ``` + + + + + +#### Limitations - Reactivity is [only supported at one depth of the JSX tree](https://github.com/ProjectEvergreen/wcc/issues/256) - Please be aware of the above linked discussion and issue filter which is tracking any known bugs / feature requests / open items related to all things WCC + JSX.