@specter-automation/test 1.0.125 → 1.0.126
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.
|
@@ -70,11 +70,11 @@ export declare class SpecterLocator<T = any> {
|
|
|
70
70
|
* Calls a reflected Unreal Engine C++ / Blueprint UFUNCTION on this entity.
|
|
71
71
|
* Argument types, required vs optional parameters, and return types are strictly validated.
|
|
72
72
|
*/
|
|
73
|
-
callFunction
|
|
73
|
+
callFunction: (T extends keyof SpecterFunctionRegistry ? ('callFunction' extends keyof SpecterFunctionRegistry[T] ? SpecterFunctionRegistry[T]['callFunction'] : <F extends (keyof SpecterFunctionRegistry[T] | (string & {}))>(functionName: F, ...args: F extends keyof SpecterFunctionRegistry[T] ? (SpecterFunctionRegistry[T][F] extends {
|
|
74
74
|
args: infer A;
|
|
75
|
-
} ?
|
|
75
|
+
} ? FunctionArgsTuple<A> : [Record<string, any>?]) : [Record<string, any>?]) => Promise<F extends keyof SpecterFunctionRegistry[T] ? (SpecterFunctionRegistry[T][F] extends {
|
|
76
76
|
returnType: infer R;
|
|
77
|
-
} ? R : any) : any) : any
|
|
77
|
+
} ? R : any) : any>) : (functionName: string, ...args: any[]) => Promise<any>);
|
|
78
78
|
/**
|
|
79
79
|
* Alias for `callFunction`. Calls a C++ UFUNCTION and returns the result.
|
|
80
80
|
*/
|
|
@@ -214,7 +214,7 @@ class SpecterLocator {
|
|
|
214
214
|
* Calls a reflected Unreal Engine C++ / Blueprint UFUNCTION on this entity.
|
|
215
215
|
* Argument types, required vs optional parameters, and return types are strictly validated.
|
|
216
216
|
*/
|
|
217
|
-
async
|
|
217
|
+
callFunction = (async (functionName, ...args) => {
|
|
218
218
|
const payloadArgs = args.length > 0 ? args[0] : {};
|
|
219
219
|
// Explicitly map args to the 'parameters' key!
|
|
220
220
|
const response = await this.evaluate("CallFunction", {
|
|
@@ -255,7 +255,7 @@ class SpecterLocator {
|
|
|
255
255
|
unpackedResult[k] = unpackValue(data[k]);
|
|
256
256
|
}
|
|
257
257
|
return unpackedResult;
|
|
258
|
-
}
|
|
258
|
+
});
|
|
259
259
|
/**
|
|
260
260
|
* Alias for `callFunction`. Calls a C++ UFUNCTION and returns the result.
|
|
261
261
|
*/
|