Both netlify-lambda build and netlify-lambda serve don’t seem to be verifying the types of TypeScript code. I tried it with the example project sw-yx/create-react-app-lambda-typescript, and something as simple as let a: number = 'abc' doesn’t trigger any warnings. How can I add type checking?
Marcus Weiner suggested that I use netlify dev and define a task that runs typescript with the watch flag -w so it will run on every code change, but I don’t know where to put it so it will run with netlify dev.
Thanks for the help, but I still don’t know how to add the tsc command to get TypeScript to check the types and keep listening for changes when developing.
I created this template for Apollo GraphQL + TypeScript lambda. But it can be easily changed for other cases as well. TypeScript in this template is part of the build process itself.