I am following a tutorial where the instructor uses square brackets after the AWS type when declaring the constant, but I have never seen this before.
import type { AWS } from "@serverless/typescript";
const dynamoResources: AWS["resources"]["Resources"] = {
urlTable: {
Type: "AWS::DynamoDB::Table",
Properties: {
TableName: "${self:custom.urlTableName}",
AttributeDefinitions: [
{
AttributeName: "id",
AttributeType: "S",
},
],
KeySchema: [
{
AttributeName: "id",
KeyType: "HASH",
},
],
BillingMode: "PAY_PER_REQUEST",
},
},
};
export default dynamoResources;
What are these used for? What is the name for it, so I can read more about it?