It'd be useful to have TS types for proper typing in TypeScript usage and also better intellisense/editor support.
interface Break {
position: number;
required: boolean;
}
export interface LineBreaker {
new(input: string): LineBreaker;
nextBreak(): Break | null;
}