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

+4 -5
View File
@@ -1,4 +1,3 @@
"use strict";
import zlib from "zlib";
class MapReaderState {
@@ -72,7 +71,7 @@ function readString(state: MapReaderState) {
return data;
}
function readOptional<T>(state: MapReaderState, readValue: (state: MapReaderState) => T) {
function readOptional<T>(state: MapReaderState, readValue: (s: MapReaderState) => T) {
let load = readUInt8(state) !== 0;
if (!load) {
return null;
@@ -80,7 +79,7 @@ function readOptional<T>(state: MapReaderState, readValue: (state: MapReaderStat
return readValue(state);
}
function readArray<T>(state: MapReaderState, readItem: (state: MapReaderState) => T) {
function readArray<T>(state: MapReaderState, readItem: (s: MapReaderState) => T) {
let size = readUInt32so(state);
let array: T[] = [];
@@ -94,8 +93,8 @@ function readArray<T>(state: MapReaderState, readItem: (state: MapReaderState) =
function readDict<K, V>(
state: MapReaderState,
readKey: (state: MapReaderState) => K,
readValue: (state: MapReaderState) => V
readKey: (s: MapReaderState) => K,
readValue: (s: MapReaderState) => V
) {
let size = readUInt32so(state);