rtf-stream-parser
Version:
Stream Transform class to tokenize RTF, and another to de-encapsulate text or HTML
20 lines (19 loc) • 809 B
TypeScript
import { TokenCountGlobalState } from './countTokens.types';
import { ControlAndDestinationGroupState } from './handleControlsAndDestinations.types';
import { GlobalStateWithGroupState } from './handleGroupState.types';
import { OutputGlobalState } from './handleOutput.types';
export declare type DestinationSet = Partial<{
[dest: string]: true;
}>;
export interface DeEncapsulationGroupState extends ControlAndDestinationGroupState {
htmlrtf?: boolean;
}
export interface DeEncapsulationGlobalState extends GlobalStateWithGroupState<DeEncapsulationGroupState>, TokenCountGlobalState, OutputGlobalState {
_options: {
mode: 'text' | 'html' | 'either';
prefix: boolean;
outlookQuirksMode: boolean;
};
_fromhtml: boolean;
_fromtext: boolean;
}