@@ -34,6 +34,7 @@ function createPropVariables() {
3434 * Add a variable name to the current scope
3535 * @param {string } name
3636 * @param {string[] } allNames Example: `props.a.b` should be formatted as `['a', 'b']`
37+ * @returns {Map<string, string[]> }
3738 */
3839 set ( name , allNames ) {
3940 if ( ! hasBeenWritten ) {
@@ -75,6 +76,8 @@ function mustBeValidated(component) {
7576
7677/**
7778 * Check if we are in a lifecycle method
79+ * @param {object } context
80+ * @param {boolean } checkAsyncSafeLifeCycles
7881 * @return {boolean } true if we are in a class constructor, false if not
7982 */
8083function inLifeCycleMethod ( context , checkAsyncSafeLifeCycles ) {
@@ -98,6 +101,7 @@ function inLifeCycleMethod(context, checkAsyncSafeLifeCycles) {
98101/**
99102 * Returns true if the given node is a React Component lifecycle method
100103 * @param {ASTNode } node The AST node being checked.
104+ * @param {boolean } checkAsyncSafeLifeCycles
101105 * @return {Boolean } True if the node is a lifecycle method
102106 */
103107function isNodeALifeCycleMethod ( node , checkAsyncSafeLifeCycles ) {
@@ -120,6 +124,7 @@ function isNodeALifeCycleMethod(node, checkAsyncSafeLifeCycles) {
120124 * Returns true if the given node is inside a React Component lifecycle
121125 * method.
122126 * @param {ASTNode } node The AST node being checked.
127+ * @param {boolean } checkAsyncSafeLifeCycles
123128 * @return {Boolean } True if the node is inside a lifecycle method
124129 */
125130function isInLifeCycleMethod ( node , checkAsyncSafeLifeCycles ) {
@@ -188,6 +193,7 @@ function isThisDotProps(node) {
188193
189194/**
190195 * Checks if the prop has spread operator.
196+ * @param {object } context
191197 * @param {ASTNode } node The AST node being marked.
192198 * @returns {Boolean } True if the prop has spread operator, false if not.
193199 */
0 commit comments