UNPKG

1.18 kBTypeScriptView Raw
1// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
2// TypeScript Version: 2.2
3export interface RegisteredCache {
4 [key: string]: string;
5}
6export interface StyleSheet {
7 container: HTMLElement;
8 nonce?: string;
9 key: string;
10 insert(rule: string): void;
11 flush(): void;
12 tags: Array<HTMLStyleElement>;
13}
14export interface EmotionCache {
15 inserted: {
16 [key: string]: string | true;
17 };
18 registered: RegisteredCache;
19 sheet: StyleSheet;
20 key: string;
21 compat?: true;
22 nonce?: string;
23 insert(selector: string, serialized: SerializedStyles, sheet: StyleSheet, shouldCache: boolean): string | void;
24}
25export interface SerializedStyles {
26 name: string;
27 styles: string;
28 map?: string;
29 next?: SerializedStyles;
30}
31export const isBrowser: boolean;
32export function getRegisteredStyles(registered: RegisteredCache, registeredStyles: Array<string>, classNames: string): string;
33export function registerStyles(cache: EmotionCache, serialized: SerializedStyles, isStringTag: boolean): void;
34export function insertStyles(cache: EmotionCache, serialized: SerializedStyles, isStringTag: boolean): string | void;
\No newline at end of file