All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
2.0.0 2019-08-05
- Type definitions now taken from
knockout
package insted of@types/knockout
#17 #18
1.2.3 2019-01-15
- ESM-module compiled to es5 compatible code #15
1.2.2 2018-09-28
- "knockout" package moved to "peerDependencies" in
package.json
#4
1.2.1 2018-08-31
subscribe()
now works with@extend({ notify: "always" })
#7
1.2.0 2018-08-30
@observable({ expose: true })
option@observableArray({ expose: true })
option
With { expose: true }
flag hidden ko.observable
can be accessed through
non-enumerable property with same name prefixed by _
.
Thanks to @FlorianBruckner.
1.1.1 - 2018-04-20
- Type Definitions
- Some TSLint issues
1.1.0 - 2018-04-19
- ES6-module build
1.0.0 - 2017-04-03
@observable({ deep: true })
option@observableArray({ deep: true })
option@computed({ pure: false })
option
@reactive
decorator
In v1.0.0 @reactive
decorator was replaced by @observable({ deep: true })
option
0.10.0 - 2017-03-29
Disposable()
mixin
Disposable()
mixin injects to class:
.subscribe()
method, an alias forsubscribe()
utility function.dispose()
method. It disposes all subscription created by.subscribe()
method.unwrap()
method, an alias forunwrap()
utility function
0.9.1 - 2017-02-01
@reactive
(deep observable) decorator. It can be used for recursively observing nested object's properties (see #3)@event
decorator. It creates hiddenko.subscribable
for class propertyObservableArray.set(index, value)
methodObservableArray.mutate(() => {...})
method
subscribe()
function can be used with@event
decoratorsubscribe()
function can subscribe to"arrayChange"
Knockout event
0.8.0 - 2017-01-22
subscribe(() => this.observableProp, (value) => { ... })
function
@extend
decorator now can be combined with@computed
decorator
@subscribe
decorator@reaction
decorator
Native ko.computed
with side effects can be used in all places where we use
@reaction
or @observer
decorator.
In v0.7.1 and earlier @subscribe
decorator can be used only with @observable
but not with @computed
. To avoid this restriction we can create ko.pureComputed
and subscribe to it:
class ViewModel {
@computed get computedProp() { ... }
constructor() {
ko.pureComputed(() => this.computedProp).subscribe((value) => { ... });
}
}
So from v0.8.0 instead of @subscribe
decorator there is shorthand function subscribe
with some extra functionality like "subscribe once":
class ViewModel {
@computed get computedProp() { ... }
constructor() {
subscribe(() => this.computedProp, (value) => { ... });
}
}
0.7.1 - 2017-01-22
- Renamed
@observer
decorator to@reaction
0.6.0 - 2016-12-11
unwrap(this, "observablePropName")
function for getting internal observable (see #1)
0.5.0 - 2016-12-10
- Upgraded TypeScript dependency to v2
- Upgraded Type Definitions
0.4.2 - 2016-10-05
@observable
decorator@observableArray
decorator@computed
decorator@observer
decorator@extend
decorator@subscribe
decorator@component
decorator