Skip to content

🧹 Refactor CLI options to use explicit type and fix CI errors - #11

Merged
sebamar88 merged 2 commits into
mainfrom
refactor-cli-options-type-safety-4561401687491474312
Mar 18, 2026
Merged

🧹 Refactor CLI options to use explicit type and fix CI errors#11
sebamar88 merged 2 commits into
mainfrom
refactor-cli-options-type-safety-4561401687491474312

Conversation

@sebamar88

Copy link
Copy Markdown
Owner

This change improves the code health of the CLI module by replacing the explicit 'any' type for the options parameter with a well-defined CliOptions interface.

Key improvements:

  • Defined a CliOptions interface that captures the shape of CLI arguments.
  • Replaced the any keyword in handleSimpleFetch and handleTypeGeneration with CliOptions & { url: string }.
  • Added type assertions as CliOptions & { url: string } when calling these handlers, as TypeScript doesn't automatically narrow the options object even after a manual check for options.url.
  • Improved duplication by using the interface in runCli.

Verification:

  • Fixed the type errors that caused the previous CI failure.
  • Confirmed that the URL presence check correctly precedes the use of the handlers.
  • Code review confirmed the quality of the refactor.

PR created automatically by Jules for task 4561401687491474312 started by @sebamar88

google-labs-jules Bot and others added 2 commits March 17, 2026 16:38
Defined a CliOptions interface in src/cli/index.ts to improve type safety
and maintainability. Replaced the use of 'any' in handleSimpleFetch and
handleTypeGeneration with the new interface. Updated runCli to use
CliOptions for its local options object.

Co-authored-by: sebamar88 <4359231+sebamar88@users.noreply.github.com>
Defined a CliOptions interface in src/cli/index.ts to improve type safety
and maintainability. Replaced the use of 'any' in handleSimpleFetch and
handleTypeGeneration with the new interface. Added type assertions when
calling these handlers to satisfy the TypeScript compiler that the URL
is present after the explicit check.

Co-authored-by: sebamar88 <4359231+sebamar88@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sonarqubecloud

Copy link
Copy Markdown

@sebamar88
sebamar88 merged commit 5db5f76 into main Mar 18, 2026
7 of 17 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.

1 participant