From ccc6e9da1af06721ad3d48a99e4391a2652ff511 Mon Sep 17 00:00:00 2001 From: viki-777 Date: Tue, 29 Oct 2024 23:10:53 +0530 Subject: [PATCH] error fix --- @types/world-countries.d.ts | 0 app/types/world-countries.d.ts | 18 ++++++++++++++++++ tsconfig.json | 8 +++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 @types/world-countries.d.ts create mode 100644 app/types/world-countries.d.ts diff --git a/@types/world-countries.d.ts b/@types/world-countries.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/app/types/world-countries.d.ts b/app/types/world-countries.d.ts new file mode 100644 index 0000000..f517188 --- /dev/null +++ b/app/types/world-countries.d.ts @@ -0,0 +1,18 @@ +declare module 'world-countries' { + export interface Country { + cca2: string; // Country code + translations: { [languageCode: string]: { official: string; common: string } }; + latlng: [number, number]; + demonyms: { [languageCode: string]: { f: string; m: string } }; + landlocked: boolean; + borders: string[]; + area: number; + name: { common: string }; // Country name + flag: string; // Country flag + region: string; // Country region + } + + const countries: Country[]; + export default countries; + } + \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 824fb18..6001d0e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,13 +22,19 @@ "paths": { "@/*": ["./*"] } + + }, "include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - "app/components/navbar/MenuItem.js" + "app/components/navbar/MenuItem.js", + "@types", + "src" ], "exclude": ["node_modules"] } + +