local D=script.Parent.Parent local E=D.Parent local s=require(E.t)local function d(D,E)local d=typeof(D)if d=="\116\097\098\108\101"and not E then return FromTable(D,true)else return s[d]end end function FromTable(D,E)local s={}for D,V in pairs(D)do s[D]=d(V,E)end return s end return d
--[[
	This function returns a type checker based on the provided value
]]

local Winro = script.Parent.Parent
local Packages = Winro.Parent

local t = require(Packages.t)

local function GetValidator(Value, NoTable)
	
	-- Get the type
	local Type = typeof(Value)

	-- Override for table types
	if Type == 'table' and not NoTable then
		return FromTable(Value, true)
	else
		return t[Type]
	end
end

function FromTable(Table, NoTable)

	-- Return a validator for each key
	local Validators = {}

	-- Pupulate validators
	for Key, Value in pairs(Table) do
		Validators[Key] = GetValidator(Value, NoTable)
	end

	return Validators
end

return GetValidator
