slackapi / bolt-js

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

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

Open robhung opened 1 year ago

robhung commented 1 year 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 1 year 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.