UNPKG

react-diff-view

Version:

A git diff component to consume the git unified diff output.

20 lines (19 loc) 633 B
import type { highlight } from 'refractor'; import { HunkData } from '../utils'; import { Pair, TokenNode } from './interface'; interface Refractor { highlight: typeof highlight; } export interface ToTokenTreeOptionsNoHighlight { highlight?: false; oldSource?: string; } export interface ToTokenTreeOptionsHighlight { highlight: true; refractor: Refractor; oldSource?: string; language: string; } export type ToTokenTreeOptions = ToTokenTreeOptionsNoHighlight | ToTokenTreeOptionsHighlight; export default function toTokenTrees(hunks: HunkData[], options: ToTokenTreeOptions): Pair<TokenNode>; export {};