Skip to content

Commit a864137

Browse files
committed
fix: Variable 'handler' is used before being assigned
1 parent 3b6b50e commit a864137

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/types/router.test-d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let done!: (err: Error | null, result: any) => void;
1212

1313
// HTTP1
1414
{
15-
let handler: Router.Handler<Router.HTTPVersion.V1>
15+
let handler!: Router.Handler<Router.HTTPVersion.V1>
1616
const router = Router({
1717
ignoreTrailingSlash: true,
1818
ignoreDuplicateSlashes: true,
@@ -90,7 +90,7 @@ let done!: (err: Error | null, result: any) => void;
9090
}
9191
}
9292

93-
let handler: Router.Handler<Router.HTTPVersion.V2>
93+
let handler!: Router.Handler<Router.HTTPVersion.V2>
9494
const router = Router<Router.HTTPVersion.V2>({
9595
ignoreTrailingSlash: true,
9696
ignoreDuplicateSlashes: true,
@@ -133,7 +133,7 @@ let done!: (err: Error | null, result: any) => void;
133133

134134
// Custom Constraint
135135
{
136-
let handler: Router.Handler<Router.HTTPVersion.V1>
136+
let handler!: Router.Handler<Router.HTTPVersion.V1>
137137

138138
interface AcceptAndContentType { accept?: string, contentType?: string }
139139

0 commit comments

Comments
 (0)