Open
Description
Use case description
Region is defined as a union of string literals which works fine if the region is being implicitly set, however when attempting to use Serverless variables a type error is raised.
The following is valid:
const serverlessConfiguration: AWS = {
provider: {
name: "aws",
runtime: "nodejs12.x",
region: "us-east-1",
},
}
The following is considered invalid:
const serverlessConfiguration: AWS = {
provider: {
name: "aws",
runtime: "nodejs12.x",
region: "${opt:region, 'us-east-1'}",
},
}
Proposed Solution
Add string
type to the end of the union type for region
to address this issue. The tradeoff being we lose type safety but keep auto completion and fix the issue of variables being used for region. I'm open to any/all other proposed solutions if anyone has any ideas.