sindresorhus/type-fest
`NonEmptyObject` fails for objects with dynamic properties
Offen
#821 geöffnet am 27.02.2024
buggood first issuehelp wanted
Repository-Metriken
- Stars
- (12.328 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 3T 5h) (11 gemergte PRs in 30 T)
Beschreibung
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: {}
}