limit the type parameter's value to given set of types