From 1fed4eb2741251c3ac5fd328545d3283aa15008f Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Sun, 13 Feb 2022 05:05:13 +0800 Subject: [PATCH] test: confirm jsdoc-type-pratt-parser handles destructuring of reserved word; closes #776 --- test/rules/assertions/validTypes.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/rules/assertions/validTypes.js b/test/rules/assertions/validTypes.js index 63ca40484..292d090ca 100644 --- a/test/rules/assertions/validTypes.js +++ b/test/rules/assertions/validTypes.js @@ -1588,5 +1588,27 @@ export default { `, ignoreReadme: true, }, + { + code: ` + /** + * @param {Store} context + * @param {Store.commit} context.commit + * @param {Store.getters} context.getters + * @param {Store.dispatch} context.dispatch + * @param {object} payload + * @param {object} payload.new + * @param {string} payload.libraryType + */ + const updateStyleVersion = async ( + { commit, getters, dispatch }, + { new: newPayload, libraryType } + ) => { + } + `, + ignoreReadme: true, + parserOptions: { + ecmaVersion: 2_017, + }, + }, ], };