Shared inner dispatch for addWithKeyframes / replaceWithKeyframes ops.
( s: Composition, payload: KeyframesPayload, animationId?: string, )
| 413 | |
| 414 | /** Shared inner dispatch for addWithKeyframes / replaceWithKeyframes ops. */ |
| 415 | function dispatchWithKeyframes( |
| 416 | s: Composition, |
| 417 | payload: KeyframesPayload, |
| 418 | animationId?: string, |
| 419 | ): void { |
| 420 | if (animationId !== undefined) { |
| 421 | s.dispatch({ type: "replaceWithKeyframes", animationId, ...payload }); |
| 422 | } else { |
| 423 | s.dispatch({ type: "addWithKeyframes", ...payload }); |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | export function sdkAddWithKeyframesPersist( |
| 428 | targetPath: string, |
no test coverage detected