[PR #1160] [CLOSED] fix: Export types #3110

Closed
opened 2026-03-07 20:12:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DavidAnson/markdownlint/pull/1160
Author: @regseb
Created: 3/24/2024
Status: Closed

Base: mainHead: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 micromark/package.json (+7 -1)

📄 Description

I'm using Markdownlint in my project and TypeScript is reporting the following problem:

node_modules/markdownlint/lib/markdownlint.d.ts:232:34 - error TS7016: Could not find a declaration file for module 'markdownlint-micromark'. '/home/regseb/dev/metalint/node_modules/markdownlint-micromark/micromark.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/markdownlint-micromark` if it exists or add a new declaration (.d.ts) file containing `declare module 'markdownlint-micromark';`

232 type MicromarkTokenType = import("markdownlint-micromark").TokenType;

I think exports and types are incompatible. The pairs are :

  • main / types
  • exports.default / exports.types

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DavidAnson/markdownlint/pull/1160 **Author:** [@regseb](https://github.com/regseb) **Created:** 3/24/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`8d4d389`](https://github.com/DavidAnson/markdownlint/commit/8d4d38932147460a9a979f877cd4d04b5c27cffa) fix: Export types ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `micromark/package.json` (+7 -1) </details> ### 📄 Description I'm using Markdownlint in my project and TypeScript is reporting the following problem: ``` node_modules/markdownlint/lib/markdownlint.d.ts:232:34 - error TS7016: Could not find a declaration file for module 'markdownlint-micromark'. '/home/regseb/dev/metalint/node_modules/markdownlint-micromark/micromark.cjs' implicitly has an 'any' type. Try `npm i --save-dev @types/markdownlint-micromark` if it exists or add a new declaration (.d.ts) file containing `declare module 'markdownlint-micromark';` 232 type MicromarkTokenType = import("markdownlint-micromark").TokenType; ``` I think [`exports`](https://nodejs.org/docs/latest/api/packages.html#exports) and [`types`](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) are _incompatible_. The pairs are : - `main` / `types` - `exports.default` / `exports.types` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 20:12:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#3110
No description provided.