Hi,
I am getting the below error s while implementing find places functionality in the application.
No overload matches this call.
const select = document.createElement('select', '');
Argument of type '{ location: any; categories: string[]; maxLocations: number; outFields: string[]; }' is not assignable to parameter of type 'LocatorAddressToLocationsParams'.
PFB the code snippet.
ah, the TypeScript typing wants an `address` field, but that's not actually required for that method.
We can update the typings for 4.20, for now you can work around by casting the param object as any, or maybe adding address: null, to the param.
Hi,
Thanks for the solution but still this error exits (No overload matches this call).
error TS2769: No overload matches this call.
Overload 1 of 3, '(tagName: "select", options?: ElementCreationOptions | undefined): HTMLSelectElement', gave the following error.
Argument of type '""' is not assignable to parameter of type 'ElementCreationOptions | undefined'.
Overload 2 of 3, '(tagName: "listing" | "xmp", options?: ElementCreationOptions | undefined): HTMLPreElement', gave the following error.
Argument of type '"select"' is not assignable to parameter of type '"listing" | "xmp"'.
Overload 3 of 3, '(tagName: string, options?: ElementCreationOptions | undefined): HTMLElement', gave the following error.
Argument of type '""' is not assignable to parameter of type 'ElementCreationOptions | undefined'.
and it is coming in the (document.createElement('select', '') ) code snippet. Moreover PFB the full code snippet.
You don't need the second argument for createElement unless you are creating a custom element web component.
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
That's a DOM typing issue, remove the second argument and should be fine.