Browse Source

feat: handle complex union types in schematics

pull/5137/head
Arman Ozak 6 years ago
parent
commit
283c04ca9a
  1. 3
      npm/ng-packs/packages/schematics/src/utils/type.ts

3
npm/ng-packs/packages/schematics/src/utils/type.ts

@ -36,7 +36,10 @@ export function flattenUnionTypes(types: string[], type: string) {
type
.replace(/^{/, '')
.replace(/}$/, '')
.replace(/{/, '(')
.replace(/}/, ')')
.split(':')
.filter(Boolean)
.forEach(t => types.push(t));
return types;

Loading…
Cancel
Save