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