mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-07 15:26:49 +01:00
Revert enforcing argument dto'ing because it seems buggy with the compiler
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user