Bug: React-Map createCustomEqual no overloads matches call.

オープン
#1,221 コメント 2 件 リアクション 2 件 担当者 1 名 GitHub で見る

@amuramoto がすでに取り組んでいます。

2022年7月8日 から。

評価

この issue はまだ評価されていません。

説明

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<undefined>): <A, B>(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<CreateComparatorCreatorOptions<undefined>>'. Did you mean to call it?
  Overload 2 of 2, '(getComparatorOptions: GetComparatorOptions<undefined>): <A, B>(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<CreateComparatorCreatorOptions<undefined>>'. 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<undefined>' 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

主要言語
TypeScript
スター
804
フォーク
826
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googlemaps/js-samples のほかの issue

googlemaps/js-samples の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。