Releases: peerigon/typescript-toolkit
Releases · peerigon/typescript-toolkit
Release list
v4.0.0
4.0.0 (2026-06-28)
Features
- result: use positional args for success and error constructors (184a37e)
BREAKING CHANGES
- result: result.success and result.error no longer accept a
single options object.
The payload (data/error) is what defines the result's state, while
createdAt and stale data are secondary metadata. The old flat options
object conflated the two, and forced ceremony like
result.success({ data: x }) for the most common call. Making the
payload positional separates "what the result is" from "extra
metadata", matches the wider ecosystem (Promise.resolve(v), Ok(v)/
Err(e)), and reads more concisely.
- result.success({ data }) → result.success(data)
- result.success({ data, createdAt }) → result.success(data, { createdAt })
- result.error({ error }) → result.error(error)
- result.error({ error, data }) → result.error(error, { data })
v3.0.0
3.0.0 (2026-06-28)
- feat(signals)!: rename signal API to get/set/watch terminology (c67c48f)
- feat(signals)!: rename watcher update payload to new and old (65ae3b6)
Bug Fixes
- signals: correct signal.from get.watch and dispose lifecycle (4ea8820)
Features
- signals: add Symbol.dispose to watch unwatch function (cb4f85f)
BREAKING CHANGES
- SignalWatcher callbacks now receive
{ new, old }
instead of{ value, previousValue }. - Signal API terminology has changed:
signal.read()is nowsignal.get()signal.write()is nowsignal.set()signal.subscribe()is nowsignal.watch()ReadSignalis nowSignalGetterWriteSignalis nowSignalSetterSignalReaderis nowSignalWatchersignal.from(readFromSource, …)is nowsignal.from(getFromSource, …)