I want to write a function that accepts a name parameter and then use it to create return object property names:
function myFunction (name: string) {
// ....
return {
[`provide${name}`]: {},
[`consume${name}`]: {}
}
const { provideTest, consumeTest } = myFunction('Test')
How should I type this function?