import { ScriptId } from '../types'; import { SporeConfig, SporeScript, SporeVersionedScript } from './types'; /** * Set the global default SporeConfig. * The default config is "predefinedSporeConfigs.Aggron4". */ export declare function setSporeConfig(config: SporeConfig): void; /** * Get the global default SporeConfig. * The default config is "predefinedSporeConfigs.Aggron4". */ export declare function getSporeConfig(): SporeConfig; /** * Get a specific SporeScript from SporeConfig, * and throws an error if the script doesn't exist. */ export declare function getSporeScript(config: SporeConfig, scriptName: string): SporeVersionedScript; export declare function getSporeScript(config: SporeConfig, scriptName: string, scriptId?: ScriptId): SporeScript; /** * Find any version of a SporeScript by the specified ScriptId. */ export declare function getSporeScriptVersion(sporeScript: SporeVersionedScript, scriptId: ScriptId): SporeScript | undefined; /** * Check if the target ScriptId is any version of the specified SporeScript. * The difference between this function and the `isSporeScriptSupported` is, * this function accepts SporeConfig and the name of SporeScript as parameters. */ export declare function isSporeScriptSupportedByName(config: SporeConfig, scriptName: string, scriptId: ScriptId): boolean; /** * Check if the target ScriptId is any version of the specified SporeScript. */ export declare function isSporeScriptSupported(sporeScript: SporeVersionedScript, scriptId: ScriptId): boolean; /** * Check if the target ScriptId is the latest version of the specified SporeScript. */ export declare function isDirectSporeScript(sporeScript: SporeScript, scriptId: ScriptId): boolean; /** * Check if the target ScriptId is an historical version of the specified SporeScript. */ export declare function isVersionedSporeScript(sporeScript: SporeVersionedScript, scriptId: ScriptId): boolean; /** * Clone and create a new SporeConfig. */ export declare function forkSporeConfig(origin: SporeConfig, change: Partial>): SporeConfig;