-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScript
Milestone
Description
- VSCode Version: Version 1.36.0-insider (1.36.0-insider)
- OS Version: macOS Mohave 10.14.5 (18F132)
Steps to Reproduce:
- write a javascript function that returns a promise
- try quick fix to convert to async (it works)
- add a
catchstatement - try quick fix to convert to asynx (it is not offered)
This code works ...
updateHeroAction({ commit }, hero) {
return axios.put(`${API}/heroes/${hero.id}`, hero).then(response => {
const updatedHero = parseItem(response, 200);
commit(UPDATE_HERO, updatedHero);
return updatedHero;
});
},Now add a catch, and there is not quick fix offered
updateHeroAction({ commit }, hero) {
return axios
.put(`${API}/heroes/${hero.id}`, hero)
.then(response => {
const updatedHero = parseItem(response, 200);
commit(UPDATE_HERO, updatedHero);
return updatedHero;
})
.catch(captains.error);
},Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript
