Preview:```ts
interface ObjA {
[x: string]: any
}
type ObjB<T extends ObjA> = {
[Property in keyof T]: any
}
function createNewObject<T extends ObjA>(input: T) {
const keys = Object.keys(input) as Array<keyof T>
// create objB with keys from objA
const objB = keys.reduce(
(acc, key) => ({...acc, [key]: "some value"}),
{} as ObjB<T>
...```
You can choose specific lines to embed by selecting them before copying the link.