diff options
author | gumi <git@gumi.ca> | 2020-05-16 17:18:17 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-05-16 17:18:17 -0400 |
commit | 25a3c3fefae87d55da172f2aaef6a27987f439fd (patch) | |
tree | c410cdfd73c7cf9101f7f6dab1c8fa1772dd05c9 /server/frob/accreg.ts | |
parent | 1af05ee74d0b2ec4e132617ab71bedd30fbfe753 (diff) | |
download | tools-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/accreg.ts')
-rw-r--r-- | server/frob/accreg.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/frob/accreg.ts b/server/frob/accreg.ts index d951d77..3e0fb19 100644 --- a/server/frob/accreg.ts +++ b/server/frob/accreg.ts @@ -1,3 +1,5 @@ +import { SQLHandler } from "./sql.ts"; + class AccregParser { private reg_line = "^" + @@ -7,7 +9,7 @@ class AccregParser { private vars_line = "(?<var_name>[^,]+),(?<value>[-0-9]+) "; private reg_regex: RegExp; private reg_regex_vars: RegExp; - private encoder; + private encoder: TextEncoder; constructor () { this.reg_regex = new RegExp(this.reg_line); @@ -51,7 +53,7 @@ class AccregParser { while (true) { const nread = await Deno.read(file.rid, buf); - if (nread === Deno.EOF) { + if (nread === null) { break; } @@ -82,9 +84,9 @@ class AccregParser { } class AccregSQL { - private sql; + private sql: SQLHandler; - constructor (sql) { + constructor (sql: SQLHandler) { this.sql = sql; } |