Skip to content

Commit 76cf016

Browse files
committed
typecheck useSource()
1 parent 94d4065 commit 76cf016

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Uwave.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,14 @@ class UwaveServer extends EventEmitter {
202202

203203
/**
204204
* Register a source plugin.
205+
*
206+
* @template TOptions
207+
* @template {import('./source/types').HotSwappableSourcePlugin<
208+
* TOptions, import('type-fest').JsonValue>} TPlugin
209+
* @param {TPlugin} sourcePlugin
210+
* @param {TOptions} [opts]
205211
*/
206-
async useSource(sourcePlugin, opts = {}) {
212+
async useSource(sourcePlugin, opts) {
207213
/** @type {import('avvio').Avvio<this>} */
208214
// @ts-ignore
209215
const boot = this;

0 commit comments

Comments
 (0)