All files / json-crdt-extensions/peritext index.ts

100% Statements 13/13
100% Branches 0/0
50% Functions 2/4
100% Lines 11/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2044x 44x 44x 44x 44x 44x     327x 44x 44x   44x           1551x  
import {ExtensionId} from '../constants';
import {PeritextNode} from './PeritextNode';
import {PeritextApi} from './PeritextApi';
import {Peritext} from './Peritext';
import {SCHEMA, MNEMONIC} from './constants';
import {Extension} from '../../json-crdt/extensions/Extension';
import type {PeritextDataNode} from './types';
 
export {PeritextNode, PeritextApi, Peritext};
export * from './slice';
export * from './block';
 
export const peritext = new Extension<
  ExtensionId.peritext,
  PeritextDataNode,
  PeritextNode,
  PeritextApi,
  [text: string]
>(ExtensionId.peritext, MNEMONIC, PeritextNode, PeritextApi, (text: string) => SCHEMA(text));