The bug in the issue is due to the fact that the type ObjectOptional assumed only undefined (optional property), so I have fixed that part.
Supplemental information on testing
Since the type CamelCaseKeys cannot be tested as is, it is tested by specifying the type CamelCaseKeys for the variable after conversion with camelcaseKeys.
The test for index.d.ts before the modification failed as follows, but after the modification, the test passes because the union part works correctly.
This ought to fix https://github.com/sindresorhus/camelcase-keys/issues/118.
The bug in the issue is due to the fact that the
type ObjectOptional
assumed only undefined (optional property), so I have fixed that part.Supplemental information on testing
Since the
type CamelCaseKeys
cannot be tested as is, it is tested by specifying thetype CamelCaseKeys
for the variable after conversion withcamelcaseKeys
.The test for
index.d.ts
before the modification failed as follows, but after the modification, the test passes because the union part works correctly.