sindresorhus/type-fest

KeysOfType

Open

#630 ouverte le 5 juin 2023

Voir sur GitHub
 (3 commentaires) (2 réactions) (0 assignés)TypeScript (12 328 stars) (471 forks)batch import
help wantedtype addition

Description

  type KeysOfType<T, U> = {
    [K in keyof T]: T[K] extends U ? K : never;
  }[keyof T];

Guide contributeur