diff --git a/Definitions/knockout-2.1.d.ts b/Definitions/knockout-2.2.d.ts similarity index 100% rename from Definitions/knockout-2.1.d.ts rename to Definitions/knockout-2.2.d.ts diff --git a/Definitions/knockoutmapping-2.0.d.ts b/Definitions/knockoutmapping-2.0.d.ts new file mode 100644 index 000000000..2b3b412f9 --- /dev/null +++ b/Definitions/knockoutmapping-2.0.d.ts @@ -0,0 +1,29 @@ +// Type definitions for Knockout.Mapping 2.0 +// Project: https://github.com/SteveSanderson/knockout.mapping +// https://github.com/borisyankov/DefinitelyTyped + +interface KnockoutMappingOptions { + ignore; + include; + copy; + mappedProperties; + deferEvaluation; +} + +interface KnockoutMapping { + isMapped(viewModel: any): bool; + fromJS(jsObject: any): any; + fromJS(jsObject: any, targetOrOptions: any): any; + fromJS(jsObject: any, inputOptions: any, target: any): any; + fromJSON(jsonString: string): any; + toJS(rootObject: any, options?: KnockoutMappingOptions): any; + toJSON(rootObject: any, options?: KnockoutMappingOptions): any; + defaultOptions(): KnockoutMappingOptions; + resetDefaultOptions(): void; + getType(x: any): any; + visitModel(rootObject: any, callback: Function, options?: { visitedObjects?; parentName?; ignore?; copy?; include?; } ): any; +} + +interface KnockoutStatic { + mapping: KnockoutMapping; +} \ No newline at end of file diff --git a/README.md b/README.md index 96045e042..46fec6a23 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Complete * [jQuery Mobile](http://jquerymobile.com) * [jQuery UI](http://jqueryui.com/) * [Knockout.js](http://knockoutjs.com/) +* [Knockout.Mapping](https://github.com/SteveSanderson/knockout.mapping) * [Modernizr](http://modernizr.com/) * [Moment.js](https://github.com/timrwood/moment) (by [Michael Lakerveld](https://github.com/Lakerfield)) * [Mustache.js](https://github.com/janl/mustache.js) @@ -37,7 +38,6 @@ Complete Next ---- -* Knockout.Mapping * Chosen * Facebook SDK * jQuery.Validate