Fixed git modules

master
WolverinDEV 2021-02-20 18:40:22 +01:00
parent 5df48b0bbf
commit 34bc5d9bb3
4 changed files with 5 additions and 35 deletions

3
.gitmodules vendored
View File

@ -7,3 +7,6 @@
[submodule "vendor/TeaEventBus"] [submodule "vendor/TeaEventBus"]
path = vendor/TeaEventBus path = vendor/TeaEventBus
url = https://github.com/WolverinDEV/TeaEventBus.git url = https://github.com/WolverinDEV/TeaEventBus.git
[submodule "vendor\\TeaClientServices"]
path = vendor\\TeaClientServices
url = https://github.com/WolverinDEV/TeaClientServices.git

1
vendor/TeaClientServices vendored Submodule

@ -0,0 +1 @@
Subproject commit f9267daa208f7f97a7bc56d52b89dac7cc0004e7

View File

@ -1,34 +0,0 @@
import {MessageCommandErrorResult} from "./Messages";
import {clientServiceLogger} from "./Logging";
export type ActionResult<T> = {
unwrap() : T;
} & ({
status: "success",
result: T
} | {
status: "error",
result: MessageCommandErrorResult
});
export function createErrorResult<T>(result: MessageCommandErrorResult) : ActionResult<T> {
return {
status: "error",
result: result,
unwrap(): T {
clientServiceLogger.logError("Tried to unwrap an action which failed: %o", result);
throw "action failed with " + result.type;
}
}
}
export function createResult<T>(result: T) : ActionResult<T> {
return {
status: "success",
result: result,
unwrap(): T {
return result;
}
}
}

2
vendor/TeaEventBus vendored

@ -1 +1 @@
Subproject commit 9caad3399af830606e25e66f51ee40239bc3b457 Subproject commit 8310382d8a851b2e7095b400807141065811da53