Skip to content

Commit

Permalink
chore: deprecate process.browser (vercel#32862)
Browse files Browse the repository at this point in the history
This value has been deprecated in favor of `typeof window !== 'undefined'` a long time ago ([ref](vercel#7651)). We should also deprecate the value in the global types as it might give the wrong assumption that this value should still be used.
  • Loading branch information
PepijnSenders authored and natew committed Feb 16, 2022
1 parent 7d7bfe9 commit 6cbbed1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/next/types/global.d.ts
Expand Up @@ -3,6 +3,9 @@
// Extend the NodeJS namespace with Next.js-defined properties
declare namespace NodeJS {
interface Process {
/**
* @deprecated Use `typeof window` instead
*/
readonly browser: boolean
}

Expand Down

0 comments on commit 6cbbed1

Please sign in to comment.