diff --git a/types/index.d.ts b/types/index.d.ts index 4abe499..f6cb849 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -54,6 +54,7 @@ declare namespace inject { payload?: InjectPayload body?: InjectPayload server?: http.Server + autoStart?: boolean cookies?: { [k: string]: string }, signal?: AbortSignal, Request?: object, diff --git a/types/index.test-d.ts b/types/index.test-d.ts index 4ff3b20..4223a3c 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -3,6 +3,10 @@ import { inject, isInjection, Response, DispatchFunc, InjectOptions, Chain } fro import { expectType, expectAssignable, expectNotAssignable } from 'tsd' expectAssignable({ url: '/' }) +expectAssignable({ autoStart: true }) +expectAssignable({ autoStart: false }) +expectAssignable({ validate: true }) +expectAssignable({ validate: false }) const dispatch: http.RequestListener = function (req, res) { expectAssignable(req)