typescript create object with keys from other object code example Example: typescript object key from other object const object: { [K in keyof MyInterface]: any } = {}