I am tying to construct an object literal with two keys coming from a function
const someFunc = () => {foo: "hi", bar: "bye" }
const x = {
a: "hello",
b: "world",
...someFunc()
}
I am trying to figure out a one liner where i can set the alias of foo
and bar
to c
and d
.
Help appreciated. I am using TS