function t.instanceOf(e,C)assert(t.string(e))local N if C~=nil then N=t.children(C)end return function(C)local L,H=t.Instance(C)if not L then return false,H or""end if C.ClassName~=e then return false,string.format("\037\115 \101\120\112\101\099\116\101\100\044 \103\111\116 \037\115",e,C.ClassName)end if N then local e,L=N(C)if not e then return false,L 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, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if value.ClassName ~= className then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

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

		return true
	end
end

t.instance = t.instanceOf
