sindresorhus / lowercase-keys

Lowercase the keys of an object
MIT License
41 stars 12 forks source link

Add TypeScript definition #5

Closed netroy closed 5 years ago

netroy commented 5 years ago

The tests are failing because Object.entries isn't available on node 6.

If you'd like I can send another PR to either change the tests to run for now 8, & 10. Or, I ca send a PR to switch to Object.keys instead.

Cheers

sindresorhus commented 5 years ago

For packages with a default export, use export default foo;, not export = foo;. You will have to add module.exports.default = foo; to the index.js file.

All types used in the public interface should be export'ed.

Don't prefix the name of interfaces with I; Options, not IOptions.

Prefer using the unknown type instead of any whenever possible.

sindresorhus commented 5 years ago

The tests are failing because Object.entries isn't available on node 6.

Don't worry about it. I'll fix that after merging.

netroy commented 5 years ago

@sindresorhus I've made the requested changes. can you have a look at this again?

sindresorhus commented 5 years ago

For packages with a default export, use export default foo;, not export = foo;. You will have to add module.exports.default = foo; to the index.js file.

Not done.

sindresorhus commented 5 years ago

The method should be documented, per https://github.com/sindresorhus/typescript-definition-style-guide#documentation

sindresorhus commented 5 years ago

Ping :)

mastermatt commented 5 years ago

@sindresorhus do you still plan on implementing this? I came across this PR when looking at missing types for got.

sindresorhus commented 5 years ago

// @bendingbender Would you be able to prioritize this package?