sindresorhus/type-fest
`NonEmptyObject` fails for objects with dynamic properties
Aberta
#821 aberto em 27 de fev. de 2024
buggood first issuehelp wanted
Métricas do repositório
- Stars
- (12.328 estrelas)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
The following code is considered as valid by Typescript, although I was expecting it to complain that the filter foo in commonArguments was empty.
import type { NonEmptyObject } from "type-fest"
interface CommonArguments {
[filter: string]: NonEmptyObject<{ [argument: string]: string | number | undefined }>
}
export const commonArguments: CommonArguments = {
foo: {}
}