Skip to content

Commit

Permalink
Fix generic in object schema union method
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartmr committed Sep 25, 2021
1 parent 02107ec commit babf3bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "not-me",
"version": "4.3.1",
"version": "4.3.2",
"description": "Easy and type-safe validation",
"main": "lib/index.js",
"types": "lib/types.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion src/schemas/object/object-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ class ObjectSchemaImpl<
Result = SchemaObjToShape<ResultSchemaObj>
>(
schemaFactory: SchemaFactory
): ObjectSchemaImpl<ResultSchemaObj, Result, Exclude<_Output, _Shape>> {
): ObjectSchemaImpl<
ResultSchemaObj,
Result,
Result | Exclude<_Output, _Shape>
> {
this.addShapeFilter((input, options) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const schema = schemaFactory(input as any);
Expand Down

0 comments on commit babf3bd

Please sign in to comment.