require/import other definitions from .tld
daurnimator opened this issue · 1 comments
daurnimator commented
From #12 (comment)
there is still not way to require/import other definitions inside .tld files.
It'd be nice if there was some way to require/import definitions from one .tld file to another.
mascarenhas commented
Part of the groundwork for that is already in place (see issue #68). The idea will be to have each module define its own namespace for global type aliases:
---- mymodule.tl ---
interface Foo
...
end
...
-----
---- client.tl ---
local mod = require "mymodule"
local foo: mod.Foo = ...
-----
Inside .tld files it is going to work in a similar way (we have not defined a syntax yet, though).