forked from thysultan/stylis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstylis.d.ts
55 lines (47 loc) · 889 Bytes
/
stylis.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
declare enum Context {
POSTS = -2,
PREPS = -1,
UNKWN = 0,
PROPS = 1,
BLCKS = 2,
ATRUL = 3
}
interface Stylis {
new(options?: Options): Stylis
(namescope: string, input: string): string | any
set: Set
use: Use
}
interface Options {
keyframe?: boolean
global?: boolean
cascade?: boolean
compress?: boolean
prefix?: boolean | ((key: string, value: string, context: number) => boolean)
semicolon?: boolean
preserve?: boolean
}
interface Set {
(options?: Options): Set
}
interface Plugin {
(this: Stylis,
context: Context,
content: string,
selector: Selectors,
parent: Selectors,
line: number,
column: number,
length: number,
at: number,
depth: number): any
}
interface Use {
(plugin?: Array<Plugin> | Plugin | null): Use
}
type Selectors = Array<string>
declare const stylis: Stylis
export = stylis
declare global {
export const stylis: Stylis
}