List of useful [[TypeScript]] tools for building [[Serverless MOC|Serverless]] apps (mostly on [[AWS]]).
Set of type definitions for all the different handler signatures that could trigger a Lambda function.
- [typesafe-dynamodb](https://github.com/sam-goodwin/typesafe-dynamodb) :
Type-only library that hooks into the AWS DynamoDB SDK and allows for strongly typed parameter and return payloads based on the structure of your DynamoDB tables (which you specify as a TypeScript interface). I particularly like the [Single Table Design](https://github.com/sam-goodwin/typesafe-dynamodb#single-table-design) feature which enforces specific prefixes on composite fields such as `pk` and `sk`. The library currently supports the `DynamoDBClient` (as of 2022-03-01) but has an [open issue](https://github.com/sam-goodwin/typesafe-dynamodb/issues/22) to add support for `DocumentClient`.
TypeScript plugin that transforms TypeScript code into Service-to-Service (aka. "functionless") integrations, such as AWS AppSync [Resolvers](https://docs.aws.amazon.com/appsync/latest/devguide/configuring-resolvers.html) and [Velocity Templates](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-programming-guide.html), or (coming soon) [Amazon States Language](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) for [[AWS Step Functions|Step Functions]]. This is great because writing VTL is pretty horrible DX and it has minimal dev tooling.
- [Add type definitions to your Lambda functions](https://serverlessfirst.com/aws-lambda-type-definitions/)