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