algolia / algoliasearch-client-javascript

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.
https://www.algolia.com/doc/api-client/javascript/getting-started/
MIT License
1.33k stars 222 forks source link

Added override to name property on error.ts #1552

Closed thegnuu closed 2 months ago

thegnuu commented 2 months ago

When using this library with the newest angular version (v18.2.2), the following error will be thrown.

You can "fix" the issue by using noImplicitOverride: false in the tsconfig, but I guess it would make sense to fix it here...

✖ Compiling with Angular sources in Ivy partial compilation mode.
node_modules/@algolia/client-common/src/transporter/errors.ts:4:3 - error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Error'.

4   name: string = 'AlgoliaError';

This PR adds the missing override property and should fix this issue.

stevengunneweg commented 2 months ago

I also need this feature. I hope this can be reviewed and merged soon!

shortcuts commented 2 months ago

Hey there, thanks for opening the PR!

The code of this repository is fully generated, so i'm moving your PR to https://github.com/algolia/api-clients-automation/pull/3785

The addition looks great, I just need to double check if there's potential compatibility issue