agg ws improvements

This commit is contained in:
Aleksandr Kraiz
2023-05-25 00:15:05 +04:00
parent c920972d08
commit 6c928690b9
7 changed files with 441 additions and 253 deletions

6
src/utils/assertError.ts Normal file
View File

@@ -0,0 +1,6 @@
export default function assertError(errorCandidate: unknown): asserts errorCandidate is Error {
if (!(errorCandidate instanceof Error)) {
throw Error(`Assertion failed: errorCandidate is not an Error. Content: ${JSON.stringify(errorCandidate)}`);
}
}