@enonic-types/global 7.11.0-B3 → 7.11.0-RC1
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 +2 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,20 +15,15 @@ Add the corresponding types to your `tsconfig.json` file that is used for applic
|
|
|
15
15
|
```json
|
|
16
16
|
{
|
|
17
17
|
"compilerOptions": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"node_modules/@enonic-types"
|
|
18
|
+
"types": [
|
|
19
|
+
"@enonic-types/global"
|
|
21
20
|
]
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
> The paths to the `node_modules` assume that your `tsconfig.json` is placed under your project root.
|
|
27
|
-
|
|
28
25
|
After that, all the global XP variables will be typed.
|
|
29
26
|
|
|
30
|
-
Adding not `"types": [...]` but `"typeRoots"` will allow to discover types for every other enonic library, that will be installed later.
|
|
31
|
-
|
|
32
27
|
Import functions, such as `require`, will return typed objects if the corresponding types for imported libraries are also added to
|
|
33
28
|
your `tsconfig.json`.
|
|
34
29
|
|