From 9a6e68d505a911a021a96bc386aca8f26417f79f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Aug 2024 10:45:30 +0200 Subject: [PATCH] Isolated modules to true in client Speeds up compilation --- client/src/assets/player/shared/stats/stats-card.ts | 2 +- client/src/root-helpers/plugins-manager.ts | 8 ++++---- client/src/standalone/videos/shared/translations.ts | 6 +----- client/tsconfig.json | 1 + 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/client/src/assets/player/shared/stats/stats-card.ts b/client/src/assets/player/shared/stats/stats-card.ts index 6c16c6449..efdfb145b 100644 --- a/client/src/assets/player/shared/stats/stats-card.ts +++ b/client/src/assets/player/shared/stats/stats-card.ts @@ -372,5 +372,5 @@ videojs.registerComponent('StatsCard', StatsCard) export { StatsCard, - StatsCardOptions + type StatsCardOptions } diff --git a/client/src/root-helpers/plugins-manager.ts b/client/src/root-helpers/plugins-manager.ts index c00230b54..01d23c3e3 100644 --- a/client/src/root-helpers/plugins-manager.ts +++ b/client/src/root-helpers/plugins-manager.ts @@ -299,10 +299,10 @@ class PluginsManager { export { PluginsManager, - PluginInfo, - PeertubeHelpersFactory, - OnFormFields, - OnSettingsScripts + type PluginInfo, + type PeertubeHelpersFactory, + type OnFormFields, + type OnSettingsScripts } // --------------------------------------------------------------------------- diff --git a/client/src/standalone/videos/shared/translations.ts b/client/src/standalone/videos/shared/translations.ts index 146732495..f4668c27b 100644 --- a/client/src/standalone/videos/shared/translations.ts +++ b/client/src/standalone/videos/shared/translations.ts @@ -1,5 +1 @@ -type Translations = { [ id: string ]: string } - -export { - Translations -} +export type Translations = { [ id: string ]: string } diff --git a/client/tsconfig.json b/client/tsconfig.json index 7df82ec1c..a1afdd2b0 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -15,6 +15,7 @@ "importHelpers": true, "strictBindCallApply": true, "target": "ES2022", + "isolatedModules": true, "typeRoots": [ "node_modules/@types" ],