type EmptyObject = { [K in keyof T]?: never; }; type EmptyObjectOf = EmptyObject extends T ? EmptyObject : never; export type { EmptyObjectOf };