Skip to content

Commit

Permalink
Fix/supress ts-check errors in js
Browse files Browse the repository at this point in the history
Fixes #99226
  • Loading branch information
mjbvz committed Jun 11, 2020
1 parent 0145e38 commit 6efc0b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/webview/browser/pre/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
}
}

window.createWebviewManager({
(/** @type {any} */ (window)).createWebviewManager({
postMessage: hostMessaging.postMessage.bind(hostMessaging),
onMessage: hostMessaging.onMessage.bind(hostMessaging),
ready: workerReady,
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/webview/browser/pre/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* focusIframeOnCreate?: boolean,
* ready?: Promise<void>,
* onIframeLoaded?: (iframe: HTMLIFrameElement) => void,
* fakeLoad: boolean,
* fakeLoad?: boolean,
* rewriteCSP: (existingCSP: string, endpoint?: string) => string,
* }} WebviewHost
*/
Expand Down Expand Up @@ -605,6 +605,6 @@
if (typeof module !== 'undefined') {
module.exports = createWebviewManager;
} else {
window.createWebviewManager = createWebviewManager;
(/** @type {any} */ (window)).createWebviewManager = createWebviewManager;
}
}());
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference lib="webworker" />

const VERSION = 1;

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

0 comments on commit 6efc0b6

Please sign in to comment.