You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
})
});
The text was updated successfully, but these errors were encountered:
define([
'dojo/_base/declare'
], function (declare) {
var a = declare(null, {
// some stuff
});
function test() {
return a;
}
a = test();
return a;
});
This only works if I remove a = test();, even though it is returning the same object... Replacing that line with a = a does work.
If I use
dojo.declare
in place ofdeclare
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.
The text was updated successfully, but these errors were encountered: