Skip to content

Releases: eithe/knockout.mapping

3.0.0

29 Apr 10:27

Choose a tag to compare

Changes

Migrating from knockout.mapping or knockout-mapping?

npm uninstall knockout-mapping
# or
npm uninstall knockout.mapping

npm install ko-mapping

Update imports

Update all your imports:

- import mapping from 'knockout-mapping';
+ import mapping from 'ko-mapping';

Update types

If you used KnockoutObservableType (or any of the other types) from the old @types/knockout.mapping package, you need to update to use MappedObservable:

- const myObj: KnockoutObservableType<SomeObject>;
+ import { MappedObservable } from 'ko-mapping';
+ const myObj: MappedObservable<SomeObject>;

If you happened to still use some types from @types/knockout (you shouldn't; types are included with Knockout 3.5), you need to update those as well. You might have used KnockoutSubcription or KnockoutObservable; use ko.Subscription or ko.Observable instead.

Thanks to @sboele and @SomaticIT for the PRs above