Skip to content

Commit

Permalink
chore: fix type test (#222)
Browse files Browse the repository at this point in the history
* chore: fix type test

* more assertions
  • Loading branch information
SimenB committed Sep 9, 2022
1 parent b7a770a commit 654c956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { expectType, expectAssignable, expectNotAssignable } from 'tsd'

expectAssignable<InjectOptions>({ url: '/' })

const dispatch = function (req: http.IncomingMessage, res: http.ServerResponse) {
const dispatch: http.RequestListener = function (req, res) {
expectAssignable<http.IncomingMessage>(req)
expectAssignable<http.ServerResponse>(res)
expectType<boolean>(isInjection(req))
expectType<boolean>(isInjection(res))

Expand Down

0 comments on commit 654c956

Please sign in to comment.