From b911cab58d2014bb37adf8d8ea846ad0d37cc354 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 31 Jul 2023 19:26:19 +0200 Subject: [PATCH] feat(printer): teal_type_definition should use the `require type` notation --- spec/printer/teal_type_definition_spec.tl | 4 ++-- src/awesomewm.d.tl/printer/teal_type_definition.tl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/printer/teal_type_definition_spec.tl b/spec/printer/teal_type_definition_spec.tl index 005b2fd..f6367ac 100644 --- a/spec/printer/teal_type_definition_spec.tl +++ b/spec/printer/teal_type_definition_spec.tl @@ -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 diff --git a/src/awesomewm.d.tl/printer/teal_type_definition.tl b/src/awesomewm.d.tl/printer/teal_type_definition.tl index 7dce917..fbfab82 100644 --- a/src/awesomewm.d.tl/printer/teal_type_definition.tl +++ b/src/awesomewm.d.tl/printer/teal_type_definition.tl @@ -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