anki/ts/editor/lib.ts
2021-01-31 14:15:03 +01:00

10 lines
268 B
TypeScript

declare global {
interface Window {
bridgeCommand<T>(command: string, callback?: (value: T) => void): void;
}
}
export function bridgeCommand<T>(command: string, callback?: (value: T) => void): void {
window.bridgeCommand<T>(command, callback);
}