Skip to content

Conversation

@clementlize
Copy link

When using the latest package @2.20 and after upgrading TS and eslint, I started having a lot of TS errors from the file make-load-script-url.ts.

At the end, I only needed to add typing to a string array to make it work.

I patched the module on my project, but here's a PR with the changes so that everybody can have it while pulling the module.

Thank you for the work on this module!


node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:40:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

40     params.push(`key=${googleMapsApiKey}`)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:42:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

42     params.push(`client=${googleMapsClientId}`)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:46:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

46     params.push(`v=${version}`)
                   ~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:50:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

50     params.push(`language=${language}`)
                   ~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:54:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

54     params.push(`region=${region}`)
                   ~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:58:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

58     params.push(`libraries=${libraries.sort().join(',')}`)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:62:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

62     params.push(`channel=${channel}`)
                   ~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:66:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

66     params.push(`map_ids=${mapIds.join(',')}`)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:70:17 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

70     params.push(`auth_referrer_policy=${authReferrerPolicy}`)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:73:15 - error TS2345: Argument of type '"loading=async"' is not assignable to parameter of type 'never'.

73   params.push('loading=async')
                 ~~~~~~~~~~~~~~~

node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:74:15 - error TS2345: Argument of type '"callback=initMap"' is not assignable to parameter of type 'never'.

74   params.push('callback=initMap')
                 ~~~~~~~~~~~~~~~~~~


Found 11 errors in the same file, starting at: node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts:40```

@JustFly1984 JustFly1984 changed the base branch from develop to upgrade December 16, 2025 12:53
@JustFly1984 JustFly1984 merged commit 780ad50 into JustFly1984:upgrade Dec 16, 2025
@JustFly1984
Copy link
Owner

Thanks, merged.released new version

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