Given the following type
type A = {
foo: string
bar: number
}
is it possible to create a mapped/conditional type such that
type APropertyNameList = MapToProperyNameList<A>
let l1: APropertyNameList = ["foo", "bar] //correct
let l2: APropertyNameList = ["foo", "boom"] //compile error
let l3: APropertyNameList = ["foo", "bar", "bar"] //compile error 2x bar