From e8238bf8b1b9a350399446dd19bae346bd324a9b Mon Sep 17 00:00:00 2001 From: AeroUtilities <63119551+AeroUtilities@users.noreply.github.com> Date: Sat, 9 May 2026 23:14:31 +0100 Subject: [PATCH] Refactor Instances type to use imported instances module Removed the instance type in create and separated the instance module into the types folder. --- src/create.luau | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/create.luau b/src/create.luau index db33663..328f214 100644 --- a/src/create.luau +++ b/src/create.luau @@ -4,6 +4,7 @@ local Instance = game and Instance or require "../test/mock".Instance :: never local defaults = require "./defaults" local apply = require "./apply" local flags = require "./flags" +local instances = require "./types/instances" local function create_constructor_for_class(class: string): ({ [unknown]: unknown }) -> Instance local function constructor(properties: { [unknown]: unknown }): Instance @@ -52,27 +53,7 @@ local function create(class_or_instance: string|Instance, properties: { [unknown else constructor end -type Instances = { - Folder: Folder, - BillboardGui: BillboardGui, - CanvasGroup: CanvasGroup, - Frame: Frame, - ImageButton: ImageButton, - ImageLabel: ImageLabel, - ScreenGui: ScreenGui, - ScrollingFrame: ScrollingFrame, - SurfaceGui: SurfaceGui, - TextBox: TextBox, - TextButton: TextButton, - TextLabel: TextLabel, - UIAspectRatioConstraint: UIAspectRatioConstraint, - UICorner: UICorner, - UIGradient: UIGradient, - UIGridLayout: UIGridLayout, - UIListLayout: UIListLayout, - Camera: Camera, - WorldModel: WorldModel, -} +type Instances = instances.Instances type function Properties(instance: type?) local properties = types.newtable()