TypeScript Arrow Functions Names Issue (Angular 4)
Currently using TypeScript 2.3.3 with Angular 4.2.4. I've created a service, doing a simple promise, then (success, failure), into another then / catch in the calling function. and i was surprised to learn that TypeScript, (unlike ES6 definition), still doesn't name arrow functions. That simply means that whenever you create a function like this "(args or not) => { //code }" you can't ever give it a name, and it will always stay as an anonymous function, mainly meaning that in an error when you would like to see the call stack you'll get and this is a wrong practice, you should ALWAYS name your functions just for that purpose. the issues can be seen in StackOverflow and GitHub Typescript issue #6433 solution would be to actually use the function keyword everywhere. in a class these 2 gets into the prototype and do not appear in the call stack at all: Get ( url ) { console . error ( 'Get' ); }; Get ( url ) : void { console...