Skip to content

Commit 0abf451

Browse files
add test
1 parent 6916fe6 commit 0abf451

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/types/schema.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,3 +969,12 @@ function gh12611() {
969969
anotherField?: string;
970970
}>({} as Props);
971971
}
972+
973+
function gh12782() {
974+
const schemaObj = { test: { type: String, required: true } };
975+
const schema = new Schema(schemaObj);
976+
type Props = InferSchemaType<typeof schema>;
977+
expectType<{
978+
test: string
979+
}>({} as Props);
980+
}

0 commit comments

Comments
 (0)