@etsoo/shared
Version:
TypeScript shared utilities and functions
23 lines (22 loc) • 694 B
TypeScript
/**
* Content disposition of HTTP
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
*/
export declare class ContentDisposition {
readonly type: string;
readonly filename: string;
readonly name?: string | undefined;
constructor(type: "inline" | "attachment", filename: string);
constructor(type: "form-data", filename: string, name: string);
/**
* Format to standard output
* @returns Result
*/
format(): string;
/**
* Parse header value
* @param header Content-Disposition header value
* @returns Object
*/
static parse(header: string | undefined | null): ContentDisposition | undefined;
}