import type { IntRange, OtherRange, RangeSpec, SuffixRange } from "./types.js"; /** Whether the {@link RangeSpec} is {@link IntRange} or not. * * @example * ```ts * import { * type IntRange, * isIntRange, * type OtherRange, * type SuffixRange, * } from "https://deno.land/x/range_parser@$VERSION/mod.ts"; * import { assert } from "https://deno.land/std/testing/asserts.ts"; * * declare const intRange: IntRange; * declare const suffixRange: SuffixRange; * declare const otherRange: OtherRange; * * assert(isIntRange(intRange)); * assert(!isIntRange(suffixRange)); * assert(!isIntRange(otherRange)); * ``` */ export declare function isIntRange(rangeSpec: RangeSpec): rangeSpec is IntRange; /** Whether the {@link RangeSpec} is {@link SuffixRange} or not. * * @example * ```ts * import { * type IntRange, * isSuffixRange, * type OtherRange, * type SuffixRange, * } from "https://deno.land/x/range_parser@$VERSION/mod.ts"; * import { assert } from "https://deno.land/std/testing/asserts.ts"; * * declare const intRange: IntRange; * declare const suffixRange: SuffixRange; * declare const otherRange: OtherRange; * * assert(isSuffixRange(suffixRange)); * assert(!isSuffixRange(intRange)); * assert(!isSuffixRange(otherRange)); * ``` */ export declare function isSuffixRange(rangeSpec: RangeSpec): rangeSpec is SuffixRange; /** Whether the {@link RangeSpec} is {@link OtherRange} or not. * * @example * ```ts * import { * type IntRange, * isOtherRange, * type OtherRange, * type SuffixRange, * } from "https://deno.land/x/range_parser@$VERSION/mod.ts"; * import { assert } from "https://deno.land/std/testing/asserts.ts"; * * declare const intRange: IntRange; * declare const suffixRange: SuffixRange; * declare const otherRange: OtherRange; * * assert(isOtherRange(otherRange)); * assert(!isOtherRange(intRange)); * assert(!isOtherRange(suffixRange)); * ``` */ export declare function isOtherRange(rangeSpec: RangeSpec): rangeSpec is OtherRange; /** Whether the {@link IntRange} is valid or not. */ export declare function isValidIntRange(intRange: IntRange): boolean; /** Whether the {@link SuffixRange} is valid or not. */ export declare function isValidSuffixRange(suffixRange: SuffixRange): boolean; /** Whether the {@link OtherRange} is valid or not. */ export declare function isValidOtherRange(otherRange: OtherRange): boolean; export declare const RangeSpecifierRe: RegExp; /** Whether the input is HTTP `Range` header field format or not. * * @example * ```ts * import { isRangeFormat } from "https://deno.land/x/range_parser@$VERSION/mod.ts"; * import { assert } from "https://deno.land/std/testing/asserts.ts"; * * assert(isRangeFormat("bytes=0-100, 200-, -500")); * assert(!isRangeFormat("")); * ``` */ export declare function isRangeFormat(input: string): boolean; export declare const ReRangeUnit: RegExp; /** Whether the input is `` format or not. */ export declare function isRangeUnitFormat(input: string): boolean; /** Assert for `` format. * @throws {TypeError} If the input is not `` format. */ export declare function assertRangeUnitFormat(input: string): asserts input;