set member through ctor argument

This commit is contained in:
Jörg Breitbart
2018-05-01 20:33:48 +02:00
parent c7fdff2f40
commit 728eeebcc7
2 changed files with 5 additions and 6 deletions
+1 -3
View File
@@ -200,7 +200,6 @@ class DcsDummy implements IDcsHandler {
export class EscapeSequenceParser implements IEscapeSequenceParser {
public initialState: number;
public currentState: number;
readonly transitions: TransitionTable;
// buffers over several parse calls
// FIXME: make those protected (needs workaround in tests)
@@ -227,10 +226,9 @@ export class EscapeSequenceParser implements IEscapeSequenceParser {
protected _dcsHandlerFb: IDcsHandler;
protected _errorHandlerFb: (state: IParsingState) => IParsingState;
constructor(transitions: TransitionTable = VT500_TRANSITION_TABLE) {
constructor(readonly transitions: TransitionTable = VT500_TRANSITION_TABLE) {
this.initialState = ParserState.GROUND;
this.currentState = this.initialState;
this.transitions = transitions;
this.osc = '';
this.params = [0];
this.collect = '';