summaryrefslogtreecommitdiff
path: root/server/frob/party.ts
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-05-16 17:18:17 -0400
committergumi <git@gumi.ca>2020-05-16 17:18:17 -0400
commit25a3c3fefae87d55da172f2aaef6a27987f439fd (patch)
treec410cdfd73c7cf9101f7f6dab1c8fa1772dd05c9 /server/frob/party.ts
parent1af05ee74d0b2ec4e132617ab71bedd30fbfe753 (diff)
downloadtools-25a3c3fefae87d55da172f2aaef6a27987f439fd.tar.gz
tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.tar.bz2
tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.tar.xz
tools-25a3c3fefae87d55da172f2aaef6a27987f439fd.zip
[frob] update for deno 1.0
Diffstat (limited to 'server/frob/party.ts')
-rw-r--r--server/frob/party.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/frob/party.ts b/server/frob/party.ts
index cdc0580..a15336b 100644
--- a/server/frob/party.ts
+++ b/server/frob/party.ts
@@ -1,3 +1,5 @@
+import { SQLHandler } from "./sql.ts";
+
class PartyParser {
private party_line =
"^" +
@@ -9,7 +11,7 @@ class PartyParser {
private member_line = "(?<account_id>[0-9]+),(?<leader>[01])\t(?<char_name>[^\t]+)\t";
private party_regex: RegExp;
private party_regex_members: RegExp;
- private encoder;
+ private encoder: TextEncoder;
constructor () {
this.party_regex = new RegExp(this.party_line);
@@ -65,7 +67,7 @@ class PartyParser {
while (true) {
const nread = await Deno.read(file.rid, buf);
- if (nread === Deno.EOF) {
+ if (nread === null) {
break;
}
@@ -96,9 +98,9 @@ class PartyParser {
}
class PartySQL {
- private sql;
+ private sql: SQLHandler;
- constructor (sql) {
+ constructor (sql: SQLHandler) {
this.sql = sql;
}