I saw this TypeScript code somewhere. It compiles without any issues:
const eventName = entityName + commandName;
pubsub.publish(triggerName, { [eventName]: response });
I assumes it dynamically creates an object literal with property name called eventName. Is this assumption correct? Where in the TypeScript docs is this feature described?