UNPKG

@httpland/range-request-middleware

Version:
9 lines (8 loc) 421 B
import { type Range, RangeUnit } from "./types.js"; export type UnitLike = RangeUnit | readonly [RangeUnit, ...readonly RangeUnit[]]; export declare function withAcceptRanges(response: Response, unit: UnitLike): Response; export interface Context { readonly ranges: Iterable<Range>; readonly rangeValue: string; } export declare function withContentRange(response: Response, context: Context): Promise<Response>;