UNPKG

@ioris/core

Version:

This package provides the core functionality for the [@ioris](https://www.npmjs.com/search?q=%40ioris) ecosystem for managing music lyrics with time synchronization.

41 lines (40 loc) 1.41 kB
/** * WordTimeline Zod Schema * Timeline validation and overlap detection */ import { z } from "zod"; import { type ValidationResult } from "./result"; /** * Single WordTimeline schema */ export declare const wordTimelineSchema: z.ZodObject<{ wordID: z.ZodOptional<z.ZodString>; text: z.ZodString; begin: z.ZodNumber; end: z.ZodNumber; hasWhitespace: z.ZodDefault<z.ZodBoolean>; hasNewLine: z.ZodDefault<z.ZodBoolean>; }, z.core.$strip>; export type WordTimelineInput = z.input<typeof wordTimelineSchema>; export type WordTimelineOutput = z.output<typeof wordTimelineSchema>; /** * WordTimeline array schema (with overlap detection) */ export declare const wordTimelinesSchema: z.ZodArray<z.ZodObject<{ wordID: z.ZodOptional<z.ZodString>; text: z.ZodString; begin: z.ZodNumber; end: z.ZodNumber; hasWhitespace: z.ZodDefault<z.ZodBoolean>; hasNewLine: z.ZodDefault<z.ZodBoolean>; }, z.core.$strip>>; export type WordTimelinesInput = z.input<typeof wordTimelinesSchema>; export type WordTimelinesOutput = z.output<typeof wordTimelinesSchema>; /** * Parse WordTimeline and return as Result type */ export declare function parseWordTimeline(input: unknown): ValidationResult<WordTimelineOutput>; /** * Parse WordTimeline array and return as Result type */ export declare function parseWordTimelines(input: unknown): ValidationResult<WordTimelinesOutput>;