# @types/prismic-dom

> TypeScript definitions for prismic-dom

Latest version **2.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/prismic-dom
pnpm add @types/prismic-dom
yarn add @types/prismic-dom
bun add @types/prismic-dom
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.4 |
| Published | 2023-11-07 |
| First published | 2018-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/prismic-dom
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prismic-dom
- npm.io page: https://npm.io/package/@types/prismic-dom

## Recent versions

- 2.1.4 (latest) — 2023-11-07
- 2.1.1 (ts2.8) — 2019-11-11
- 2.1.0 (ts2.1) — 2019-03-27
- 2.0.2 (ts2.0) — 2018-07-16
- 2.1.3 — 2023-10-18
- 2.1.2 — 2023-09-24
- 2.0.1 — 2018-06-13
- 2.0.0 — 2018-03-13

## README

# Installation
> `npm install --save @types/prismic-dom`

# Summary
This package contains type definitions for prismic-dom (https://github.com/prismicio/prismic-dom#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prismic-dom.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prismic-dom/index.d.ts)
````ts
interface Elements {
    heading1: "heading1";
    heading2: "heading2";
    heading3: "heading3";
    heading4: "heading4";
    heading5: "heading5";
    heading6: "heading6";
    paragraph: "paragraph";
    preformatted: "preformatted";
    strong: "strong";
    em: "em";
    listItem: "list-item";
    oListItem: "o-list-item";
    list: "group-list-item";
    oList: "group-o-list-item";
    image: "image";
    embed: "embed";
    hyperlink: "hyperlink";
    label: "label";
    span: "span";
}

type ElementType = Elements[keyof Elements];

type HTMLSerializer<T> = (
    type: ElementType,
    element: any,
    text: string | null,
    children: T[],
    index: number,
) => T;

interface RichText {
    asHtml(
        richText: any,
        linkResolver?: (doc: any) => string,
        serializer?: HTMLSerializer<string>,
    ): string;
    asText(richText: any, joinString?: string): string;
    Elements: Elements;
}

interface Link {
    url(link: any, linkResolver?: (doc: any) => string): string;
}

export const RichText: RichText;
export const Link: Link;
export const HTMLSerializer: HTMLSerializer<string>;

declare const _default: {
    RichText: RichText;
    Link: Link;
};

export default _default;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Nick Whyte](https://github.com/nickw444), [Siggy Bilstein](https://github.com/sbilstein), [Douglas Nomizo](https://github.com/douglasnomizo), and [Henry Myers](https://github.com/henrymyers).

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