Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

contentEncodings

import { contentEncodings } from "https://raw.githubusercontent.com/worker-tools/shed/master/index.ts";

Performs content negotiation over the content encoding of the response.

function contentEncodings<T extends string, TS extends readonly T[]>(encodings: TS): <X extends Context>(ax: Awaitable<X>) => Promise<X & ContentEncoding<TS[number]>>;
§
contentEncodings<T extends string, TS extends readonly T[]>(encodings: TS): <X extends Context>(ax: Awaitable<X>) => Promise<X & ContentEncoding<TS[number]>>
[src]

§Type Parameters

§
T extends string
[src]
§
TS extends readonly T[]
[src]

§Parameters

§
encodings: TS
[src]

The encodings provided by this endpoint.

§Return Type

§
<X extends Context>(ax: Awaitable<X>) => Promise<X & ContentEncoding<TS[number]>>
[src]