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
I use an ODM which associates instance methods with a Model like so:
Model.define("someFunction",someFunction)
I therefore have to tell jsdoc via @instance that these are instance methods, since there is no class structure that it can parse. Unfortunately, even with the plugin enabled, if I don't also specify @memberof, jsdoc will classify these methods as static, which negates much of the value of this plugin for my use case. :-( Would it be feasible for the package to enforce the @instance tag for namespace membership that is implicitly assigned?
The text was updated successfully, but these errors were encountered:
Hey, It sounds like you're working with a scenario where you're defining functions within a namespace without an explicit class structure, and you're using JsDoc to document these functions. The @instance tag is typically used to indicate that a method is an instance method rather than a static one, and the @memberof tag is used to specify the namespace or object to which the method belongs. While JsDoc is a powerful tool for documenting JavaScript code, the behavior you're describing, where you have to explicitly use @memberof to avoid methods being classified as static even when using @instance could be related to the specific JsDoc plugin or configuration you're using. As of my last knowledge, JsDoc doesn't natively support the concept of instance methods without an associated class. It typically assumes that instance methods are associated with classes. The @instance tag is often used in the context of classes, and if you're using it outside of that context, it might not have the intended effect.
I use an ODM which associates instance methods with a Model like so:
I therefore have to tell jsdoc via
@instance
that these are instance methods, since there is no class structure that it can parse. Unfortunately, even with the plugin enabled, if I don't also specify@memberof
, jsdoc will classify these methods as static, which negates much of the value of this plugin for my use case. :-( Would it be feasible for the package to enforce the@instance
tag for namespace membership that is implicitly assigned?The text was updated successfully, but these errors were encountered: