scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Change Representation of Private Methods

Open madoar opened this issue 6 years ago • 2 comments

Private methods and fields are currently marked with an _. This not only looks bad but also has no effect, because JavaScript as of now does not support private fields and methods.

Therefore I propose to remove the _ from the private method names and instead add a short comment to each private method that tells the user that this method is only for internal use. Such a comment could look like the following:

/**
 * *** INTERNAL API ***
 * ...
 */

madoar avatar Jun 22 '19 10:06 madoar

JSDoc has a @private tag. Maybe we can use that?

plata avatar Jun 22 '19 10:06 plata

@private would also work I think.

madoar avatar Jun 22 '19 10:06 madoar