Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test: add
  • Loading branch information
sxzz committed Feb 4, 2023
1 parent 5f5c5b0 commit 61e08b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -1603,6 +1603,8 @@ export default /*#__PURE__*/_defineComponent({
alias: { type: Array, required: true },
method: { type: Function, required: true },
symbol: { type: Symbol, required: true },
extract: { type: Number, required: true },
exclude: { type: [Number, Boolean], required: true },
union: { type: [String, Number], required: true },
literalUnion: { type: String, required: true },
literalUnionNumber: { type: Number, required: true },
Expand Down
8 changes: 8 additions & 0 deletions packages/compiler-sfc/__tests__/compileScript.spec.ts
Expand Up @@ -898,6 +898,8 @@ const emit = defineEmits(['a', 'b'])
alias: Alias
method(): void
symbol: symbol
extract: Extract<1 | 2 | boolean, 2>
exclude: Exclude<1 | 2 | boolean, 2>
union: string | number
literalUnion: 'foo' | 'bar'
Expand Down Expand Up @@ -928,6 +930,10 @@ const emit = defineEmits(['a', 'b'])
expect(content).toMatch(`alias: { type: Array, required: true }`)
expect(content).toMatch(`method: { type: Function, required: true }`)
expect(content).toMatch(`symbol: { type: Symbol, required: true }`)
expect(content).toMatch(`extract: { type: Number, required: true }`)
expect(content).toMatch(
`exclude: { type: [Number, Boolean], required: true }`
)
expect(content).toMatch(
`union: { type: [String, Number], required: true }`
)
Expand Down Expand Up @@ -961,6 +967,8 @@ const emit = defineEmits(['a', 'b'])
alias: BindingTypes.PROPS,
method: BindingTypes.PROPS,
symbol: BindingTypes.PROPS,
extract: BindingTypes.PROPS,
exclude: BindingTypes.PROPS,
union: BindingTypes.PROPS,
literalUnion: BindingTypes.PROPS,
literalUnionNumber: BindingTypes.PROPS,
Expand Down

0 comments on commit 61e08b4

Please sign in to comment.