Skip to content

Commit 2928ff3

Browse files
committed
chore: cleanup
1 parent 177e4d5 commit 2928ff3

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

packages/repack/src/modules/ScriptManager/ScriptManager.ts

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,20 @@ export class ScriptManager extends EventEmitter {
370370
referenceUrl?: string
371371
): Promise<Script>;
372372

373+
// NOTE: Keep declaration and implementation separate
374+
// to allow for better naming in JSDocs while preventing
375+
// using the arguments directly in the implementation
373376
async resolveScript(
374-
_scriptId: string,
375-
_caller?: string,
376-
_webpackContext = getWebpackContext(),
377-
_referenceUrl?: string
377+
__scriptId: string,
378+
__caller?: string,
379+
__webpackContext = getWebpackContext(),
380+
__referenceUrl?: string
378381
): Promise<Script> {
379382
let options: ResolveScriptOptions = {
380-
scriptId: _scriptId,
381-
caller: _caller,
382-
referenceUrl: _referenceUrl,
383-
webpackContext: _webpackContext,
383+
scriptId: __scriptId,
384+
caller: __caller,
385+
referenceUrl: __referenceUrl,
386+
webpackContext: __webpackContext,
384387
};
385388

386389
let locator: ScriptLocator | undefined;
@@ -532,17 +535,20 @@ export class ScriptManager extends EventEmitter {
532535
referenceUrl?: string
533536
): Promise<void>;
534537

538+
// NOTE: Keep declaration and implementation separate
539+
// to allow for better naming in JSDocs while preventing
540+
// using the arguments directly in the implementation
535541
async loadScript(
536-
_scriptId: string,
537-
_caller?: string,
538-
_webpackContext = getWebpackContext(),
539-
_referenceUrl?: string
542+
__scriptId: string,
543+
__caller?: string,
544+
__webpackContext = getWebpackContext(),
545+
__referenceUrl?: string
540546
) {
541547
let options: LoadScriptOptions = {
542-
scriptId: _scriptId,
543-
caller: _caller,
544-
referenceUrl: _referenceUrl,
545-
webpackContext: _webpackContext,
548+
scriptId: __scriptId,
549+
caller: __caller,
550+
referenceUrl: __referenceUrl,
551+
webpackContext: __webpackContext,
546552
};
547553

548554
let loaded = false;

0 commit comments

Comments
 (0)