1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
//// [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}) {}
}
//// [file.js]
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
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.
*/
cancel({ reason, code }) {
return __awaiter(this, void 0, void 0, function* () { });
}
}
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.
*/
cancel({ reason, suberr }) {
return __awaiter(this, void 0, void 0, function* () { });
}
}
//// [file.d.ts]
declare 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.
*/
cancel({ reason, code }: {
reason: string | null;
code: string | null;
}): Promise<any>;
}
declare 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.
*/
cancel({ reason, suberr }: {
reason: string | null;
suberr: {
reason: string | null;
code: string | null;
};
}): Promise<any>;
}
|