Skip to content

Commit 172407f

Browse files
committed
chore: add comment regarding Simplify
1 parent 9db55aa commit 172407f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/omit-deep.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ P extends `${infer RecordKeyInPath}.${infer SubPath}`
119119
? IsNever<Key> extends true
120120
? ObjectT
121121
: Key extends PropertyKey
122-
? Simplify<Omit<ObjectT, Key>>
122+
? Simplify<Omit<ObjectT, Key>> // `Simplify` to prevent `Omit` from appearing in the resulting type
123123
: ObjectT
124124
: ObjectT;
125125

source/required-deep.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export type RequiredDeep<T> = T extends BuiltIns
6666
? T
6767
: ((...arguments_: Parameters<T>) => ReturnType<T>) & RequiredObjectDeep<T>
6868
: T extends object
69-
? Simplify<RequiredObjectDeep<T>>
69+
? Simplify<RequiredObjectDeep<T>> // `Simplify` to prevent `RequiredObjectDeep` from appearing in the resulting type
7070
: unknown;
7171

7272
type RequiredObjectDeep<ObjectType extends object> = {

0 commit comments

Comments
 (0)