@enonic-types/lib-app 7.11.0-B3 → 7.11.0-B4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -11
- package/app.d.ts +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,12 +31,11 @@ global objects, e.g. `log`, `app`, `__`, etc, requiring a library by the default
|
|
|
31
31
|
|
|
32
32
|
`tsconfig.json`
|
|
33
33
|
|
|
34
|
-
```
|
|
34
|
+
```json
|
|
35
35
|
{
|
|
36
36
|
"compilerOptions": {
|
|
37
37
|
"types": [
|
|
38
|
-
|
|
39
|
-
"@enonic-types/lib-app"
|
|
38
|
+
"@enonic-types/global"
|
|
40
39
|
]
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -66,16 +65,13 @@ types mapping to your configuration.
|
|
|
66
65
|
|
|
67
66
|
`tsconfig.json`
|
|
68
67
|
|
|
69
|
-
```
|
|
68
|
+
```json
|
|
70
69
|
{
|
|
71
70
|
"compilerOptions": {
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
+ "paths": {
|
|
77
|
-
+ "/lib/xp/app": ["node_modules/@enonic-types/lib-app"],
|
|
78
|
-
+ }
|
|
71
|
+
"baseUrl": "./",
|
|
72
|
+
"paths": {
|
|
73
|
+
"/lib/xp/app": ["node_modules/@enonic-types/lib-app"]
|
|
74
|
+
}
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
```
|
package/app.d.ts
CHANGED
|
@@ -101,15 +101,15 @@ export interface HasVirtualApplicationParams {
|
|
|
101
101
|
* @returns {boolean} result.
|
|
102
102
|
*/
|
|
103
103
|
export declare function hasVirtual(params: HasVirtualApplicationParams): boolean;
|
|
104
|
-
export interface
|
|
104
|
+
export interface GetApplicationModeParams {
|
|
105
105
|
key: string;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* Fetches a mode of the app with the app key.
|
|
109
109
|
*
|
|
110
110
|
* @param {object} params JSON with the parameters.
|
|
111
111
|
* @param {string} params.key Application key.
|
|
112
112
|
*
|
|
113
|
-
* @returns {
|
|
113
|
+
* @returns {string} application mode.
|
|
114
114
|
*/
|
|
115
|
-
export declare function
|
|
115
|
+
export declare function getApplicationMode(params: GetApplicationModeParams): string | null;
|