sveltejs / sapper-template

Starter template for Sapper apps
703 stars 215 forks source link

Types in latest Sapper incompatible with Express #300

Closed Jayphen closed 3 years ago

Jayphen commented 3 years ago

To replicate: clone the repo, convert to TS and replace polka with Express.

Error detail follows:

CleanShot 2021-01-28 at 16 47 11

> @rollup/plugin-typescript TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '(req: SapperRequest, res: SapperResponse, next: () => void) => void' is not assignable to parameter of type 'PathParams'.
      Type '(req: SapperRequest, res: SapperResponse, next: () => void) => void' is missing the following properties from type '(string | RegExp)[]': pop, push, concat, join, and 25 more.
benmccann commented 3 years ago

Closing in favor of https://github.com/sveltejs/sapper/issues/1706