1 | import { IStyle } from './IStyle';
|
2 | import { IStyleFunctionOrObject, IStyleFunction } from './IStyleFunction';
|
3 | export declare type Diff<T extends keyof any, U extends keyof any> = ({
|
4 | [P in T]: P;
|
5 | } & {
|
6 | [P in U]: never;
|
7 | } & {
|
8 | [x: string]: never;
|
9 | })[T];
|
10 |
|
11 |
|
12 |
|
13 | export declare type Omit<U, K extends keyof U> = Pick<U, Diff<keyof U, K>>;
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export declare type __MapToFunctionType<T> = Extract<T, Function> extends never ? (...args: any[]) => Partial<T> : Extract<T, Function>;
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export declare type IStyleSet<TStyleSet extends IStyleSet<TStyleSet> = {
|
25 | [key: string]: any;
|
26 | }> = {
|
27 | [P in keyof Omit<TStyleSet, 'subComponentStyles'>]: IStyle;
|
28 | } & {
|
29 | subComponentStyles?: {
|
30 | [P in keyof TStyleSet['subComponentStyles']]: IStyleFunctionOrObject<any, any>;
|
31 | };
|
32 | };
|
33 |
|
34 |
|
35 |
|
36 | export declare type IConcatenatedStyleSet<TStyleSet extends IStyleSet<TStyleSet>> = {
|
37 | [P in keyof Omit<TStyleSet, 'subComponentStyles'>]: IStyle;
|
38 | } & {
|
39 | subComponentStyles?: {
|
40 | [P in keyof TStyleSet['subComponentStyles']]: IStyleFunction<any, any>;
|
41 | };
|
42 | };
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | export declare type IProcessedStyleSet<TStyleSet extends IStyleSet<TStyleSet>> = {
|
48 | [P in keyof Omit<TStyleSet, 'subComponentStyles'>]: string;
|
49 | } & {
|
50 | subComponentStyles: {
|
51 | [P in keyof TStyleSet['subComponentStyles']]: __MapToFunctionType<TStyleSet['subComponentStyles'] extends infer J ? (P extends keyof J ? J[P] : never) : never>;
|
52 | };
|
53 | };
|