# @types/elm

> TypeScript definitions for elm

Latest version **0.19.6** (published 2025-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/elm
pnpm add @types/elm
yarn add @types/elm
bun add @types/elm
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.19.6 |
| Published | 2025-08-05 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51393 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/elm
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/elm
- npm.io page: https://npm.io/package/@types/elm

## Recent versions

- 0.19.6 (latest) — 2025-08-05
- 0.19.5 (ts5.1) — 2025-07-16
- 0.19.3 (ts4.5) — 2023-11-07
- 0.19.1 (ts3.8) — 2021-07-08
- 0.19.0 (ts3.3) — 2021-01-01
- 0.12.30 (ts3.2) — 2020-05-15
- 0.12.29 (ts2.3) — 2016-09-19
- 0.19.4 — 2025-05-06
- 0.19.2 — 2023-10-18
- 0.12.28 — 2016-07-14
- 0.12.27-alpha — 2016-07-08
- 0.12.26-alpha — 2016-07-04
- 0.12.25-alpha — 2016-07-02
- 0.12.24-alpha — 2016-07-01
- 0.12.23-alpha — 2016-07-01
- … 4 more at https://npm.io/package/@types/elm/versions

## README

# Installation
> `npm install --save @types/elm`

# Summary
This package contains type definitions for elm (http://elm-lang.org).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/elm.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/elm/index.d.ts)
````ts
export interface ElmModule<
    P,
    F,
    Entrypoints extends string[] =
        // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type
        ["Main"],
> {
    Elm: ElmInstance<P, F, Entrypoints>;
}

export type ElmInstance<
    P,
    F,
    // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type
    Entrypoints extends string[] = ["Main"],
> = NestedEntrypoints<Entrypoints, P, F>;

type NestedEntrypoints<Entrypoints extends string[], P, F> = Entrypoints extends [
    infer First extends string,
    ...infer Rest extends string[],
] ? { [K in First]: NestedEntrypoints<Rest, P, F> }
    : ElmMain<P, F>;

export interface ElmMain<P, F> {
    init(options?: { node?: Node | undefined; flags: F } | undefined): ElmApp<P>;
}

export interface ElmApp<P> {
    ports: P;
}

export interface PortToElm<V> {
    send(value: V): void;
}

export interface PortFromElm<V> {
    subscribe(handler: (value: V) => void): void;
    unsubscribe(handler: (value: V) => void): void;
}

export {};

````

### Additional Details
 * Last updated: Tue, 05 Aug 2025 18:02:59 GMT
 * Dependencies: none

# Credits
These definitions were written by [Dénes Harmath](https://github.com/thSoft), [Renan Vaz ](https://github.com/renanpvaz), and [Eli D.](https://github.com/lishaduck).

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