Skip to content

Commit 820f34b

Browse files
committed
fix: fix type annotations for bit module
Specifically for function `bor`, `band` and `bxor`, which all only require one mandatory argument. Reference: https://bitop.luajit.org/api.html
1 parent 64c7084 commit 820f34b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* `FIX` reimplement section `luals.config` in file doc.json
99
* `FIX` incorrect file names in file doc.json
1010
* `FIX` remove extra `./` path prefix in the check report when using `--check=.`
11+
* `FIX` fix type annotations for bit module
1112

1213
## 3.13.6
1314
`2025-2-6`

meta/template/bit.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ function bit.tohex(x, n) end
2222
function bit.bnot(x) end
2323

2424
---@param x integer
25-
---@param x2 integer
2625
---@param ... integer
2726
---@return integer y
2827
---@nodiscard
29-
function bit.bor(x, x2, ...) end
28+
function bit.bor(x, ...) end
3029

3130
---@param x integer
32-
---@param x2 integer
3331
---@param ... integer
3432
---@return integer y
3533
---@nodiscard
36-
function bit.band(x, x2, ...) end
34+
function bit.band(x, ...) end
3735

3836
---@param x integer
39-
---@param x2 integer
4037
---@param ... integer
4138
---@return integer y
4239
---@nodiscard
43-
function bit.bxor(x, x2, ...) end
40+
function bit.bxor(x, ...) end
4441

4542
---@param x integer
4643
---@param n integer

0 commit comments

Comments
 (0)