Describe the issue
The Function docs are currently corrupted by addAlias's example code block not being closed, and this infects surrounding docs, in particular the addEnvironment method:
|
* ```ts |
|
* declare const fn: lambda.Function; |
|
* |
|
* fn.addAlias('Live'); |
|
* |
|
* // Is equivalent to |
|
* |
|
* new lambda.Alias(this, 'AliasLive', { |
|
* aliasName: 'Live', |
|
* version: fn.currentVersion, |
|
* }); |
|
* |
|
* @param aliasName The name of the alias |

More broadly that this specific instance, it seems like a unclosed code block in a single method should never escape into surrounding docs, and either be an error, or be automatically closed in the method it's attached to (so as to contain the 'damage').
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#addwbraliasaliasname-options
Describe the issue
The
Functiondocs are currently corrupted byaddAlias's example code block not being closed, and this infects surrounding docs, in particular theaddEnvironmentmethod:aws-cdk/packages/@aws-cdk/aws-lambda/lib/function.ts
Lines 976 to 988 in 15bcc3c
More broadly that this specific instance, it seems like a unclosed code block in a single method should never escape into surrounding docs, and either be an error, or be automatically closed in the method it's attached to (so as to contain the 'damage').
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#addwbraliasaliasname-options