import { Selection } from './Selection' ; import { Attributes } from './attributes' ; remarks internal export interface GenericLine { index : number ; lineRange : Selection ; } export function isLineInSelection ( selection , { lineRange } ) { const { start : beginningOfLineIndex , end : endOfLineIndex } = lineRange ; return ( ( selection . start >= beginningOfLineIndex && selection . start <= endOfLineIndex ) || ( selection . start <= endOfLineIndex && selection . end >= beginningOfLineIndex ) ) ; } export function getLineType ( lineAttributes ? ) { return lineAttributes && lineAttributes . $type ? ( lineAttributes . $type as Attributes . LineType ) : 'normal' ; }