File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ declare namespace ElectronElementsUtils {
2
+ interface AttributeChangeOpts {
3
+ addDataAttrs ?: boolean ,
4
+ handler : Function
5
+ }
6
+
7
+ class AttributeManager {
8
+ constructor ( el : Node ) ;
9
+ get ( attributeName : string ) : null | string ;
10
+ set ( attributeName : string , value ?: string ) : undefined ;
11
+ onAttributeChange ( attributes : string , opts : AttributeChangeOpts ) : any ;
12
+ onAttributeChange ( attributes : Array < string > , opts : AttributeChangeOpts ) : any ;
13
+ getChangeHandlers ( attr : string ) : Function [ ] ;
14
+ createAttrToPropBridge ( attr : string ) : Function [ ] ;
15
+ }
16
+
17
+ class TemplateManager {
18
+ constructor ( ) ;
19
+ add ( name : string , html : string , data ?: object ) : void ;
20
+ update ( name : string , data : object , noCache ?: boolean ) : void ;
21
+ has ( name : string ) : boolean ;
22
+ get ( name : string ) : DocumentFragment ;
23
+ getHTMLTemplat ( name : string ) : string ;
24
+ getCachedData ( name : string ) : object ;
25
+ deleteCachedData ( name : string ) : void ;
26
+ updateTemplate ( name : string , html : string , data ?: object ) : void ;
27
+ remove ( name : string ) : void ;
28
+ }
29
+ }
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"description" : " Utilities for building electron elements." ,
5
5
"main" : " lib/index.js" ,
6
+ "types" : " lib/utils.d.ts" ,
6
7
"scripts" : {
7
8
"lint" : " eslint . --cache" ,
8
9
"lint-fix" : " eslint . --cache --fix" ,
You can’t perform that action at this time.
0 commit comments