feat(printer): teal_type_definition should use the `require type` notation
ci/woodpecker/pr/docker-build Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details

This commit is contained in:
Aire-One 2023-07-31 19:26:19 +02:00
parent a0d4765b91
commit b911cab58d
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