forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolymer.d.ts
64 lines (51 loc) · 1.5 KB
/
polymer.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
// Type definitions for polymer
// Project: /~https://github.com/polymer
// Definitions by: Louis Grignon </~https://github.com/lgrignon>
// Definitions: /~https://github.com/borisyankov/DefinitelyTyped
interface PolymerElement {
// definition
publish?: Object;
computed?: Object;
// object mapping variable names to functions name
observe?: Object;
// life time API
created? (): void;
ready? (): void;
attached? (): void;
domReady? (): void;
detached? (): void;
attributeChanged? (attrName: string, oldVal: any, newVal: any): void;
/**
* User must call from attached callback
*/
resizableAttachedHandler(): void;
/**
* User must call from detached callback
*/
resizableDetachedHandler(): void;
/**
* User must call from attached callback
*/
resizerAttachedHandler(): void;
/**
* User must call from detached callback
*/
resizerDetachedHandler(): void;
/**
* User should call when resizing or un-hiding children
*/
notifyResize(): void;
}
interface Polymer {
importElements(node: Node, callback: Function): void;
import(url: string, callback?: () => void): void;
mixin(target: any, ...mixins: any[]): any;
waitingFor(): Array<string>;
// should be an "integer" for milliseconds
forceReady(timeout: number): void;
(tagName: string, prototype: PolymerElement): void;
(tagName: string, prototype: any): void;
(prototype: PolymerElement): void;
(): void;
}
declare var Polymer: Polymer;