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}; pkgs = nixpkgs.legacyPackages.${system};
in { in {
devShells.default = pkgs.mkShell { 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": { "dependencies": {
"@discordjs/rest": "^0.2.0-canary.0", "@discordjs/rest": "^0.2.0-canary.0",
"@hokify/agenda": "^6.2.12", "@hokify/agenda": "^6.2.12",
"@total-typescript/ts-reset": "^0.3.7",
"@tsconfig/node18-strictest-esm": "^1.0.0", "@tsconfig/node18-strictest-esm": "^1.0.0",
"@types/node": "^18.14.6",
"@ungap/structured-clone": "^1.0.1", "@ungap/structured-clone": "^1.0.1",
"agenda": "^4.3.0", "agenda": "^4.3.0",
"body-parser": "^1.20.0", "body-parser": "^1.20.0",
@ -18,7 +20,7 @@
"node-tesseract-ocr": "^2.2.1", "node-tesseract-ocr": "^2.2.1",
"structured-clone": "^0.2.2", "structured-clone": "^0.2.2",
"systeminformation": "^5.17.3" "systeminformation": "^5.17.3"
}, },
"resolutions": { "resolutions": {
"discord-api-types": "0.37.23" "discord-api-types": "0.37.23"
}, },

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

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

Loading…
Cancel
Save