I am trying to create a helper function that simplifies creating lookups.
So given this:
const obj = produceLiteral([`foo`, `bar`, `foo`, `moo`]);
obj should be typed as:
interface Obj {
foo: `foo`;
bar: `bar`;
moo: `moo`;
}
Not sure how.
myIds.foothis will returnfoo. This is typesafe and non-magic thus can be shared around the codebase