/**
*
* @param {string} key
* @param {any} value
* @returns {{[key]: typeof value}}
*/
const set = (key, value) => {
return {[key]: value}
}
const myObj = set("country", "USA")
myObj. // should suggest .country key
I can not understand how correct define key name of return object
CodePudding user response: