You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Object mapping plugin for [Knockout](http://knockoutjs.com/) with built-in types, forked from https://github.com/crissdev/knockout.mapping
5
+
> Object mapping plugin for [Knockout](http://knockoutjs.com/)3.5+ with built-in types, forked from https://github.com/crissdev/knockout.mapping.
6
6
7
7
8
8
## Documentation
@@ -58,6 +58,39 @@ var newData = ko.mapping.toJS(viewModel);
58
58
Run this example in [JSFiddle](http://jsfiddle.net/wmeqx7ss/280/).
59
59
60
60
61
+
## Migrating from knockout.mapping or knockout-mapping?
62
+
63
+
```bash
64
+
npm uninstall knockout-mapping
65
+
# or
66
+
npm uninstall knockout.mapping
67
+
68
+
npm install ko-mapping
69
+
```
70
+
71
+
### Update imports
72
+
73
+
Update all your imports:
74
+
75
+
```diff
76
+
- import mapping from 'knockout-mapping';
77
+
+ import mapping from 'ko-mapping';
78
+
```
79
+
80
+
81
+
### Update types
82
+
83
+
If you used `KnockoutObservableType` (or [any of the other types](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/knockout.mapping/index.d.ts)) from the old `@types/knockout.mapping` package, you need to update to use `MappedObservable`:
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.
93
+
61
94
## Test
62
95
63
96
Unless `CI` environment variable is defined, the tests use the latest version Knockout.
0 commit comments