# unified-doc-types

> unified-doc typescript typings.

Latest version **2.0.3** (published 2020-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install unified-doc-types
pnpm add unified-doc-types
yarn add unified-doc-types
bun add unified-doc-types
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2020-08-29 |
| First published | 2020-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Chris Zhou |
| Maintainers | chrisrzhou |
| Keywords | unified, doc, types, document, file, content, unist, hast, typescript |

## Links

- npm: https://www.npmjs.com/package/unified-doc-types
- Repository: https://github.com/unified-doc/unified-doc
- Homepage: https://github.com/unified-doc/unified-doc/tree/main/packages/unified-doc-types
- Issues: https://github.com/unified-doc/unified-doc/issues
- npm.io page: https://npm.io/package/unified-doc-types

## Dependencies (1)

- [@types/hast](https://npm.io/package/@types/hast.md) ^2.3.1

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.0.3 (latest) — 2020-08-29
- 2.0.2 — 2020-08-23
- 2.0.1 — 2020-08-20
- 2.0.0 — 2020-08-19
- 1.0.2 — 2020-08-16
- 1.0.1 — 2020-08-09
- 1.0.0 — 2020-07-19
- 0.1.10-beta.0 — 2020-07-19
- 0.1.9-beta.0 — 2020-07-04
- 0.1.8-beta.0 — 2020-06-24
- 0.1.7-beta.0 — 2020-06-16
- 0.1.6-beta.0 — 2020-06-13

## README

# unified-doc-types

[**unified-doc**][unified-doc] [typescript][] typings.

---

## Install

```sh
npm install unified-doc-types
```

## Use

```ts
import { FileData, Mark, SearchResult } from 'unified-doc-types';

const fileData: FileData = {
  content: '> **some** markdown content',
  extension: '.md',
  name: 'doc.md',
  stem: 'name',
  type: 'text/markdown'
};

const marks: Mark[] = [
  { id: 'a', start: 0, end: 5, classNames: ['class-a', 'class-b'] },
  { id: 'b', start: 0, end: 5, style: { background: 'red' }, data: { custom: true } },
];

const results: SearchResult[] = [
  { start: 0, end: 2, value: 'so', data: { weight: 2 } },
  { start: 6, end: 8, value: 'rk', data: { weight: 5 } },
];
```

<!-- Definitions -->
[typescript]: https://github.com/microsoft/TypeScript
[unified-doc]: https://github.com/unified-doc/unified-doc

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