Skip to content

Commit

Permalink
Work around optional parameters without void
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Mar 4, 2022
1 parent 8afd265 commit fa43cb1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ cliCompleter.pluginId = constants.sourceId
* Plugin to validate that Markdown links and images reference existing local
* files and headings.
*
* @type {import('unified').Plugin<[Options?, FileSet?]|[Options?]|void[], Root>}
* @typedef {import('unified-lint-rule').Label|import('unified-lint-rule').Severity} Severity
* @type {import('unified').Plugin<[(Options|[Severity, Options?])?, FileSet?], Root>}
* @param [rawOptions]
* @param [fileSet]
*/
export default function remarkValidateLinks(rawOptions, fileSet) {
// Attach a `completer`.
Expand Down Expand Up @@ -86,7 +89,7 @@ export default function remarkValidateLinks(rawOptions, fileSet) {
}
)
}
).call(this, rawOptions)
).call(this, /** @type {NonNullable<rawOptions>} */ (rawOptions))
}

/**
Expand Down

0 comments on commit fa43cb1

Please sign in to comment.