to consume the types provided by the @types/gtag.js package create a root index.d.ts file then add a triple slash directive at the very top followed with a `declare module` a few lines below:

```ts

/// <reference types="gtag.js" />

declare module 'gtag.js'

```

then you can just call the types from anywhere in your repo without importing anything. I have google.maps called in mine as well

```ts

/// <reference types="google.maps" />

/// <reference types="gtag.js" />

declare module 'google.maps';

declare module 'gtag.js';

```

--

Full-Stack Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store