Skip to content

Commit 35ba414

Browse files
author
nizar-lahlali
committed
fix(cdk): narrow dlqAlarm public type to cloudwatch.IAlarm
Consumers only need addAlarmAction (defined on IAlarm); exposing the concrete Alarm class leaks the full mutable surface unnecessarily.
1 parent 44359e4 commit 35ba414

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cdk/src/constructs/approval-metrics-publisher-consumer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export interface ApprovalMetricsPublisherConsumerProps {
8585
export class ApprovalMetricsPublisherConsumer extends Construct {
8686
public readonly fn: lambda.NodejsFunction;
8787
public readonly dlq: sqs.Queue;
88-
public readonly dlqAlarm: cloudwatch.Alarm;
88+
public readonly dlqAlarm: cloudwatch.IAlarm;
8989

9090
constructor(scope: Construct, id: string, props: ApprovalMetricsPublisherConsumerProps) {
9191
super(scope, id);

cdk/src/constructs/fanout-consumer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export interface FanOutConsumerProps {
107107
export class FanOutConsumer extends Construct {
108108
public readonly fn: lambda.NodejsFunction;
109109
public readonly dlq: sqs.Queue;
110-
public readonly dlqAlarm: cloudwatch.Alarm;
110+
public readonly dlqAlarm: cloudwatch.IAlarm;
111111

112112
constructor(scope: Construct, id: string, props: FanOutConsumerProps) {
113113
super(scope, id);

0 commit comments

Comments
 (0)