Skip to content

[@lit-labs/signals] export SignalWatcherApi type #5192

Description

@malobre

Which package(s) are affected?

Other/unknown (please mention in description)

Description

@lit-labs/[email protected]

When extending SignalWatcher, typescripts throws an error because SignalWatcherApi isn't exported:

error TS4020: 'extends' clause of exported class 'MyElement' has or is using private name 'SignalWatcherApi'.

Reproduction

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbwDLBgUQDYFMRYHYwC+cAZlBCHAOQapUDcAUKJLIgMrADmeAhhgHVeMAMYALLFGJkKcAEQABWjAC0GXgCMAzgHot3Phi1ymjLAA9W8Eeq1a4ncNgDiULFhjA8XOBZj4AE3tOHn4hUQkoAAoUdGxcAgBKREIgA

Workaround

I have not found a workaround

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

Failing in @lit-labs/[email protected], interface did not exist before

Browser/OS/Node environment

node 25.2.1
npm 11.6.4
tsc 5.9.3
linux 6.17.9

Activity

  1. added theissue type on Dec 24, 2025
  2. sorvell commented on Dec 25, 2025

    @sorvell
    Member

    We aren't seeing this issue in the tests, and I think the reason may be that our tsconfig is using "target": "es2021", "module": "NodeNext",.

    If that works, perhaps it's a workaround until this is fixed.

  3. malobre commented on Dec 25, 2025

    @malobre
    ContributorAuthor

    Tried the options you suggested, unfortunately it doesn't seem to make a difference.

  4. aomarks commented on Jan 30, 2026

    @aomarks
    Contributor

    ✋ I am also seeing this error with target = es2021 or es2022, and module = nodenext after upgrading from 0.1.3 to 0.2.0

    tsc logs: https://github.com/breadboard-ai/breadboard/actions/runs/21518216974/job/62001970794?pr=7635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions