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 6, 2022
1 parent 8afd265 commit 762f96f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ 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>}
* https://github.com/microsoft/TypeScript/pull/48132
* @param [rawOptions]
* @param [fileSet]
*/
export default function remarkValidateLinks(rawOptions, fileSet) {
// Attach a `completer`.
Expand Down Expand Up @@ -86,7 +90,7 @@ export default function remarkValidateLinks(rawOptions, fileSet) {
}
)
}
).call(this, rawOptions)
).call(this, /** @type {NonNullable<rawOptions>} */ (rawOptions))
}

/**
Expand Down

0 comments on commit 762f96f

Please sign in to comment.