-
-
Notifications
You must be signed in to change notification settings - Fork 601
export ConditionalSimplify
and ConditionalSimplifyDeep
#1094
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This pull request exports the ConditionalSimplify and ConditionalSimplifyDeep types and updates the tests and documentation accordingly.
- Removed deep simplification tests from conditional-simplify.ts to separate concerns.
- Added full test coverage for ConditionalSimplifyDeep in a dedicated file.
- Updated readme.md to include entries for the newly exported types.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
test-d/conditional-simplify.ts | Removed deep tests and adjusted the import to use the new index. |
test-d/conditional-simplify-deep.ts | Added comprehensive tests for ConditionalSimplifyDeep. |
readme.md | Updated documentation to include the new exports. |
// Should simplify interface deeply. | ||
type SomeNode = { | ||
parent: PositionAndSizeIntersection; | ||
childs: Array<{parent: PositionAndSizeIntersection}>; |
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.
Consider renaming 'childs' to 'children' for correct plural form.
Copilot uses AI. Check for mistakes.
There is never any need to open multiple pull requests. If you made a mistake, you can simply force push to the same branch. Multiple closed pull requests adds needless noise to the our notifications. |
@@ -0,0 +1,62 @@ | |||
/** | |||
Recursively simplifies a type while including and/or excluding certain types from being simplified. |
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.
Please preserve the code example like it was originally, this includes empty lines.
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.
@romanywu I was talking in general, not just this example. All the code.
|
||
@example | ||
```ts | ||
import type {ConditionalSimplifyDeep} from 'type-fest'; |
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.
import type {ConditionalSimplifyDeep} from 'type-fest'; | |
import type {ConditionalSimplifyDeep} from 'type-fest'; | |
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.
Etc etc.
closed #1005