observablehq / observablehq/plot
Inconsistent type definition of _scale_._transform_
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
When specifying scale.interval, scale.transform is automatically set. (See related discussion 2450 with an example).
In order to disable the implicit transform, we need to set it to null. However, the corresponding TypeScript definition specifies:
So null is not assignable here.
Related: #2423
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 at src/scales.d.ts around line 440 and compare the declaration with the runtime behavior described in discussion 2450. Confirm that the type definition permits the documented way to disable the implicit transform, and check related issue #2423 for context. Done means the declaration matches the supported API without rejecting that configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100