sindresorhus / camelcase-keys

Convert object keys to camel case
MIT License
691 stars 95 forks source link

Add better type definition #72

Closed g-plane closed 3 years ago

g-plane commented 3 years ago

This PR leverages TypeScript 4.1 template literal types to enhance type definition.

Fixes #60

sindresorhus commented 3 years ago

See https://github.com/sindresorhus/camelcase-keys/pull/69 and the feedback given there.

g-plane commented 3 years ago

Should we drop Node.js 8 in CI?

sindresorhus commented 3 years ago

Sure. I plan to target Node.js 12 after this PR.

g-plane commented 3 years ago

And, can you review this PR again?

sindresorhus commented 3 years ago

Should we drop Node.js 8 in CI?

Yes

sindresorhus commented 3 years ago

How does this implementation differ from https://github.com/sindresorhus/camelcase-keys/pull/69 ? I'm trying to make sure this PR is as good or better has that one. I haven't reviewed this in detail yet.

g-plane commented 3 years ago

Both are similar, but:

yuichkun commented 3 years ago

Hi, I just wanted to stop by and say big thank you for implementing this! 👏 Looking forward to leveraging this in my projects!