Browse Source

fix: generate interface for base types too

pull/5137/head
Arman Ozak 6 years ago
parent
commit
2e82d0a20d
  1. 8
      npm/ng-packs/packages/schematics/src/utils/model.ts

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

@ -133,7 +133,13 @@ export function createImportRefToInterfaceReducerCreator(params: ModelGeneratorP
prop.refs.forEach(type => !types[type]?.isEnum && refs.push(type));
return refs;
}, [])
.concat(base || [])
.concat(
base
? parseGenerics(typeDef.baseType!)
.toGenerics()
.join('')
: [],
)
.reduce<Interface[]>(reduceRefsToInterfaces, interfaces);
}
}

Loading…
Cancel
Save