Skip to content

fix: sync GeoId/GridId type unions with palette.js - #20

Merged
nmndwivedi merged 3 commits into
quickdrawjs:mainfrom
Dahhrk:cursor/fix-type-union-drift-16-23e5
Sep 19, 2026
Merged

nmndwivedi merged 3 commits into
quickdrawjs:mainfrom
Dahhrk:cursor/fix-type-union-drift-16-23e5

Conversation

@Dahhrk

@Dahhrk Dahhrk commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What & why

The type declarations in packages/core/types/index.d.ts drifted behind the runtime arrays in palette.js:

  • GeoId was missing cloud
  • GridId was missing ruled, crosses, and iso
  • packages/core/README.md listed three grids and marked the default as none; the default is lines

This PR aligns the unions, docs, and a CI drift test with the runtime source of truth.

Fixes #16

Changes

File Change
packages/core/types/index.d.ts cloud on GeoId; ruled / crosses / iso on GridId
packages/react/types/index.d.ts JSDoc lists all six grids
packages/react-native/types/index.d.ts JSDoc lists all six grids
packages/core/README.md All six grids; lines marked default
README.md Cloud in shapes; six grids; default lines
packages/core/test/type-drift.test.js Parses the unions from index.d.ts and asserts they match GEO_IDS / GRID_IDS

No lockfile change. No new runtime dependencies.

cursoragent and others added 3 commits September 3, 2026 04:31
…d drift test

- GeoId: add missing 'cloud' to match GEO_IDS
- GridId: add missing 'ruled', 'crosses', 'iso' to match GRID_IDS
- Update JSDoc comments in core, react, and react-native type declarations
- README: list all seven geo shapes and six grid kinds, mark 'lines' as default
- Add packages/core/test/type-drift.test.js to catch future union drift

Fixes quickdrawjs#16

Co-authored-by: Dark <Dahhrk@users.noreply.github.com>
Co-authored-by: Dark <Dahhrk@users.noreply.github.com>
… default is lines

Co-authored-by: Dark <Dahhrk@users.noreply.github.com>
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

@cursoragent is attempting to deploy a commit to the naman's projects Team on Vercel.

A member of the Team first needs to authorize it.

@nmndwivedi nmndwivedi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against palette.js — unions and docs now match GEO_IDS / GRID_IDS, and the drift test is a nice guard. Tests + typecheck pass on top of current main. Thanks!

@nmndwivedi
nmndwivedi marked this pull request as ready for review September 19, 2026 22:57
@nmndwivedi
nmndwivedi merged commit af7086c into quickdrawjs:main Sep 19, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type declarations and README lag the shipped GRID_IDS and GEO_IDS

3 participants