mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Fix bad typings detected by linting
Fix badly typed expressions that were detected by turning on `@typescript-eslint/no-unnecessary-condition` in eslint.
This commit is contained in:
1 parent
90a88f7e01
commit
ec734c92bc
29 files changed
+62
-73
No files matched your search
@@ -19,9 +19,7 @@ export default class ExportManifest {
|
||||
* - locale: JSON of flattened Map entries of en locale strings from the game.
|
||||
*/
|
||||
public assets: Record<string, string>
|
||||
) {
|
||||
if (assets) { this.assets = assets; }
|
||||
}
|
||||
) { }
|
||||
|
||||
static jsonSchema = Type.Object({
|
||||
"assets": Type.Record(Type.String(), Type.String()),
|
||||
|
||||
@@ -281,7 +281,7 @@ export default class ModPack {
|
||||
function propertyTreeBytes(element: PropertyType) {
|
||||
let type: number;
|
||||
let dataBytes: Buffer;
|
||||
if (typeof element === null) {
|
||||
if (element === null) {
|
||||
type = 1;
|
||||
dataBytes = Buffer.alloc(0);
|
||||
} else if (typeof element === "boolean") {
|
||||
|
||||
Reference in new issue
Block a user