System (please complete the following information):
OS: Ubuntu 20.04.1
Deno version: 1.3.3
Nessie version: 1.0.4
Describe the bug
When running on 1.3.3 it gives the error.
To Reproduce
Steps to reproduce the behavior:
Setup a migration
Run: deno run --allow-net --allow-read --allow-write https://deno.land/x/nessie@v1.0.4/cli.ts migrate
See error
Expected behavior
Migrations run.
Screenshots or error log
❯ deno run --allow-net --allow-read --allow-write https://deno.land/x/nessie@v1.0.4/cli.ts migrate
Check https://deno.land/x/nessie@v1.0.4/cli.ts
error: TS2790 [ERROR]: The operand of a 'delete' operator must be optional.
delete this.conn;
~~~~~~~~~
at https://deno.land/x/postgres@v0.4.3/connection.ts:612:12
TS2790 [ERROR]: The operand of a 'delete' operator must be optional.
delete this.bufReader;
~~~~~~~~~~~~~~
at https://deno.land/x/postgres@v0.4.3/connection.ts:613:12
TS2790 [ERROR]: The operand of a 'delete' operator must be optional.
delete this.bufWriter;
~~~~~~~~~~~~~~
at https://deno.land/x/postgres@v0.4.3/connection.ts:614:12
TS2790 [ERROR]: The operand of a 'delete' operator must be optional.
delete this.packetWriter;
~~~~~~~~~~~~~~~~~
at https://deno.land/x/postgres@v0.4.3/connection.ts:615:12
Found 4 errors.
Additional context
I believe this is happening because of TypeScript 4.0, which has just been introduced in Deno, it wasn't failing in the previous version.
System (please complete the following information):
Describe the bug When running on 1.3.3 it gives the error.
To Reproduce Steps to reproduce the behavior:
deno run --allow-net --allow-read --allow-write https://deno.land/x/nessie@v1.0.4/cli.ts migrate
Expected behavior Migrations run.
Screenshots or error log
Additional context
I believe this is happening because of TypeScript 4.0, which has just been introduced in Deno, it wasn't failing in the previous version.
This is the project and commit that I'm using, if you want to repro: https://github.com/giggio-samples/deno-api-starter-oak/tree/a66ba95ea8aaa0f0dc0ce4812b15d17a8171f8fc