Skip to content

Commit 2051064

Browse files
fix: import app types from nuxt/app
1 parent b22e737 commit 2051064

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/runtime/composables/useKql.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { NitroFetchRequest } from 'nitropack'
22
import type { Ref } from 'vue'
33
import { computed, unref } from 'vue'
4+
// TODO: Import type from `#app` is not transpiled
5+
import type { AsyncData } from 'nuxt/app'
46
import type { KqlQueryRequest, KqlQueryResponse, UseKqlOptions } from '../types'
5-
import type { AsyncData } from '#app'
67
import { useFetch } from '#imports'
78
import { apiRoute } from '#build/nuxt-kql/options'
89

src/runtime/composables/usePublicKql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { NitroFetchRequest } from 'nitropack'
22
import type { Ref } from 'vue'
33
import { computed, unref } from 'vue'
4+
import type { AsyncData } from 'nuxt/app'
45
import type { KqlQueryRequest, KqlQueryResponse, UseKqlOptions } from '../types'
56
import type { ModuleOptions } from '../../module'
67
import { getAuthHeaders } from '../utils'
7-
import type { AsyncData } from '#app'
88
import { useFetch, useRuntimeConfig } from '#imports'
99

1010
export function usePublicKql<ResT = KqlQueryResponse, ReqT = KqlQueryRequest>(

src/runtime/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { FetchOptions } from 'ohmyfetch'
2-
import type { UseFetchOptions } from '#app'
2+
// TODO: Import type from `#app` is not transpiled
3+
import type { UseFetchOptions } from 'nuxt/app'
34

45
export type KqlQuery = `${'kirby' | 'site' | 'page'}${string}`
56

0 commit comments

Comments
 (0)