Edge Runtime logoEdge Runtime
GitHubGitHub (opens in a new tab)
  • Introduction
  • Getting Started
  • Command-line Interface
  • Features
    • Edge Runtime APIs
    • Polyfills
    • TypeScript support
    • Upgrading Nextjs
  • Packages
    • @edge-runtime/cookies
    • @edge-runtime/feature-detector
    • @edge-runtime/format
    • @edge-runtime/jest-environment
    • @edge-runtime/jest-expect
    • @edge-runtime/node-utils
    • @edge-runtime/ponyfill
    • @edge-runtime/primitives
    • edge-runtime
    • @edge-runtime/types
    • @edge-runtime/vm
  • Changelog (opens in a new tab)
  • Introduction
  • Getting Started
  • Command-line Interface
  • Features
    • Edge Runtime APIs
    • Polyfills
    • TypeScript support
    • Upgrading Nextjs
  • Packages
    • @edge-runtime/cookies
    • @edge-runtime/feature-detector
    • @edge-runtime/format
    • @edge-runtime/jest-environment
    • @edge-runtime/jest-expect
    • @edge-runtime/node-utils
    • @edge-runtime/ponyfill
    • @edge-runtime/primitives
    • edge-runtime
    • @edge-runtime/types
      • Installation
      • Usage
    • @edge-runtime/vm
  • Changelog (opens in a new tab)

On This Page

  • Installation
  • Usage
Question? Give us feedback → (opens in a new tab)Edit this page on GitHub
Packages
@edge-runtime/types

Edge Runtime Types

The @edge-runtime/types package has the TypeScript global types for using Edge Runtime.

Installation

npm install @edge-runtime/types --save

Usage

If you need to have these types loaded as part of the global context, you can add them inside tsconfig.json (opens in a new tab):

{
  "compilerOptions": {
    "types": ["@edge-runtime/types"]
  }
}

Alternatively, you can load them using triple-slash directive (opens in a new tab) as well:

/// <reference types="@edge-runtime/types" />
edge-runtime@edge-runtime/vm