worker-factory
Advanced tools
Comparing version 2.4.11 to 2.4.12
@@ -8,7 +8,9 @@ import * as tslib_1 from "tslib"; | ||
if (messageHandler === undefined) { | ||
throw renderMethodNotFoundError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderMethodNotFoundError({ method: method }); | ||
} | ||
const response = messageHandler(params); | ||
if (response === undefined) { | ||
throw renderMissingResponseError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderMissingResponseError({ method: method }); | ||
} | ||
@@ -18,3 +20,4 @@ const synchronousResponse = (response instanceof Promise) ? yield response : response; | ||
if (synchronousResponse.result !== undefined) { | ||
throw renderUnexpectedResultError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderUnexpectedResultError({ method: method }); | ||
} | ||
@@ -24,3 +27,4 @@ } | ||
if (synchronousResponse.result === undefined) { | ||
throw renderUnexpectedResultError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderUnexpectedResultError({ method: method }); | ||
} | ||
@@ -27,0 +31,0 @@ const { result, transferables = [] } = synchronousResponse; |
@@ -17,2 +17,3 @@ var _this = this; | ||
if (messageHandler === undefined) { | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderMethodNotFoundError({ method: method }); | ||
@@ -22,2 +23,3 @@ } | ||
if (response === undefined) { | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderMissingResponseError({ method: method }); | ||
@@ -37,2 +39,3 @@ } | ||
if (synchronousResponse.result !== undefined) { | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderUnexpectedResultError({ method: method }); | ||
@@ -43,2 +46,3 @@ } | ||
if (synchronousResponse.result === undefined) { | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderUnexpectedResultError({ method: method }); | ||
@@ -45,0 +49,0 @@ } |
@@ -58,6 +58,6 @@ { | ||
"ts-loader": "^4.3.0", | ||
"tsconfig-holy-grail": "^4.0.20", | ||
"tsconfig-holy-grail": "^4.0.21", | ||
"tslint": "^5.10.0", | ||
"tslint-config-holy-grail": "^28.0.3", | ||
"typescript": "^2.8.4", | ||
"typescript": "^2.9.1", | ||
"uglifyjs-webpack-plugin": "^1.2.5", | ||
@@ -88,3 +88,3 @@ "webpack": "^4.10.2" | ||
"types": "build/es2015/module.d.ts", | ||
"version": "2.4.11" | ||
"version": "2.4.12" | ||
} |
@@ -16,3 +16,4 @@ import { IAugmentedError } from 'compilerr'; | ||
if (messageHandler === undefined) { | ||
throw renderMethodNotFoundError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderMethodNotFoundError({ method: <string> method }); | ||
} | ||
@@ -23,3 +24,4 @@ | ||
if (response === undefined) { | ||
throw renderMissingResponseError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderMissingResponseError({ method: <string> method }); | ||
} | ||
@@ -31,7 +33,9 @@ | ||
if (synchronousResponse.result !== undefined) { | ||
throw renderUnexpectedResultError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderUnexpectedResultError({ method: <string> method }); | ||
} | ||
} else { | ||
if (synchronousResponse.result === undefined) { | ||
throw renderUnexpectedResultError({ method }); | ||
// @todo The variable method is of type keyof T which is actually a string but TypeScript (v2.9.1) doesn't accept that. | ||
throw renderUnexpectedResultError({ method: <string> method }); | ||
} | ||
@@ -38,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
86321
798