Skip to content

Commit

Permalink
docs(implements-on-classes): indicate that non-constructors can use…
Browse files Browse the repository at this point in the history
… `@type` instead to refer to a callback
  • Loading branch information
brettz9 committed Dec 29, 2019
1 parent 5b8a413 commit 1a2bb7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .README/rules/implements-on-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Reports an issue with any non-constructor function using `@implements`.
Constructor functions, whether marked with `@class`, `@constructs`, or being
an ES6 class constructor, will not be flagged.

To indicate that a function follows another function's signature, one might
instead use `@type` to indicate the `@function` or `@callback` to which the
funciton is adhering.

|||
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3728,6 +3728,10 @@ Reports an issue with any non-constructor function using `@implements`.
Constructor functions, whether marked with `@class`, `@constructs`, or being
an ES6 class constructor, will not be flagged.
To indicate that a function follows another function's signature, one might
instead use `@type` to indicate the `@function` or `@callback` to which the
funciton is adhering.
|||
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
Expand Down

0 comments on commit 1a2bb7f

Please sign in to comment.