瀏覽代碼

Fix type generation

JC Brand 1 年之前
父節點
當前提交
fb60206cde

+ 1 - 1
src/headless/plugins/bookmarks/collection.js

@@ -1,5 +1,5 @@
 /**
- * @typedef {import('@converse/headless').MUC} MUC
+ * @typedef {import('../muc/muc.js').default} MUC
  */
 import { Collection } from "@converse/skeletor";
 import { getOpenPromise } from '@converse/openpromise';

+ 1 - 0
src/headless/types/plugins/bookmarks/collection.d.ts

@@ -1,4 +1,5 @@
 export default Bookmarks;
+export type MUC = import('../muc/muc.js').default;
 declare class Bookmarks extends Collection {
     static checkBookmarksSupport(): Promise<any>;
     constructor();

+ 11 - 7
src/types/i18n/index.d.ts

@@ -1,12 +1,16 @@
-export function __(str: any, ...args: any[]): any;
-export namespace i18n {
-    function getLocale(): string;
+export const __: typeof i18nStub.__ & ((str: any, ...args: any[]) => any);
+/**
+ * @namespace i18n
+ */
+export const i18n: typeof i18nStub & {
+    getLocale(): string;
     /**
      * @param {string} str - The string to be translated
      * @param {Array<any>} args
      */
-    function translate(str: string, args: any[], ...args: any[]): any;
-    function initialize(): Promise<void>;
-    function __(str: any, ...args: any[]): any;
-}
+    translate(str: string, args: Array<any>, ...args: any[]): any;
+    initialize(): Promise<void>;
+    __(str: any, ...args: any[]): any;
+};
+import { i18n as i18nStub } from "@converse/headless";
 //# sourceMappingURL=index.d.ts.map