import {defer, animationFrames, fromEvent} from 'rxjs'
import { animationFrame } from 'rxjs/internal/scheduler/animationFrame'
import {endWith, map, tap, takeWhile, finalize, mergeMap, concatMap, switchMap } from 'rxjs/operators'
const animation = (duration: number, distance: number) => defer(() => {
const div = document.createElement('div')
document.body.appendChild(div)
div.className = 'square'
return import {defer, animationFrames, fromEvent}