@types/googlemaps package and had problems.Definitions by: in index.d.ts) so they can respond.If you do not mention the authors the issue will be ignored.
Hello,
I tried to import these types to use the Google Maps Javascript API. Unfortunately, when I build my own api, I encounter the following errors :
node_modules/@types/googlemaps/index.d.ts:94:32 - error TS2304: Cannot find name 'Node'.
94 constructor(container: Node, opts?: SaveWidgetOptions);
node_modules/@types/googlemaps/reference/info-window.d.ts:89:32 - error TS2304: Cannot find name 'Node'.
89 getContent(): string | Node;
node_modules/@types/googlemaps/reference/info-window.d.ts:125:38 - error TS2304: Cannot find name 'Node'.
125 setContent(content: string | Node): void;
node_modules/@types/googlemaps/reference/info-window.d.ts:163:28 - error TS2304: Cannot find name 'Node'.
163 content?: string | Node;
node_modules/@types/googlemaps/reference/map.d.ts:385:34 - error TS2304: Cannot find name 'Node'.
385 controls: Array<MVCArray<Node>>;
node_modules/@types/googlemaps/reference/street-view.d.ts:4:34 - error TS2304: Cannot find name 'Node'.
4 controls: Array<MVCArray<Node>>;
Is it normal to depend on a type that is not a basic type? Should I add another type definition to get the Node type? Should I already have it?
Thanks for your help!
Please provide an example of your tsconfig.json.
Yeah you might just be missing lib: ["dom"].
Indeed, I was missing the DOM lib. It wasn't added because I call the Google Maps API from my API backend. Adding it solves this issue.
Thanks for helping!
Most helpful comment
Yeah you might just be missing
lib: ["dom"].