Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@internal JavaScript documentation tag inside react code, is this jsdoc, closure, or something else?

I noticed that React uses the @internal tag for documentation. What program consumes this tag? Is it jsdoc or something else? Google Closure Compiler? I can't find this tag on http://usejsdoc.org/ or in the Google Closure Compiler documentation. What is it used for?

Here is an example -

/**
 * Warn for mutations.
 *
 * @internal
 * @param {object} object
 * @param {string} key
 */
function defineWarningProperty(object, key) {

https://github.com/facebook/react/blob/master/src/classic/element/ReactElement.js

like image 235
Josh Unger Avatar asked Oct 31 '22 09:10

Josh Unger


1 Answers

The typescript compiler can use this tag to exclude stuff from the d.ts definition.

See the --stripInternal option for more information.

like image 143
moander Avatar answered Nov 07 '22 21:11

moander