UNPKG

superfly-timeline

Version:

Resolver for defining objects with temporal boolean logic relationships on a timeline

46 lines 1.97 kB
import { TimelineKeyframe, TimelineObject } from '../api/timeline'; /** * Note: A TimelineValidator instance is short-lived and used to validate a timeline. * Intended usage: * 1. const validator = new TimelineValidator() * 2. validator.validateTimeline(timeline) * or: * 1. const validator = new TimelineValidator() * 2. validator.validateObject(obj) * or: * 1. const validator = new TimelineValidator() * 2. validator.validateKeyframe(obj) */ export declare class TimelineValidator { private uniqueIds; /** Validates all objects in the timeline. Throws an error if something's wrong. */ validateTimeline( /** The timeline to validate */ timeline: TimelineObject[], /** Set to true to enable some optional strict rules. Set this to true to increase future compatibility. */ strict?: boolean): void; /** Validates a simgle Timeline-object. Throws an error if something's wrong. */ validateObject( /** The object to validate */ obj: TimelineObject, /** Set to true to enable some optional strict rules. Set this to true to increase future compatibility. */ strict?: boolean): void; /** Validates a simgle Timeline-object. Throws an error if something's wrong. */ validateKeyframe( /** The object to validate */ keyframe: TimelineKeyframe, /** Set to true to enable some optional strict rules. Set this to true to increase future compatibility */ strict?: boolean): void; private validateId; private validateLayer; private validateContent; private validateEnable; private validateClasses; /** * Validates a string that is used in Timeline as a reference (an id, a class or layer) * @param str The string to validate * @param strict Set to true to enable some strict rules (rules that can possibly be ignored) */ static validateReferenceString(str: string, strict?: boolean): void; } //# sourceMappingURL=TimelineValidator.d.ts.map