vscode-jsonrpc
Advanced tools
Comparing version 3.6.1 to 3.6.2
@@ -32,3 +32,3 @@ /* -------------------------------------------------------------------------------------------- | ||
var toAppend = chunk; | ||
if (typeof (chunk) == 'string') { | ||
if (typeof (chunk) === 'string') { | ||
var str = chunk; | ||
@@ -35,0 +35,0 @@ var bufferLen = Buffer.byteLength(str, this.encoding); |
@@ -62,3 +62,3 @@ /** | ||
readonly code: number; | ||
readonly data: D; | ||
readonly data: D | undefined; | ||
constructor(code: number, message: string, data?: D); | ||
@@ -65,0 +65,0 @@ toJson(): ResponseErrorLiteral<D>; |
@@ -48,5 +48,3 @@ /* -------------------------------------------------------------------------------------------- | ||
_this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; | ||
if (data !== void 0) { | ||
_this.data = data; | ||
} | ||
_this.data = data; | ||
Object.setPrototypeOf(_this, ResponseError.prototype); | ||
@@ -56,11 +54,7 @@ return _this; | ||
ResponseError.prototype.toJson = function () { | ||
var result = { | ||
return { | ||
code: this.code, | ||
message: this.message | ||
message: this.message, | ||
data: this.data, | ||
}; | ||
if (this.data !== void 0) { | ||
result.data = this.data; | ||
} | ||
; | ||
return result; | ||
}; | ||
@@ -67,0 +61,0 @@ return ResponseError; |
{ | ||
"name": "vscode-jsonrpc", | ||
"description": "A json rpc implementation over streams", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"author": "Microsoft Corporation", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128821
3031