-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from ekhaled/es6-assignment-pattern
fix #75: support for ES6 assignment pattern in methods
- Loading branch information
Showing
3 changed files
with
148 additions
and
2 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
21 changes: 21 additions & 0 deletions
21
test/svelte3/integration/methods/method.typeInference.svelte
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,21 @@ | ||
<script> | ||
/** | ||
* The method comment. | ||
* @param {string} param1 - the first parameter | ||
* @param {boolean} [param2=false] - the second parameter | ||
* @param param3 - the third parameter of type number | ||
* @param {any} param7 | ||
* @returns {number} - return value description | ||
*/ | ||
export function publicMethod( | ||
param1, //this should use jsdoc from above | ||
param2, //this should use jsdoc from above | ||
param3 = 1, //type and default should be inferred, description from jsdoc | ||
param4 = [], //type should be inferred, no description | ||
param5 = {}, //type should be inferred, no description | ||
param6 = true, //type and default should be inferred, no description | ||
param7 // this should use jsdoc from above | ||
) { | ||
return 0; | ||
}; | ||
</script> |
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