Skip to content

Commit

Permalink
Fix #3437: extendShape erases JSDoc property documentation (#3463)
Browse files Browse the repository at this point in the history
  • Loading branch information
jussisaurio authored May 7, 2024
1 parent 29d2ea2 commit d969423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions deno/lib/helpers/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,9 @@ export namespace objectUtil {
};

export type extendShape<A extends object, B extends object> = {
[K in keyof A | keyof B]: K extends keyof B
? B[K]
: K extends keyof A
? A[K]
: never;
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
};
}

Expand Down
8 changes: 3 additions & 5 deletions src/helpers/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,9 @@ export namespace objectUtil {
};

export type extendShape<A extends object, B extends object> = {
[K in keyof A | keyof B]: K extends keyof B
? B[K]
: K extends keyof A
? A[K]
: never;
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
};
}

Expand Down

0 comments on commit d969423

Please sign in to comment.