Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[labs/analyzer] Analyze overloaded functions and methods. (#3702)
* Add tests for overloaded function exports and methods. * Ignore non-implementation signatures of overloaded functions. * Make the string concatenation in the overloaded example function more obvious. * Add different JSDoc comment combinations for overloaded functions. * Add tests for overloaded function JSDoc comments. * Read JSDoc tags from another declaration if there are none on a function's implementation node. * Extract `getDocNodeForFunctionLikeDeclaration`. * Add missing JSDoc tags to JS properties test fixture. * Add support for retrieving JSDoc descriptions from method overload declarations. * Add a test for JSDoc descriptions on multiple overload signatures. * Add a changeset. * Add `FunctionOverloadDeclaration`. * Don't use documentation from one signature for another. * Collect function overloads. * Fix tests for overloaded non-method functions. * Fix overloaded methods. * Add a comment about checking for `.body` on method declarations. * Update the changeset.
- Loading branch information
Showing
11 changed files
with
295 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@lit-labs/analyzer': minor | ||
--- | ||
|
||
Adds support for overloaded functions. Methods of model objects that accept a | ||
string key will now specifically return the `FunctionDeclaration` of the | ||
implementation signature of an overloaded function, which has a new `overloads` | ||
field containing a `FunctionOverloadDeclaration` for each overload signature. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters