mitt breaking changes
mitt 3.0.0 (June 23, 2021) is its newest release with breaking changes, 12 of them. The first: Behavior changed off. Every breaking API change we have recorded in mitt on npm: 18 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 3.0.1, released July 4, 2023. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
mitt 3.0.0 breaking changes
- Behavior changed
off
Calling off with a type and no handler now removes every listener of that type instead of doing nothing. Code that relied on the old behavior must pass a specific handler. github.com - Signature changed
default
Was function mitt(all?: EventHandlerMap): Emitter; now function mitt<Events extends Record<EventType, unknown>>(all?: EventHandlerMap<Events>): Emitter<Events>. npmjs.com - Signature changed
Emitter
Was interface Emitter; now interface Emitter<Events extends Record<EventType, unknown>>. npmjs.com - Signature changed
Emitter.all
Was all: EventHandlerMap; now all: EventHandlerMap<Events>. npmjs.com - Signature changed
Emitter.emit
Was emit(type: '*', event?: any): void emit<T = any>(type: EventType, event?: T): void; now emit<Key extends keyof Events>(type: Key, event: Events[Key]): void emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key... npmjs.com - Signature changed
Emitter.off
Was off(type: '*', handler: WildcardHandler): void off<T = any>(type: EventType, handler: Handler<T>): void; now off(type: '*', handler: WildcardHandler<Events>): void off<Key extends keyof Events>(type: Key, handler?... npmjs.com - Signature changed
Emitter.on
Was on(type: '*', handler: WildcardHandler): void on<T = any>(type: EventType, handler: Handler<T>): void; now on(type: '*', handler: WildcardHandler<Events>): void on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>)... npmjs.com - Signature changed
EventHandlerList
Was type EventHandlerList = Array<Handler>; now type EventHandlerList<T = unknown> = Array<Handler<T>>. npmjs.com - Signature changed
EventHandlerMap
Was type EventHandlerMap = Map<EventType, EventHandlerList | WildCardEventHandlerList>; now type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> |... npmjs.com - Signature changed
Handler
Was type Handler<T = any> = (event?: T) => void; now type Handler<T = unknown> = (event: T) => void. npmjs.com - Signature changed
WildCardEventHandlerList
Was type WildCardEventHandlerList = Array<WildcardHandler>; now type WildCardEventHandlerList<T = Record<string, unknown>> = Array<WildcardHandler<T>>. npmjs.com - Signature changed
WildcardHandler
Was type WildcardHandler = (type: EventType, event?: any) => void; now type WildcardHandler<T = Record<string, unknown>> = (type: keyof T, event: T[keyof T]) => void. npmjs.com
mitt 2.0.0 breaking changes
- Removed
"mitt"
"mitt" was removed in mitt 2.0.0 npmjs.com - Removed
mitt
The optional event map passed to mitt() is now a Map rather than a plain object. Code that passes an object map or reads events from it as properties must switch to new Map() and map.get(). npmjs.com - Renamed
"mitt".Emitter
Use Emitter instead. npmjs.com - Signature changed
"mitt".Emitter.emit
Was emit(type: string, event?: any): void; now emit(type: "*", event?: any): void emit<T = any>(type: EventType, event?: T): void. npmjs.com - Signature changed
"mitt".Emitter.off
Was off(type: string, handler: Handler): void; now off(type: EventType, handler: Handler): void. npmjs.com - Signature changed
"mitt".Emitter.on
Was on(type: string, handler: Handler): void; now on(type: EventType, handler: Handler): void. npmjs.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.