Skip to content

Commit 6efc0b6

Browse files
committed
Fix/supress ts-check errors in js
Fixes #99226
1 parent 0145e38 commit 6efc0b6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/vs/workbench/contrib/webview/browser/pre/host.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
}
9191
}
9292

93-
window.createWebviewManager({
93+
(/** @type {any} */ (window)).createWebviewManager({
9494
postMessage: hostMessaging.postMessage.bind(hostMessaging),
9595
onMessage: hostMessaging.onMessage.bind(hostMessaging),
9696
ready: workerReady,

src/vs/workbench/contrib/webview/browser/pre/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* focusIframeOnCreate?: boolean,
1212
* ready?: Promise<void>,
1313
* onIframeLoaded?: (iframe: HTMLIFrameElement) => void,
14-
* fakeLoad: boolean,
14+
* fakeLoad?: boolean,
1515
* rewriteCSP: (existingCSP: string, endpoint?: string) => string,
1616
* }} WebviewHost
1717
*/
@@ -605,6 +605,6 @@
605605
if (typeof module !== 'undefined') {
606606
module.exports = createWebviewManager;
607607
} else {
608-
window.createWebviewManager = createWebviewManager;
608+
(/** @type {any} */ (window)).createWebviewManager = createWebviewManager;
609609
}
610610
}());

src/vs/workbench/contrib/webview/browser/pre/service-worker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5+
/// <reference lib="webworker" />
6+
57
const VERSION = 1;
68

79
const rootPath = self.location.pathname.replace(/\/service-worker.js$/, '');
@@ -273,4 +275,4 @@ async function getOuterIframeClient(webviewId) {
273275
const clientUrl = new URL(client.url);
274276
return (clientUrl.pathname === `${rootPath}/` || clientUrl.pathname === `${rootPath}/index.html`) && clientUrl.search.match(new RegExp('\\bid=' + webviewId));
275277
});
276-
}
278+
}

0 commit comments

Comments
 (0)