-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHARD-2019 - Prettier lib-types #37
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
type Diff<T, U> = T extends U ? never : T | ||
type OptionalExceptFor<T, TRequired extends keyof T> = Partial<T> & | ||
Pick<T, TRequired> | ||
type RequiredExceptFor<T, TOptional extends keyof T> = Pick< | ||
T, | ||
Diff<keyof T, TOptional> | ||
> & | ||
Partial<T> | ||
type OptionalExceptFor<T, TRequired extends keyof T> = Partial<T> & Pick<T, TRequired> | ||
type RequiredExceptFor<T, TOptional extends keyof T> = Pick<T, Diff<keyof T, TOptional>> & Partial<T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Ensure that the Diff
type utility is correctly defined and handles edge cases where T
or U
might be never
or unknown
. [possible issue, importance: 5]
type Diff<T, U> = T extends U ? never : T | |
type OptionalExceptFor<T, TRequired extends keyof T> = Partial<T> & | |
Pick<T, TRequired> | |
type RequiredExceptFor<T, TOptional extends keyof T> = Pick< | |
T, | |
Diff<keyof T, TOptional> | |
> & | |
Partial<T> | |
type OptionalExceptFor<T, TRequired extends keyof T> = Partial<T> & Pick<T, TRequired> | |
type RequiredExceptFor<T, TOptional extends keyof T> = Pick<T, Diff<keyof T, TOptional>> & Partial<T> | |
type Diff<T, U> = T extends U ? never : T | |
type OptionalExceptFor<T, TRequired extends keyof T> = Partial<T> & Pick<T, TRequired> | |
type RequiredExceptFor<T, TOptional extends keyof T> = Pick<T, Diff<keyof T, TOptional>> & Partial<T> |
PR Type
enhancement, formatting
Description
Remove semicolons from TypeScript interface definitions
Adjust Prettier configuration for print width
Reformat import statements for consistency
Update test cases to match new formatting
Changes walkthrough 📝
13 files
Remove semicolons from TypeScript interfaces
Reformat import statements and remove semicolons
Remove semicolons from TypeScript interfaces
Remove semicolons from TypeScript interfaces
Remove semicolons from TypeScript interfaces
Reformat type definitions for consistency
Reformat type definitions for consistency
Remove semicolons from TypeScript interfaces
Reformat type definitions for consistency
Remove semicolons from TypeScript interfaces
Remove semicolons from TypeScript interfaces
Reformat export statements for consistency
Reformat conditional statements for consistency
1 files
Update test cases to match new formatting
1 files
Adjust Prettier print width configuration