Skip to content

Commit 99b2904

Browse files
authored
fix(gmap): fix google namespace augmentation (#61)
1 parent 59e7cb6 commit 99b2904

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/runtime/registry/google-maps.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ import { useRegistryScript } from '../utils'
44
import { array, literal, object, optional, string, union } from '#nuxt-scripts-validator'
55
import type { RegistryScriptInput } from '#nuxt-scripts'
66

7+
// eslint-disable-next-line ts/no-namespace
8+
declare namespace google {
9+
// eslint-disable-next-line ts/no-namespace
10+
export namespace maps {
11+
/**
12+
* @internal
13+
*/
14+
export function __ib__(): void
15+
}
16+
}
17+
718
export const GoogleMapsOptions = object({
819
apiKey: string(),
920
libraries: optional(array(string())),
@@ -12,13 +23,6 @@ export const GoogleMapsOptions = object({
1223

1324
export type GoogleMapsInput = RegistryScriptInput<typeof GoogleMapsOptions>
1425

15-
// eslint-disable-next-line ts/no-namespace
16-
declare namespace google.maps {
17-
/**
18-
* @internal
19-
*/
20-
export function __ib__(): void
21-
}
2226
export interface GoogleMapsApi {
2327
maps: typeof google.maps
2428
}

0 commit comments

Comments
 (0)