import readline from 'readline'; import { Component } from './component'; import { Calendar, CalendarEvent } from './components'; import { Property } from './property/Property'; /** Represents an error that occurs when deserializing a calendar component. */ export declare class DeserializationError extends Error { name: string; } /** * Deserialize a calendar component. * @param lines The serialized component as a **readline** interface. * @returns The deserialized calendar component object. * @throws {DeserializationError} If the component is invalid. * @deprecated Use the synchronous `deserializeComponentLines` instead. */ export declare function deserializeComponent(lines: readline.Interface): Promise; /** * Deserialize a calendar component from a list of lines. * @param lines The serialized component as a list of lines. * @returns The deserialized calendar component object. * @throws {DeserializationError} If the component is invalid. */ export declare function deserializeComponentLines(lines: string[]): Component; /** * Deserialize a calendar component string. * @param text The serialized component. * @returns The deserialized component object. * @throws {DeserializationError} If the component is invalid. */ export declare function deserializeComponentString(text: string): Component; /** * Parse a serialized calendar. * @param text A serialized calendar as you would see in an iCalendar file. * @returns The parsed calendar object. */ export declare function parseCalendar(text: string): Calendar; /** * Parse a serialized calendar event. * @param text A serialized event as you would see in an iCalendar file. * @returns The parsed event object. */ export declare function parseEvent(text: string): CalendarEvent; /** * Deserialize a component property. * @param line The serialized content line that defines this property. * @param strict If newlines are allowed to be LF and CRLF, not just CRLF. Defaults to false. * @returns The deserialized property. * @throws {DeserializationError} If content line is invalid. */ export declare function deserializeProperty(line: string, strict?: boolean): Property; //# sourceMappingURL=parse.d.ts.map