feat(agera,intl,kida,nanoviews,query,router,svelte-kit): rename ValueOrAccessor to Signalish - #210
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #210 +/- ##
=======================================
Coverage 85.33% 85.33%
=======================================
Files 139 139
Lines 3143 3143
Branches 591 591
=======================================
Hits 2682 2682
Misses 332 332
Partials 129 129 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…eOrAccessor` to `Signalish` `ValueOrAccessor` is the most repeated type a consumer writes - 705 occurrences in this repo alone, 577 of them in the DOM attribute types - and no neighbouring library spells it that way. Preact names the same union `Signalish` and uses it in the same position, its JSX attribute types; solid-primitives publishes `MaybeAccessor` for the identical shape; Vue has `MaybeRef`. `Signalish` is the shortest of the three and reads as the thing consumers actually pass: a signal, an accessor over one, or a plain value. `MaybeAccessorValue` becomes `SignalishValue` so the extractor keeps its union's name, `AnyValueOrAccessor` becomes `AnySignalish`, and `query`'s `SignalsParams`, which maps each parameter through this union, becomes `SignalishParams`. The parameters that carried the old name in their spelling are now `source`. The old names stay as deprecated aliases, so nothing breaks; they are marked to drop at the next major.
dangreen
force-pushed
the
feat/signalish-rename
branch
from
August 24, 2026 16:18
c6c4521 to
7507eb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ValueOrAccessoris the type a consumer of this library writes most: 705 occurrences in this repo, 577 of them indom/attributes.tsalone. It is fifteen characters of noun-conjunction-noun, and no other library spells it that way.Where the name comes from
Only three ecosystems publish a "plain value or reactive thing" union at all, and all three name it as a modifier on a noun rather than a conjunction:
Signalish<T> = T | SignalLike<T>(preact/src/dom.d.ts)jsx.d.ts— the DOM attribute types, the same position as oursMaybeAccessor<T> = T | Accessor<T>MaybeRef<T>,MaybeRefOrGetter<T>Angular, Svelte, nanostores, MobX, RxJS, Jotai, Zustand and Recoil ship no such union — their props are either plain or always wrapped.
Signalishis the shortest of the three, and it comes from the library whose usage matches ours exactly. The union is written overAccessor, butReadableSignal<T> extends Accessor<T>, so from the writing side there is no difference to see: a signal, an accessor, or a plain value all fit, and a signal is what gets passed most.What else moves with it
MaybeAccessorValue→SignalishValue, so the extractor keeps the name of the union it extracts from. (Preact pairsSignalishwithUnpackSignal; a noun reads better here than a verb.)AnyValueOrAccessor→AnySignalish.query'sSignalsParams→SignalishParams— it maps every element of a parameter tuple through this union, so it promised signals while accepting plain values too.valueOrAccessor,valueOrReadable— are nowsource.Nothing breaks
Every old name stays as a deprecated alias, marked for removal:
ValueOrSignalandValueOrWritableSignalare aliased too. They have no consumer left in this repo and were on the way out, but dropping a published export is the break this PR is avoiding.Types cost nothing at runtime: every bundle in the chain is byte-identical and no size pin moves.
Checked
All eleven packages: lint,
tsc --noEmit, and unit suites — agera 155, kida 64, store 57, nanoviews 114, query 163, router 129, intl 114, preact 9, react 15, svelte 4, svelte-kit 21.The narrowing types
TruthyValueOrSignal/FalsyValueOrSignalinnanoviewsbelong to the same family and follow in a separate PR; they are left untouched here so this one stays mechanical.