Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/workers_middleware/index.ts>providesLanguages

Placeholder for Worker-based middleware solution
Latest
function providesLanguages
import { providesLanguages } from "https://deno.land/x/workers_middleware@v0.1.0-pre.36/index.ts";

Performs content negotiation over the content language of the response.

Type Parameters

T extends string
TS extends readonly T[]

Parameters

languages: TS

The languages provided by this endpoint.

Returns

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