Skip to content

Dojo.declare() #3

@aramk

Description

@aramk

If I use dojo.declare in place of declare when declaring modules, although my source works fine in the browser this docs parser sets my class to a "string" type in the api browser.

Also, I'm calling dojo.declare in a separate function and then returning the result. I then use this function in place of my imported declare and although I've verified this is working correctly this parser returns an "object" instead of a "class" unless I strictly use the same instance of the "declare" function which I import. Creating a new reference to this declare function also works, but calling it in a function does not.

// Works
define([
    'dojo/_base/declare'
], function (declare) {
    var declare2 = declare;
    return declare2(null, {
        // some stuff
    });
});


// Doesn't work
define([
    'dojo/_base/declare'
], function (declare) {
    var me = this;
    var declare3 = function () {
        // some stuff
        return declare.apply(me, arguments);
    };
    return declare3(null, {
        // some stuff
    })
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions