Created
March 23, 2025 22:54
-
-
Save nagolove/2c267c444536d9aa47c4acbace297a87 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- somemod.d.tl | somemod.tl | |
local somemod = require "somemod" | |
local function myrequire(modname: string): <T> | |
local ok, err = pcall(function() | |
end) | |
local mod: any | |
if not ok then | |
-- try to instal throw luarocks --local | |
-- try to load with require | |
end | |
return mod | |
end | |
local somemod<T> = myrequire "somemod" | |
-- What type is T? How I can find it? Because of I had proper .tl file for module. But I could not write type-unsafe | |
-- require. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment