Skip to content

refactor(frontend): enforce exact optional property contracts - #1543

Closed
lovasoa wants to merge 1 commit into
mainfrom
codex/ts-exact-optional-properties
Closed

lovasoa wants to merge 1 commit into
mainfrom
codex/ts-exact-optional-properties

Conversation

@lovasoa

@lovasoa lovasoa commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

TypeScript previously accepted { option: undefined } wherever a configuration property was optional, making it easy to clear library defaults accidentally. Enable exactOptionalPropertyTypes for the frontend and both inherited test configurations, and build chart points, chart axes, TomSelect settings, and Playwright settings with absent properties when an option is unset.

Keep two intentional ApexCharts overrides explicit: xaxis.type and tooltip.custom use a present undefined to clear defaults. Narrow, documented adapters describe those runtime contracts at the library boundary; omitting tooltip.custom would replace SQLPage's linked range-bar tooltip with ApexCharts' built-in tooltip. Other optional fields retain their exact contracts, and chart type/series assertions exclude undefined because those values are always present.

Validation: npm run format, npm test (Biome, frontend/test TypeScript configurations, frontend unit tests), npm run build, and all 82 Playwright component fixture tests against a binary built with this branch's browser assets.

@lovasoa

lovasoa commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

sounds uselessly verbose

@lovasoa lovasoa closed this Oct 9, 2026
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.

1 participant