chrisyip / koa-pug

A Pug middleware for Koa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript error on koa import

epx-nathan opened this issue · comments

When running tsc I get the following error:

Screen Shot 2019-12-16 at 11 31 52 AM

If I update the import statement in the referenced dist file (koa-pug/dist/index.d.ts) to import * as Koa from 'koa' the error goes away.

I'm using the following package versions:

  • koa-pug: 4.0.2
  • koa: 2.11.0
  • @types/koa: 2.11.0

import Koa from 'koa'

I don't know much about Typescript, but if you were able to update your import signature for Koa, I assume that would fix this issue for me and for anyone else who might have it. Also open to a different solution for resolving this issue!

Let me know if there are any further details I can provide.

Thanks!

Fixed, please update koa-pug to 4.0.3.

FYI, koa-pug requires typescript@^3.2.

Thanks so much!