Skip to content

Commit

Permalink
chore: remove unnecessary casting in tests + use as const
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 14, 2023
1 parent 8a7f621 commit eb4a23a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test-dts/mount.d-test.ts
Expand Up @@ -66,11 +66,11 @@ const AppWithProps = {
props: {
a: {
type: String,
required: true as true
required: true
}
},
template: ''
}
} as const

// accept props - vm is properly typed
expectType<string>(
Expand All @@ -91,7 +91,7 @@ expectError(
)

const AppWithArrayProps = {
props: ['a'] as ['a'],
props: ['a'],
template: ''
}

Expand Down Expand Up @@ -137,7 +137,7 @@ expectError(
mount((props: { a: 1 }) => {}, {
props: {
// @ts-expect-error wrong props
a: '222'
a: '222'
}
})
)
Expand Down
6 changes: 3 additions & 3 deletions test-dts/shallowMount.d-test.ts
Expand Up @@ -38,11 +38,11 @@ const AppWithProps = {
props: {
a: {
type: String,
required: true as true
required: true
}
},
template: ''
}
} as const

// accept props
// vm is properly typed
Expand All @@ -65,7 +65,7 @@ expectError(
)

const AppWithArrayProps = {
props: ['a'] as ['a'],
props: ['a'],
template: ''
}

Expand Down

0 comments on commit eb4a23a

Please sign in to comment.