We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use this library in TypeScript (thank you for developing it).
I have recently submitted an issue, but I have found another issue, so I would like to report it again.
When the following implementation, the type definitions of Date and class fields and methods are also converted to snake_case.
Date
class Point { x: number; y: number; addPoint(point: Point): Point { return ...; } constructor(x: number, y: number) { ... } } interface Person { firstName: string; lastName: string; age: number; } const point = new Point(0, 10); const person: Person = { firstName: 'Yuta', lastName: 'Katayama', age: 30 }; const result1 = snakecaseKeys({ foo: person, nested: { fooBaz: point } }); const result2 = snakecaseKeys({ fooBaz: "fooBaz", foo_bar: new Date() });
// type structure of `result1` const result1: { foo: { first_name: string; last_name: string; age: number; }; nested: { foo_baz: { x: number; y: number; add_point: {}; }; }; } // type structure of `result2` const result2: { foo_baz: string; foo_bar: { to_string: {}; to_date_string: {}; to_time_string: {}; to_locale_string: {}; to_locale_date_string: {}; to_locale_time_string: {}; value_of: {}; get_time: {}; get_full_year: {}; ... 34 more ...; [Symbol.toPrimitive]: {}; }; }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I use this library in TypeScript (thank you for developing it).
I have recently submitted an issue, but I have found another issue, so I would like to report it again.
When the following implementation, the type definitions of
Date
and class fields and methods are also converted to snake_case.The text was updated successfully, but these errors were encountered: