diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index e9a1b02b9f6..59d96e58586 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -2473,9 +2473,9 @@ export class DataTransfer { this.#items.set(mimeType, [value]); } - forEach(callbackfn: (value: DataTransferItem, key: string) => void): void { + forEach(callbackfn: (value: DataTransferItem, key: string) => void, thisArg?: unknown): void { for (const [mime, items] of this.#items) { - items.forEach(item => callbackfn(item, mime)); + items.forEach(item => callbackfn(item, mime), thisArg); } } } diff --git a/src/vscode-dts/vscode.d.ts b/src/vscode-dts/vscode.d.ts index 88f7fdf67eb..730f0ad2014 100644 --- a/src/vscode-dts/vscode.d.ts +++ b/src/vscode-dts/vscode.d.ts @@ -10110,9 +10110,11 @@ declare module 'vscode' { /** * Allows iteration through the data transfer items. + * * @param callbackfn Callback for iteration through the data transfer items. + * @param thisArg The `this` context used when invoking the handler function. */ - forEach(callbackfn: (value: DataTransferItem, key: string) => void): void; + forEach(callbackfn: (value: DataTransferItem, key: string) => void, thisArg?: unknown): void; } /**