UNPKG

timing-provider

Version:

An implementation of the timing provider specification.

12 lines (9 loc) 342 B
import { TNativeEventTarget } from '../types'; export const createEventTargetFactory = (window: null | Window): (() => TNativeEventTarget) => { return () => { if (window === null) { throw new Error('A native EventTarget could not be created.'); } return window.document.createElement('p'); }; };