Modified: Updating ID Types
I have an array that contains the following values:
const ids: number[] = [45, 56];
const obj: any = {
45: "HELLO",
56: "WORLD",
};
I want to specify a type for my object to only allow values that are in my ids
array.
I attempted to use a lookup type but didn't achieve the desired result...
Any suggestions?
Thank you