|
@@ -8,7 +8,7 @@ export function isEmptyMessage(attrs: any): boolean;
|
|
|
* inserted before the mentioned nicknames.
|
|
|
*/
|
|
|
export function prefixMentions(message: any): any;
|
|
|
-export function isErrorObject(o: any): boolean;
|
|
|
+export function isErrorObject(o: any): o is Error;
|
|
|
export function safeSave(model: any, attributes: any, options: any): void;
|
|
|
export function getRandomInt(max: any): number;
|
|
|
/**
|
|
@@ -31,7 +31,7 @@ declare const _default: {
|
|
|
triggerEvent: typeof triggerEvent;
|
|
|
waitUntil: typeof waitUntil;
|
|
|
isValidURL(text: string): boolean;
|
|
|
- getURI(url: any): any;
|
|
|
+ getURI(url: string | getOpenPromise): any;
|
|
|
checkFileTypes(types: string[], url: string): boolean;
|
|
|
filterQueryParamsFromURL(url: any): any;
|
|
|
isURLWithImageExtension(url: any): boolean;
|
|
@@ -41,28 +41,23 @@ declare const _default: {
|
|
|
isImageURL(url: any): any;
|
|
|
isEncryptedFileURL(url: any): any;
|
|
|
getMediaURLsMetadata(text: string, offset?: number): {
|
|
|
- media_urls?: url.MediaURLMetadata[];
|
|
|
+ media_urls?: MediaURLMetadata[];
|
|
|
};
|
|
|
- getMediaURLs(arr: url.MediaURLMetadata[], text: string, offset?: number): url.MediaURLMetadata[];
|
|
|
+ getMediaURLs(arr: Array<MediaURLMetadata>, text: string, offset?: number): MediaURLData[];
|
|
|
getDefaultStore(): "session" | "persistent";
|
|
|
createStore(id: any, store: any): any;
|
|
|
initStorage(model: any, id: any, type: any): void;
|
|
|
isErrorStanza(stanza: Element): boolean;
|
|
|
isForbiddenError(stanza: Element): boolean;
|
|
|
isServiceUnavailableError(stanza: Element): boolean;
|
|
|
- getAttributes(stanza: Element): any;
|
|
|
+ getAttributes(stanza: Element): object;
|
|
|
isUniView(): boolean;
|
|
|
isTestEnv(): boolean;
|
|
|
getUnloadEvent(): "pagehide" | "beforeunload" | "unload";
|
|
|
- replacePromise(_converse: any, name: string): void;
|
|
|
- shouldClearCache(_converse: any): boolean;
|
|
|
- tearDown(_converse: any): Promise<any>;
|
|
|
- clearSession(_converse: any): any;
|
|
|
- /**
|
|
|
- * @copyright The Converse.js contributors
|
|
|
- * @license Mozilla Public License (MPLv2)
|
|
|
- * @description This is the core utilities module.
|
|
|
- */
|
|
|
+ replacePromise(_converse: ConversePrivateGlobal, name: string): void;
|
|
|
+ shouldClearCache(_converse: ConversePrivateGlobal): boolean;
|
|
|
+ tearDown(_converse: ConversePrivateGlobal): Promise<any>;
|
|
|
+ clearSession(_converse: ConversePrivateGlobal): any;
|
|
|
merge(dst: any, src: any): void;
|
|
|
isError(obj: any): boolean;
|
|
|
isFunction(val: any): boolean;
|
|
@@ -72,23 +67,18 @@ declare const _default: {
|
|
|
isSameDomain(jid1: any, jid2: any): boolean;
|
|
|
getJIDFromURI(jid: string): string;
|
|
|
isElement(el: unknown): boolean;
|
|
|
- isTagEqual(stanza: Element | typeof import("strophe.js/src/types/builder.js").default, name: string): boolean;
|
|
|
+ isTagEqual(stanza: Element | typeof import("strophe.js").Builder, name: string): boolean;
|
|
|
stringToElement(s: string): Element;
|
|
|
queryChildren(el: HTMLElement, selector: string): ChildNode[];
|
|
|
siblingIndex(el: Element): number;
|
|
|
decodeHTMLEntities(str: string): string;
|
|
|
getSelectValues(select: HTMLSelectElement): string[];
|
|
|
- webForm2xForm(field: HTMLSelectElement | HTMLInputElement | HTMLTextAreaElement): Element;
|
|
|
+ webForm2xForm(field: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement): Element;
|
|
|
getCurrentWord(input: HTMLInputElement, index?: number, delineator?: string | RegExp): string;
|
|
|
isMentionBoundary(s: string): boolean;
|
|
|
replaceCurrentWord(input: HTMLInputElement, new_value: string): void;
|
|
|
placeCaretAtEnd(textarea: HTMLTextAreaElement): void;
|
|
|
colorize(s: string): Promise<string>;
|
|
|
- /**
|
|
|
- * @copyright The Converse.js contributors
|
|
|
- * @license Mozilla Public License (MPLv2)
|
|
|
- * @description This is the core utilities module.
|
|
|
- */
|
|
|
appendArrayBuffer(buffer1: any, buffer2: any): ArrayBufferLike;
|
|
|
arrayBufferToHex(ab: any): any;
|
|
|
arrayBufferToString(ab: any): string;
|
|
@@ -102,7 +92,7 @@ export type CommonUtils = Record<string, Function>;
|
|
|
/**
|
|
|
* The utils object
|
|
|
*/
|
|
|
-export type PluginUtils = Record<'muc' | 'mam', CommonUtils>;
|
|
|
+export type PluginUtils = Record<"muc" | "mam", CommonUtils>;
|
|
|
declare function getLongestSubstring(string: any, candidates: any): any;
|
|
|
/**
|
|
|
* Call the callback once all the events have been triggered
|
|
@@ -113,7 +103,7 @@ declare function getLongestSubstring(string: any, candidates: any): any;
|
|
|
*/
|
|
|
declare function onMultipleEvents(events: any[], callback: Function): void;
|
|
|
declare function shouldCreateMessage(attrs: any): any;
|
|
|
-import { toStanza } from "strophe.js";
|
|
|
+import { toStanza } from 'strophe.js';
|
|
|
/**
|
|
|
* @param {Element} el
|
|
|
* @param {string} name
|
|
@@ -122,6 +112,7 @@ import { toStanza } from "strophe.js";
|
|
|
* @param {boolean} [cancelable]
|
|
|
*/
|
|
|
declare function triggerEvent(el: Element, name: string, type?: string, bubbles?: boolean, cancelable?: boolean): void;
|
|
|
-import { waitUntil } from "./promise.js";
|
|
|
-import * as url from "./url.js";
|
|
|
+import { waitUntil } from './promise.js';
|
|
|
+import * as url from './url.js';
|
|
|
+import * as session from './session.js';
|
|
|
//# sourceMappingURL=index.d.ts.map
|