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.

except.d.ts 886B

12345678910111213141516171819202122
  1. /**
  2. Create a type from an object type without certain keys.
  3. This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
  4. Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/30825) if you want to have the stricter version as a built-in in TypeScript.
  5. @example
  6. ```
  7. import {Except} from 'type-fest';
  8. type Foo = {
  9. a: number;
  10. b: string;
  11. c: boolean;
  12. };
  13. type FooWithoutA = Except<Foo, 'a' | 'c'>;
  14. //=> {b: string};
  15. ```
  16. */
  17. export type Except<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;