Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ export interface RequestOptions {
validate?: boolean;
}

type InjectionListener = (req: InjectedRequest, res: ServerResponse) => void;

type MaybeInjectionListener = (req: MaybeInjectedRequest, res: ServerResponse) => void;
export type InjectionListener = (req: MaybeInjectedRequest, res: ServerResponse) => void;

/**
* Injects a fake request into an HTTP server.
Expand All @@ -169,7 +167,6 @@ type MaybeInjectionListener = (req: MaybeInjectedRequest, res: ServerResponse) =
* @return A Promise that resolves with a ResponseObject object
*/
export function inject(dispatchFunc: InjectionListener, options: RequestOptions | string): Promise<ResponseObject>;
export function inject(dispatchFunc: MaybeInjectionListener, options: RequestOptions | string): Promise<ResponseObject>;

/**
* Checks if given object is a Shot Request object.
Expand Down