mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Use strict type checking
This commit is contained in:
1 parent
2ca8e69025
commit
a66e930997
36 files changed
+714
-676
No files matched your search
@@ -49,7 +49,7 @@ export async function handlePluginCommand(
|
||||
pluginList: Map<string, string>,
|
||||
pluginListPath: string
|
||||
) {
|
||||
let command = args._[1];
|
||||
let command = (args._ as string[])[1];
|
||||
|
||||
if (command === "add") {
|
||||
let pluginPath = args.path as string;
|
||||
@@ -61,7 +61,7 @@ export async function handlePluginCommand(
|
||||
try {
|
||||
// eslint-disable-next-line node/global-require
|
||||
pluginInfo = require(path.posix.join(pluginPath, "info"));
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
logger.error(`Unable to import plugin info from ${args.path}:\n${err.stack}`);
|
||||
process.exitCode = 1;
|
||||
return;
|
||||
@@ -132,7 +132,7 @@ export async function handleConfigCommand(
|
||||
instance: libConfig.Config,
|
||||
configPath: string
|
||||
) {
|
||||
let command = args._[1];
|
||||
let command = (args._ as string[])[1];
|
||||
|
||||
if (command === "list") {
|
||||
for (let GroupClass of (instance.constructor as typeof libConfig.Config).groups.values()) {
|
||||
|
||||
Reference in new issue
Block a user