preserve import { PointContainer } from '../utils/pointContainer' ; import { Palette } from '../utils/palette' ; import { ImageQuantizerYieldValue } from './imageQuantizerYieldValue' ; export abstract class AbstractImageQuantizer { abstract quantize ( pointContainer , palette ) ; quantizeSync ( pointContainer , palette ) { for ( const value of this . quantize ( pointContainer , palette ) ) { if ( value . pointContainer ) { return value . pointContainer ; } } throw new Error ( 'unreachable' ) ; } }