sholladay / pogo

Server framework for Deno

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL constructor in Deno 1.2

Bidek56 opened this issue · comments

commented

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

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

Fixed in PR #47