# @item-enonic-types/global

> Global variables and functions type definition.

Latest version **7.15.0** (published 2025-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @item-enonic-types/global
pnpm add @item-enonic-types/global
yarn add @item-enonic-types/global
bun add @item-enonic-types/global
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.15.0 |
| Published | 2025-02-28 |
| First published | 2022-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Tom Arild Jakobsen |
| Maintainers | tajakobsen |
| Keywords | enonic |

## Links

- npm: https://www.npmjs.com/package/@item-enonic-types/global
- Repository: https://github.com/ItemConsulting/enonic-types
- Homepage: https://github.com/ItemConsulting/enonic-types#readme
- Issues: https://github.com/ItemConsulting/enonic-types/issues
- npm.io page: https://npm.io/package/@item-enonic-types/global

## Recent versions

- 7.15.0 (latest) — 2025-02-28
- 7.15.0-A2 — 2025-01-13
- 7.15.0-A1 — 2024-12-12
- 7.13.1 — 2023-07-28
- 7.13.0 — 2023-07-26
- 7.12.2 — 2023-04-14
- 7.12.1 — 2023-03-22
- 7.12.0 — 2023-03-15
- 7.11.3 — 2023-01-19
- 7.11.2 — 2023-01-19
- 7.11.1 — 2022-12-06
- 7.11.0 — 2022-11-07
- 7.11.0-RC4 — 2022-11-04
- 7.11.0-RC3 — 2022-11-02
- 7.11.0-RC1 — 2022-10-26
- … 1 more at https://npm.io/package/@item-enonic-types/global/versions

## README

# Global types for Enonic XP

[![npm version](https://badge.fury.io/js/@item-enonic-types%2Fglobal.svg)](https://badge.fury.io/js/@item-enonic-types%2Fglobal)

> **Note** There is also an [official package for Global types for XP](https://www.npmjs.com/package/@enonic-types/global).

This library provides backwards compatibility for the old [enonic-types](https://www.npmjs.com/package/enonic-types) package
while moving to the [new types provided by Enonic](https://www.npmjs.com/org/enonic-types).

## Contents

The following global types:

- `XP.Request`
  - `XP.ErrorRequest`
  - `XP.CustomSelectorServiceParams`
- `XP.Response`
  - `XP.WebSocketResponse`
  - `XP.CustomSelectorServiceResponseBody`
  - `XP.CustomSelectorServiceResponseHit`
- `XP.MacroContext`
- `XP.WebSocketEvent`

## Use

To use these global types you need to update the `types` field in your *tsconfig.json* with this library.

```diff
{
  "baseUrl": "./",
  "paths": {
    "/lib/xp/*": ["node_modules/@enonic-types/lib-*"]
  },
+  "types": [
+    "@item-enonic-types/global"
+  ]
}
```

---
_Source: https://npm.io/package/@item-enonic-types/global · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
