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