From ddc5dfbd8d1f363beab9be77fd1db1ff13836099 Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Sun, 3 Sep 2023 22:11:26 -0500 Subject: [PATCH] Fix plugin typechecking --- plugin/src/init.server.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/src/init.server.lua b/plugin/src/init.server.lua index 75b8c04e..be6a96d1 100644 --- a/plugin/src/init.server.lua +++ b/plugin/src/init.server.lua @@ -24,12 +24,14 @@ local AnalyticsService = game:GetService("AnalyticsService") local Settings = nil :: any -local SettingsModule = AnalyticsService:FindFirstChild("LuauLSP_Settings") +local SettingsModule = AnalyticsService:FindFirstChild("LuauLSP_Settings") :: ModuleScript if not SettingsModule then - SettingsModule = script.DefaultSettings:Clone() + SettingsModule = (script :: any).DefaultSettings:Clone() + assert(SettingsModule, "Luau Typechecking") SettingsModule.Name = "LuauLSP_Settings" SettingsModule.Parent = AnalyticsService end +assert(SettingsModule, "failed to create settings module") local function LoadSettings() local result, parseError: any = loadstring(SettingsModule.Source)