Code Monkey home page Code Monkey logo

saltarelleknockout's People

Contributors

erik-kallen avatar mattleibow avatar nippur72 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

saltarelleknockout's Issues

Observable() constructor

to create an Observable, the static creator Knockout.Observable<T>() has to be called instead of the natural class constructor (which is not implemented and marked as internal).

My proposal is to implement a proper constructor so that observables can be created with new like in:

var h = new Observable<string>("hello");

I was thinking of something like this in Observable.cs:

        [InlineCode("ko.observable()")]
        public Observable() {
        }

        [InlineCode("ko.observable({value})")]
        public Observable(T value) {
        }

what do you think? IMO it would make the code nicer to read.

ObservableArray<T>.Splice should expand args

public void Splice(int index, int howmany, params T[] args) should be decorated with [ExpandParams] attribute since the args parameter should not be compiled as an array, but a list of items.

ModelToObject is not overloaded to take mapping options

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.

The mapping plugin doesn't have the DefaultOptions and ResetDefaultOptions

These are used to specify the default ignore, copy, observe and include behaviours of the plugin. These are part of the plugin
https://github.com/SteveSanderson/knockout.mapping/blob/master/knockout.mapping.js
I used to add these myself while I was including Knockout as source code, but now I can't because I use the Knockout Nuget package. I can just add these as extension methods, but I hope they're added to the library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.