-
Notifications
You must be signed in to change notification settings - Fork 0
/
typings.d.ts
25 lines (24 loc) · 1.07 KB
/
typings.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
declare function extend(constructor: () => void): () => FunctionConstructor
declare function require(param: string): any;
declare const lang: { [key: string]: any };
declare const SMF: any;
declare const __SF_NSURL: any;
declare const __SF_Dispatch: {
mainAsync: (func: (...args: any[]) => any) => void
}
declare const Device: any;
declare const global: { [key: string]: any } & {
lang: { [key: string]: any },
requireClass: (...args: any[]) => any
};
declare const alert: (...args: any[]) => any;
type StyleContextDispatch = {
dispatch: (action: { [key: string]: any }) => void;
}
type StyleContextAddChild = {
addChild(child: View, name?: string, classNames?: string, userProps?: { [key: string]: any; }, defaultClassNames?: string): void;
}
type StyleContextComponent = StyleContextAddChild & StyleContextDispatch;
type StyleContextComponentType<T> = T & StyleContextAddChild & StyleContextDispatch;
type StyleContextComponentWithDispatch<T> = T & StyleContextDispatch;
type componentContextPatch = <T = any>(component: T, name: string) => StyleContextComponentType<T>;