Fix code style errors

Remove extra whitespace, use more consistent spacing, add missing
semicolons, using dangling commas, break up long lines, consistent
multiline operator placement, add missing JSDoc strings and so on.
This commit is contained in:
Hornwitser committed 2023-11-19 04:48:38 +01:00
1 parent 97e05c0610
commit 7314dc99c8
71 files changed
+403 -290

No files matched your search

+8 -7
View File
@@ -19,7 +19,7 @@ export class ContributionEvent {
"name": Type.String(),
"level": Type.Integer(),
"contribution": Type.Number(),
})
});
static fromJSON(json: Static<typeof ContributionEvent.jsonSchema>): ContributionEvent {
return new this(json.name, json.level, json.contribution);
@@ -39,7 +39,7 @@ export class TechnologyProgress {
"name": Type.String(),
"level": Type.Integer(),
"progress": Type.Number(),
})
});
}
export class ProgressEvent {
@@ -57,8 +57,8 @@ export class ProgressEvent {
static jsonSchema = Type.Object({
"technologies": Type.Array(
TechnologyProgress.jsonSchema
)
})
),
});
static fromJSON(json: Static<typeof ProgressEvent.jsonSchema>): ProgressEvent {
return new this(json.technologies);
@@ -81,7 +81,7 @@ export class FinishedEvent {
static jsonSchema = Type.Object({
"name": Type.String(),
"level": Type.Integer(),
})
});
static fromJSON(json: Static<typeof FinishedEvent.jsonSchema>): FinishedEvent {
return new this(json.name, json.level);
@@ -100,9 +100,10 @@ export class TechnologySync {
static jsonSchema = Type.Tuple([
Type.String(),
Type.Integer(),
Type.Union([ Type.Number(), Type.Null() ]),
Type.Union([Type.Number(), Type.Null()]),
Type.Boolean(),
])
]);
toJSON() {
return [this.name, this.level, this.progress, this.researched];
}