aboutsummaryrefslogtreecommitdiff
path: root/resources/studip.d.ts
diff options
context:
space:
mode:
authorMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2023-04-05 09:42:50 +0000
committerMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2023-04-05 09:42:50 +0000
commitebaaa758a3fee40b45d5385cee5be411d47f7b1c (patch)
treeebb1da5636745e77ada5650d0a6c342b18fc71e3 /resources/studip.d.ts
parenta1cef8653cf6bb70bde54df0e970a63083d7f803 (diff)
Add TypeScript support, fixes #2376
Closes #2376 Merge request studip/studip!1676
Diffstat (limited to 'resources/studip.d.ts')
-rw-r--r--resources/studip.d.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/resources/studip.d.ts b/resources/studip.d.ts
new file mode 100644
index 0000000..5ec8fef
--- /dev/null
+++ b/resources/studip.d.ts
@@ -0,0 +1,24 @@
+import { Emitter } from 'mitt';
+import { URLHelper } from './assets/javascripts/lib/url_helper.d.ts';
+export {};
+
+declare global {
+ interface Window {
+ STUDIP: {
+ wysiwyg_enabled: boolean;
+ INSTALLED_LANGUAGES: { [name: string]: InstalledLanguage };
+ ABSOLUTE_URI_STUDIP: string;
+ ASSETS_URL: string;
+ CSRF_TOKEN: { name: string; value: string };
+ URLHelper: URLHelper;
+ eventBus: Emitter;
+ };
+ }
+}
+
+export interface InstalledLanguage {
+ name: string;
+ path: string;
+ picture: string;
+ selected: boolean;
+}