forked from microsoft/parallel-prettier
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a25312
commit 471b358
Showing
4 changed files
with
56 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
import type { IOptions } from "./protocol.js"; | ||
|
||
export declare function spawnWorkers(options: IOptions): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { type IFormatResults } from "./protocol.js"; | ||
|
||
/** | ||
* Handles reporting progress of the formatting to the console. | ||
*/ | ||
export declare class ProgressReporter { | ||
private readonly check; | ||
total: number; | ||
reformatted: number; | ||
failed: number; | ||
private spinner?; | ||
constructor(quiet: boolean, check: boolean); | ||
/** | ||
* Increments the count of the total and reformatted files. | ||
*/ | ||
update(results: IFormatResults): void; | ||
/** | ||
* Prints a completion message. | ||
*/ | ||
complete(): void; | ||
private getMessage; | ||
private readonly check; | ||
total: number; | ||
reformatted: number; | ||
failed: number; | ||
private spinner?; | ||
constructor(quiet: boolean, check: boolean); | ||
/** | ||
* Increments the count of the total and reformatted files. | ||
*/ | ||
update(results: IFormatResults): void; | ||
/** | ||
* Prints a completion message. | ||
*/ | ||
complete(): void; | ||
private getMessage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
import { Observable } from "rxjs"; | ||
|
||
import { type IFormatResults, type IOptions } from "./protocol.js"; | ||
|
||
export declare class WorkerExitedError extends Error { | ||
constructor(codeOrSignal: number | string); | ||
constructor(codeOrSignal: number | string); | ||
} | ||
/** | ||
* Pool of workers. | ||
*/ | ||
export declare class WorkerPool { | ||
private readonly options; | ||
private readonly workers; | ||
private workIdCounter; | ||
/** | ||
* Maximum size of the worker pool. | ||
*/ | ||
get maxSize(): number; | ||
constructor(options: IOptions); | ||
/** | ||
* Schedules the given files to be formatted. | ||
*/ | ||
format(files: string[]): Observable<IFormatResults> | void; | ||
private sortWorkers; | ||
private spawnWorker; | ||
private readonly options; | ||
private readonly workers; | ||
private workIdCounter; | ||
/** | ||
* Maximum size of the worker pool. | ||
*/ | ||
get maxSize(): number; | ||
constructor(options: IOptions); | ||
/** | ||
* Schedules the given files to be formatted. | ||
*/ | ||
format(files: string[]): Observable<IFormatResults> | void; | ||
private sortWorkers; | ||
private spawnWorker; | ||
} |