Revert enforcing argument dto'ing because it seems buggy with the compiler

This commit is contained in:
Johannes Rieken
2022-01-19 10:55:39 +01:00
parent 367f9f6ea2
commit 31ad3f54ff
2 changed files with 3 additions and 7 deletions
@@ -536,7 +536,7 @@ export interface MainThreadTerminalServiceShape extends IDisposable {
}
export type TransferQuickPickItemOrSeparator = TransferQuickPickItem | quickInput.IQuickPickSeparator;
export interface TransferQuickPickItem extends Dto<quickInput.IQuickPickItem> {
export interface TransferQuickPickItem extends quickInput.IQuickPickItem {
handle: number;
buttons?: TransferQuickInputButton[];
}
@@ -2176,7 +2176,7 @@ export interface ExtHostTestingShape {
/** Handles a diff of tests, as a result of a subscribeToDiffs() call */
$acceptDiff(diff: TestsDiff): void;
/** Publishes that a test run finished. */
$publishTestResults(results: Dto<ISerializedTestResults[]>): void;
$publishTestResults(results: ISerializedTestResults[]): void;
/** Expands a test item's children, by the given number of levels. */
$expandTest(testId: string, levels: number): Promise<void>;
/** Requests file coverage for a test run. Errors if not available. */
@@ -64,12 +64,8 @@ export type Dto<T> = T extends { toJSON(): infer U }
? { [k in keyof T]: Dto<T[k]>; }
: T;
/**
* Map `T` to be only functions that return promises of data transfer objects and that
* accept arguments of data transfer objects.
*/
export type Proxied<T> = { [K in keyof T]: T[K] extends (...args: infer A) => infer R
? (...args: { [K in keyof A]: Dto<A[K]> }) => Promise<Dto<Awaited<R>>>
? (...args: A) => Promise<Dto<Awaited<R>>>
: never
};