0.5.0
0.5.0 (2019-09-05)
Breaking changes
Watcher.useForeach
The callback parameter type of Watcher.useForeach
has changed. (See 42df24f)
declare const x: Watcher<string>
declare const y: Watcher<HTMLElement>
x.useForeach((value, key) => {}) // Signature for Watcher<not Element> has not changed
- // before
- y.useForeach((ele: DomProxy, key, realNode: Element) => {})
+ // after, the first `ele`'s type is equal to the generic type. But it is not a real element, it is DomProxy.current
+ // if you want to access realNode, use metadata.realCurrent
+ y.useForeach((ele: HTMLElement, key, metadata: DomProxy) => {})
LiveSelector.evaluateOnce
has renamed to LiveSelector.evaluate
(bae3e27)
AutomatedTabTask(options)
options.key has removed. use options.asyncCallOptions.key instead (5ad6560)
Bug Fixes
- bugs in AutomatedTabTask, MessageCenter and AsyncCall (cffb695)
- AutomatedTabTask: can not use twice (480153e)
- docs: fix doc inconsistency (cb72dae)
- LiveSelector: ban mutation on LiveSelector (5477a55)
- LiveSelector: replace (687e9e4)
- MessageCenter: async listener (62d6113)
- MessageCenter: browser.runtime.onMessage.addListener type error (ce69f8a)
- clone the liveselector to avoid unexpected modify (7509efd)
- done is undefined (a727f06)
- use ts 3.6 new stricter iterator type to fix AsyncCall's type (dded411)
- AsyncCall: options and call stack (3321b73)
- AsyncCall: reject methods starts with "rpc." (081be1e)
- ValueRef: called when value has not changed (b1b77d5)
- Watcher: false positive warning (25b3987)
- Watcher: fix warning (424f302)
- Watcher: then() emits wrong value (820aca8)
- Watcher: type error for EventCallback (b425d1e)
Features
- AsyncCall: new option preferLocalImplementation (6a8182f)
- AsyncCall: send local stack to remote when calling (170c5f7)
- AsyncCall: support async generator functions now. (17804bd)
- AsyncCall: support execute patch mode (3a71bb9)
- AsyncCall: support Notification now (0a9b884)
- AsyncCall: transfer Error type (586effd)
- AutomatedTabTask: support tabID as input (b1d606f)
- LiveSelector: add a shortcut to .replace(() => arr) (615a4e6)
- MessageCenter: add off function, let on return a canceller (db4751b)
- MessageCenter: add serialization (80d32fd)
- add Watcher.omitWarningForForgetWatch (8c9589f)