Completion record linting doesn't work quite right with parentheses
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 245
- Forks
- 80
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 2
Description
In Temporal I have an operation RoundDuration which returns "either a normal completion containing a Record with fields [[DurationRecord]] (a Duration Record) and [[Total]] (a mathematical value), or a throw completion". I'm trying to access one of the fields on the returned Record without making an intermediate binding:
- Let result be (? RoundDuration(arguments)).[[DurationRecord]].
This results in the error "RoundDuration returns a Completion Record, but is not consumed as if it does" from ecmarkup.
Changing it to this makes the error go away:
- Let roundRecord be ? RoundDuration(arguments).
- Set result to roundRecord.[[DurationRecord]].
Contributor guide
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 reproducing the ecmarkup lint error with the RoundDuration example in the issue, then trace the completion-record linting path for parenthesized field access. Done means direct access to [[DurationRecord]] after ? RoundDuration(arguments) is accepted while invalid unconsumed completion records still produce an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100