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