All files / actions annotations.ts

100% Statements 6/6
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40    2x 2x 2x 2x 2x 2x                                                                
//tslint:disable:no-reserved-keywords
import { AnnotatedText, Annotation } from '../models';
export enum AnnotationActions {
  tag = 'annotation.tag',
  unTag = 'annotation.unTag',
  addText = 'annotation.addText',
  removeText = 'annotation.removeText',
  updateText = 'annotation.updateText'
}
 
export interface TagText {
  type: AnnotationActions.tag;
  text: AnnotatedText;
  tag: Annotation;
}
 
export interface UnTagText {
  type: AnnotationActions.unTag;
  text: AnnotatedText;
  tag: Annotation;
}
 
export interface AddText {
  type: AnnotationActions.addText;
  text: AnnotatedText;
}
 
export interface RemoveText {
  type: AnnotationActions.removeText;
  text: AnnotatedText;
}
 
export interface UpdateText {
  type: AnnotationActions.updateText;
  text: AnnotatedText;
  newText: string;
}
 
export type AnnotationAction = TagText | UnTagText | AddText | RemoveText | UpdateText;