-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Is your feature request related to a problem? Please describe.
I'm successfully using netlify-lambda and netlify dev with Typescript per the README. However, when I add the simplest possible package.json (npm init and accept all defaults) in the directory with my Typescript source, the Typescript parsing fails (e.g. I get "Unexpected token" on the colon in export const handler: ProxyHandler = ...).
Describe the solution you'd like
I'd love to have README docs for how to use TypeScript (from netlify-lambda build) along with a function-local package.json (from netlify-lambda install).
Describe alternatives you've considered
This is just some nice cleanliness, I think. Putting the function dependencies in the top-level package.json shouldn't hurt anything other than clarity.
That said, it might be even nicer if the TypeScript source directory operated like the usual JS lambda folder, and let you put each function in subdirectories with their own package.json with install.
Additional context
Thanks!