chore(client/ts): port services/script_context

This commit is contained in:
Elian Doran
2024-12-19 22:16:03 +02:00
parent 650a116193
commit 7c2002c589
3 changed files with 14 additions and 10 deletions

View File

@@ -445,10 +445,8 @@ interface Api {
/**
* <p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
* available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.startNote.title);</code></p>
*
* @constructor
*/
function FrontendScriptApi (this: Api, startNote: FNote, currentNote: FNote, originEntity: Entity | null = null, $container = null) {
function FrontendScriptApi(this: Api, startNote: FNote, currentNote: FNote, originEntity: Entity | null = null, $container: JQuery<HTMLElement> | null = null) {
this.$container = $container;
this.startNote = startNote;
@@ -671,4 +669,6 @@ function FrontendScriptApi (this: Api, startNote: FNote, currentNote: FNote, ori
};
}
export default FrontendScriptApi;
export default FrontendScriptApi as any as {
new (startNote: FNote, currentNote: FNote, originEntity: Entity | null, $container: JQuery<HTMLElement> | null): Api
};