TypeScript
String Templates vs. String Array

by Benny Neugebauer

public async deleteBot(conversationId: string, botId: string): Promise<void> {
  const config: AxiosRequestConfig = {
    method: 'delete',
    url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.BOTS}/${botId}`,
  };

  await this.client.sendJSON(config);
}

public async deleteBot(conversationId: string, botId: string): Promise<void> {
  const config: AxiosRequestConfig = {
    method: 'delete',
    url: [
      ConversationAPI.URL.CONVERSATIONS,
      conversationId,
      ConversationAPI.URL.BOTS,
      botId
    ].join('/'),
  };

  await this.client.sendJSON(config);
}