Skip to content

Latest commit

 

History

History
196 lines (113 loc) · 3.75 KB

libraries_requestContext.md

File metadata and controls

196 lines (113 loc) · 3.75 KB

talawa-api / Exports / libraries/requestContext

Module: libraries/requestContext

Table of contents

Variables

Functions

Variables

requestContextNamespace

Const requestContextNamespace: Namespace<Record<string, any>>

Defined in

src/libraries/requestContext.ts:8

Functions

getRequestContextValue

getRequestContextValue<T>(key): T

Type parameters

Name
T

Parameters

Name Type
key string

Returns

T

Defined in

src/libraries/requestContext.ts:19


init

init<T>(options?): T

Type parameters

Name
T

Parameters

Name Type
options InterfaceInitOptions<T>

Returns

T

Defined in

src/libraries/requestContext.ts:45


middleware

middleware(): (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void

Returns

fn

▸ (req, res, next): void

Parameters
Name Type
req Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
res Response<any, Record<string, any>>
next NextFunction
Returns

void

Defined in

src/libraries/requestContext.ts:28


setRequestContext

setRequestContext(obj): void

Parameters

Name Type
obj any

Returns

void

Defined in

src/libraries/requestContext.ts:23


setRequestContextValue

setRequestContextValue<T>(key, value): T

Type parameters

Name
T

Parameters

Name Type
key string
value T

Returns

T

Defined in

src/libraries/requestContext.ts:14


translate

translate(...args): any

Parameters

Name Type
...args any

Returns

any

Defined in

src/libraries/requestContext.ts:62


translatePlural

translatePlural(...args): any

Parameters

Name Type
...args any

Returns

any

Defined in

src/libraries/requestContext.ts:71