ad983114dbaccd9380cf5dffb1357b2475b9561d
[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 export namespace RecordList {
36 export class LinkBrowser {
37 public getLinkAttributeValues(): {[key: string]: string};
38 }
39 }
40 }
41 }
42
43 /**
44 * Current AMD/RequireJS modules are returning *instances* of ad-hoc *classes*, make that known to TypeScript
45 */
46
47 declare module 'TYPO3/CMS/Backend/FormEngineValidation' {
48 export = new TYPO3.CMS.Backend.FormEngineValidation();
49 }
50
51 declare module 'TYPO3/CMS/Backend/FormEngine' {
52 export = new TYPO3.CMS.Backend.FormEngine();
53 }
54
55 declare module 'TYPO3/CMS/Backend/Modal' {
56 export = new TYPO3.CMS.Backend.Modal();
57 }
58
59 declare module 'TYPO3/CMS/Backend/Severity' {
60 export = new TYPO3.CMS.Backend.Severity();
61 }
62
63 declare module 'TYPO3/CMS/Recordlist/LinkBrowser' {
64 export = new TYPO3.CMS.RecordList.LinkBrowser();
65 }
66
67 // Type definition for global namespace object
68 interface Window {
69 TYPO3: any;
70 }
71
72 /**
73 * Needed type declarations for provided libs
74 */
75 declare module 'TYPO3/CMS/Core/Contrib/imagesloaded.pkgd.min' {
76 import * as imagesloaded from 'imagesloaded';
77 export = imagesloaded;
78 }