slackapi / bolt-js

A framework to build Slack apps using JavaScript
https://tools.slack.dev/bolt-js/
MIT License
2.75k stars 395 forks source link

Use `unknown` instead of `any` for `StringIndexed` #1661

Open robhung opened 2 years ago

robhung commented 2 years ago

https://github.com/slackapi/bolt-js/blob/e14c6a19f9435607745daf16aab4062cf6b731a7/src/types/helpers.ts#L5

As per title, I think it should be unknown to prevent accessing properties which may not exist.

seratch commented 2 years ago

Thanks for the suggestion! This can be a breaking change, so we are not planning to make this change happen in the short term. In the long run, changing the type when upgrading the major version may be worth considering.