import { isPlainObject, isFunction } from '../../internal/base' import { Data, Mutation, isAtomLike, DEFAULT_MUTATION_OPTIONS } from '../atoms' import { pipeAtom, binaryTweenPipeAtom } from '../helpers' import type { MutatorOriginalTransformationUnion } from '../particles' import type { MutationOptions, AtomLikeOfOutput } from '../atoms' // S -> Single, M -> Multi /****************************************************************************************************** * * SS Tache * ******************************************************************************************************/ /** * */ export type SSTache
= (source: AtomLikeOfOutput
) => Data (
transformation: MutatorOriginalTransformationUnion , options: MutationOptions = DEFAULT_MUTATION_OPTIONS
): SSTache => {
if (!isFunction(transformation)) {
throw (new TypeError('"transformation" is expected to be type of "Function".'))
}
if (!isPlainObject(options)) {
throw (new TypeError('"options" is expected to be type of "PlainObject".'))
}
const preparedOptions = { ...DEFAULT_MUTATION_OPTIONS, ...options }
/**
* @param source
* @return { Data (transformation, preparedOptions)
const outputD = Data.empty