You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"use strict";classExceptionextendsError{publicconstructor(publicstatus: number=500,reason: string){super(reason);if(!this.isValidStatus(status)){this.status=500;}}isValidStatus(status: number): boolean{returnstatus>=100&&status<=599;}}constexception=newException(401,"Invalid API Key");
Expected behavior:
To see the program run to completion with any errors.
Actual behavior:
C:\Users\Consultant\issue.js:13
if (!_this.isValidStatus(status)) {
^
TypeError: _this.isValidStatus is not a function
at new Exception (C:\Users\Consultant\issue.js:13:20)
at Object.<anonymous> (C:\Users\Consultant\issue.js:23:17)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.runMain (module.js:607:10)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
Additional Information:
This problem is only present in the release candidate (TypeScript@2.1.1).
Compiled JavaScript for TypeScript@2.1.1
"use strict";var__extends=(this&&this.__extends)||function(d,b){for(varpinb)if(b.hasOwnProperty(p))d[p]=b[p];function__(){this.constructor=d;}d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype,new__());};varException=(function(_super){__extends(Exception,_super);functionException(status,reason){if(status===void0){status=500;}var_this=_super.call(this,reason)||this;_this.status=status;if(!_this.isValidStatus(status)){_this.status=500;}return_this;}Exception.prototype.isValidStatus=function(status){returnstatus>=100&&status<=599;};returnException;}(Error));varexception=newException(401,"Invalid API Key");
Compiled JavaScript for TypeScript@2.0.9:
"use strict";var__extends=(this&&this.__extends)||function(d,b){for(varpinb)if(b.hasOwnProperty(p))d[p]=b[p];function__(){this.constructor=d;}d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype,new__());};varException=(function(_super){__extends(Exception,_super);functionException(status,reason){if(status===void0){status=500;}_super.call(this,reason);this.status=status;if(!this.isValidStatus(status)){this.status=500;}}Exception.prototype.isValidStatus=function(status){returnstatus>=100&&status<=599;};returnException;}(Error));varexception=newException(401,"Invalid API Key");
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.1.1
Code
Expected behavior:
To see the program run to completion with any errors.
Actual behavior:
Additional Information:
This problem is only present in the release candidate (TypeScript@2.1.1).
Compiled JavaScript for TypeScript@2.1.1
Compiled JavaScript for TypeScript@2.0.9:
The text was updated successfully, but these errors were encountered: