Skip to content

Comments

Fix DeepPartial type#22789

Merged
IlyaKhD merged 3 commits intoDevExpress:22_2from
IlyaKhD:khd/fix-deep-partial
Sep 30, 2022
Merged

Fix DeepPartial type#22789
IlyaKhD merged 3 commits intoDevExpress:22_2from
IlyaKhD:khd/fix-deep-partial

Conversation

@IlyaKhD
Copy link
Contributor

@IlyaKhD IlyaKhD commented Sep 29, 2022

Cherry-picks

Practical Value

This fixes DeepPartial type which recursively wraps all object fields. Recursion becomes infinite and causes
TS2589: Type instantiation is excessively deep and possibly infinite error.

Before

DeepPartial recursion does not stop on scalar types (string, number, etc.): considering them as object types

After

Recursion terminated at non-object types.

Links

@IlyaKhD IlyaKhD added the 22_2 label Sep 29, 2022
@IlyaKhD IlyaKhD self-assigned this Sep 29, 2022
@IlyaKhD IlyaKhD force-pushed the khd/fix-deep-partial branch from ca64582 to 9c85872 Compare September 29, 2022 14:05
@IlyaKhD IlyaKhD marked this pull request as ready for review September 29, 2022 14:54
@IlyaKhD IlyaKhD force-pushed the khd/fix-deep-partial branch from 81eed7a to 075870f Compare September 30, 2022 10:59
pomahtri
pomahtri previously approved these changes Sep 30, 2022
@IlyaKhD IlyaKhD merged commit 0f23421 into DevExpress:22_2 Sep 30, 2022
@IlyaKhD IlyaKhD deleted the khd/fix-deep-partial branch October 2, 2022 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants