Skip to content

Instantly share code, notes, and snippets.

@dmitriyzyuzin
Created November 14, 2021 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitriyzyuzin/519d292a132b547d783c0f70be109681 to your computer and use it in GitHub Desktop.
Save dmitriyzyuzin/519d292a132b547d783c0f70be109681 to your computer and use it in GitHub Desktop.
TypeScript define custom property in window object

Declare ymaps property with TypeScript through typings.d.ts file (in the /src folder):

export declare global {
    interface Window {
        ymaps: {
            ready: Function,
        };
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment