> ## Documentation Index
> Fetch the complete documentation index at: https://extension.js.org/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript browser extension template

> Scaffold a TypeScript browser extension with strict typing, Manifest V3 types, and pre-wired popup, content, and background script entry points.

<img src="https://mintcdn.com/extensionjs/VCnDd7fX2Nza24SE/images/examples/new-typescript/screenshot.png?fit=max&auto=format&n=VCnDd7fX2Nza24SE&q=85&s=e43e64970306e1e5eaa17f40a8c720ad" alt="TypeScript template preview" className="w-full rounded-xl border border-black/10 dark:border-white/10" width="2400" height="1800" data-path="images/examples/new-typescript/screenshot.png" />

## Create the project

<CodeGroup>
  ```bash npm theme={null}
  npx extension@latest create my-extension --template=typescript
  ```

  ```bash pnpm theme={null}
  pnpx extension@latest create my-extension --template=typescript
  ```

  ```bash yarn theme={null}
  yarn dlx extension@latest create my-extension --template=typescript
  ```

  ```bash bun theme={null}
  bunx extension@latest create my-extension --template=typescript
  ```

  ```bash bun theme={null}
  bunx extension@latest create my-extension --template=typescript
  ```
</CodeGroup>

## What you get

Static types across popup, content, and background scripts, with `chrome` and `browser` API typings configured. Catch manifest, messaging, and permission bugs at compile time instead of in the browser console.

A solid choice for teams that want strong refactor confidence as the extension grows.

## Source

Browse the full source on GitHub: [extension-js/examples/typescript](https://github.com/extension-js/examples/tree/main/examples/typescript).
