thefrontside / thefrontside/interactors
Reject non string matchers as the first argument to an interactor constructor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 2
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
The first argument to an interactor constructor can either be a filter, or a MaybeMatcher<string>. This means that passing something like a Matcher<number> as the first argument should be rejected, but it is currently not. This is due to how the types are combined and using Record<never, never> as the starting type. Eventually we would like to use never as the starting type, instead of Record<never, never>. I'm pretty sure with that change we could make this work, but it will not work as long as InteractorSpecificationBuilder exists. In other words we will only be able to do this once the specification syntax has been removed entirely in favour of the builder syntax.
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 with the simplified TypeScript Playground linked in the issue and trace how the constructor argument types are combined, especially the use of Record<never, never>. Confirm how InteractorSpecificationBuilder prevents using never as the starting type. Done means a Matcher is rejected as the first argument while filters and MaybeMatcher remain accepted, if this is possible before the specification syntax is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100