Company
Date Published
Author
Eduardo Bouças
Word count
894
Language
English
Hacker News points
None

Summary

Netlify has introduced native TypeScript support in Netlify Functions, allowing developers to build serverless functions with the same powerful workflows as they do for their application. To get started, add the `@netlify/functions` module to your project and create a function by placing a file with the `.ts` extension in your functions directory. The new feature uses esbuild to compile TypeScript functions, and Netlify Dev can be used to develop these functions locally without additional tooling or configuration needed. The build system does not perform type checking on files, but most modern code editors can handle this task, and users can enable the `esModuleInterop` and `isolatedModules` properties in their TypeScript configuration file for better compatibility. With native TypeScript support, developers have more flexibility to write serverless functions in their preferred language, whether it's TypeScript, JavaScript, or Go.