@remotion/gif
Version:
Embed GIFs in a Remotion video
10 lines (9 loc) • 772 B
TypeScript
import type { ParsedGif } from '../gifuct/types';
import type { Stream } from './uint8-parser';
export declare const parse: <T extends Record<string, T>>(stream: Stream, schema: unknown, result?: T, parent?: T) => unknown;
export declare const loop: <R>(schema: unknown, continueFunc: (st: Stream, r: R, p: R) => boolean) => (stream: Stream, result: R, parent: R, _parse: ParseFn<R>) => R[];
type ConditionalFunction<T> = (st: Stream, result: T, parent: T) => boolean;
type ParseFn<T> = (st: Stream, schema: GifSchema, result: T, parent: T) => void;
export type GifSchema = unknown | ParsedGif;
export declare const conditional: <T>(schema: unknown, conditionFunc: ConditionalFunction<T>) => (stream: Stream, result: T, parent: T, parseFn: ParseFn<T>) => void;
export {};