mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-23 01:10:13 +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
|
|
@ -203,12 +203,24 @@ function micromarkParse(
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @callback AllowedPredicate
|
||||
* @param {Token} token Micromark token.
|
||||
* @returns {boolean} True iff allowed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @callback TransformPredicate
|
||||
* @param {Token} token Micromark token.
|
||||
* @returns {Token[]} Child tokens.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Filter a list of Micromark tokens by predicate.
|
||||
*
|
||||
* @param {Token[]} tokens Micromark tokens.
|
||||
* @param {Function} allowed Allowed token predicate.
|
||||
* @param {Function} [transformChildren] Transform children predicate.
|
||||
* @param {AllowedPredicate} allowed Allowed token predicate.
|
||||
* @param {TransformPredicate} [transformChildren] Transform predicate.
|
||||
* @returns {Token[]} Filtered tokens.
|
||||
*/
|
||||
function filterByPredicate(tokens, allowed, transformChildren) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue