import { AnimationTarget } from '../core/types' ; import { mapFlatten } from './lists' ; import { isArrayLike , isFunction , isObject , isString } from './inspect' ; param { ElementSource } source returns { Element [ ] } export function getTargets ( target ) { return isString ( target ) ? Array . prototype . slice . call ( document . querySelectorAll ( target as string ) ) : isFunction ( target ) ? getTargets ( ( target as { ( ) : AnimationTarget ; } ) ( ) ) : isArrayLike ( target ) ? mapFlatten ( target as any [ ] , getTargets ) : isObject ( target ) ? [ target ] : [ ] ; }