Skip to content

Commit 14b7aea

Browse files
committed
Merge branch 'hotfix/62-oneof-ts'
2 parents b123576 + 63f8285 commit 14b7aea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

types/test/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ const customType = VueTypes.custom(validator).def(0).isRequired
3333

3434
const customTypeStrict = VueTypes.custom<number>(validator).def(0).isRequired
3535

36-
const oneOfType = VueTypes.oneOf([0, 'string', null]).def('test').isRequired
36+
const oneOf = VueTypes.oneOf([0, 'string', null]).def(1).isRequired
3737

38-
const oneOfTypeStrict = VueTypes.oneOf<string | boolean>([true, 'string']).def(
39-
true,
38+
const oneOfStrict = VueTypes.oneOf<true | 'string'>([true, 'string']).def(
39+
'string',
4040
).isRequired
4141

4242
class MyClass {

types/vue-types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface VueTypesInterface {
9292
fn: ValidatorFunction<T>,
9393
warnMsg?: string,
9494
): VueTypeCustom<T, ValidatorFunction<T>>
95-
oneOf<T = any>(arr: T[]): VueTypeDef<T[], T>
95+
oneOf<T = any>(arr: T[]): VueTypeDef<T>
9696
instanceOf<C extends Constructor>(
9797
instanceConstructor: C,
9898
): VueTypeInstanceOf<C>

0 commit comments

Comments
 (0)