Skip to content

Commit 9ceb1bf

Browse files
committed
docs(device): simplify and fix examples in types
1 parent 63621bc commit 9ceb1bf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

types/device.d.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ function Device:flush() end
236236
---
237237
---```lua
238238
---local evdev = require "evdev"
239+
---local Device = evdev.device.open
239240
---
240241
----- Open an input device (e.g., event0)
241242
---local dev = assert(Device("/dev/input/event0"))
@@ -272,7 +273,7 @@ function M.is_device(value) end
272273
---Open an input device by path.
273274
---
274275
---```lua
275-
---local dev = assert(Device("/dev/input/eventX"))
276+
---local dev = assert(evdev.device.open("/dev/input/eventX"))
276277
---```
277278
---
278279
---@param path evdev.path

0 commit comments

Comments
 (0)