Skip to content

Commit

Permalink
typecheck useSource()
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Nov 2, 2021
1 parent 94d4065 commit 76cf016
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Uwave.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,14 @@ class UwaveServer extends EventEmitter {

/**
* Register a source plugin.
*
* @template TOptions
* @template {import('./source/types').HotSwappableSourcePlugin<
* TOptions, import('type-fest').JsonValue>} TPlugin
* @param {TPlugin} sourcePlugin
* @param {TOptions} [opts]
*/
async useSource(sourcePlugin, opts = {}) {
async useSource(sourcePlugin, opts) {
/** @type {import('avvio').Avvio<this>} */
// @ts-ignore
const boot = this;
Expand Down

0 comments on commit 76cf016

Please sign in to comment.