diff --git a/package.json b/package.json
index f9e1429..6973dae 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,8 @@
"type": "module",
"scripts": {
"dev": "vite --port 3000",
- "build": "vite build",
+ "prebuild": "tsc --noEmit",
+ "build": "npm run prebuild && vite build",
"preview": "vite preview",
"start": "vite build && vite preview --port 3000"
},
diff --git a/src/components/button/index.js b/src/components/button/index.ts
similarity index 100%
rename from src/components/button/index.js
rename to src/components/button/index.ts
diff --git a/src/components/error/index.js b/src/components/error/index.ts
similarity index 100%
rename from src/components/error/index.js
rename to src/components/error/index.ts
diff --git a/src/components/index.js b/src/components/index.ts
similarity index 100%
rename from src/components/index.js
rename to src/components/index.ts
diff --git a/src/components/input/index.js b/src/components/input/index.ts
similarity index 100%
rename from src/components/input/index.js
rename to src/components/input/index.ts
diff --git a/src/index.html b/src/index.html
index bbc0a4f..fc706f1 100644
--- a/src/index.html
+++ b/src/index.html
@@ -6,7 +6,7 @@
Web Messenger
-
+
diff --git a/src/main.js b/src/main.ts
similarity index 100%
rename from src/main.js
rename to src/main.ts
diff --git a/src/pages/chat/index.js b/src/pages/chat/index.ts
similarity index 100%
rename from src/pages/chat/index.js
rename to src/pages/chat/index.ts
diff --git a/src/pages/error404/index.js b/src/pages/error404/index.ts
similarity index 100%
rename from src/pages/error404/index.js
rename to src/pages/error404/index.ts
diff --git a/src/pages/error500/index.js b/src/pages/error500/index.ts
similarity index 100%
rename from src/pages/error500/index.js
rename to src/pages/error500/index.ts
diff --git a/src/pages/index.js b/src/pages/index.ts
similarity index 100%
rename from src/pages/index.js
rename to src/pages/index.ts
diff --git a/src/pages/login-form/index.js b/src/pages/login-form/index.ts
similarity index 100%
rename from src/pages/login-form/index.js
rename to src/pages/login-form/index.ts
diff --git a/src/pages/main-page/index.js b/src/pages/main-page/index.ts
similarity index 100%
rename from src/pages/main-page/index.js
rename to src/pages/main-page/index.ts
diff --git a/src/pages/profile-edit-password/index.js b/src/pages/profile-edit-password/index.ts
similarity index 100%
rename from src/pages/profile-edit-password/index.js
rename to src/pages/profile-edit-password/index.ts
diff --git a/src/pages/profile-edit/index.js b/src/pages/profile-edit/index.ts
similarity index 100%
rename from src/pages/profile-edit/index.js
rename to src/pages/profile-edit/index.ts
diff --git a/src/pages/profile/index.js b/src/pages/profile/index.ts
similarity index 100%
rename from src/pages/profile/index.js
rename to src/pages/profile/index.ts
diff --git a/src/pages/registration-form/index.js b/src/pages/registration-form/index.ts
similarity index 100%
rename from src/pages/registration-form/index.js
rename to src/pages/registration-form/index.ts
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..dcee91c
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "useDefineForClassFields": true,
+ "module": "ESNext",
+ "lib": ["ESNext", "DOM"],
+ "moduleResolution": "Node",
+ "strict": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "esModuleInterop": true,
+ "noEmit": true,
+ "noImplicitAny": false,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "sourceMap": true,
+ "strictNullChecks": false,
+ "noImplicitReturns": true,
+ "skipLibCheck": true,
+ },
+ "include": ["src"]
+}
\ No newline at end of file
diff --git a/vite.config.js b/vite.config.ts
similarity index 100%
rename from vite.config.js
rename to vite.config.ts