feat(printer): teal_type_definition should use the `require type` notation

This commit is contained in:
Aire-One 2023-07-31 19:26:19 +02:00
parent f44a028683
commit dbeb536393
2 changed files with 3 additions and 3 deletions

View File

@ -163,8 +163,8 @@ describe("Teal type definition Printer", function()
},
[[
-- This file was auto-generated.
local deeper = require("path.dep.deeper")
local dep = require("dep")
local type deeper = require("path.dep.deeper")
local type dep = require("dep")
local record Module
end

View File

@ -32,7 +32,7 @@ end
local function render_require(dependencies: { string : string }): string
local generated = ""
for dependency, path in utils.pairsByKeys(dependencies) do
generated = generated .. string.format("local %s = require(\"%s\")\n", dependency, path)
generated = generated .. string.format("local type %s = require(\"%s\")\n", dependency, path)
end
return generated
end