We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 926a9ab commit 631dd9eCopy full SHA for 631dd9e
2 files changed
src/runtime/composables/useSafeRuntimeConfig.ts
@@ -1,7 +1,7 @@
1
import { useRuntimeConfig } from '#imports'
2
3
declare global {
4
- interface NuxtSafeRuntimeConfig extends Record<string, unknown> {}
+ interface NuxtSafeRuntimeConfig {}
5
}
6
7
/**
test/fixtures/server-typing/server/utils/config.ts
@@ -1,5 +1,7 @@
export function getTypedServerConfig(): { secretKey: string, apiBase: string } {
const config = useSafeRuntimeConfig()
+ // @ts-expect-error unknown keys must be rejected to catch typos
+ type _InvalidKey = typeof config.notARealConfigKey
const secretKey: string = config.secretKey
const apiBase: string = config.public.apiBase
0 commit comments