Skip to content

Commit 1ae8043

Browse files
committed
chore: types
1 parent 4854b4c commit 1ae8043

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/runtime/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
} from '@unhead/vue/types'
44
import type { UseScriptInput, VueScriptInstance, UseScriptOptions } from '@unhead/vue'
55
import type { ComputedRef, Ref } from 'vue'
6-
import type {InferInput, ObjectSchema, ValiError} from 'valibot'
6+
import type { InferInput, ObjectSchema, ValiError } from 'valibot'
77
import type { Import } from 'unimport'
88
import type { SegmentInput } from './registry/segment'
99
import type { CloudflareWebAnalyticsInput } from './registry/cloudflare-web-analytics'
@@ -87,7 +87,7 @@ export type NuxtUseScriptOptions<T extends Record<symbol | string, any> = {}> =
8787
registryMeta?: Record<string, string>
8888
}
8989
/**
90-
* @internal Used to run custom validation logic in dev mode.
90+
* @internal
9191
*/
9292
_validate?: () => ValiError<any> | null | undefined
9393
}

src/runtime/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { UseScriptInput } from '@unhead/vue'
44
import { useRuntimeConfig } from 'nuxt/app'
55
import { useScript } from './composables/useScript'
66
import { parse } from '#nuxt-scripts-validator'
7+
import { parseURL, withQuery, parseQuery } from 'ufo'
78
import type {
89
EmptyOptionsSchema,
910
InferIfSchema,
@@ -22,7 +23,7 @@ function validateScriptInputSchema<T extends GenericSchema>(key: string, schema:
2223
}
2324
catch (_e) {
2425
const e = _e as ValiError<any>
25-
console.error(e.issues.map(i => `${key}.${i.path?.map(i => i.key).join(',')}: ${i.message}`).join('\n'))
26+
console.error(e.issues.map((i: any) => `${key}.${i.path?.map((i: any) => i.key).join(',')}: ${i.message}`).join('\n'))
2627
return e
2728
}
2829
}

0 commit comments

Comments
 (0)