From a70cfd6d2728a360d78a71d7af7f6bf9ed4af0e5 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Wed, 19 Aug 2020 18:52:28 +0300 Subject: [PATCH] fix: avoid creating interfaces for enums in schematics --- npm/ng-packs/packages/schematics/src/utils/model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/schematics/src/utils/model.ts b/npm/ng-packs/packages/schematics/src/utils/model.ts index a8676ce639..cadede7e6b 100644 --- a/npm/ng-packs/packages/schematics/src/utils/model.ts +++ b/npm/ng-packs/packages/schematics/src/utils/model.ts @@ -21,7 +21,8 @@ export function createImportRefsToModelMapper(solution: string, types: Record { - model.interfaces.push(mapImportRefToInterface(ref)); + if (!types[ref].isEnum) model.interfaces.push(mapImportRefToInterface(ref)); + return reduceImportRefToImport(accumulatedImports, ref); }, []);