Type Alias: MimeResolver
ts
type MimeResolver = (ctx: {
declared?: string;
path: string;
peek: (bytes: number) => Promise<Uint8Array>;
}) => string | undefined | Promise<string | undefined>;Defined in: src/batteries/sandbox/contracts/mime_resolver.ts:4
MIME resolver; undefined means the resolver declines and a later resolver may decide.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | { declared?: string; path: string; peek: (bytes: number) => Promise<Uint8Array>; } | - |
ctx.declared? | string | - |
ctx.path | string | - |
ctx.peek | (bytes: number) => Promise<Uint8Array> | Read a bounded prefix only; this callback cannot read the whole file. |
Returns
string | undefined | Promise<string | undefined>