Posted On: Apr 27, 2023

Today, AWS AppSync released enhanced support for TypeScript in JavaScript resolvers, along with integrated support for source maps in bundled JavaScript code. Plus, we’ve released updated guidance to help you during your development process, and we are updating the AppSync utility library to provide better type and generics support.

Developers love writing their code in TypeScript, an extension of JavaScript. It is designed to provide a better developer experience with compile-time type safety and enhanced auto-completion support in most IDEs. With this update, you can take advantage of TypeScript features when you write JavaScript resolvers. With the updated libraries, you get improved support for types and generics in AppSync’s utility functions. The updated AppSync documentation provides guidance on how to get started and how to bundle your code when you want to use TypeScript or work in a multi file configuration. When working in a multi-file configuration, AppSync now allows you to provide a source map in your AppSync resolver or function code. With source maps, you can see the original source file name and location when you log data to Amazon Cloudwatch Logs, and in reported runtime errors.

You can leverage TypeScript, source maps, and use bundling for AppSync JavaScript resolvers in all AWS regions supported by AppSync. The utils libraries are available for download on NPM. For more details, refer to the AppSync documentation.