From 058cd0edea158d4e1238200c78ec428a4a6c207f Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Wed, 15 May 2024 23:45:39 +0200 Subject: [PATCH 1/2] fix: fix namespace augmentation --- src/runtime/registry/google-maps.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/runtime/registry/google-maps.ts b/src/runtime/registry/google-maps.ts index 8ec1f3ca..385f16e1 100644 --- a/src/runtime/registry/google-maps.ts +++ b/src/runtime/registry/google-maps.ts @@ -4,6 +4,18 @@ import { useRegistryScript } from '../utils' import { array, literal, object, optional, string, union } from '#nuxt-scripts-validator' import type { RegistryScriptInput } from '#nuxt-scripts' +// eslint-disable-next-line ts/no-namespace +declare namespace google { + // eslint-disable-next-line ts/no-namespace + export namespace maps { + + /** + * @internal + */ + export function __ib__(): void + } +} + export const GoogleMapsOptions = object({ apiKey: string(), libraries: optional(array(string())), @@ -12,13 +24,6 @@ export const GoogleMapsOptions = object({ export type GoogleMapsInput = RegistryScriptInput -// eslint-disable-next-line ts/no-namespace -declare namespace google.maps { - /** - * @internal - */ - export function __ib__(): void -} export interface GoogleMapsApi { maps: typeof google.maps } From 9d7ff338415974494f1ab49c9fb266a08afb3933 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Wed, 15 May 2024 23:47:28 +0200 Subject: [PATCH 2/2] remove line --- src/runtime/registry/google-maps.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/registry/google-maps.ts b/src/runtime/registry/google-maps.ts index 385f16e1..50dc465b 100644 --- a/src/runtime/registry/google-maps.ts +++ b/src/runtime/registry/google-maps.ts @@ -8,7 +8,6 @@ import type { RegistryScriptInput } from '#nuxt-scripts' declare namespace google { // eslint-disable-next-line ts/no-namespace export namespace maps { - /** * @internal */