Features
-
Add
t.dict
export: 20d2bbd, d40b952
Adds a JSON Schema builder for theRecord<string, T>
TypeScript equivalent.import * as t from 'tschema'; let names = t.dict(t.string()); type Names = t.Infer<typeof names>; //-> Record<string, string> let mates = t.dict( t.object({ name: t.string(), age: t.integer(), }) ); type Mates = t.Infer<typeof mates>; //-> Record<string, { //-> name: string; //-> age: number; //-> }>
Patches
- Add explicit return type for
t.partial
signature: 11b12c3
Chores
- Add type assertion tests for readonly arrays w/ enums (#10): 09c541e
- (CI) Use Deno 2.0 in Actions: 0bb98d0, e50e379, 70f964f
- (CI) Add
Publish (dry-run)
step: 5bcb4ef
Full Changelog: v3.1.0...v3.2.0