forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jss.d.ts
50 lines (41 loc) · 1.08 KB
/
jss.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
// Type definitions for jss v0.6
// Project: https://github.com/Box9/jss
// Definitions by: Valentin Robert <https://github.com/Ptival/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Properties {
[name: string]: string;
}
interface Selectors {
[selector: string]: Properties;
}
interface JSS {
/**
* Retrieve all rules added via JSS, organized by selectors
*/
get(): Selectors;
/**
* Retrieve rules added via JSS for a given selector
* @param s CSS selector
*/
get(s: string): Properties;
/**
* Retrieve all rules specified for a given selector (not necessarily added via JSS)
* @param s CSS selector
*/
getAll(s: string): Properties;
/**
* Remove all rules added via JSS
*/
remove(): void;
/**
* Remove all rules added via JSS for the given selector
*/
remove(s: string): void;
/**
* Add or extend an existing rule
* @param s CSS selector
* @param p CSS properties
*/
set(s: string, p: Properties): void;
}
declare var jss: JSS;