-
-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9d32c3
commit 3524514
Showing
3 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,53 @@ | ||
|
||
export {}; | ||
|
||
declare module "markdownlint" { | ||
export * from "./exports.mjs"; | ||
|
||
export type Configuration = import("./markdownlint.mjs").Configuration; | ||
export type ConfigurationParser = import("./markdownlint.mjs").ConfigurationParser; | ||
export type ConfigurationStrict = import("./markdownlint.mjs").ConfigurationStrict; | ||
export type FixInfo = import("./markdownlint.mjs").FixInfo; | ||
export type LintCallback = import("./markdownlint.mjs").LintCallback; | ||
export type LintContentCallback = import("./markdownlint.mjs").LintContentCallback; | ||
export type LintError = import("./markdownlint.mjs").LintError; | ||
export type LintResults = import("./markdownlint.mjs").LintResults; | ||
export type MarkdownItToken = import("./markdownlint.mjs").MarkdownItToken; | ||
export type MarkdownParsers = import("./markdownlint.mjs").MarkdownParsers; | ||
export type MicromarkToken = import("./markdownlint.mjs").MicromarkToken; | ||
export type MicromarkTokenType = import("./markdownlint.mjs").MicromarkTokenType; | ||
export type Options = import("./markdownlint.mjs").Options; | ||
export type ParserMarkdownIt = import("./markdownlint.mjs").ParserMarkdownIt; | ||
export type ParserMicromark = import("./markdownlint.mjs").ParserMicromark; | ||
export type Plugin = import("./markdownlint.mjs").Plugin; | ||
export type ReadConfigCallback = import("./markdownlint.mjs").ReadConfigCallback; | ||
export type ResolveConfigExtendsCallback = import("./markdownlint.mjs").ResolveConfigExtendsCallback; | ||
export type Rule = import("./markdownlint.mjs").Rule; | ||
export type RuleConfiguration = import("./markdownlint.mjs").RuleConfiguration; | ||
export type RuleFunction = import("./markdownlint.mjs").RuleFunction; | ||
export type RuleOnError = import("./markdownlint.mjs").RuleOnError; | ||
export type RuleOnErrorFixInfo = import("./markdownlint.mjs").RuleOnErrorFixInfo; | ||
export type RuleOnErrorFixInfoNormalized = import("./markdownlint.mjs").RuleOnErrorFixInfoNormalized; | ||
export type RuleOnErrorInfo = import("./markdownlint.mjs").RuleOnErrorInfo; | ||
export type RuleParams = import("./markdownlint.mjs").RuleParams; | ||
export type ToStringCallback = import("./markdownlint.mjs").ToStringCallback; | ||
export { applyFix, applyFixes, getVersion } from "./markdownlint.mjs"; | ||
|
||
} | ||
|
||
declare module "markdownlint/async" { | ||
export * from "./exports-async.mjs"; | ||
|
||
export { lintAsync as lint, readConfigAsync as readConfig } from "./markdownlint.mjs"; | ||
|
||
} | ||
|
||
declare module "markdownlint/promise" { | ||
export * from "./exports-promise.mjs"; | ||
|
||
export { extendConfigPromise as extendConfig, lintPromise as lint, readConfigPromise as readConfig } from "./markdownlint.mjs"; | ||
|
||
} | ||
|
||
declare module "markdownlint/sync" { | ||
export * from "./exports-sync.mjs"; | ||
|
||
export { lintSync as lint, readConfigSync as readConfig } from "./markdownlint.mjs"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// @ts-check | ||
|
||
import fs from "node:fs/promises"; | ||
|
||
const typesDTS = ` | ||
export {}; | ||
declare module "markdownlint" { | ||
${await fs.readFile("./lib/exports.d.mts", "utf8")} | ||
} | ||
declare module "markdownlint/async" { | ||
${await fs.readFile("./lib/exports-async.d.mts", "utf8")} | ||
} | ||
declare module "markdownlint/promise" { | ||
${await fs.readFile("./lib/exports-promise.d.mts", "utf8")} | ||
} | ||
declare module "markdownlint/sync" { | ||
${await fs.readFile("./lib/exports-sync.d.mts", "utf8")} | ||
} | ||
`; | ||
|
||
await fs.writeFile("./lib/types.d.mts", typesDTS, "utf8"); |