File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ onMounted(() => {
144
144
})
145
145
// create the map
146
146
$script .then (async (instance ) => {
147
- const maps = await instance .maps
147
+ const maps = await instance .maps as any as typeof google . maps // some weird type issue here
148
148
const _map = new maps .Map (mapEl .value ! , options .value )
149
149
const placesService = new maps .places .PlacesService (_map )
150
150
Original file line number Diff line number Diff line change @@ -23,13 +23,16 @@ export const GoogleMapsOptions = object({
23
23
24
24
export type GoogleMapsInput = RegistryScriptInput < typeof GoogleMapsOptions >
25
25
26
+ type MapsNamespace = typeof google . maps
26
27
export interface GoogleMapsApi {
27
- maps : typeof window . google . maps
28
+ maps : MapsNamespace | Promise < MapsNamespace >
28
29
}
29
30
30
31
declare global {
31
32
interface Window {
32
- google : typeof google
33
+ google : {
34
+ maps : MapsNamespace
35
+ }
33
36
}
34
37
}
35
38
Original file line number Diff line number Diff line change 1
- /// <reference types="vimeo__player" />
2
1
import { watch } from 'vue'
2
+ import type Vimeo from 'vimeo__player'
3
3
import { useRegistryScript } from '../utils'
4
4
import type { RegistryScriptInput } from '#nuxt-scripts'
5
5
import { useHead } from '#imports'
@@ -8,7 +8,7 @@ type Constructor<T extends new (...args: any) => any> = T extends new (...args:
8
8
9
9
export interface VimeoPlayerApi {
10
10
Vimeo : {
11
- Player : Constructor < typeof window . Vimeo >
11
+ Player : Constructor < typeof Vimeo >
12
12
}
13
13
}
14
14
Original file line number Diff line number Diff line change @@ -126,6 +126,6 @@ export interface RegistryScript {
126
126
logo ?: string | { light : string , dark : string }
127
127
}
128
128
129
- export type ElementScriptTrigger = 'immediate' | 'visible' | keyof GlobalEventHandlersEventMap | ( keyof GlobalEventHandlersEventMap ) [ ] | false
129
+ export type ElementScriptTrigger = 'immediate' | 'visible' | string | string [ ] | false
130
130
131
131
export type RegistryScripts = RegistryScript [ ]
You can’t perform that action at this time.
0 commit comments