SillyTavern/public/global.d.ts

44 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-10-17 21:18:34 +03:00
import libs from './lib';
2024-12-06 16:41:26 +02:00
import getContext from './scripts/st-context';
2024-10-17 21:18:34 +03:00
// Global namespace modules
declare var ai;
2024-10-17 20:53:18 +03:00
declare var pdfjsLib;
2024-10-17 20:59:42 +03:00
declare var ePub;
2024-08-12 21:56:32 +03:00
declare var SillyTavern: {
2024-12-06 16:41:26 +02:00
getContext(): typeof getContext;
2024-08-12 21:56:32 +03:00
llm: any;
2024-10-17 21:18:34 +03:00
libs: typeof libs;
2024-08-12 21:56:32 +03:00
};
2024-10-31 21:05:22 +02:00
declare global {
// Jquery plugins
interface JQuery {
nanogallery2(options?: any): JQuery;
nanogallery2(method: string, options?: any): JQuery;
pagination(method: 'getCurrentPageNum'): number;
pagination(method: string, options?: any): JQuery;
pagination(options?: any): JQuery;
izoomify(options?: any): JQuery;
}
namespace Select2 {
interface Options<Result = DataFormat | GroupedDataFormat, RemoteResult = any> {
/**
* Extends Select2 v4 plugin by adding an option to set a placeholder for the 'search' input field
* [Custom Field]
* @default ''
*/
searchInputPlaceholder?: string;
/**
* Extends select2 plugin by adding a custom css class for the 'search' input field
* [Custom Field]
* @default ''
*/
searchInputCssClass?: string;
}
}
}