Skip to content

fix(types): improve type safety of pollForToken#7896

Draft
google-labs-jules[bot] wants to merge 4 commits intomainfrom
fix/type-safety-command-helpers-18230714401657410548
Draft

fix(types): improve type safety of pollForToken#7896
google-labs-jules[bot] wants to merge 4 commits intomainfrom
fix/type-safety-command-helpers-18230714401657410548

Conversation

@google-labs-jules
Copy link
Contributor

This change improves the type safety of the pollForToken function in src/utils/command-helpers.ts by removing a @ts-expect-error and adding a type guard to safely handle the error object in a catch block. This makes the code more robust and easier to maintain.


PR created automatically by Jules for task 18230714401657410548 started by @serhalp

@google-labs-jules
Copy link
Contributor Author

👋 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

github-actions bot commented Jan 26, 2026

📊 Benchmark results

Comparing with 6a26e81

  • Dependency count: 1,055 ⬇️ 2.27% decrease vs. 6a26e81
  • Package size: 317 MB ⬇️ 1.85% decrease vs. 6a26e81
  • Number of ts-expect-error directives: 365 (no change)

@serhalp serhalp changed the title Improve Type Safety in Command Helpers fix(types): improve type safety of pollForToken Jan 28, 2026
@serhalp serhalp marked this pull request as ready for review January 28, 2026 21:08
@serhalp serhalp requested a review from a team as a code owner January 28, 2026 21:08
@serhalp serhalp enabled auto-merge (squash) January 28, 2026 21:08
@serhalp serhalp self-assigned this Feb 3, 2026
@serhalp serhalp requested a review from a team as a code owner February 3, 2026 15:03
Improved the type safety of the `pollForToken` function in `src/utils/command-helpers.ts` by removing the `@ts-expect-error` and adding a type guard to safely handle the error object.
@serhalp serhalp force-pushed the fix/type-safety-command-helpers-18230714401657410548 branch from fc8fdb3 to c47be27 Compare February 3, 2026 19:08
serhalp and others added 3 commits February 3, 2026 14:48
Improved the type safety of the `pollForToken` function in `src/utils/command-helpers.ts` by removing the `@ts-expect-error` and adding a type guard to safely handle the error object.

Co-authored-by: serhalp <1377702+serhalp@users.noreply.github.com>
@serhalp serhalp disabled auto-merge February 3, 2026 21:43
Copy link
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friendship ended 😢

@sarahetter sarahetter marked this pull request as draft February 10, 2026 16:25
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