189d2641efe6b88b4ae2d5489446b6d98948555b
[Packages/TYPO3.CMS.git] / Build / types / TYPO3 / index.d.ts
1 /* tslint:disable:max-classes-per-file */
2
3 /**
4 * Currently a mixture between namespace and global object
5 * Add types as you use them
6 */
7 declare namespace TYPO3 {
8 export let Backend: any;
9 export let DebugConsole: any;
10 export let Icons: any;
11 export let InfoWindow: any;
12 export let LoginRefresh: any;
13 export let ModuleMenu: any;
14 export let Notification: any;
15 export let Modal: any;
16 export let Popover: any;
17 export let Severity: any;
18 export let ShortcutMenu: any;
19 export let Storage: any;
20 export let Utility: any;
21 export const lang: any;
22 export const settings: any;
23 export const configuration: any;
24 export namespace CMS {
25 export namespace Backend {
26 export class FormEngineValidation {
27 public readonly errorClass: string;
28 }
29
30 export class FormEngine {
31 public readonly Validation: FormEngineValidation;
32 }
33 }
34 }
35 }
36
37 declare namespace TBE_EDITOR {
38 export let fieldChanged: Function;
39 }
40
41 /**
42 * Current AMD/RequireJS modules are returning *instances* of ad-hoc *classes*, make that known to TypeScript
43 */
44 declare module 'TYPO3/CMS/Backend/FormEngineValidation' {
45 export = new TYPO3.CMS.Backend.FormEngineValidation();
46 }
47
48 declare module 'TYPO3/CMS/Backend/FormEngine' {
49 export = new TYPO3.CMS.Backend.FormEngine();
50 }
51
52 // type definition for global namespace object
53 interface Window {
54 TYPO3: any;
55 $: any;
56 startInModule: Array<string>;
57 inline: {
58 delayedImportElement: (objectId: number, table: string, uid: number, type: string) => void
59 };
60 rawurlencode: Function;
61 list_frame: Window;
62 jump: Function;
63 currentSubScript: string;
64 currentModuleLoaded: string;
65 fsMod: { [key: string]: any };
66 nextLoadModuleUrl: string;
67 }
68
69 /**
70 * Needed type declarations for provided libs
71 */
72 declare module 'TYPO3/CMS/Core/Contrib/imagesloaded.pkgd.min' {
73 import * as imagesloaded from 'imagesloaded';
74 export = imagesloaded;
75 }
76
77 declare module 'cm/lib/codemirror';
78 declare module 'moment';
79
80 interface JQueryTypedEvent<T extends Event> extends JQueryEventObject {
81 originalEvent: T;
82 }
83
84 /**
85 * Required to make jQuery plugins "available" in TypeScript
86 */
87 interface JQuery {
88 clearable(options?: any): JQuery;
89
90 datetimepicker(options?: any): JQuery;
91
92 dragUploader(options?: any): JQuery;
93
94 // To be able to use twbs/bootstrap-slider we have to override the definition of jquerui
95 slider(options: { [key: string]: any }): any;
96
97 // To be able to use jquery/autocomplete-slider we have to override the definition of jquerui
98 autocomplete(options?: { [key: string]: any }): any;
99 }
100