Add types for SillyTavern.getContext

This commit is contained in:
Cohee
2024-12-06 16:41:26 +02:00
parent 3502bfcaa0
commit 77841dbc21
7 changed files with 228 additions and 146 deletions

View File

@ -5,6 +5,7 @@ import { showLoader } from './loader.js';
import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup } from './popup.js';
import { renderTemplate, renderTemplateAsync } from './templates.js';
import { isSubsetOf, setValueByPath } from './utils.js';
import { getContext } from './st-context.js';
export {
getContext,
getApiUrl,
@ -174,7 +175,6 @@ const extension_settings = {
let modules = [];
let activeExtensions = new Set();
const getContext = () => window['SillyTavern'].getContext();
const getApiUrl = () => extension_settings.apiUrl;
let connectedToApi = false;