-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.ts
44 lines (39 loc) · 1.28 KB
/
server.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Utilities for testing handlers, middlewares, routes, etc.
*
* @module
*/
export type {
CreateFreshContextOptions,
CreateRouteContextOptions,
} from "./internal/fresh/context.ts";
export {
createFreshContext,
createRouteContext,
} from "./internal/fresh/context.ts";
import type { CreateFreshContextOptions } from "./internal/fresh/context.ts";
import { createFreshContext } from "./internal/fresh/context.ts";
/**
* @deprecated Use {@linkcode CreateFreshContextOptions} instead.
*
* Options which can be passed to {@linkcode createHandlerContext}.
*/
export type CreateHandlerContextOptions<
TState extends Record<string, unknown> = Record<string, unknown>,
> = CreateFreshContextOptions<unknown, TState>;
/**
* @deprecated Use {@linkcode CreateFreshContextOptions} instead.
*
* Options which can be passed to {@linkcode createMiddlewareHandlerContext}.
*/
export type CreateMiddlewareHandlerContextOptions<
TState extends Record<string, unknown> = Record<string, unknown>,
> = CreateFreshContextOptions<unknown, TState>;
/**
* @deprecated Use {@linkcode createFreshContext} instead.
*/
export const createHandlerContext = createFreshContext;
/**
* @deprecated Use {@linkcode createFreshContext} instead.
*/
export const createMiddlewareHandlerContext = createFreshContext;