-
Notifications
You must be signed in to change notification settings - Fork 8
/
riot.d.ts
68 lines (55 loc) · 1.75 KB
/
riot.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
declare module "riot/riot+compiler"
{
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;
interface Base
{
version: string;
settings: Settings;
mount(customTagSelector: string, opts?: any): Array<RiotElement>;
mount(selector: string, tagName: string, opts?: any): Array<RiotElement>;
mount(domNode: Node, tagName: string, opts?: any): Array<RiotElement>;
render(tagName: string, opts?: any): string;
tag(tagName: string, html: string, css: string, attrs: string, constructor: Function): any;
tag2(tagName: string, html: string, css: string, attrs: string, constructor: Function, bpair: string): any;
class(element: Function): void;
observable(object: any): void;
compile: Compile;
mixin(mixinName: string, mixinObject: any): void;
// TODO server-only methods
route: Router;
}
var riot: Base;
export = riot;
}