From 030239dd52fd42eb87770e88042d3d6130d264d6 Mon Sep 17 00:00:00 2001 From: jinhojang6 Date: Wed, 25 Oct 2023 23:35:39 +0900 Subject: [PATCH] refactor: update fathom types --- src/index.d.ts | 11 +++++++++++ tsconfig.json | 2 +- types/fathom.d.ts | 8 -------- 3 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 types/fathom.d.ts diff --git a/src/index.d.ts b/src/index.d.ts index 49839624..c96fb302 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -11,3 +11,14 @@ declare module 'next' { getLayout?: (page: React.ReactNode) => any } } + +declare global { + interface Fathom { + (command: string, ...args: any[]): void + q?: Array + } + + interface Window { + fathom?: Fathom + } +} diff --git a/tsconfig.json b/tsconfig.json index ad1a1602..537dba92 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,6 +19,6 @@ "@/*": ["./src/*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "./types"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"] } diff --git a/types/fathom.d.ts b/types/fathom.d.ts deleted file mode 100644 index 27a30321..00000000 --- a/types/fathom.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -interface Fathom { - (command: string, ...args: any[]): void - q?: Array -} - -interface Window { - fathom?: Fathom -}