compiling-typescript icon indicating copy to clipboard operation
compiling-typescript copied to clipboard

ParsedQs compiler error

Open k1ngpr4wn opened this issue 5 years ago • 2 comments

Getting a compiler error:

src/server/server.ts:53:11 - error TS2739: Type 'ParsedQs' is missing the following properties from type 'Question': title, content

53     const question : Question = req.query;
             ~~~~~~~~

k1ngpr4wn avatar Aug 22 '20 14:08 k1ngpr4wn

Maybe this could help you... const question : Question = { title: req.query.title as string, content: req.query.content as string };

CPrz21 avatar Mar 18 '21 16:03 CPrz21

Experiencing this too, given the Pluralsight course says to clone this repo and compare if you're running into issues, seems like the repo should build successfully out of the box.

brunerma-dev avatar Jul 29 '21 21:07 brunerma-dev