Breaking change in v24.8.2: `StyleSpecification`, `LayerSpecification`, and other types are no longer exported
bug
**Describe the bug**
Since `v24.8.2`, TypeScript types such as `StyleSpecification`, `LayerSpecification`, `FillLayerSpecification`, `LineLayerSpecification`, etc., are no longer exported from the package.
Applications that build on top of the style spec and rely on these typings are affected with errors like:
```
Module '"@maplibre/maplibre-gl-style-spec"' declares 'StyleSpecification' locally, but it is not exported.ts(2459)
```
**To Reproduce**
Use any of the following imports in a TypeScript project with `v24.8.2`:
```ts
import { StyleSpecification, format } from '@maplibre/maplibre-gl-style-spec';
```
```ts
import {
LayerSpecification,
FillLayerSpecification,
LineLayerSpecification,
} from '@maplibre/maplibre-gl-style-spec';
```
**Expected behavior**
Applications continue working after updating from `v24.8.1` to `v24.8.2` (semver).
关闭于 2026-05-03 3 条评论