EDIT: , , , :
JSDoc doclet SOMETHING, ( JSHint ):
var nativeStuff = require('some/native/stuff');
nativeStuff.MyCoolClass;
nativeStuff.MyCoolClass.prototype.CoolMethod;
nativeStuff.someStringValue;
module.exports = nativeStuff;
IDE ( , WebStorm) - . , , ( @function @class @type), .
, , , .
, require() , :
var nativeStuff = require('some/native/stuff');
module.exports = nativeStuff;
module.exports = {
MyCoolClass: nativeStuff.MyCoolClass,
OtherCoolMember: nativeStuff.OtherCoolMember
};
, , , .
, , native JS, ( ) :
var nativeStuff = require('some/native/stuff');
class MyCoolClass {
constructor() {
this._nativeObj = new nativeStuff.MyCoolClass();
}
coolMethod(name) {
return this._nativeObj(name);
}
}
module.exports = MyCoolClass;
( , JS, ES6 :)
@typedef, , doclet typedef , , , typedef , .