sholladay / pogo

Server framework for Deno
Mozilla Public License 2.0
482 stars 33 forks source link

URL constructor in Deno 1.2 #46

Closed Bidek56 closed 4 years ago

Bidek56 commented 4 years ago

In Deno 1.2, this simple code fails with Type 'URL' is not assignable to type 'string'.

import React from 'https://dev.jspm.io/react';
import pogo from 'https://deno.land/x/pogo/main.ts';

const server = pogo.server({ port : 3000 });

server.router.get('/', () => {
    return <h1>Hello, world!</h1>;
});

server.start();

Definition of URL constructor has changed in 1.2 by PR and I think you need to upgrade your package. Thx

afaur commented 4 years ago

Looked at this and created PR (https://github.com/sholladay/pogo/pull/47) which seems to fix this. More information available here: https://dev.to/srnv/deno-1-2-0-url-argument-type-solutions-37m0

sholladay commented 4 years ago

Fixed in PR #47