Add total-typescript's ts-reset

pull/22/head
Skyler Grey 3 years ago
parent 453b999752
commit cf77140058
Signed by: Minion3665
GPG Key ID: 1AFD10256B3C714D

@ -8,7 +8,7 @@
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
packages = [ pkgs.yarn pkgs.nodejs-19_x ];
packages = [ pkgs.yarn pkgs.nodejs-19_x pkgs.typescript ];
};
});
}

@ -2,7 +2,9 @@
"dependencies": {
"@discordjs/rest": "^0.2.0-canary.0",
"@hokify/agenda": "^6.2.12",
"@total-typescript/ts-reset": "^0.3.7",
"@tsconfig/node18-strictest-esm": "^1.0.0",
"@types/node": "^18.14.6",
"@ungap/structured-clone": "^1.0.1",
"agenda": "^4.3.0",
"body-parser": "^1.20.0",

@ -1,3 +1,5 @@
import "@total-typescript/ts-reset";
import runServer from "./api/index.js";
import client from "./utils/client.js";
import config from "./config/main.js";

@ -263,7 +263,7 @@ export class Transcript {
}
}
if(!data) return null;
doc = JSON.parse(Buffer.from(data).toString());
doc = JSON.parse(Buffer.from(data).toString()) as TranscriptSchema;
}
if(!doc) return null;
return doc;
@ -294,7 +294,7 @@ export class Transcript {
}
}
if(!data) return null;
doc = JSON.parse(Buffer.from(data).toString());
doc = JSON.parse(Buffer.from(data).toString()) as TranscriptSchema;
}
if(!doc) return null;
for(const message of doc.messages) {

Loading…
Cancel
Save