-
Notifications
You must be signed in to change notification settings - Fork 1
/
options.ts
76 lines (67 loc) · 1.6 KB
/
options.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// tslint:disable:whitespace
//
// action options
//
export class ActionOptions {
/**
* Add the class name of the object that holds the action to the action name.
* Format: <class name><separator><action name>
* Default value: true.
*/
public actionNamespace? = true;
/**
* Default value: . (dot)
*/
public actionNamespaceSeparator? = '.';
/**
* Use redux style action names. For instance, if a component defines a
* method called 'incrementCounter' the matching action name will be
* 'INCREMENT_COUNTER'.
* Default value: true.
*/
public uppercaseActions? = false;
}
//
// app options
//
export class AppOptions {
/**
* Name of the newly created app.
*/
public name?: string;
/**
* By default each component is assigned (with some optimizations) with it's
* relevant sub state on each store change. Set this to false to disable
* this updating process. The store's state will still be updated as usual
* and can always be retrieved using store.getState().
* Default value: true.
*/
public updateState? = true;
}
//
// global options
//
export enum LogLevel {
/**
* Emit no logs
*/
None = 0,
Verbose = 1,
Debug = 2,
Warn = 5,
/**
* Emit no logs (same as None)
*/
Silent = 10
}
export class GlobalOptions {
/**
* Default value: LogLevel.Warn
*/
public logLevel = LogLevel.Warn;
/**
* Customize actions naming.
*/
public action = new ActionOptions();
}
export const globalOptions = new GlobalOptions();