So I've got this big object
const bigObject = {
propA: "sup",
propB: "hi",
propC: undefined,
propD: "",
propE: "hello",
propF: null,
}
And I want to make a type which is the keys of my bigObject, but only if that key has a value:
// what I have so far which doesn't quite work
type LittleObject = {
[x in keyof typeof bigObject]: number
}
↑↑↑↑ This type is too permissive. It shapes objects so their keys could be anything from propA to propF. I want a type that would only allow propA, probB, and propE because they have truthy values.