mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-23 17:30:12 +01:00
Replace all instances of JSDoc generic Function with detailed @callback definition (type-only changes).
This commit is contained in:
parent
8bb97dadfe
commit
07f403173c
6 changed files with 199 additions and 38 deletions
8
lib/markdownlint.d.ts
vendored
8
lib/markdownlint.d.ts
vendored
|
|
@ -8,7 +8,7 @@ export = markdownlint;
|
|||
*/
|
||||
declare function markdownlint(options: Options | null, callback: LintCallback): void;
|
||||
declare namespace markdownlint {
|
||||
export { markdownlintSync as sync, readConfig, readConfigSync, getVersion, promises, RuleFunction, RuleParams, MarkdownItToken, RuleOnError, RuleOnErrorInfo, RuleOnErrorFixInfo, Rule, Options, Plugin, ToStringCallback, LintResults, LintError, FixInfo, LintCallback, Configuration, RuleConfiguration, ConfigurationParser, ReadConfigCallback, ResolveConfigExtendsCallback };
|
||||
export { markdownlintSync as sync, readConfig, readConfigSync, getVersion, promises, RuleFunction, RuleParams, MarkdownItToken, RuleOnError, RuleOnErrorInfo, RuleOnErrorFixInfo, Rule, Options, Plugin, ToStringCallback, LintResults, LintError, FixInfo, LintContentCallback, LintCallback, Configuration, RuleConfiguration, ConfigurationParser, ReadConfigCallback, ResolveConfigExtendsCallback };
|
||||
}
|
||||
/**
|
||||
* Configuration options.
|
||||
|
|
@ -64,7 +64,7 @@ type Options = {
|
|||
/**
|
||||
* Called with the result of the lint function.
|
||||
*/
|
||||
type LintCallback = (err: Error | null, results?: LintResults) => void;
|
||||
type LintCallback = (error: Error | null, results?: LintResults) => void;
|
||||
/**
|
||||
* Lint specified Markdown files synchronously.
|
||||
*
|
||||
|
|
@ -353,6 +353,10 @@ type FixInfo = {
|
|||
*/
|
||||
insertText?: string;
|
||||
};
|
||||
/**
|
||||
* Called with the result of linting a string or document.
|
||||
*/
|
||||
type LintContentCallback = (error: Error | null, result?: LintError[]) => void;
|
||||
/**
|
||||
* Configuration object for linting rules. For a detailed schema, see
|
||||
* {@link ../schema/markdownlint-config-schema.json}.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue