-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved lens find interface output type (#77)
- Loading branch information
1 parent
a8c90a4
commit 85c8529
Showing
3 changed files
with
8 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import type { SchemaInterfaceIdentity } from "../schema/mod.ts"; | ||
|
||
export type Entity< | ||
T extends unknown = Record<string, unknown>, | ||
> = | ||
export type Entity<T extends unknown = Record<string, unknown>> = | ||
& DeepPartial<T> | ||
& SchemaInterfaceIdentity; | ||
|
||
export type DeepPartial<T> = T extends Record<string, unknown> | ||
? { [P in keyof T]?: DeepPartial<T[P]> } | ||
: T; | ||
|
||
export type Unite<T> = T extends Record<string, unknown> | ||
? { [Key in keyof T]: T[Key] } | ||
: T; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters