1
1
/**
2
- * @typedef {import('unified').Plugin<Array<unknown>> } Plugin
3
- * @typedef {import('unified').PluginTuple<Array<unknown>> } PluginTuple
4
- * @typedef {import('unified').Preset } Preset
5
- * @typedef {import('unified').Settings } Settings
2
+ * @import {PluginTuple, Plugin, Preset, Settings} from 'unified'
6
3
*/
7
4
8
5
/**
19
16
* Resolved configuration.
20
17
* @property {string | undefined } filePath
21
18
* File path of found configuration.
22
- * @property {Array<PluginTuple> } plugins
19
+ * @property {Array<PluginTuple<Array<unknown>> > } plugins
23
20
* Resolved plugins.
24
21
* @property {Settings } settings
25
22
* Resolved settings.
61
58
* @typedef {PluginSupportingSpecifiers | PluginTupleSupportingSpecifiers | Preset } PluggableSupportingSpecifiers
62
59
* Usable values, with support for specifiers.
63
60
*
64
- * @typedef {Plugin | string } PluginSupportingSpecifiers
61
+ * @typedef {Plugin<Array<unknown>> | string } PluginSupportingSpecifiers
65
62
* A plugin, or a specifier to one.
66
63
*
67
- * @typedef {[plugin: string, ...parameters: Array<unknown>] | PluginTuple } PluginTupleSupportingSpecifiers
64
+ * @typedef {[plugin: string, ...parameters: Array<unknown>] | PluginTuple<Array<unknown>> } PluginTupleSupportingSpecifiers
68
65
* A plugin with configuration, with support for specifiers.
69
66
*
70
67
* @typedef PresetSupportingSpecifiers
@@ -439,7 +436,7 @@ async function merge(target, raw, options) {
439
436
try {
440
437
if ( typeof result === 'function' ) {
441
438
// Assume plugin.
442
- const plugin = /** @type {Plugin } */ ( result )
439
+ const plugin = /** @type {Plugin<Array<unknown>> } */ ( result )
443
440
addPlugin ( plugin , value )
444
441
} else {
445
442
// Assume preset.
@@ -462,7 +459,7 @@ async function merge(target, raw, options) {
462
459
}
463
460
464
461
/**
465
- * @param {Plugin } plugin
462
+ * @param {Plugin<Array<unknown>> } plugin
466
463
* Plugin.
467
464
* @param {unknown } value
468
465
* Primary parameter.
@@ -485,7 +482,7 @@ async function merge(target, raw, options) {
485
482
}
486
483
487
484
/**
488
- * @param {PluginTuple } entry
485
+ * @param {PluginTuple<Array<unknown>> } entry
489
486
* Tuple.
490
487
* @param {unknown } value
491
488
* Primary value.
@@ -501,11 +498,11 @@ function reconfigure(entry, value) {
501
498
}
502
499
503
500
/**
504
- * @param {Array<PluginTuple> } entries
501
+ * @param {Array<PluginTuple<Array<unknown>> > } entries
505
502
* Tuples.
506
- * @param {Plugin } plugin
503
+ * @param {Plugin<Array<unknown>> } plugin
507
504
* Plugin.
508
- * @returns {PluginTuple | undefined }
505
+ * @returns {PluginTuple<Array<unknown>> | undefined }
509
506
* Tuple.
510
507
*/
511
508
function find ( entries , plugin ) {
0 commit comments