@enonic-types/lib-cluster
Advanced tools
Comparing version 7.11.0-B1 to 7.11.0-B3
{ | ||
"name": "@enonic-types/lib-cluster", | ||
"version": "7.11.0-B1", | ||
"version": "7.11.0-B3", | ||
"description": "Type definitions for lib-cluster.", | ||
@@ -29,2 +29,3 @@ "types": "cluster.d.ts", | ||
"homepage": "https://github.com/enonic/xp/tree/master#readme", | ||
"dependencies": {}, | ||
"publishConfig": { | ||
@@ -31,0 +32,0 @@ "access": "public" |
# Enonic XP lib-cluster TS types | ||
> TypeScript definitions for `lib-cluster` library of Enonic XP | ||
## Install | ||
```bash | ||
npm i --save-dev @enonic/lib-cluster | ||
npm i --save-dev @enonic-types/lib-cluster | ||
``` | ||
@@ -15,2 +16,3 @@ | ||
`tsconfig.json` | ||
```json | ||
@@ -28,5 +30,7 @@ { | ||
To make `require` work out of box, you must install and add the `@enonic-types/global` types. Aside from providing definitions for XP global objects, e.g. `log`, `app`, `__`, etc, requiring library by the default path will return typed object. | ||
To make `require` work out of the box, you must install and add the `@enonic-types/global` types. Aside from providing definitions for XP | ||
global objects, e.g. `log`, `app`, `__`, etc, requiring a library by the default path will return typed object. | ||
`tsconfig.json` | ||
```diff | ||
@@ -44,2 +48,3 @@ { | ||
`example.ts` | ||
```ts | ||
@@ -49,9 +54,12 @@ const {isMaster} = require('/lib/xp/cluster'); | ||
More detailed explanation on how it works and how to type custom import function can be found [here](https://github.com/enonic/xp/tree/master/modules/lib/typescript/README.md). | ||
More detailed explanation on how it works and how to type custom import function can be | ||
found [here](https://developer.enonic.com/docs/xp/stable/api). | ||
### ES6-style import | ||
If you are planning to use `import` in your code and transpile it with the default `tsc` TypeScript compiler, you'll need to add proper types mapping to your configuration. | ||
If you are planning to use `import` in your code and transpile it with the default `tsc` TypeScript compiler, you'll need to add proper | ||
types mapping to your configuration. | ||
`tsconfig.json` | ||
```diff | ||
@@ -72,2 +80,3 @@ { | ||
`example.ts` | ||
```ts | ||
@@ -74,0 +83,0 @@ import {isMaster} from '/lib/xp/cluster'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2955
82
0