# monaco-types

> Type-only exports of Monaco editor

Latest version **0.1.2** (published 2026-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install monaco-types
pnpm add monaco-types
yarn add monaco-types
bun add monaco-types
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2026-02-20 |
| First published | 2023-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 12 |
| Author | Remco Haszing |
| Maintainers | remcohaszing |
| Keywords | monaco, monaco-editor, monaco-editor-core, types, typescript |

## Links

- npm: https://www.npmjs.com/package/monaco-types
- Repository: https://github.com/remcohaszing/monaco-types
- Homepage: https://github.com/remcohaszing/monaco-types#readme
- Issues: https://github.com/remcohaszing/monaco-types/issues
- Funding: https://github.com/sponsors/remcohaszing
- npm.io page: https://npm.io/package/monaco-types

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2026-02-20
- 0.1.1 — 2025-12-24
- 0.1.0 — 2023-03-03

## README

# monaco-types

[![github actions](https://github.com/remcohaszing/monaco-types/actions/workflows/ci.yaml/badge.svg)](https://github.com/remcohaszing/monaco-types/actions/workflows/ci.yaml)
[![npm version](https://img.shields.io/npm/v/monaco-types)](https://www.npmjs.com/package/monaco-types)
[![npm downloads](https://img.shields.io/npm/dm/monaco-types)](https://www.npmjs.com/package/monaco-types)

Users of Monaco editor may insert it into their webpage via multiple sources, for example from the
`monaco-editor` or `monaco-editor-core` package, from a CDN, or from a third party source.

This package provides type-only exports of Monaco editor from either `monaco-editor` or
`monaco-editor-core`, whatever is available.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Compatibility](#compatibility)
- [License](#license)

## Installation

```sh
npm install monaco-types
```

## Usage

Instead of importing from `monaco-editor` or `monaco-editor-core`, import all type definitions from
`monaco-types`. This will allow you to write type annotations:

```ts
import { MarkerSeverity } from 'monaco-types'

let severity: MarkerSeverity
```

But TypeScript will show an error when using the import as a value

```ts
import { MarkerSeverity } from 'monaco-types'

let severity: MarkerSeverity
```

Also your user will only have to install either `monaco-editor` or `monaco-editor-core` to get type
definitions, but you don’t have to enforce either on them.

In order to support this, your library needs to accept `MonacoEditor` as an argument instead of
importing. For example:

```ts
import { IDisposable, MonacoEditor } from 'monaco-types'

export function configureMyPlugin(monaco: MonacoEditor): IDisposable {
  // Use monaco here.
}
```

## Compatibility

This package follows the DefinitelyTyped
[support window](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window).

## License

[MIT](LICENSE.md) © [Remco Haszing](https://github.com/remcohaszing)

---
_Source: https://npm.io/package/monaco-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
