ScavXpCounts/types/services/ModCompilerService.d.ts

38 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-02-23 15:06:00 -07:00
import ts from "typescript";
import type { ILogger } from "@spt-aki/models/spt/utils/ILogger";
2024-04-19 21:23:52 -06:00
import { ModHashCacheService } from "@spt-aki/services/cache/ModHashCacheService";
2024-02-23 15:06:00 -07:00
import { VFS } from "@spt-aki/utils/VFS";
2023-08-17 19:49:16 -06:00
export declare class ModCompilerService {
protected logger: ILogger;
2024-04-19 21:23:52 -06:00
protected modHashCacheService: ModHashCacheService;
2023-08-17 19:49:16 -06:00
protected vfs: VFS;
2024-02-23 15:06:00 -07:00
protected serverDependencies: string[];
2024-04-19 21:23:52 -06:00
constructor(logger: ILogger, modHashCacheService: ModHashCacheService, vfs: VFS);
2024-02-23 15:06:00 -07:00
/**
* Convert a mods TS into JS
* @param modName Name of mod
* @param modPath Dir path to mod
* @param modTypeScriptFiles
* @returns
*/
2023-08-17 19:49:16 -06:00
compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise<void>;
2024-02-23 15:06:00 -07:00
/**
* Convert a TS file into JS
* @param fileNames Paths to TS files
* @param options Compiler options
*/
protected compile(fileNames: string[], options: ts.CompilerOptions): Promise<void>;
/**
* Do the files at the provided paths exist
* @param fileNames
* @returns
*/
2023-08-17 19:49:16 -06:00
protected areFilesReady(fileNames: string[]): boolean;
2024-02-23 15:06:00 -07:00
/**
* Wait the provided number of milliseconds
* @param ms Milliseconds
* @returns
*/
2023-08-17 19:49:16 -06:00
protected delay(ms: number): Promise<unknown>;
}