Browse Source

fix: avoid importing generic type placeholders in schematics

pull/5137/head
Arman Ozak 6 years ago
parent
commit
832692a238
  1. 5
      npm/ng-packs/packages/schematics/src/utils/model.ts

5
npm/ng-packs/packages/schematics/src/utils/model.ts

@ -69,8 +69,9 @@ export function createImportRefsToModelReducer(params: ModelGeneratorParams) {
_interface.properties.forEach(prop => { _interface.properties.forEach(prop => {
prop.refs.forEach(ref => { prop.refs.forEach(ref => {
if (parseNamespace(solution, ref) !== model.namespace) const propType = types[ref];
toBeImported.push({ type: ref, isEnum: types[ref]?.isEnum }); if (propType && parseNamespace(solution, ref) !== model.namespace)
toBeImported.push({ type: ref, isEnum: propType?.isEnum });
}); });
}); });
}); });

Loading…
Cancel
Save