# @enonic-types/core

> Shared type definition for core libraries.

Latest version **8.0.4** (published 2026-08-12) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 8.0.4 |
| Published | 2026-08-12 |
| First published | 2022-10-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 37.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 211 |
| Maintainers | alansemenov, edloidas |
| Keywords | enonic, enonic-xp, core, shared, types, typescript |

## Links

- npm: https://www.npmjs.com/package/@enonic-types/core
- Repository: https://github.com/enonic/xp.git#master
- Homepage: https://github.com/enonic/xp/tree/master#readme
- Issues: https://github.com/enonic/xp/issues
- npm.io page: https://npm.io/package/@enonic-types/core

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 8.0.4 (latest) — 2026-08-12
- 8.1.0-RC2 (beta) — 2026-09-14
- 8.1.0-RC1 — 2026-09-09
- 8.1.0-B3 — 2026-09-07
- 8.1.0-B2 — 2026-09-02
- 8.1.0-B1 — 2026-08-27
- 7.16.8 — 2026-08-11
- 8.0.4-B2 — 2026-08-07
- 7.16.8-B1 — 2026-08-06
- 7.16.7 — 2026-07-10
- 8.0.4-B1 — 2026-07-09
- 7.16.7-RC1 — 2026-07-07
- 8.0.3 — 2026-07-02
- 7.16.6 — 2026-07-02
- 7.16.5 — 2026-06-12
- … 77 more at https://npm.io/package/@enonic-types/core/versions

## README

# Enonic XP Core TS types

> TypeScript definitions that are shared between libraries and represent core 
> data structures.

## Install

```bash
npm i --save-dev @enonic-types/core
```

## Use

> It is not necessary to include this dependency into your project, as all
> libraries export related core types, e.g. Content library exports `Content`
> type.

All core types can be imported using ES6-style import:

```ts
import type {Content} from '@enonic-types/core';
```

### Content

`Content` contains the `x` property, that has a very special `XpMixin` type.

`XpMixin` is an interface, that is added to the global scope, so it can be
modified using the [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces).
This allows you to set the shape of the Mixin in your project, simply by
declaring the `XpMixin` like this:

```ts
declare global {
    interface XpMixin {
        'com-mysite-app': {
            metadata: {
                metaTagTitle: string;
                metaTagImageId: string;
            }
        }
    }
}
```

### Additional types

`Content` is a complex type that contains unions and maps, that are not exported, but may be needed during the development. Actually, these types can easily be retrieved from the `Content` itself:

```ts
import type {Content} from '@enonic-types/core';

type Attachments = Content['attachments'];

type ContentInheritType = Content['inherit'];

type Workflow = Content['workflow'];
```

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