From 4d4c87db7c0e3b4574833a3b13213de4e7b8db46 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 7 Mar 2019 09:26:34 +0100 Subject: [PATCH] fix(eks): remove 'const' from NodeType enum 'const enums' are inlined at the usage site by TypeScript and so the generated type will not be in the JavaScript source code in the assembly, even though the declaration will be there. This leads to "symbol not found" errors upon trying to load it. https://www.typescriptlang.org/docs/handbook/enums.html#const-enums Fixes #1969 --- packages/@aws-cdk/aws-eks/lib/ami.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/lib/ami.ts b/packages/@aws-cdk/aws-eks/lib/ami.ts index 52c7516f09083..e25db075a4de9 100644 --- a/packages/@aws-cdk/aws-eks/lib/ami.ts +++ b/packages/@aws-cdk/aws-eks/lib/ami.ts @@ -37,7 +37,7 @@ const LATEST_KUBERNETES_VERSION = '1.11'; /** * Whether the worker nodes should support GPU or just normal instances */ -export const enum NodeType { +export enum NodeType { /** * Normal instances */ @@ -121,4 +121,4 @@ function parseTable(contents: string): {[type: string]: {[region: string]: strin [NodeType.GPU]: gpuTable, [NodeType.Normal]: normalTable }; -} \ No newline at end of file +}