diff --git a/npm/ng-packs/packages/schematics/src/models/util.ts b/npm/ng-packs/packages/schematics/src/models/util.ts index 5ff732ccfe..0588ed7d5b 100644 --- a/npm/ng-packs/packages/schematics/src/models/util.ts +++ b/npm/ng-packs/packages/schematics/src/models/util.ts @@ -1,2 +1,16 @@ // Omissible (given keys will become optional) export type Omissible = Partial> & Omit; + +// ExcludeKeys (keys will be excluded based on their type) +type ExcludeKeys = Exclude< + { + [Key in keyof Type]: Type[Key] extends Excluded ? never : Key; + }[keyof Type], + never +>; + +// tslint:disable-next-line: ban-types +type ExcludeMethods = Pick>; + +// Options (methods will be omitted, given keys will become optional) +export type Options> = Omissible, K>;