import type { Range, RangeSpec, RangesSpecifier } from "./types.js"; /** Parses a string into {@link Range}. * * @example * ```ts * import { parseRange } from "https://deno.land/x/range_parser@$VERSION/parse.ts"; * import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; * * const actual = parseRange("bytes=0-100, 200-, -300"); * * assertEquals(actual, { * rangeUnit: "bytes", * rangeSet: [ * { firstPos: 0, lastPos: 100 }, * { firstPos: 200, lastPos: undefined }, * { suffixLength: 300 }, * ], * }); * ``` * * @throws {SyntaxError} If the input is invalid `Range` header format. * @throws {RangeError} If the input is invalid semantic. */ export declare function parseRange(input: string): Range; /** * @deprecated Rename to {@link parseRange} */ export declare const parse: typeof parseRange; export declare function parseRangesSpecifier(input: string): RangesSpecifier; export declare function parseRangeSpec(input: string): RangeSpec; export declare function parseRangeSet(input: string): [RangeSpec, ...RangeSpec[]];