anki/ts/editor/lib.ts

10 lines
268 B
TypeScript
Raw Normal View History

2021-01-31 14:15:03 +01:00
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);
}