mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 05:45:02 +00:00
Type fixes + circular dependency fix
This commit is contained in:
parent
e3b6b017a2
commit
59e75e0584
20 changed files with 70 additions and 83 deletions
backend/src/plugins/Cases
|
@ -16,10 +16,6 @@ import { getRecentCasesByMod } from "./functions/getRecentCasesByMod";
|
|||
import { getTotalCasesByMod } from "./functions/getTotalCasesByMod";
|
||||
import { postCaseToCaseLogChannel } from "./functions/postToCaseLogChannel";
|
||||
import { CaseArgs, CaseNoteArgs, CasesPluginType, ConfigSchema } from "./types";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
|
||||
// Workaround for circular dependency
|
||||
const AnyTypedLogsPlugin = LogsPlugin as any;
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -42,7 +38,11 @@ export const CasesPlugin = zeppelinGuildPlugin<CasesPluginType>()({
|
|||
`),
|
||||
},
|
||||
|
||||
dependencies: () => [TimeAndDatePlugin, AnyTypedLogsPlugin],
|
||||
dependencies: async () => [
|
||||
TimeAndDatePlugin,
|
||||
// The `as any` cast here is to prevent TypeScript from locking up from the circular dependency
|
||||
((await import("../Logs/LogsPlugin")) as any).LogsPlugin,
|
||||
],
|
||||
configSchema: ConfigSchema,
|
||||
defaultOptions,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue