Skip to content

Add TypeScript types for Standard Style configuration#4210

Open
mfazekas wants to merge 4 commits into
mainfrom
feat/standard-style-config
Open

Add TypeScript types for Standard Style configuration#4210
mfazekas wants to merge 4 commits into
mainfrom
feat/standard-style-config

Conversation

@mfazekas
Copy link
Copy Markdown
Contributor

Summary

Adds proper TypeScript types (StandardStyleConfig) for the config prop on StyleImport, providing autocomplete and type safety for all known Mapbox Standard style configuration options (light presets, themes, 3D features, labels, and color overrides). Arbitrary string keys are still accepted for forward compatibility.

Test plan

  • Run yarn type:check - passes with no new errors
  • Verify autocomplete works in IDE when typing config={{ }} on a <StyleImport> component
  • Example app StyleImportConfig.tsx compiles without errors

…docs

The doc generator now properly renders intersection types (showing the
typed object members) and union types (showing the actual values instead
of just "union").
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