I have a collection of Typescript objects that look like this:
SomeData {
prop1: string;
prop2: number;
}
And I need to end up with some objects that look like this:
type SomeMoreData= {
prop1Change: string;
prop2Change: number;
}
I know that if I just wanted to change the type, I could do this:
type SomeMoreData<T> = {
[P in keyof T]: boolean;
}
Which would give me:
SomeMoreData<SomeData> {
prop1: boolean;
prop2: boolean;
}
Is there a way to manipulate the name produced by the [P in keyof T] bit? I've tried things like [(P in keyof T) + "Change"] with no success.