sindresorhus/type-fest
`NonEmptyObject` fails for objects with dynamic properties
开放
#821 创建于 2024年2月27日
buggood first issuehelp wanted
仓库指标
- 星标
- (12,328 个星标)
- PR 合并指标
- (平均合并 3天 5小时) (30 天内合并 11 个 PR)
描述
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: {}
}