on-error.ts

import { NotificationBubbles } from "../../codeeditor-app/elements/notification-bubbles/notification-bubbles";

export function setOnErrorListener(fn: (type: 'syntax-error', value: any) => void) {
    window.onerror = function (error) {
        fn('syntax-error', error);
    }
}