Skip to content

Commit 762f96f

Browse files
committed
Work around optional parameters without void
1 parent 8afd265 commit 762f96f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ cliCompleter.pluginId = constants.sourceId
5252
* Plugin to validate that Markdown links and images reference existing local
5353
* files and headings.
5454
*
55-
* @type {import('unified').Plugin<[Options?, FileSet?]|[Options?]|void[], Root>}
55+
* @typedef {import('unified-lint-rule').Label|import('unified-lint-rule').Severity} Severity
56+
* @type {import('unified').Plugin<[(Options|[Severity, Options?])?, FileSet?], Root>}
57+
* https://github.com/microsoft/TypeScript/pull/48132
58+
* @param [rawOptions]
59+
* @param [fileSet]
5660
*/
5761
export default function remarkValidateLinks(rawOptions, fileSet) {
5862
// Attach a `completer`.
@@ -86,7 +90,7 @@ export default function remarkValidateLinks(rawOptions, fileSet) {
8690
}
8791
)
8892
}
89-
).call(this, rawOptions)
93+
).call(this, /** @type {NonNullable<rawOptions>} */ (rawOptions))
9094
}
9195

9296
/**

0 commit comments

Comments
 (0)