From 3972d8a7041f65849ca1e2c0a3d4b275d0a60c54 Mon Sep 17 00:00:00 2001 From: Daniel Brady Date: Sat, 29 Aug 2020 14:56:49 -0400 Subject: [PATCH] document(assertions) Add note about possible use for LuaMacro --- assertions.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assertions.lua b/assertions.lua index 60742eb..0363c06 100644 --- a/assertions.lua +++ b/assertions.lua @@ -24,6 +24,11 @@ do end -- Provide less magical type assertion. +-- TODO(dabrady) Evaluate LuaMacro as possible alternative. +-- This current approach results in misleading function name in failed assertion +-- error messages: it always reports `assert_type` as the source of type errors. +-- @see https://github.com/stevedonovan/LuaMacro +-- @see https://luarocks.org/modules/steved/luamacro function module.assert_type(val, t) module.__checks__(t) -- Asserts against the first argument to `assert_type` return val