-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove schema layer funcs (#1202)
* refactor: remove schema layer funcs * lint
- Loading branch information
1 parent
64dc9d5
commit f44b086
Showing
12 changed files
with
6 additions
and
131 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,26 +1,6 @@ | ||
import type { Input } from './__.js' | ||
|
||
type InputFields = Record<string, any> | ||
|
||
export interface Args<$InputFields extends InputFields, $IsFieldsAllNullable extends boolean = boolean> { | ||
fields: $InputFields | ||
isFieldsAllNullable: $IsFieldsAllNullable | ||
} | ||
|
||
export const Args = <$InputFields extends InputFields, const $IsInputFieldsAllNullable extends boolean>( | ||
fields: $InputFields, | ||
isFieldsAllNullable: $IsInputFieldsAllNullable, | ||
): Args<$InputFields, $IsInputFieldsAllNullable> => { | ||
return { | ||
fields, | ||
isFieldsAllNullable, | ||
} | ||
} | ||
|
||
export type OmitNullableFields<$Fields extends InputFields> = { | ||
[Key in keyof $Fields as $Fields[Key]['type'] extends Input.Nullable<any> ? never : Key]: $Fields[Key] | ||
} | ||
|
||
export type PickNullableFields<$Fields extends InputFields> = { | ||
[Key in keyof $Fields as $Fields[Key]['type'] extends Input.Nullable<any> ? Key : never]: $Fields[Key] | ||
} |
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
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
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
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
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