mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Port more code over to use strict
This commit is contained in:
parent
15e848d4bf
commit
581449d992
3 changed files with 7 additions and 19 deletions
|
|
@ -1,3 +1,5 @@
|
|||
local strict = require(script.Parent.strict)
|
||||
|
||||
local Assets = {
|
||||
Sprites = {},
|
||||
Slices = {
|
||||
|
|
@ -18,11 +20,7 @@ local Assets = {
|
|||
}
|
||||
|
||||
local function guardForTypos(name, map)
|
||||
setmetatable(map, {
|
||||
__index = function(_, key)
|
||||
error(("%q is not a valid member of %s"):format(tostring(key), name), 2)
|
||||
end
|
||||
})
|
||||
strict(name, map)
|
||||
|
||||
for key, child in pairs(map) do
|
||||
if type(child) == "table" then
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
local Theme = {
|
||||
local strict = require(script.Parent.strict)
|
||||
|
||||
return strict("Theme", {
|
||||
ButtonFont = Enum.Font.GothamSemibold,
|
||||
InputFont = Enum.Font.Code,
|
||||
TitleFont = Enum.Font.GothamBold,
|
||||
|
|
@ -9,12 +11,4 @@ local Theme = {
|
|||
PrimaryColor = Color3.fromRGB(64, 64, 64),
|
||||
SecondaryColor = Color3.fromRGB(235, 235, 235),
|
||||
LightTextColor = Color3.fromRGB(160, 160, 160),
|
||||
}
|
||||
|
||||
setmetatable(Theme, {
|
||||
__index = function(_, key)
|
||||
error(("%s is not a valid member of Theme"):format(key), 2)
|
||||
end
|
||||
})
|
||||
|
||||
return Theme
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return function()
|
||||
local TestEZ = require(script.Parent.Parent.TestEZ)
|
||||
TestEZ.TestBootstrap:run(script.Parent)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue