diff --git a/packages/@aws-cdk/core/lib/names.ts b/packages/@aws-cdk/core/lib/names.ts index e68b43b137bf0..ea75927acb5ed 100644 --- a/packages/@aws-cdk/core/lib/names.ts +++ b/packages/@aws-cdk/core/lib/names.ts @@ -1,4 +1,4 @@ -import { Construct, Node } from 'constructs'; +import { IConstruct, Node } from 'constructs'; import { makeUniqueId } from './private/uniqueid'; /** @@ -14,7 +14,7 @@ export class Names { * @param construct The construct * @returns a unique id based on the construct path */ - public static uniqueId(construct: Construct): string { + public static uniqueId(construct: IConstruct): string { const node = Node.of(construct); const components = node.scopes.slice(1).map(c => Node.of(c).id); return components.length > 0 ? makeUniqueId(components) : '';