Skip to content

fix(ts): fix type errors - #329

Merged
rhashimoto merged 1 commit into
rhashimoto:masterfrom
delagen:fix-types-original
Jul 2, 2026
Merged

fix(ts): fix type errors#329
rhashimoto merged 1 commit into
rhashimoto:masterfrom
delagen:fix-types-original

Conversation

@delagen

@delagen delagen commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I grant to recipients of this Project distribution a perpetual,
    non-exclusive, royalty-free, irrevocable copyright license to reproduce, prepare
    derivative works of, publicly display, sublicense, and distribute this
    Contribution and such derivative works.
  • I certify that I am legally entitled to grant this license, and that this
    Contribution contains no content requiring a license from any third party.

Fix TS errors when using PowerSync packages for build via Vite multiple errors

    TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. [plugin angular-compiler]
    
        node_modules/.../wa-sqlite/src/types/index.d.ts:1157:2:
          1130 │   export = ModuleFactory;
               ╵   ~~~~~~~~~~~~~~~~~~~~~~~
    
    TS7006: Parameter 'db' implicitly has an 'any' type. [plugin angular-compiler]
    
        node_modules/.../wa-sqlite/src/types/index.d.ts:357:10:
          357 │   changes(db): number;
              ╵           ~~
    
    TS7006: Parameter 'db' implicitly has an 'any' type. [plugin angular-compiler]
    
        node_modules/.../wa-sqlite/src/types/index.d.ts:381:8:
          381 │   close(db): Promise<number>;
              ╵         ~~
    
    TS7010: 'progress_handler', which lacks return-type annotation, implicitly has an 'any' return type. [plugin angular-compiler]
    
        node_modules/.../wa-sqlite/src/types/index.d.ts:634:2:
          634 │   progress_handler(db: number, nProgressOps: number, handler: (us...
              ╵   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    TS7006: Parameter 'userData' implicitly has an 'any' type. [plugin angular-compiler]
    
        node_modules/.../wa-sqlite/src/types/index.d.ts:634:105:
          634 │ ...r, handler: (userData: any) => number|Promise<number>, userData);
              ╵                                                           ~~~~~~~~

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request cleans up trailing whitespaces, adds explicit types to several function parameters (such as changes, close, and progress_handler), and updates module exports to use export default in src/types/index.d.ts. The reviewer suggested introducing a generic type parameter T for userData in progress_handler to improve type safety, along with a minor formatting adjustment.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/types/index.d.ts Outdated
@delagen
delagen force-pushed the fix-types-original branch from 059c125 to 374b345 Compare June 30, 2026 10:39
@delagen

delagen commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@rhashimoto @shoestringr please take a look

Comment thread src/types/index.d.ts Outdated

@rhashimoto rhashimoto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the PR! I rarely use Typescript and know nothing about Vite, but the changes look fine AFAICT. Just fix one format nitpick and I'll merge.

@delagen
delagen force-pushed the fix-types-original branch from 374b345 to 6e083ef Compare July 2, 2026 15:20
@rhashimoto
rhashimoto merged commit c4d54d3 into rhashimoto:master Jul 2, 2026
1 check passed
@delagen
delagen deleted the fix-types-original branch July 2, 2026 15:57
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.

2 participants