function t.instanceOf(Z,Q)assert(t.string(Z))local A if Q~=nil then A=t.children(Q)end return function(Q)local F=t.Instance(Q)if not F then return false end if Q.ClassName~=Z then return false end if A then local Z=A(Q)if not Z then return false end end return true end end t.instance=t.instanceOf
--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName

	@param className The class name to check for

	@returns A function that will return true iff the condition is passed
**--]]
function t.instanceOf(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess = t.Instance(value)
		if not instanceSuccess then
			return false
		end

		if value.ClassName ~= className then
			return false
		end

		if childrenCheck then
			local childrenSuccess = childrenCheck(value)
			if not childrenSuccess then
				return false
			end
		end

		return true
	end
end

t.instance = t.instanceOf
