Convert a lot of top level consts to const enums

This commit is contained in:
Daniel Imms
2026-05-02 06:44:25 -07:00
parent 5c47e6dd9a
commit 80debafa11
19 changed files with 304 additions and 282 deletions
+5 -3
View File
@@ -12,7 +12,9 @@ import { IBuffer } from 'common/buffer/Types';
import { IInstantiationService } from 'common/services/Services';
import { addDisposableListener } from 'browser/Dom';
const MAX_ROWS_TO_READ = 20;
const enum Constants {
MAX_ROWS_TO_READ = 20
}
const enum BoundaryPosition {
TOP,
@@ -137,7 +139,7 @@ export class AccessibilityManager extends Disposable {
}
private _handleChar(char: string): void {
if (this._liveRegionLineCount < MAX_ROWS_TO_READ + 1) {
if (this._liveRegionLineCount < Constants.MAX_ROWS_TO_READ + 1) {
if (this._charsToConsume.length > 0) {
// Have the screen reader ignore the char if it was just input
const shiftedChar = this._charsToConsume.shift();
@@ -150,7 +152,7 @@ export class AccessibilityManager extends Disposable {
if (char === '\n') {
this._liveRegionLineCount++;
if (this._liveRegionLineCount === MAX_ROWS_TO_READ + 1) {
if (this._liveRegionLineCount === Constants.MAX_ROWS_TO_READ + 1) {
this._liveRegion.textContent = Strings.tooMuchOutput.get();
}
}