csnover / js-doc-parse

An experimental library for parsing JavaScript files and extracting inline documentation.
31 stars 7 forks source link

kwargs definition using declare() to extend from plain function() broken #64

Open kitsonk opened 11 years ago

kitsonk commented 11 years ago

The dojo/store/JsonRest defines __QueryOptions as

__QueryOptions = declare(Store.QueryOptions, __HeaderOptions);

Store.QueryOptions is defined as:

Store.QueryOptions = function(sort, start, count){
    // summary:
    //      Optional object with additional parameters for query results.
    // sort: Store.SortInformation[]?
    //      A list of attributes to sort on, as well as direction
    //      For example:
    //      | [{attribute:"price, descending: true}].
    //      If the sort parameter is omitted, then the natural order of the store may be
    //      applied if there is a natural order.
    // start: Number?
    //      The first result to begin iteration on
    // count: Number?
    //      The number of how many results should be returned.
    this.sort = sort;
    this.start = start;
    this.count = count;
};

The properties from the superclass Store.QueryOptions don't make it into __QueryOptions.

wkeese commented 11 years ago

I worked around this by using declare() to declare the superclass, see http://bugs.dojotoolkit.org/changeset/29333/dojo and http://bugs.dojotoolkit.org/changeset/29354/dojo, That worked fine. So marking the milestone as future (low priority). You can reproduce the problem by checking out [29332] or earlier.