Skip to content

Commit

Permalink
fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
moshest authored and depfu[bot] committed May 30, 2021
1 parent d8854db commit c4b1755
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 4 additions & 3 deletions package-lock.json

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

12 changes: 10 additions & 2 deletions src/schema/compiler.ts
Expand Up @@ -149,15 +149,23 @@ export default function compiler<S>(

if (!promises.length) {
if (errors.length || mainError) {
throw createValidationError(errors, mainError || error, ...args);
throw createValidationError<SchemaParameters<S>>(
errors,
mainError || error,
...args,
);
}

return res as SchemaResolveType<S>;
}

return Promise.all(promises).then(() => {
if (errors.length || mainError) {
throw createValidationError(errors, mainError || error, ...args);
throw createValidationError<SchemaParameters<S>>(
errors,
mainError || error,
...args,
);
}

return res;
Expand Down

0 comments on commit c4b1755

Please sign in to comment.