Remove `any` from `PermissionController` types
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 413
- Forks
- 308
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 253
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the definitions and uses of CaveatSpecificationBase and PermissionSpecificationBase, then compare their constraints with the concrete specifications that consume them. Genericize the base types so TypeScript can validate concrete specifications without any; RestrictedMethodSpecificationConstraint is tracked separately in #4238.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authorization
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100