Skip to content

Commit 0b7e4f4

Browse files
committed
add missing args param to executeLuaFunction
1 parent a43c3d6 commit 0b7e4f4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

script/openspace-api-static.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
2323
****************************************************************************************/
2424

25-
declare module 'openspace-api-js' {
25+
declare module "openspace-api-js" {
2626
export class OpenSpaceApi {
2727
/**
2828
* Construct an instance of the OpenSpace API.
@@ -118,21 +118,23 @@ declare module 'openspace-api-js' {
118118
executeLuaScript(
119119
script: string,
120120
getReturnValue: boolean,
121-
shouldBeSynchronized: boolean
121+
shouldBeSynchronized: boolean,
122122
): Promise<unknown | undefined>;
123123

124124
/**
125125
* Execute a lua function from the OpenSpace library
126126
* @param function The lua function to execute (for example
127127
* `openspace.addSceneGraphNode`).
128+
* @param args The function arguments.
128129
* @param getReturnValue Specified whether the return value should be collected.
129130
*
130131
* @return The return value of the script, if `getReturnValue` is true, otherwise
131132
* undefined.
132133
*/
133134
executeLuaFunction(
134135
fun: string,
135-
getReturnValue: boolean
136+
args: unknown[],
137+
getReturnValue: boolean,
136138
): Promise<unknown | undefined>;
137139

138140
/**
@@ -189,7 +191,7 @@ declare module 'openspace-api-js' {
189191
constructor(
190192
iterator: AsyncGenerator<any, void, unknown>,
191193
talk: (payload: any) => void,
192-
cancel: () => void
194+
cancel: () => void,
193195
);
194196
/**
195197
* Send data within a topic

src/api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ class OpenSpaceApi {
245245
/**
246246
* Execute a lua function from the OpenSpace library
247247
* @param {string} function - The lua function to execute (for example `openspace.addSceneGraphNode`).
248+
* @param {*[]} args - The function arguments.
248249
* @param {string} getReturnValue - Specified whether the return value should be collected.
249250
* @return {*} The return value of the script, if `getReturnValue` is true, otherwise undefined.
250251
*/
@@ -357,4 +358,4 @@ class OpenSpaceApi {
357358
}
358359
}
359360

360-
module.exports = OpenSpaceApi;
361+
module.exports = OpenSpaceApi;

0 commit comments

Comments
 (0)