Skip to content

Commit 9faeeea

Browse files
authored
Valibot 1.0.0 (#55)
* update syntax * add nullish handling * clean up * refactor * reverse object logic
1 parent 7a85939 commit 9faeeea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/model/model-to-valibot.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export namespace ModelToValibot {
9393
return Type(`v.never`, null, [])
9494
}
9595
function Null(schema: Types.TNull) {
96-
return Type(`v.null_`, null, [])
96+
return Type(`v.null`, null, [])
9797
}
9898
function String(schema: Types.TString) {
9999
const constraints: string[] = []
@@ -153,7 +153,7 @@ export namespace ModelToValibot {
153153
return UnsupportedType(schema)
154154
}
155155
function Undefined(schema: Types.TUndefined) {
156-
return Type(`v.undefined_`, null, [])
156+
return Type(`v.undefined`, null, [])
157157
}
158158
function Union(schema: Types.TUnion) {
159159
const inner = schema.anyOf.map((schema) => Visit(schema)).join(`, `)
@@ -163,7 +163,7 @@ export namespace ModelToValibot {
163163
return Type(`v.unknown`, null, [])
164164
}
165165
function Void(schema: Types.TVoid) {
166-
return Type(`v.void_`, null, [])
166+
return Type(`v.void`, null, [])
167167
}
168168
function UnsupportedType(schema: Types.TSchema) {
169169
return `v.any(/* unsupported */)`

0 commit comments

Comments
 (0)