Closed endel closed 3 years ago
Thanks for the feedback @endel. I pushed a small change to use {[type: string]: any}
instead of just any
plus some other more specific definitions where possible.
The goal was to prevent assignments such as:
grant.profile = 0
grant.profile = ''
Let me know what you think.
My proposal from above isn't going to work, so I reverted back most of the unknown object definitions to any. Probably a better approach could have been the use of unknown instead of any, but that would force everyone to define those objects, which can be seen as both good and bad depending on your point of view.
Published in v5.4.13
The reason for this change is because
object
is very restrictive, and you can't really access the contents of aGrantResponse
freely, for example:TypeScript playground URL: https://www.typescriptlang.org/play?#code/PQKhFgCgAIWhxATgQwHYBdqIKYGcAOA9qrtlLMFNgB5GKYCWG2iAZsgMbYIoYBKeIiW4BvclmQB3APwAuaIQBGAK2wd04-IkKsGAG2xyFKtRsgBfKFA7FcmAOa908pGnQCCt7gF5oI8wDcVpA2JIwAJtC+jm4AdFo6+oaxDOEBQA