Skip to content

Commit 4ff1db2

Browse files
authored
fix: request.header return type (#44)
1 parent 31ba09e commit 4ff1db2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adonis-typings/request.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ declare module '@ioc:Adonis/Core/Request' {
205205
* Returns value for a given header key. The default value is
206206
* used when original value is `undefined`.
207207
*/
208-
header(key: string, defaultValue?: any): string | undefined
208+
header(key: string): string | undefined
209+
header<T>(key: string, defaultValue?: T): string | T
209210

210211
/**
211212
* Returns the ip address of the user. This method is optimize to fetch

0 commit comments

Comments
 (0)