Skip to content

Commit 488bc13

Browse files
committedJul 4, 2022
Make parse static
1 parent d3470ae commit 488bc13

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default class Saffron {
108108
* @param sourceJson The json object of the source file.
109109
* @throws SourceException if there is a problem parsing the source file.
110110
*/
111-
async parse(sourceJson: object): Promise<Article[]> {
111+
static async parse(sourceJson: object): Promise<Article[]> {
112112
let source: Source = await Source.fileToSource(sourceJson);
113113
source.instructions.getSource = (): Source => source;
114114

‎src/modules/grid/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import * as https from "https";
1717
export default class Grid {
1818

1919
private static instance: Grid
20+
2021
private declare readonly isMain: boolean
2122
private declare readonly workersIds: string[];
22-
private declare workersClients: { workersIds: string[], socketId: string }[];
23+
private declare readonly workersClients: { workersIds: string[], socketId: string }[];
2324

2425
private declare readonly http_s_server: any;
2526
private declare readonly server: ServerIO.Server;
@@ -30,7 +31,7 @@ export default class Grid {
3031
this.workersIds = [];
3132
this.workersClients = [];
3233

33-
if(Config.getOption(ConfigOptions.GRID_DISTRIBUTED)) {
34+
if (Config.getOption(ConfigOptions.GRID_DISTRIBUTED)) {
3435
if (typeof Config.getOption(ConfigOptions.GRID_AUTH) !== 'string')
3536
throw new Error('InvalidAuthException The grid authToken must be type string on distributed: true');
3637
}

0 commit comments

Comments
 (0)
Please sign in to comment.