Skip to content

Commit

Permalink
fix: distinct return type
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Aug 14, 2024
1 parent 4763ea3 commit 11b12c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ function _readonly<T extends Type>(field: T): _readonly<T> {
* //-> }
* ```
*/
function _partial<P extends Properties>(input: _object<P>) {
// @ts-expect-error; object needs distinct/definitive type else array overlap
function _partial<P extends Properties>(input: _object<P>): _object<Partial<P>> {
// deno-lint-ignore no-unused-vars
let { required, ...schema } = input;
// @ts-expect-error; needs distinct type else array overlap
return schema as _object<Partial<P>>;
return schema;
}

/**
Expand Down

0 comments on commit 11b12c3

Please sign in to comment.