diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 8081668f98c..5181a0f17f5 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -21,8 +21,7 @@ namespace ts { var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };`; // emit output for the __decorate helper function