Skip to content

Commit

Permalink
types: fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
keindev committed Feb 14, 2024
1 parent 99ffa05 commit a7ef481
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/ProgressBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class ProgressBar implements Required<Omit<IProgressBarOptions, 'current'

#current = Progress.Start;
#end: number | undefined;
#start = new Date().getTime();
readonly #start = new Date().getTime();
#status = TaskStatus.Pending;
#tokens: Map<TemplateToken | string, string> = new Map();

Expand Down
10 changes: 5 additions & 5 deletions src/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export interface ITaskOptions {

/** Entity for managing a task - includes all child objects (informational messages, errors, progress bars, and tasks) */
export class Task {
#autoClear: boolean;
readonly #autoClear: boolean;
#bars: ProgressBar[] = [];
#errors: string[] = [];
#id: number;
#logs = new Set<string>();
readonly #errors: string[] = [];
readonly #id: number;
readonly #logs = new Set<string>();
#status: TaskStatus;
#subtasks: Task[] = [];
#text: string;
#warnings = new Set<string>();
readonly #warnings = new Set<string>();

constructor(text: string, { status, autoClear }: ITaskOptions = {}) {
this.#id = ++uid;
Expand Down
4 changes: 2 additions & 2 deletions src/TaskTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export class TaskTree {

#autoClear = false;
#handle: NodeJS.Timeout | undefined;
#manager: UpdateManager;
readonly #manager: UpdateManager;
#offset = 0;
#paused = false;
#silent = false;
#started = false;
#tasks: Task[];
#theme: Theme;
readonly #theme: Theme;

private constructor(theme?: ThemeOptions) {
this.#tasks = [];
Expand Down
6 changes: 3 additions & 3 deletions src/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export type ThemeOptions = {
export class Theme {
static INDENT = ' ';

#badges: Map<IndicationType, string> = new Map();
#colors: Map<IndicationType, string> = new Map();
#symbols: Map<IndicationType, string> = new Map();
readonly #badges: Map<IndicationType, string> = new Map();
readonly #colors: Map<IndicationType, string> = new Map();
readonly #symbols: Map<IndicationType, string> = new Map();

constructor(options?: ThemeOptions) {
if (options) {
Expand Down

0 comments on commit a7ef481

Please sign in to comment.