mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): deprecate process.*
flags (#27089)
This commit is contained in:
parent
3169c5cec7
commit
bff1ec237b
29
packages/nuxt/src/app/types/augments.d.ts
vendored
29
packages/nuxt/src/app/types/augments.d.ts
vendored
@ -1,20 +1,29 @@
|
||||
import type { UseHeadInput } from '@unhead/vue'
|
||||
import type { NuxtApp, useNuxtApp } from '../nuxt'
|
||||
|
||||
interface NuxtStaticBuildFlags {
|
||||
browser: boolean
|
||||
client: boolean
|
||||
dev: boolean
|
||||
server: boolean
|
||||
test: boolean
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
interface Process extends NuxtStaticBuildFlags {}
|
||||
interface Process {
|
||||
/** @deprecated Use `import.meta.browser` instead. This may be removed in Nuxt v5 or a future major version. */
|
||||
browser: boolean
|
||||
/** @deprecated Use `import.meta.client` instead. This may be removed in Nuxt v5 or a future major version. */
|
||||
client: boolean
|
||||
/** @deprecated Use `import.meta.dev` instead. This may be removed in Nuxt v5 or a future major version. */
|
||||
dev: boolean
|
||||
/** @deprecated Use `import.meta.server` instead. This may be removed in Nuxt v5 or a future major version. */
|
||||
server: boolean
|
||||
/** @deprecated Use `import.meta.test` instead. This may be removed in Nuxt v5 or a future major version. */
|
||||
test: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface ImportMeta extends NuxtStaticBuildFlags {}
|
||||
interface ImportMeta extends NuxtStaticBuildFlags {
|
||||
browser: boolean
|
||||
client: boolean
|
||||
dev: boolean
|
||||
server: boolean
|
||||
test: boolean
|
||||
}
|
||||
|
||||
interface Window {
|
||||
__NUXT__?: Record<string, any>
|
||||
|
Loading…
Reference in New Issue
Block a user