I am facing an issue with an external library named "gapi" that is set to a property on the window object as window.gapi. I would like to keep it there while using the @types/gapi declaration. Is there a way to achieve this, like the following code snippet?
import gapi from "@types/gapi"
const gapi = window.gapi as gapi
I have tried importing it directly from node_modules but it seems to be ambient, for example:
import gapi from "./node_modules/@types/gapi/index.d.ts"
I am stuck on this issue and would appreciate any help or insights on how to resolve it. Thank you!