-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Incorrect types when using optional property with nested structure and deep option #77
Comments
// @g-plane |
This may be able to be fixed, but the "optional" mark will be lost as the given example. For example: type Source = { a?: string } will become: type Result = { a: string | undefined } These are different in TypeScript. |
There are actually two issues with the given example:
|
I know, but we can't operate: TypeScript playground. |
I wanted to bump this. It seems like even if If that's a cool assumption to make, I'd be open to submitting a patch for this issue. |
Ironically I think this fix for this is to use the type |
Output type should be In some cases you don't want to pass keys with undefined values explicitely. |
When using optional properties in a type and the option deep: true, the nested type is not properly converted to camelcase.
Here is a repository which reproduces the error.
https://github.com/monisnap-paul/camelcase-keys-bug
The text was updated successfully, but these errors were encountered: