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
{{ message }}
This repository has been archived by the owner on Dec 31, 2017. It is now read-only.
The code below uses lang.extend() rather than dojo.declare() to create a "class":
define(["dojo/_base/lang"],function(lang){returnlang.extend(function(){// summary:// The constructor},{// summary:// The prototypefunc: function(a,b,c){// summary:// The function}})});
According to the ES spec, when defining a new function, it is given a prototype with a constructor property (§13.2). This doesn’t mean a function is a constructor; just like the existence or non-existence of the prototype property, it just means it may be used as a constructor. Usage of lang.extend, however, is a concrete indicator that a function is a constructor so I’ll be sure to update that code to reflect it.
I see. Regardless though, seems like you should mark it as class-like if any properties are added to the prototype, or added directly to the object via this.foo = ... syntax, ex:
The code below uses lang.extend() rather than dojo.declare() to create a "class":
The parsed output is:
The parser clearly recognizes this as class-like at some level, hence the faux
constructor
method.However, the object is marked as type="function". I would expect type="constructor" classlike="true".
The text was updated successfully, but these errors were encountered: