Is there any way in typescript to dynamically join keys names / dynamically join string types? what i mean by that is :
type JoinString<A extends string, B extends string> = /*some magic*/
const example = {
foo: "b",
bar: "c"
}
type GetAnotherKeys<T> = {
JoinString<[TKey in keyof T], "_">: T[Tkey]
}
type Result = GetAnotherKeys<typeof example>;
/*
Result ={
foo_:string
bar_:string
}
*/