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

Type Error for {url:string;} #94

Closed
jrmarcum opened this issue Oct 29, 2021 · 7 comments · Fixed by #99
Closed

Type Error for {url:string;} #94

jrmarcum opened this issue Oct 29, 2021 · 7 comments · Fixed by #99

Comments

@jrmarcum
Copy link

TS2345 [ERROR]: Argument of type '{ url: string; }' is not assignable to parameter of type 'boolean | undefined'.
Type '{ url: string; }' is not assignable to type 'true'.

@jrmarcum
Copy link
Author

This issue occurs on all of the examples for me on Deno 1.13.2

@checkwoodson
Copy link

sure, I use to Deno Version 1.15.3

@jrmarcum
Copy link
Author

If I upgrade to the latest version, it should work correctly?

@brandonros
Copy link

Brandons-Air:Desktop brandonros 2021-11-27 15:00:58 $ deno --version
deno 1.16.3 (release, aarch64-apple-darwin)
v8 9.7.106.5
typescript 4.4.2
Brandons-Air:Desktop brandonros 2021-11-27 15:01:00 $ deno run --unstable webview.ts 
Check file:///Users/brandonros/Desktop/webview.ts
error: TS2345 [ERROR]: Argument of type '{ url: string; }' is not assignable to parameter of type 'boolean | undefined'.
  Type '{ url: string; }' is not assignable to type 'true'.
  { url: `data:text/html,${encodeURIComponent(html)}` },
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/brandonros/Desktop/webview.ts:12:3

@brandonros
Copy link

#97

@brandonros
Copy link

0.5.6 needs the { url: '..' } as the constructor

0.6.0 seems to be a breaking change there

import { Webview } from "https://deno.land/x/webview@0.5.6/mod.ts";

@jrmarcum
Copy link
Author

Thanks

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

Successfully merging a pull request may close this issue.

3 participants