I have following type:
type TypeAsProperty<Type> = {
[Prop in keyof { a: true } as `${Type & string}`]: Type;
};
type Person = {
id: number;
firstname: string;
};
type PersonAsProperty = TypeAsProperty<Person>;
I would expect that PersonAsProperty is equal to the following type:
type ResultingType = {Person: Person};
Unfortunately that is not the case. What do I have to do to fix it?
Thanks a lot.