@scml-dol-maplebirch/types 5.0.2 → 5.0.4
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 +6 -4
- package/package.json +1 -1
package/maplebirch.d.ts
CHANGED
|
@@ -2559,18 +2559,20 @@ 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 readonly ready;
|
|
2568
2570
|
constructor(manager: ToolCollection);
|
|
2569
2571
|
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;
|
|
2572
|
+
define<Args extends unknown[]>(macroName: string, macroFunction: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean, phase?: MacroPhase): void;
|
|
2571
2573
|
private installAll;
|
|
2572
2574
|
private install;
|
|
2573
|
-
defineS<Args extends unknown[]>(macroName: string, macroFunction: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean): void;
|
|
2575
|
+
defineS<Args extends unknown[]>(macroName: string, macroFunction: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean, phase?: MacroPhase): void;
|
|
2574
2576
|
create<Args extends unknown[]>(name: string, fn: StatFunction<Args>): void;
|
|
2575
2577
|
callStatFunction(name: string, ...args: unknown[]): DocumentFragment;
|
|
2576
2578
|
}
|
|
@@ -2771,8 +2773,8 @@ declare class ToolCollection {
|
|
|
2771
2773
|
readonly patch: Patch;
|
|
2772
2774
|
constructor(core: MaplebirchCore, constructors?: ToolConstructors);
|
|
2773
2775
|
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;
|
|
2776
|
+
define<Args extends unknown[]>(name: string, fn: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean, phase?: MacroPhase): void;
|
|
2777
|
+
defineS<Args extends unknown[]>(name: string, fn: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean, phase?: MacroPhase): void;
|
|
2776
2778
|
addTo(zone: string, ...widgets: ZoneWidget[]): void;
|
|
2777
2779
|
inject(...databases: Parameters<zonesManager['inject']>): void;
|
|
2778
2780
|
}
|