Skip to content

Instantly share code, notes, and snippets.

@ranbena
Last active December 21, 2018 10:31
Show Gist options
  • Save ranbena/f8879c5f1e0048e29e8abca58274f2ad to your computer and use it in GitHub Desktop.
Save ranbena/f8879c5f1e0048e29e8abca58274f2ad to your computer and use it in GitHub Desktop.
Flow animationend error
Cannot call video.addEventListener because:
• Either string [1] is incompatible with enum [2].
• Or string [1] is incompatible with enum [3].
• Or string [1] is incompatible with enum [4].
• Or string [1] is incompatible with enum [5].
• Or string [1] is incompatible with string literal wheel [6].
• Or string [1] is incompatible with enum [7].
• Or string [1] is incompatible with enum [8].
• Or string [1] is incompatible with enum [9].
app/components/QrCodeScanner/QrCodeScanner.jsx
105│ if (video) {
106│ // allow "flash" animation (QrCodeScanner.scss) to conclude
107│ return new Promise(resolve => {
[1] 108│ video.addEventListener('animationend', resolve)
109│ video.pause() // freeze frame and run animations
110│ })
111│ }
/private/tmp/flow/flowlib_2ad1786d/dom.js
[2] 159│ addEventListener(type: MouseEventTypes, listener: MouseEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[3] 160│ addEventListener(type: FocusEventTypes, listener: FocusEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[4] 161│ addEventListener(type: KeyboardEventTypes, listener: KeyboardEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[5] 162│ addEventListener(type: TouchEventTypes, listener: TouchEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[6] 163│ addEventListener(type: WheelEventTypes, listener: WheelEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[7] 164│ addEventListener(type: ProgressEventTypes, listener: ProgressEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[8] 165│ addEventListener(type: DragEventTypes, listener: DragEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
166│ addEventListener(type: AnimationEventTypes, listener: AnimationEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
[9] 167│ addEventListener(type: ClipboardEventTypes, listener: ClipboardEventListener, optionsOrUseCapture?: EventListenerOptionsOrUseCapture): void;
Found 1 error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment