router.js icon indicating copy to clipboard operation
router.js copied to clipboard

TS2511: Cannot create an instance of an abstract class.

Open nm4568 opened this issue 5 years ago • 2 comments

Perhaps I am misunderstanding the very first step of the README, that shows the following example of 'newing' up the Router class but the Typescript definition of Router is an abstract class.

import Router from 'router_js'

var router = new Router();

nm4568 avatar Apr 16 '19 19:04 nm4568

I'm also confused by this...are we supposed to implement all abstract methods? Nothing in docs tho...

dakt avatar Apr 27 '19 10:04 dakt

Any updates here?

govorov avatar Oct 21 '22 23:10 govorov