We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1ec504 commit 8bb3d90Copy full SHA for 8bb3d90
packages/traffic/src/index.ts
@@ -4,7 +4,6 @@ export { TrafficScene };
4
if (typeof window !== 'undefined') {
5
// append GroupGLLayer on maptalks manually
6
if (window.maptalks) {
7
- // @ts-expect-error-error
8
window.maptalks.TrafficScene = TrafficScene;
9
}
10
packages/traffic/src/types/global.d.ts
@@ -0,0 +1,11 @@
1
+import TrafficScene from "../TrafficScene";
2
+
3
+declare global {
+ interface Window {
+ maptalks: {
+ TrafficScene: typeof TrafficScene;
+ };
+ }
+}
11
+export {};
0 commit comments