@scml-dol-maplebirch/types 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/maplebirch.d.ts +7 -4
- package/package.json +1 -1
package/maplebirch.d.ts
CHANGED
|
@@ -2559,18 +2559,21 @@ type SimpleMacroFunction<Args extends unknown[]> = (this: MacroContext$1 | null,
|
|
|
2559
2559
|
type StatFunction<Args extends unknown[] = unknown[]> = (...args: Args) => DocumentFragment;
|
|
2560
2560
|
type MacroTags = string[] | null | undefined;
|
|
2561
2561
|
type SkipArgs = string[] | boolean | null | undefined;
|
|
2562
|
+
type MacroPhase = 'sugarcube' | 'storyready';
|
|
2562
2563
|
declare class defineMacros {
|
|
2563
2564
|
readonly manager: ToolCollection;
|
|
2564
2565
|
readonly log: ScopedLog;
|
|
2565
2566
|
readonly macros: string[];
|
|
2566
2567
|
readonly statFunctions: Record<string, StatFunction>;
|
|
2567
2568
|
private readonly definitions;
|
|
2569
|
+
private sugarcube;
|
|
2570
|
+
private story;
|
|
2568
2571
|
constructor(manager: ToolCollection);
|
|
2569
2572
|
get Macro(): ReturnType<MaplebirchCore['host']['sugarcube']['require']>['Macro'];
|
|
2570
|
-
define<Args extends unknown[]>(macroName: string, macroFunction: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean): void;
|
|
2573
|
+
define<Args extends unknown[]>(macroName: string, macroFunction: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean, phase?: MacroPhase): void;
|
|
2571
2574
|
private installAll;
|
|
2572
2575
|
private install;
|
|
2573
|
-
defineS<Args extends unknown[]>(macroName: string, macroFunction: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean): void;
|
|
2576
|
+
defineS<Args extends unknown[]>(macroName: string, macroFunction: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean, phase?: MacroPhase): void;
|
|
2574
2577
|
create<Args extends unknown[]>(name: string, fn: StatFunction<Args>): void;
|
|
2575
2578
|
callStatFunction(name: string, ...args: unknown[]): DocumentFragment;
|
|
2576
2579
|
}
|
|
@@ -2771,8 +2774,8 @@ declare class ToolCollection {
|
|
|
2771
2774
|
readonly patch: Patch;
|
|
2772
2775
|
constructor(core: MaplebirchCore, constructors?: ToolConstructors);
|
|
2773
2776
|
onInit(...widgets: InitFunction[]): void;
|
|
2774
|
-
define<Args extends unknown[]>(name: string, fn: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean): void;
|
|
2775
|
-
defineS<Args extends unknown[]>(name: string, fn: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean): void;
|
|
2777
|
+
define<Args extends unknown[]>(name: string, fn: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean, phase?: MacroPhase): void;
|
|
2778
|
+
defineS<Args extends unknown[]>(name: string, fn: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean, phase?: MacroPhase): void;
|
|
2776
2779
|
addTo(zone: string, ...widgets: ZoneWidget[]): void;
|
|
2777
2780
|
inject(...databases: Parameters<zonesManager['inject']>): void;
|
|
2778
2781
|
}
|