Skip to content

Commit ede4b7c

Browse files
authored
Merge pull request #9 from tom-konda/ts_type
Add TypeScript declarations
2 parents 46b1510 + 9d5c67c commit ede4b7c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

index.d.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { IControl, Map } from 'maplibre-gl';
2+
3+
type OpacityControlOption = {
4+
baseLayers: Record<string, string>,
5+
overLayers: Record<string, string>,
6+
opacityControl: boolean,
7+
}
8+
9+
export default class OpacityControl implements IControl {
10+
constructor(options: Partial<OpacityControlOption>);
11+
onAdd(map: Map): HTMLElement;
12+
onRemove(): void;
13+
}
14+
15+
export {}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.6.0",
44
"description": "maplibre-gl-opacity is a MapLibre GL JS plugin that makes multiple tile layers transparent.",
55
"main": "dist/maplibre-gl-opacity.js",
6+
"types": "./index.d.ts",
67
"repository": {
78
"type": "git",
89
"url": "git+https://github.com/dayjournal/maplibre-gl-opacity.git"

0 commit comments

Comments
 (0)