core icon indicating copy to clipboard operation
core copied to clipboard

Remove `any` from `PermissionController` types

Open rekmarks opened this issue 1 year ago • 0 comments

Following #4171, any is only used in a small number of PermissionController types. They are mostly, but not always used as constraints. We should eliminate any from the following types:

  • [ ] CaveatSpecificationBase
  • [ ] PermissionSpecificationBase
  • [ ] RestrictedMethodSpecificationConstraint
    • Will be resolved by #4238

For the *SpecificationBase types, I believe the solution is to genericize them such that TypeScript can determine whether a concrete specification is valid. The refactor necessary to accomplish this may not be terrible, but it's not trivial.

rekmarks avatar May 01 '24 17:05 rekmarks