import { create } from '../../../../../core/object'; export function nativeEvents() { const events = create(); return class NativeEvents { static register(type: string, event: EventType) { events[type] = event; } static event(type: string) { const ret = events[type]; if (ret === undefined) throw new TypeError(`NativeEvents: event '${type}' is not supported.`); return ret; } } } export type NativeEvents = ReturnType;