// https://stackoverflow.com/questions/49580725/is-it-possible-to-restrict-typescript-object-to-contain-only-properties-defined export type Impossible = { [P in K]: never } export type NoExtraProperties = U & Impossible>