Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno 1.3.3 Sample. Error - TS2790 [ERROR]: The operand of a 'delete' operator must be optional. #111

Closed
YuriyTigiev opened this issue Sep 8, 2020 · 6 comments

Comments

@YuriyTigiev
Copy link

Deno 1.3.3
OS: Windows 10 64 bit
I'm using a sample from https://github.com/eveningkid/denodb
run command: deno run --allow-net --allow-write --allow-read --allow-plugin --unstable app.ts

Error:
PS C:\Users\yuriy\Documents\Projects\deno\prj\api> deno run --allow-net --allow-write --allow-read --allow-plugin --unstable app.ts
Check file:///C:/Users/yuriy/Documents/Projects/deno/prj/api/app.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

TS2339 [ERROR]: Property 'departure' does not exist on type 'Flight'.
flight.departure = 'London';
~~~~~~~~~
at file:///C:/Users/yuriy/Documents/Projects/deno/prj/api/app.ts:38:10

TS2339 [ERROR]: Property 'destination' does not exist on type 'Flight'.
flight.destination = 'San Francisco';
~~~~~~~~~~~
at file:///C:/Users/yuriy/Documents/Projects/deno/prj/api/app.ts:39:10

Found 6 errors.

@fleca
Copy link

fleca commented Sep 8, 2020

Same issue for the first 4 errors here

@aluiscode
Copy link

Denodb is apunting to version 0.4.3, with is in denopage:

deno.land / x / denodb@v1.0.8 / deps.ts
export { Client as PostgresClient } from "https://deno.land/x/postgres/mod.ts";

If we using that we are apunting to 0.4.3 version
https://deno.land/x/postgres@v0.4.3/connection.ts#L613

If you wanna solve this you could clone, with has 0.4.4 version and change postgres/mod.ts for that repository.

@eveningkid
Copy link
Owner

Hey,

Thanks for raising this issue.

@lazcanocode 0.4.4 is not available on deno.land yet, only on Github at the moment. Are you sure 0.4.4 fixes the issue?
If so, we can update the dependencies to use Github source instead.

Just let me know so I can take this forward.

Keep in touch

@eveningkid
Copy link
Owner

Just a quick update: it seems like 0.4.4 fixes the issue indeed (@lazcanocode is correct!).

People raised the issue that the release was not published on deno.land already (denodrivers/postgres#169).

I will just wait on that to be solved for now, let's be patient!

@Nastradoomus
Copy link

Just a quick update: it seems like 0.4.4 fixes the issue indeed (@lazcanocode is correct!).

People raised the issue that the release was not published on deno.land already (deno-postgres/deno-postgres#169).

I will just wait on that to be solved for now, let's be patient!

Hi,

This is easily forked to work but i'm thinking about the future of these kind of situations. It's not so convenient to create a fork for just one line. Is there any way to override dep(s) inside your App just to get rid of them if there is an update to the original?

@eveningkid
Copy link
Owner

This should now be fixed by #113, thanks to @ThomasT404.

Feel free to comment again if anything else comes out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants