Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@enonic-types/lib-cluster

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enonic-types/lib-cluster - npm Package Compare versions

Comparing version 7.11.0-B1 to 7.11.0-B3

3

package.json
{
"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';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc