Revision 0.8.4 (#13)

* Parameterized Types

* Syntax Options

* Documentation
This commit is contained in:
sinclairzx81
2025-01-28 02:39:50 +09:00
committed by GitHub
parent c2991c1972
commit 78dc497ef8
21 changed files with 451 additions and 159 deletions

17
test/options.ts Normal file
View File

@@ -0,0 +1,17 @@
import { Assert } from './assert'
import { TypeBox, Valibot, Zod } from '@sinclair/typemap'
describe('SyntaxOptions', () => {
it('Should map Options (Zod)', () => {
const A = TypeBox('string', { minLength: 10 })
const B = Zod(A)
const C = TypeBox(B)
Assert.IsEqual(C.minLength, 10)
})
it('Should map Options (Valibot)', () => {
const A = TypeBox('string', { minLength: 10 })
const B = Valibot(A)
const C = TypeBox(B)
Assert.IsEqual(C.minLength, 10)
})
})