[Vue] propsでUnion(複数の型の指定)を実現する [TypeScript]

例えば、

const value: String | Number;

みたいなのをpropsで指定したい場合、以下のようにする

export default Vue.extend({
  name: "SampleComponent",
  props: {
    type: {
      type: [String, Number], // 配列を格納すると複数指定できる
      // type: String as () => string | null, // propがnullableだという宣言の場合、以下のようにできる
      default: 0
    },
    ...