mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
The getClientIp can return null (#41902)
As you can see in the source code here https://github.com/pbojinov/request-ip/blob/master/src/index.js#L129 the `getClientIp` function can return `null` value if all the possible methods fail.
This commit is contained in:
parent
f3b9ae8270
commit
9264f705a6
2
types/request-ip/index.d.ts
vendored
2
types/request-ip/index.d.ts
vendored
@ -38,7 +38,7 @@ interface Options {
|
||||
attributeName: string;
|
||||
}
|
||||
|
||||
export declare function getClientIp(req: Request): string;
|
||||
export declare function getClientIp(req: Request): string | null;
|
||||
|
||||
export function mw(options?: Options): (req: Request, res: any, next: any) => any;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user