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

Fix mithCors example errors #16

Closed
tajpouria opened this issue Aug 14, 2020 · 2 comments · Fixed by tajpouria/cors#19
Closed

Fix mithCors example errors #16

tajpouria opened this issue Aug 14, 2020 · 2 comments · Fixed by tajpouria/cors#19

Comments

@tajpouria
Copy link

Getting the following error on running mithCors examples you added to cors, Is there any way to fix it?

error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
  Type 'URL' is not assignable to type 'string'.
  return new URL(url).pathname
                 ~~~
    at https://deno.land/std@0.53.0/path/win32.ts:911:18

TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
  Type 'URL' is not assignable to type 'string'.
  return new URL(url).pathname;
                 ~~~
    at https://deno.land/std@0.53.0/path/posix.ts:433:18

Found 2 errors.

I'm also tried :

import { Mith } from "https://deno.land/x/mith@v0.7.0/mod.ts";
import { Router } from "https://deno.land/x/mith_router@v0.2.0/mod.ts";

and it wasn't helpful!

Using:
deno 1.2.3
v8 8.6.334
typescript 3.9.2

@JWebCoder
Copy link
Owner

I've created a pull request under cors repo tajpouria/cors#19

@tajpouria
Copy link
Author

@JWebCoder Thank you :)

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

Successfully merging a pull request may close this issue.

2 participants