2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-01 00:37:47 +00:00

chore: adapt for raw exposed json messages of webview fork

This commit is contained in:
Jan Laupetin
2025-10-07 20:57:13 +01:00
parent 71791abb59
commit 5310ae7b8b
3 changed files with 5 additions and 4 deletions

View File

@@ -2,5 +2,6 @@ export interface NativeMethods {
greet: (name: string) => Promise<string>;
}
// @ts-expect-error Typescript expects this to be an error, it is not here though
export const nativeMethods: NativeMethods = window as NativeMethods;
const windowWithWebViewExtensions = window as typeof window & {webview_binds: NativeMethods};
export const nativeMethods: NativeMethods = windowWithWebViewExtensions.webview_binds;