[TASK] Revert "Port RteLinkBrowser to TypeScript"
[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 Popover: any;
9 export const lang: any;
10 export const settings: any;
11 export namespace CMS {
12 export namespace Backend {
13 export class FormEngineValidation {
14 public readonly errorClass: string;
15 }
16 export class FormEngine {
17 public readonly Validation: FormEngineValidation;
18 }
19 export class Modal {
20 public readonly sizes: {[key: string]: string};
21 public readonly styles: {[key: string]: string};
22 public advanced(configuration: object): any;
23 public confirm(title: string, content: any, severity: number, buttons: any[], additionalCssClasses?: string[]): JQuery; // tslint:disable-line:max-line-length
24 public dismiss(): void;
25 }
26 export class Severity {
27 public readonly notice: number;
28 public readonly info: number;
29 public readonly ok: number;
30 public readonly warning: number;
31 public readonly: number;
32 }
33 }
34 }
35 }
36
37 /**
38 * Current AMD/RequireJS modules are returning *instances* of ad-hoc *classes*, make that known to TypeScript
39 */
40
41 declare module 'TYPO3/CMS/Backend/FormEngineValidation' {
42 export = new TYPO3.CMS.Backend.FormEngineValidation();
43 }
44
45 declare module 'TYPO3/CMS/Backend/FormEngine' {
46 export = new TYPO3.CMS.Backend.FormEngine();
47 }
48
49 declare module 'TYPO3/CMS/Backend/Modal' {
50 export = new TYPO3.CMS.Backend.Modal();
51 }
52
53 declare module 'TYPO3/CMS/Backend/Severity' {
54 export = new TYPO3.CMS.Backend.Severity();
55 }
56
57 // Type definition for global namespace object
58 interface Window {
59 TYPO3: any;
60 }
61
62 /**
63 * Needed type declarations for provided libs
64 */
65 declare module 'TYPO3/CMS/Core/Contrib/imagesloaded.pkgd.min' {
66 import * as imagesloaded from 'imagesloaded';
67 export = imagesloaded;
68 }