diff --git a/examples/browser/next-app/.eslintrc.json b/examples/browser/next-app/.eslintrc.json index bffb357a7..48dff74c0 100644 --- a/examples/browser/next-app/.eslintrc.json +++ b/examples/browser/next-app/.eslintrc.json @@ -1,3 +1,6 @@ { - "extends": "next/core-web-vitals" + "extends": "next/core-web-vitals", + "parserOptions": { + "project": "./tsconfig.json" + } } diff --git a/examples/browser/next-app/pages/index.tsx b/examples/browser/next-app/pages/index.tsx index a54156b64..ce6188cd5 100644 --- a/examples/browser/next-app/pages/index.tsx +++ b/examples/browser/next-app/pages/index.tsx @@ -1,6 +1,5 @@ import type { NextPage } from 'next' import Head from 'next/head' -import Image from 'next/image' import styles from '../styles/Home.module.css' import { identify, setGroup, groupIdentify, track, Identify } from '@amplitude/analytics-browser' diff --git a/packages/analytics-types/src/element-interactions.ts b/packages/analytics-types/src/element-interactions.ts index 34e91c1dd..0c682da94 100644 --- a/packages/analytics-types/src/element-interactions.ts +++ b/packages/analytics-types/src/element-interactions.ts @@ -94,6 +94,8 @@ export interface Messenger { // DomElement is [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) if the dom library is included in tsconfig.json // and never if it is not included // eslint-disable-next-line no-restricted-globals -type DomElement = typeof globalThis extends { Element: infer T extends abstract new (...args: any) => any } - ? InstanceType +type DomElement = typeof globalThis extends { + Element: new (...args: any) => infer T; +} + ? T : never;