Clopen Basis Theorem for Type Spaces