Skip to content

Commit

Permalink
Manual type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoffrey committed Aug 20, 2024
1 parent a5a759f commit 122c514
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion test/validation/dynamic/valid-reference.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { assert } from '../../../src'
import { expect, test } from 'vitest'
import { assert, type, dynamic, literal, string, number } from '../../../src'

Expand Down
2 changes: 1 addition & 1 deletion test/validation/empty/valid-array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'
import { number, array, empty } from '../../../src'

test('Valid empty array', () => {
const data = []
const data: any[] = []
assert(data, empty(array(number())))
expect(data).toStrictEqual([])
})
2 changes: 1 addition & 1 deletion test/validation/object/invalid-array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'
import { object } from '../../../src'

test('Invalid object array', () => {
const data = []
const data: any[] = []
const [err, res] = validate(data, object())
expect(res).toBeUndefined()

Expand Down
2 changes: 1 addition & 1 deletion test/validation/record/invalid-array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'
import { record, string, number } from '../../../src'

test('Invalid record array', () => {
const data = []
const data: any[] = []
const [err, res] = validate(data, record(string(), number()))
expect(res).toBeUndefined()

Expand Down
2 changes: 1 addition & 1 deletion test/validation/size/invalid-array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'
import { array, size, number } from '../../../src'

test('Invalid size array', () => {
const data = []
const data: any[] = []
const [err, res] = validate(data, size(array(number()), 1, 5))
expect(res).toBeUndefined()

Expand Down
2 changes: 1 addition & 1 deletion test/validation/type/invalid-array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, test } from 'vitest'
import { type } from '../../../src'

test('Invalid type array', () => {
const data = []
const data: any[] = []
const [err, res] = validate(data, type({}))
expect(res).toBeUndefined()

Expand Down

0 comments on commit 122c514

Please sign in to comment.