import { Record } from "immutable" ; import { Path } from "./types" ; export interface IJumpTarget { readonly path : Path ; readonly comment : string ; readonly readableKifu : string ; } export class JumpTarget extends Record < IJumpTarget > ( { path : null ! , comment : "" , readableKifu : "" , } ) { constructor ( props ) { if ( ! props . path ) throw new Error ( "JumpTarget.path is mandatory" ) ; super ( props ) ; } isBad ( ) { return ! ! this . comment && this . comment . startsWith ( "bad:" ) ; } }