Vue 2 + Typescript + multiple types for props

Hello,

When working with Vuejs v2.6.14, typescript (v 4.2.4) version without decorators, I noticed that you cannot use multiple types (nor union types) for a prop type definition. Tried lots of alternatives, but always got the same error regarding prop validation "Expected String with value ‘…’, got Number with value ‘…’ or all the component will turn red from errors. This is mainly happening when declaring union types or multiple types that are different (e.g.: number | string, Object | null, Object | Array, string | object)

E.g.: for a prop named title:
type: String || Number => doesn’t work because the String constructor will always be truthy
type: String as PropType<String | Number> => sees only String as a type for the title prop
type: [String, Number] => not working as well
type: => tried creating a union type as well, but failed.
type: string | number => error: “a constructor is expected”

It’s an ongoing project and I would really appreciate a good solution.
Thanks!