We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f80f98 commit 028a899Copy full SHA for 028a899
index.d.ts
@@ -64,6 +64,7 @@ declare namespace build {
64
65
export interface StringSchema extends BaseSchema {
66
type: "string";
67
+ format?: string;
68
}
69
70
export interface IntegerSchema extends BaseSchema {
test/types/test.ts
@@ -135,3 +135,11 @@ const schema11: Schema = {
135
136
137
build(schema11)({ something: 'a string', somethingElse: 42 })
138
+
139
+// String schema with format
140
+const schema12: Schema = {
141
+ type: 'string',
142
+ format: 'date-time'
143
+}
144
145
+build(schema12)(new Date())
0 commit comments