Skip to content

Commit c7fd75a

Browse files
committed
test: add
1 parent b602ab4 commit c7fd75a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,8 @@ export default /*#__PURE__*/_defineComponent({
15851585
alias: { type: Array, required: true },
15861586
method: { type: Function, required: true },
15871587
symbol: { type: Symbol, required: true },
1588+
extract: { type: Number, required: true },
1589+
exclude: { type: [Number, Boolean], required: true },
15881590
union: { type: [String, Number], required: true },
15891591
literalUnion: { type: String, required: true },
15901592
literalUnionNumber: { type: Number, required: true },

packages/compiler-sfc/__tests__/compileScript.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,8 @@ const emit = defineEmits(['a', 'b'])
898898
alias: Alias
899899
method(): void
900900
symbol: symbol
901+
extract: Extract<1 | 2 | boolean, 2>
902+
exclude: Exclude<1 | 2 | boolean, 2>
901903
902904
union: string | number
903905
literalUnion: 'foo' | 'bar'
@@ -928,6 +930,10 @@ const emit = defineEmits(['a', 'b'])
928930
expect(content).toMatch(`alias: { type: Array, required: true }`)
929931
expect(content).toMatch(`method: { type: Function, required: true }`)
930932
expect(content).toMatch(`symbol: { type: Symbol, required: true }`)
933+
expect(content).toMatch(`extract: { type: Number, required: true }`)
934+
expect(content).toMatch(
935+
`exclude: { type: [Number, Boolean], required: true }`
936+
)
931937
expect(content).toMatch(
932938
`union: { type: [String, Number], required: true }`
933939
)
@@ -961,6 +967,8 @@ const emit = defineEmits(['a', 'b'])
961967
alias: BindingTypes.PROPS,
962968
method: BindingTypes.PROPS,
963969
symbol: BindingTypes.PROPS,
970+
extract: BindingTypes.PROPS,
971+
exclude: BindingTypes.PROPS,
964972
union: BindingTypes.PROPS,
965973
literalUnion: BindingTypes.PROPS,
966974
literalUnionNumber: BindingTypes.PROPS,

0 commit comments

Comments
 (0)