Skip to content

Fix/remove unused parameter merge order levels#201

Merged
Mosas2000 merged 6 commits into
mainfrom
fix/remove-unused-parameter-merge-order-levels
May 21, 2026
Merged

Fix/remove unused parameter merge order levels#201
Mosas2000 merged 6 commits into
mainfrom
fix/remove-unused-parameter-merge-order-levels

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Root cause: mergeOrderLevels had its second parameter named _new. In TypeScript, prefixing a parameter with _ is a convention to tell the compiler "I know this is unused, suppress the warning." But the parameter was actually used — _new.forEach(...) iterates over it to apply delta updates to the order book map. The name was both misleading and a violation of the noUnusedParameters rule's intent.

Fix: Renamed _new → updates, which accurately describes what the parameter represents: the incoming order book level changes being merged into the existing state.

Closes #154

Mosas2000 added 6 commits May 21, 2026 09:49
The _new parameter was actively used in the function body but named
with a leading underscore, which conventionally signals an intentionally
unused parameter. This was misleading and violated the noUnusedParameters
TypeScript rule intent.

Renamed _new to updates to accurately reflect its role: applying
incremental order book level changes on top of the existing state.

Closes #154
@Mosas2000 Mosas2000 merged commit 764b9e8 into main May 21, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused parameter in websocketUtils

1 participant