Skip to content

Commit 5dc10b4

Browse files
committed
small annotation cleanup/fixes
1 parent fc56b48 commit 5dc10b4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

meta/3rd/OpenResty/library/ngx.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,7 @@ function ngx.req.discard_body() end
25032503
--- ```
25042504
---
25052505
---@param header_name string
2506-
---@param header_value string|string[]
2506+
---@param header_value string|string[]|nil
25072507
function ngx.req.set_header(header_name, header_value) end
25082508

25092509
--- Retrieves in-memory request body data. It returns a Lua string rather than a Lua table holding all the parsed query arguments. Use the `ngx.req.get_post_args` function instead if a Lua table is required.
@@ -3009,7 +3009,7 @@ function tcpsock:receive(pattern) end
30093009
---
30103010
--- This method doesn't automatically close the current connection when the read timeout error occurs. For other connection errors, this method always automatically closes the connection.
30113011
---
3012-
---@param max string
3012+
---@param max integer
30133013
---@return string? data
30143014
---@return string? error
30153015
function tcpsock:receiveany(max) end
@@ -3138,9 +3138,9 @@ function tcpsock:settimeout(time) end
31383138
---
31393139
--- Note that this method does *not* affect the `lua_socket_keepalive_timeout` setting; the `timeout` argument to the `setkeepalive` method should be used for this purpose instead.
31403140
---
3141-
---@param connect_timeout number
3142-
---@param send_timeout number
3143-
---@param read_timeout number
3141+
---@param connect_timeout number|nil
3142+
---@param send_timeout number|nil
3143+
---@param read_timeout number|nil
31443144
function tcpsock:settimeouts(connect_timeout, send_timeout, read_timeout) end
31453145

31463146

@@ -3294,7 +3294,7 @@ function tcpsock:getreusedtimes() end
32943294
---@param port? number
32953295
---@return tcpsock? socket
32963296
---@return string? error
3297-
function ngx.socket.connect(host,port) end
3297+
function ngx.socket.connect(host, port) end
32983298

32993299
--- Creates and returns a UDP or datagram-oriented unix domain socket object (also known as one type of the "cosocket" objects). The following methods are supported on this object:
33003300
---
@@ -4007,7 +4007,7 @@ function ngx.location.capture_multi(args) end
40074007
---
40084008
--- For reading *request* headers, use the `ngx.req.get_headers` function instead.
40094009
---
4010-
---@type table<string, any>
4010+
---@type table<string, string|string[]|nil>
40114011
ngx.header = {}
40124012

40134013

@@ -4101,7 +4101,7 @@ function ngx.time() end
41014101
--- There is a hard coded `2048` byte limitation on error message lengths in the NGINX core. This limit includes trailing newlines and leading time stamps. If the message size exceeds this limit, NGINX will truncate the message text accordingly. This limit can be manually modified by editing the `NGX_MAX_ERROR_STR` macro definition in the `src/core/ngx_log.h` file in the NGINX source tree.
41024102
---
41034103
---@param level ngx.log.level
4104-
---@param ... string|number|'nil'|'ngx.null'
4104+
---@param ... any
41054105
function ngx.log(level, ...) end
41064106

41074107

0 commit comments

Comments
 (0)