plugin: Miscellaneous cleanup

This commit is contained in:
Lucien Greathouse
2020-03-18 23:15:03 -07:00
parent 3b433e53be
commit 5768d8e4a4
5 changed files with 30 additions and 17 deletions

25
plugin/src/PatchSet.lua Normal file
View File

@@ -0,0 +1,25 @@
--[[
Methods to operate on either a patch created by the hydrate method, or a
patch returned from the API.
]]
local t = require(script.Parent.Parent.t)
local Types = require(script.Parent.Types)
local PatchSet = {}
PatchSet.validate = t.interface({
removed = t.array(t.union(Types.RbxId, t.Instance)),
added = t.map(Types.RbxId, Types.ApiInstance),
updated = t.array(Types.ApiInstanceUpdate),
})
--[[
Invert the given PatchSet using the given instance map.
]]
function PatchSet.invert(patchSet, instanceMap)
error("not yet implemented", 2)
end
return PatchSet