Skip to content

Commit

Permalink
Install @types/lodash-es
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Aug 1, 2024
1 parent 0908fae commit e35ad23
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 12 deletions.
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@babel/preset-env": "^7.18.2",
"@converse/headless": "file:src/headless",
"@types/bootstrap": "^5.2.10",
"@types/lodash-es": "^4.17.12",
"@types/webappsec-credential-management": "^0.6.8",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
Expand Down
2 changes: 1 addition & 1 deletion src/headless/types/plugins/muc/muc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare class MUC extends ChatBox {
time_sent: string;
type: string;
};
debouncedRejoin: any;
debouncedRejoin: import("lodash").DebouncedFunc<() => Promise<MUC>>;
isEntered(): boolean;
/**
* Checks whether this MUC qualifies for subscribing to XEP-0437 Room Activity Indicators (RAI)
Expand Down
2 changes: 1 addition & 1 deletion src/headless/types/shared/chat/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function pruneHistory(model: ChatBox | MUC): void;
* message or `undefined` if not applicable.
*/
export function handleCorrection(model: ChatBox | MUC, attrs: object): Promise<Message | void>;
export const debouncedPruneHistory: any;
export const debouncedPruneHistory: import("lodash").DebouncedFunc<typeof pruneHistory>;
export type Message = import('../../plugins/chat/message.js').default;
export type ChatBox = import('../../plugins/chat/model.js').default;
export type MUC = import('../../plugins/muc/muc.js').default;
Expand Down
2 changes: 1 addition & 1 deletion src/headless/types/shared/connection/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ declare const Connection_base: typeof import("strophe.js/src/types/connection.js
export class Connection extends Connection_base {
constructor(service: any, options: any);
send_initial_presence: boolean;
debouncedReconnect: any;
debouncedReconnect: import("lodash").DebouncedFunc<() => Promise<any>>;
/** @param {Element} body */
xmlInput(body: Element): void;
bind(): Promise<void>;
Expand Down
4 changes: 2 additions & 2 deletions src/headless/types/shared/rsm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const RSM_ATTRIBUTES: string[];
* @class RSM
*/
export class RSM {
static getQueryParameters(options?: {}): any;
static getQueryParameters(options?: {}): Partial<{}>;
static parseXMLResult(set: any): {
index: number;
};
Expand All @@ -23,7 +23,7 @@ export class RSM {
* @constructor
*/
constructor(options?: any);
query: any;
query: Partial<{}>;
result: {};
/**
* Returns a `<set>` XML element that confirms to XEP-0059 Result Set Management.
Expand Down
4 changes: 2 additions & 2 deletions src/shared/chat/emoji-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ export default class EmojiPicker extends CustomElement {
* @param {KeyboardEvent} ev
*/
onSearchInputKeyDown (ev) {
const target = /** @type {HTMLInputElement} */(ev.target);
if (ev.keyCode === KEYCODES.TAB) {
const target = /** @type {HTMLInputElement} */(ev.target);
if (target.value) {
ev.preventDefault();
const match = converse.emojis.shortnames.find(sn => FILTER_CONTAINS(sn, target.value));
Expand All @@ -231,7 +231,7 @@ export default class EmojiPicker extends CustomElement {
ev.keyCode !== KEYCODES.ENTER &&
ev.keyCode !== KEYCODES.DOWN_ARROW
) {
this.debouncedFilter(ev.target);
this.debouncedFilter(target);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default class BookmarksView extends CustomElement {
initialize(): Promise<void>;
liveFilter: any;
liveFilter: import("lodash").DebouncedFunc<(ev: any) => false | Model>;
model: Model;
render(): import("lit").TemplateResult<1>;
clearFilter(ev: any): void;
Expand Down
5 changes: 4 additions & 1 deletion src/types/plugins/omemo/store.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ declare class OMEMOStore extends Model {
* to use a pre-key, which it chooses randomly from the list of available
* ones.
*/
generatePreKeys(): Promise<any>;
generatePreKeys(): Promise<{
id: any;
key: any;
}[]>;
/**
* Generate the cryptographic data used by the X3DH key agreement protocol
* in order to build a session with other devices.
Expand Down
2 changes: 1 addition & 1 deletion src/types/shared/chat/emoji-picker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class EmojiPicker extends CustomElement {
model: any;
query: string;
_search_results: any[];
debouncedFilter: any;
debouncedFilter: import("lodash").DebouncedFunc<(input: HTMLInputElement) => any>;
set search_results(arg: any[]);
get search_results(): any[];
render(): import("lit").TemplateResult<1>;
Expand Down
2 changes: 1 addition & 1 deletion src/types/shared/chat/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function shortnamesToEmojis(str: string, options?: {
unicode_only: boolean;
add_title_wrapper: boolean;
}): any[];
export const markScrolled: any;
export const markScrolled: import("lodash").DebouncedFunc<(ev: any) => void>;
export type EmojiMarkupOptions = {
unicode_only?: boolean;
add_title_wrapper?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/types/shared/components/list-filter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class ListFilter extends CustomElement {
template: any;
promise: Promise<void>;
initialize(): void;
liveFilter: any;
liveFilter: import("lodash").DebouncedFunc<(ev: any) => any>;
render(): any;
dispatchUpdateEvent(): void;
/**
Expand Down

0 comments on commit e35ad23

Please sign in to comment.