Skip to content

fix: enable noImplicitAny and fix resulting type errors#1450

Open
tambien wants to merge 5 commits into
devfrom
enable-no-implicit-any-17956039260356736605
Open

fix: enable noImplicitAny and fix resulting type errors#1450
tambien wants to merge 5 commits into
devfrom
enable-no-implicit-any-17956039260356736605

Conversation

@tambien

@tambien tambien commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

I have enabled noImplicitAny: true in tsconfig.json and fixed all resulting TypeScript errors across the Tone/ source and test/ directories.

Key changes include:

  • Core Source Files: Added explicit types for parameters, return values, and members in classes like Transport, Sampler, Frequency, and ToneEvent.
  • Base Classes: In classes like ToneWithContext, as any was used for dynamic property access in get() and set() methods to maintain simplicity and avoid complex generics, as requested.
  • Utility Functions: Fixed potential bugs in Context.dispose() (iterating a Map) and made omitFromObject non-mutating.
  • Tests: Fixed implicit any errors in numerous test files and updated test helper signatures. Added test/types.d.ts to provide basic declarations for untyped third-party modules (array2d, plotly.js-dist, etc.).
  • Validation: Verified that tsc --noEmit passes with no errors and that the core test group passes successfully.

Efforts were made to minimize the use of any, but it remains in situations involving dynamic property indexing or complex class inheritance where the "simplest solution" was prioritized over architectural changes.


PR created automatically by Jules for task 17956039260356736605 started by @tambien

- Set "noImplicitAny": true in tsconfig.json
- Address hundreds of implicit any errors across the codebase and tests
- Use explicit types where possible and as any for dynamic property access
- Add missing declaration files for third-party modules in tests
- Ensure tsc --noEmit passes without errors

Co-authored-by: tambien <1323402+tambien@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.

@tambien tambien changed the title Enable noImplicitAny and fix resulting type errors fix: enable noImplicitAny and fix resulting type errors Jul 1, 2026
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