What is target in tsconfig.json for?

I am quite new to Typescript. What does Target in tsconfig.json signify? target signifies which target of JavaScript should be emitted from the given TypeScript. Examples: target:es5 ()=>null will become function(){return null} as ES5 doesn’t have arrow functions. target:es6 ()=>null will become ()=>null as ES6 has arrow functions. More I also made a quick video … Read more

Extending Error in Javascript with ES6 syntax & Babel

Based on Karel Bílek’s answer, I’d make a small change to the constructor: class ExtendableError extends Error { constructor(message) { super(message); this.name = this.constructor.name; if (typeof Error.captureStackTrace === ‘function’) { Error.captureStackTrace(this, this.constructor); } else { this.stack = (new Error(message)).stack; } } } // now I can extend class MyError extends ExtendableError {} var myerror = … Read more