From 2466af69360493e8268be096a7dcfa43cc43992c Mon Sep 17 00:00:00 2001 From: Manuel Stahl Date: Mon, 22 Apr 2024 14:23:55 +0200 Subject: [PATCH] Transform code base to typescript Change-Id: Ia1f862fb5962ddd54b8d7643abbc39bb314d1f8e --- index.html | 2 +- jest.config.ts | 13 + package.json | 33 +- src/{App.test.jsx => App.test.tsx} | 1 - src/{App.jsx => App.tsx} | 3 +- src/AppContext.jsx | 5 - src/AppContext.tsx | 9 + ...atarField.test.js => AvatarField.test.tsx} | 1 - .../{AvatarField.jsx => AvatarField.tsx} | 3 +- .../{EventReports.jsx => EventReports.tsx} | 12 +- .../{ImportFeature.jsx => ImportFeature.tsx} | 205 +++++----- ...{LoginPage.test.jsx => LoginPage.test.tsx} | 1 - .../{LoginPage.jsx => LoginPage.tsx} | 10 +- ...ationTokens.jsx => RegistrationTokens.tsx} | 13 +- .../{RoomDirectory.jsx => RoomDirectory.tsx} | 19 +- .../{ServerNotices.jsx => ServerNotices.tsx} | 18 +- src/components/date.ts | 30 ++ .../{destinations.jsx => destinations.tsx} | 50 ++- src/components/devices.jsx | 51 --- src/components/devices.tsx | 25 ++ src/components/{media.jsx => media.tsx} | 32 +- src/components/{rooms.jsx => rooms.tsx} | 34 +- .../{statistics.jsx => statistics.tsx} | 38 +- src/components/{users.jsx => users.tsx} | 90 ++--- src/i18n/{de.js => de.ts} | 3 +- src/i18n/{en.js => en.ts} | 4 +- src/i18n/{fa.js => fa.ts} | 3 +- src/i18n/{fr.js => fr.ts} | 3 +- src/i18n/index.d.ts | 90 +++++ src/i18n/{it.js => it.ts} | 3 +- src/i18n/{zh.js => zh.ts} | 8 +- src/{index.jsx => index.tsx} | 0 src/jest.setup.ts | 1 + src/setupTests.js | 3 - ...hProvider.test.js => authProvider.test.ts} | 33 +- .../{authProvider.js => authProvider.ts} | 22 +- ...aProvider.test.js => dataProvider.test.ts} | 9 +- .../{dataProvider.js => dataProvider.ts} | 381 +++++++++++++----- .../{synapse.test.js => synapse.test.ts} | 0 src/synapse/{synapse.js => synapse.ts} | 0 tsconfig.eslint.json | 4 + tsconfig.json | 64 +++ tsconfig.vite.json | 8 + vite.config.js => vite.config.ts | 0 yarn.lock | 260 +++++++++++- 45 files changed, 1081 insertions(+), 516 deletions(-) create mode 100644 jest.config.ts rename src/{App.test.jsx => App.test.tsx} (89%) rename src/{App.jsx => App.tsx} (97%) delete mode 100644 src/AppContext.jsx create mode 100644 src/AppContext.tsx rename src/components/{AvatarField.test.js => AvatarField.test.tsx} (94%) rename src/components/{AvatarField.jsx => AvatarField.tsx} (88%) rename src/components/{EventReports.jsx => EventReports.tsx} (94%) rename src/components/{ImportFeature.jsx => ImportFeature.tsx} (80%) rename src/components/{LoginPage.test.jsx => LoginPage.test.tsx} (99%) rename src/components/{LoginPage.jsx => LoginPage.tsx} (98%) rename src/components/{RegistrationTokens.jsx => RegistrationTokens.tsx} (92%) rename src/components/{RoomDirectory.jsx => RoomDirectory.tsx} (90%) rename src/components/{ServerNotices.jsx => ServerNotices.tsx} (89%) create mode 100644 src/components/date.ts rename src/components/{destinations.jsx => destinations.tsx} (83%) delete mode 100644 src/components/devices.jsx create mode 100644 src/components/devices.tsx rename src/components/{media.jsx => media.tsx} (91%) rename src/components/{rooms.jsx => rooms.tsx} (94%) rename src/components/{statistics.jsx => statistics.tsx} (57%) rename src/components/{users.jsx => users.tsx} (88%) rename src/i18n/{de.js => de.ts} (99%) rename src/i18n/{en.js => en.ts} (99%) rename src/i18n/{fa.js => fa.ts} (99%) rename src/i18n/{fr.js => fr.ts} (99%) create mode 100644 src/i18n/index.d.ts rename src/i18n/{it.js => it.ts} (99%) rename src/i18n/{zh.js => zh.ts} (97%) rename src/{index.jsx => index.tsx} (100%) create mode 100644 src/jest.setup.ts delete mode 100644 src/setupTests.js rename src/synapse/{authProvider.test.js => authProvider.test.ts} (83%) rename src/synapse/{authProvider.js => authProvider.ts} (86%) rename src/synapse/{dataProvider.test.js => dataProvider.test.ts} (92%) rename src/synapse/{dataProvider.js => dataProvider.ts} (64%) rename src/synapse/{synapse.test.js => synapse.test.ts} (100%) rename src/synapse/{synapse.js => synapse.ts} (100%) create mode 100644 tsconfig.eslint.json create mode 100644 tsconfig.json create mode 100644 tsconfig.vite.json rename vite.config.js => vite.config.ts (100%) diff --git a/index.html b/index.html index 8588999..2a0db84 100644 --- a/index.html +++ b/index.html @@ -119,7 +119,7 @@
Loading...
- +