Skip to content
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

Fix: CamelCasedPropertiesDeep changing tupleto array #818

Merged
merged 1 commit into from May 6, 2024

Conversation

pmk1c
Copy link
Contributor

@pmk1c pmk1c commented Feb 21, 2024

fix #817

  • Copied the array/tuple-logic from DelimiterCasedPropertiesDeep to fix CamelCasedPropertiesDeep to change tuple to array.

@pmk1c pmk1c requested a review from voxpelli as a code owner February 21, 2024 08:55
@pmk1c pmk1c changed the title Fix: CamelCasedPropertiesDeep changing tuple-type to array-type Fix: CamelCasedPropertiesDeep changing tupleto array Feb 21, 2024
};
: Value extends []
? []
// Tailing spread array
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation.

@sindresorhus
Copy link
Owner

It should be a separate helper type, like in https://github.com/sindresorhus/type-fest/blob/main/source/delimiter-cased-properties-deep.d.ts

It would also be useful with a comment to indicate where it's copied from, to make it easier to keep them in sync.

Copy link
Collaborator

@voxpelli voxpelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm skipping review on this one, I'm not really a fan of the *Deep ones, they give me a headache

@sindresorhus
Copy link
Owner

@pmk1c Bump :)

@pmk1c pmk1c force-pushed the fix/817 branch 3 times, most recently from 7442936 to b8c233e Compare May 3, 2024 11:20
@pmk1c
Copy link
Contributor Author

pmk1c commented May 3, 2024

Sorry for letting you wait.

I also tried merging CamelCasedPropertiesArrayDeep and DelimiterCasedPropertiesArrayDeep into a higher order helper, but I gave up on that, when my head also started to hurt.

I'd think this is good for now.

@pmk1c pmk1c requested a review from sindresorhus May 3, 2024 11:21
};

// This is a copy of DelimiterCasedPropertiesArrayDeep (see: delimiter-cased-properties-deep.d.ts).
// These types should be kept in sync.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add this text to DelimiterCasedPropertiesArrayDeep too, otherwise it could get out of sync with this one.

…lCasedPropertiesDeep to fix changing tuple-type to array-type
@pmk1c pmk1c requested a review from sindresorhus May 3, 2024 19:24
@sindresorhus sindresorhus merged commit 4e7bb18 into sindresorhus:main May 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CamelCasedObjectDeep breaks tuple-types into array-types
3 participants