Export interfaces like `ScannedDelimiters`

Author: tats-uCreated Aug 14, 2026Updated Aug 15, 2026

Syntax extensions are out of scope for markdown-it core. Search for an existing plugin or create your own.

Wait for the proposal to be accepted before writing code — see CONTRIBUTING.md.

Problem

https://app.unpkg.com/[email protected]/files/dist/markdown-it.d.mts

When you override a member of a class in markdown-it, you have to use an ugly type hack using ReturnType/Parameters to represent a return type or arguments of it. ReturnType<typeof PreviousState.prototype.ScanDelims> should be able to be simply rewritten to ScannedDelimiters.

It is a shame that the above type definition file still contains some interfaces that have not been exported yet like ScannedDelimiters.

Proposed change

  1. Add export to interfaces used by the default-exported class in each file
  2. `export { type interfaces of 1. } from "files of 1."``

Why this belongs in core

Type issue