Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

ModelToObject is not overloaded to take mapping options #4

Closed
ashrafsabrym opened this issue May 9, 2013 · 2 comments
Closed

ModelToObject is not overloaded to take mapping options #4

ashrafsabrym opened this issue May 9, 2013 · 2 comments

Comments

@ashrafsabrym
Copy link

I've pointed to this on the forum
http://saltarellecompiler.freeforums.org/post134.html

In the latest release, ModelToObject takes only one parameter, while in a previous release it had an overload that takes an extra mapping options parameter.

In the original JS Knockout Mapping file:
https://github.com/SteveSanderson/knockout.mapping/blob/master/knockout.mapping.js
toJS (Which is named ModelToObject in Saltarelle) is defined in line 160, and it takes two parameters, rootObject and options. So, why the options parameter was removed from Saltarelle and Script#? I'm sure this parameter was in a previous release, because I wrote code that uses it.

@erik-kallen
Copy link
Contributor

Sorry for not answering this earlier.

The options parameter you are talking about is not in the docs, at least not where I can find it (http://knockoutjs.com/documentation/json-data.html). If you want me to add it, please tell me exactly how you want it to be (the options should most likely be a [Serializable] class, as I have no knowledge of Knockout.

@erik-kallen
Copy link
Contributor

Nevermind, found your other issue

erik-kallen added a commit that referenced this issue Jul 25, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants