Skip to content

Commit

Permalink
Change file extension to Luau
Browse files Browse the repository at this point in the history
  • Loading branch information
dphfox committed Apr 15, 2024
1 parent 5cb91ff commit 9abd82d
Show file tree
Hide file tree
Showing 95 changed files with 40 additions and 40 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
80 changes: 40 additions & 40 deletions src/Memory/scoped.lua → src/Memory/scoped.luau
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
--!strict
--!nolint LocalShadow

--[[
Creates cleanup tables with access to constructors as methods.
]]

local Package = script.Parent.Parent
local Types = require(Package.Types)
local logError = require(Package.Logging.logError)
local scopePool = require(Package.Memory.scopePool)

local function merge(
into: {[unknown]: unknown},
from: {[unknown]: unknown}?,
...: {[unknown]: unknown}
): {[unknown]: unknown}
if from == nil then
return into
else
for key, value in from do
if into[key] == nil then
into[key] = value
else
logError("mergeConflict", nil, tostring(key))
end
end
return merge(into, ...)
end
end

local function scoped(
...: {[unknown]: unknown}
): {[unknown]: unknown}
return setmetatable(
scopePool.reuseAny() or {},
{__index = merge({}, ...)}
) :: any
end

--!strict
--!nolint LocalShadow

--[[
Creates cleanup tables with access to constructors as methods.
]]

local Package = script.Parent.Parent
local Types = require(Package.Types)
local logError = require(Package.Logging.logError)
local scopePool = require(Package.Memory.scopePool)

local function merge(
into: {[unknown]: unknown},
from: {[unknown]: unknown}?,
...: {[unknown]: unknown}
): {[unknown]: unknown}
if from == nil then
return into
else
for key, value in from do
if into[key] == nil then
into[key] = value
else
logError("mergeConflict", nil, tostring(key))
end
end
return merge(into, ...)
end
end

local function scoped(
...: {[unknown]: unknown}
): {[unknown]: unknown}
return setmetatable(
scopePool.reuseAny() or {},
{__index = merge({}, ...)}
) :: any
end

return (scoped :: any) :: Types.ScopedConstructor
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9abd82d

Please sign in to comment.