Skip to content

Commit c575767

Browse files
Update UUID parameter types in ValidatorJSAsserts interface
1 parent 10ac352 commit c575767

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export interface ValidatorJSAsserts {
202202

203203
/**
204204
* Valid `UUID`.
205-
* @param [version] - UUID version `3`, `4`, `5`, `7`, `max` or `nil`. Defaults to `all` if omitted.
205+
* @param [version] - UUID version 3, 4, 5, 7, `3`, `4`, `5`, `7`, `max` or `nil`. Defaults to `all` if omitted.
206206
*/
207-
uuid(version?: '3' | '4' | '5' | '7' | 'max' | 'nil'): AssertInstance;
207+
uuid(version?: 3 | 4 | 5 | 7 | '3' | '4' | '5' | '7' | 'max' | 'nil'): AssertInstance;
208208
}

test/asserts/uuid-assert.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ describe('UuidAssert', () => {
7272

7373
[
7474
{ name: 'v3', uuid: '6fa459ea-ee8a-3ca4-894e-db77e160355e', version: 3 },
75+
{ name: 'v3 (string version)', uuid: '6fa459ea-ee8a-3ca4-894e-db77e160355e', version: '3' },
7576
{ name: 'v4', uuid: '17dd5a7a-637c-436e-bb8a-5398f7ac0a76', version: 4 },
77+
{ name: 'v4 (string version)', uuid: '17dd5a7a-637c-436e-bb8a-5398f7ac0a76', version: '4' },
7678
{ name: 'v5', uuid: '74738ff5-5367-5958-9aee-98fffdcd1876', version: 5 },
79+
{ name: 'v5 (string version)', uuid: '74738ff5-5367-5958-9aee-98fffdcd1876', version: '5' },
7780
{ name: 'v7', uuid: '01973bbd-2012-7c70-bc1a-59c06fe30326', version: 7 },
81+
{ name: 'v7 (string version)', uuid: '01973bbd-2012-7c70-bc1a-59c06fe30326', version: '7' },
7882
{ name: 'nil', uuid: '00000000-0000-0000-0000-000000000000', version: 'nil' },
7983
{ name: 'max', uuid: 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF', version: 'max' }
8084
].forEach(({ name, uuid, version }) => {

0 commit comments

Comments
 (0)