unified-doc-types
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

unified-doc-types

unified-doc typescript typings.


Install

npm install unified-doc-types

Use

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 } },
];

Package Sidebar

Install

npm i unified-doc-types

Weekly Downloads

1

Version

2.0.3

License

MIT

Unpacked Size

5.68 kB

Total Files

8

Last publish

Collaborators

  • chrisrzhou