googlemaps / googlemaps/js-samples
Bug: React-Map createCustomEqual no overloads matches call.
- Dominant language
- TypeScript
- Stars
- 805
- Forks
- 836
- PR merge metrics
- No merged PRs in 30d
Description
### Operating system
Windows 10 21H2
### Browser Version
Firefox 102.0
### How severe is the bug?
high
### Bug description
Checking the custom hook for deep comparisons, the method createCustomEqual in deepCompareEqualsForMaps **(line 213, in react-maps/docs/index.tsx)**, does not recognize both a and b:
`(deepEqual) => (a: any, b: any) `
throws the following error:
```
No overload matches this call.
Overload 1 of 2, '(getComparatorOptions: GetComparatorOptions): (a: A, b: B, meta?: undefined) => boolean', gave the following error.
Value of type '(a: any, b: any) => any' has no properties in common with type 'Partial>'. Did you mean to call it?
Overload 2 of 2, '(getComparatorOptions: GetComparatorOptions): (a: A, b: B, meta?: undefined) => boolean', gave the following error.
Value of type '(a: any, b: any) => any' has no properties in common with type 'Partial>'. Did you mean to call it?ts(2769),
index.d.ts(16, 42): The expected type comes from the return type of this signature.
index.d.ts(16, 42): The expected type comes from the return type of this signature.
```
And also the `deepEqual(a , b);` call throws the error:
```
This expression is not callable.
Type 'CreateComparatorCreatorOptions' has no call signatures.ts(2349)
```
I guess both things are related to some Typescript error using fast-equals library. I also tried cloning the repository and the same problems are still showing up.
### Steps to reproduce
_No response_
### Console log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.