mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
// @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}) {}
|
|
}
|