Here is simplified case what i am struggling.
const createObj = <T extends string>(keys: T[]) => {
return Object.fromEntries(
keys.map((key) => [key, 0])
);
};
const result = createObj(["hi","hello","gg"] as const)
I hoped the result type would be {hi: 0, hello: 0, gg: 0 }
but the result is any;