-
Notifications
You must be signed in to change notification settings - Fork 8
/
riot.global.d.ts
63 lines (54 loc) · 2.01 KB
/
riot.global.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
declare module riot
{
interface CompilerResult
{
tagName: string;
html: string;
css: string;
attribs: string;
js: string;
}
interface Compile
{
(callback: Function): void;
(url: string, callback: Function): void;
(tag: string): string;
(tag: string, dontExecute: boolean): string;
(tag: string, options: any): string;
(tag: string, dontExecute: boolean, options: any): CompilerResult[];
}
interface Router {
(callback: Function): void;
(filter: string, callback: Function): void;
(to: string, title?: string): void;
create(): Router;
start(autoExec?: boolean): void;
stop(): void;
exec(): void;
query(): any;
base(base: string): any;
parser(parser: (path: string)=>string, secondParser?: Function ): any;
}
interface Settings {
brackets: string;
}
type RiotElement = any;
var version: string;
var settings: Settings;
function mount(customTagSelector: string, opts?: any): Array<RiotElement>;
function mount(selector: string, tagName: string, opts?: any): Array<RiotElement>;
function mount(domNode: Node, tagName: string, opts?: any): Array<RiotElement>;
function render(tagName: string, opts?: any): string;
function tag(tagName: string, html: string, css: string, attrs: string, constructor: Function): any;
function tag2(tagName: string, html: string, css: string, attrs: string, constructor: Function, bpair: string): any;
function _class(element: Function): void;
function observable(object: any): void;
function compile(callback: Function): void;
function compile(url: string, callback: Function): void;
function compile(tag: string): string;
function compile(tag: string, dontExecute: boolean): string;
function compile(tag: string, options: any): string;
function compile(tag: string, dontExecute: boolean, options: any): CompilerResult[];
function mixin(mixinName: string, mixinObject: any): void;
var route: Router;
}