UNPKG

edgerender

Version:
25 lines (24 loc) 1.07 kB
/// <reference types="@cloudflare/workers-types" /> import { MimeTypes, PreResponse } from './response'; export interface AssetConfig { content_manifest?: any; kv_namespace?: KVNamespace; path?: string; cache_control?: string; asset_class?: typeof Assets; } export declare class Assets { protected readonly path: string; protected log: boolean; protected readonly prefix: RegExp; protected readonly manifest: Record<string, string> | null; protected readonly kv_namespace?: KVNamespace; protected readonly security_headers: Record<string, string>; protected readonly headers: Record<string, string>; constructor(config: AssetConfig, security_headers: Record<string, string>, log: boolean); is_static_path(pathname: string): boolean; response(request: Request, pathname: string): Promise<PreResponse>; not_found_error(pathname: string): Error; cached_proxy(request: Request, url: string, custom_mime_type?: MimeTypes | null): Promise<PreResponse>; protected mime_type(pathname: string): MimeTypes; }