From 3a7a3550f962ea4c2216900ae62953aa1d864989 Mon Sep 17 00:00:00 2001 From: Alexander Chibrikin Date: Sun, 4 Jan 2026 21:13:34 +0300 Subject: [PATCH] Fix `Settings:get_bool()` annotation. --- classes/Settings.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classes/Settings.lua b/classes/Settings.lua index edf438d..6fe53cb 100644 --- a/classes/Settings.lua +++ b/classes/Settings.lua @@ -1,4 +1,4 @@ ---- @diagnostic disable: missing-return +--- @meta --- An interface to read config files in the format of `minetest.conf`. @@ -33,9 +33,13 @@ function Settings:get(key) end --- returns a boolean --- * `default` is the value returned if `key` is not found. --- * Returns `nil` if `key` is not found and `default` not specified. +--- --- @overload fun(key:string):boolean|nil ---- @param key string ---- @return boolean|nil +--- +--- @param key string +--- @param default boolean +--- +--- @return boolean function Settings:get_bool(key, default) end --- returns a NoiseParams table --- @param key string