Merge branch 'main' into feat/roblox-types

This commit is contained in:
littensy 2023-09-17 07:42:06 -07:00 committed by GitHub
commit 4c488981e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 2751 additions and 1949 deletions

View file

@ -8,11 +8,11 @@ local defaults = require(script.Parent.defaults)
local apply = require(script.Parent.apply)
local memoize = require(script.Parent.memoize)
local function create_instance(class_name: string)
local ok, instance: Instance = pcall(Instance.new, class_name :: any)
if not ok then throw(`invalid class name, could not create instance of class { class_name }`) end
local function create_instance(class: string)
local ok, instance: Instance = pcall(Instance.new, class :: any)
if not ok then throw(`invalid class name, could not create instance of class { class }`) end
local default: { [string]: unknown }? = defaults[class_name]
local default: { [string]: unknown }? = defaults[class]
if default then
for i, v in next, default do
(instance :: any)[i] = v