Skip to content

Commit 8bb3d90

Browse files
authored
feat: 增加对 traffic 包的类型声明 (#2638)
1 parent b1ec504 commit 8bb3d90

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/traffic/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export { TrafficScene };
44
if (typeof window !== 'undefined') {
55
// append GroupGLLayer on maptalks manually
66
if (window.maptalks) {
7-
// @ts-expect-error-error
87
window.maptalks.TrafficScene = TrafficScene;
98
}
109
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import TrafficScene from "../TrafficScene";
2+
3+
declare global {
4+
interface Window {
5+
maptalks: {
6+
TrafficScene: typeof TrafficScene;
7+
};
8+
}
9+
}
10+
11+
export {};

0 commit comments

Comments
 (0)