swc/crates/swc_ecma_parser/tests/tsc/jsDeclarationsNestedParams.ts

30 lines
1.1 KiB
TypeScript
Raw Normal View History

// @allowJs: true
// @checkJs: true
// @target: es6
// @outDir: ./out
// @declaration: true
// @filename: file.js
class X {
/**
* Cancels the request, sending a cancellation to the other party
* @param {Object} error __auto_generated__
* @param {string?} error.reason the error reason to send the cancellation with
* @param {string?} error.code the error code to send the cancellation with
* @returns {Promise.<*>} resolves when the event has been sent.
*/
async cancel({reason, code}) {}
}
class Y {
/**
* Cancels the request, sending a cancellation to the other party
* @param {Object} error __auto_generated__
* @param {string?} error.reason the error reason to send the cancellation with
* @param {Object} error.suberr
* @param {string?} error.suberr.reason the error reason to send the cancellation with
* @param {string?} error.suberr.code the error code to send the cancellation with
* @returns {Promise.<*>} resolves when the event has been sent.
*/
async cancel({reason, suberr}) {}
}