LearnNewsExamplesServices
Frontmatter
id8206
titleRefactor Client Services to use Parameter Destructuring
stateClosed
labels
airefactoring
assigneestobiu
createdAtDec 30, 2025, 12:27 AM
updatedAtDec 30, 2025, 12:36 AM
githubUrlhttps://github.com/neomjs/neo/issues/8206
authortobiu
commentsCount0
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 30, 2025, 12:36 AM

Refactor Client Services to use Parameter Destructuring

Closed v11.18.0 airefactoring
tobiu
tobiu commented on Dec 30, 2025, 12:27 AM

Context: To improve code readability and maintainability, we want to standardize the method signatures in our client-side AI services.

Goal: Refactor all methods in src/ai/client/*.mjs that currently accept a single params object and manually destructure it inside the function body. They should instead use parameter destructuring directly in the function signature.

Scope:

  1. Analyze:
    • src/ai/client/ComponentService.mjs
    • src/ai/client/DataService.mjs
    • src/ai/client/RuntimeService.mjs
  2. Refactor:
    • Identify methods like myMethod(params) { let {a, b} = params; ... }.
    • Change to myMethod({a, b}) { ... }.
    • Update JSDoc to reflect the changes (if needed, though param names usually stay the same, just the syntax changes).

Acceptance Criteria:

  • All relevant methods in the target files use signature destructuring.
  • No functionality is broken (verify with basic checks or existing tests if available).
tobiu added the ai label on Dec 30, 2025, 12:27 AM
tobiu added the refactoring label on Dec 30, 2025, 12:27 AM
tobiu added parent issue #8169 on Dec 30, 2025, 12:27 AM
tobiu assigned to @tobiu on Dec 30, 2025, 12:27 AM
tobiu referenced in commit 77a7371 - "Refactor Client Services to use Parameter Destructuring #8206" on Dec 30, 2025, 12:36 AM
tobiu closed this issue on Dec 30, 2025, 12:36 AM