chore: lint using putout

This commit is contained in:
coderaiser
2020-06-01 00:04:17 +03:00
parent 4e6151d011
commit f63f1f7b95
16 changed files with 50 additions and 31 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ export class DcsHandler implements IDcsHandler {
if (this._hitLimit) {
ret = false;
} else if (success) {
ret = this._handler(this._data, this._params ? this._params : new Params());
ret = this._handler(this._data, this._params || new Params());
}
this._params = undefined;
this._data = '';
@@ -1589,9 +1589,9 @@ describe('EscapeSequenceParser', function (): void {
});
it('final ESC range 0x30 .. 0x7e, one byte', () => {
for (let i = 0x30; i <= 0x7e; ++i) {
const c = String.fromCharCode(i);
const final = String.fromCharCode(i);
let handler: IDisposable | undefined;
chai.assert.doesNotThrow(() => { handler = parser.addEscHandler({final: c}, () => {}); }, 'final must be in range 48 .. 126');
chai.assert.doesNotThrow(() => { handler = parser.addEscHandler({final}, () => {}); }, 'final must be in range 48 .. 126');
if (handler) handler.dispose();
}
chai.assert.throws(() => { parser.addEscHandler({final: '\x2f'}, () => {}); }, 'final must be in range 48 .. 126');