Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

conditional-except.d.ts 1012B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import {Except} from './except';
  2. import {ConditionalKeys} from './conditional-keys';
  3. /**
  4. Exclude keys from a shape that matches the given `Condition`.
  5. This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
  6. @example
  7. ```
  8. import {Primitive, ConditionalExcept} from 'type-fest';
  9. class Awesome {
  10. name: string;
  11. successes: number;
  12. failures: bigint;
  13. run() {}
  14. }
  15. type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
  16. //=> {run: () => void}
  17. ```
  18. @example
  19. ```
  20. import {ConditionalExcept} from 'type-fest';
  21. interface Example {
  22. a: string;
  23. b: string | number;
  24. c: () => void;
  25. d: {};
  26. }
  27. type NonStringKeysOnly = ConditionalExcept<Example, string>;
  28. //=> {b: string | number; c: () => void; d: {}}
  29. ```
  30. */
  31. export type ConditionalExcept<Base, Condition> = Except<
  32. Base,
  33. ConditionalKeys<Base, Condition>
  34. >;