Dinh Long Nguyen преди 8 месеца
родител
ревизия
cdbe08740f
променени са 2 файла, в които са добавени 17 реда и са изтрити 9 реда
  1. 5 5
      frontend/taipy-gui/base/src/exports.ts
  2. 12 4
      frontend/taipy-gui/base/src/packaging/taipy-gui-base.d.ts

+ 5 - 5
frontend/taipy-gui/base/src/exports.ts

@@ -1,7 +1,7 @@
+import { TaipyApp, createApp, OnChangeHandler, OnInitHandler } from "./app";
 import { WsAdapter } from "./wsAdapter";
-// import { TaipyApp } from "./app";
+import { ModuleData } from "./dataManager";
 
-export {
-    WsAdapter,
-    // TaipyApp,
-};
+export default TaipyApp;
+export { TaipyApp, createApp, WsAdapter };
+export type { OnChangeHandler, OnInitHandler, ModuleData };

+ 12 - 4
frontend/taipy-gui/base/src/packaging/taipy-gui-base.d.ts

@@ -85,6 +85,10 @@ export interface WsMessage {
     module_context: string;
     ack_id?: string;
 }
+export declare abstract class WsAdapter {
+    abstract supportedMessageTypes: string[];
+    abstract handleWsMessage(message: WsMessage, app: TaipyApp): boolean;
+}
 export type OnInitHandler = (taipyApp: TaipyApp) => void;
 export type OnChangeHandler = (taipyApp: TaipyApp, encodedName: string, value: unknown, dataEventKey?: string) => void;
 export type OnNotifyHandler = (taipyApp: TaipyApp, type: string, message: string) => void;
@@ -163,7 +167,11 @@ export declare class TaipyApp {
     getWsStatus(): string[];
     getBaseUrl(): string;
 }
-export declare abstract class WsAdapter {
-    abstract supportedMessageTypes: string[];
-    abstract handleWsMessage(message: WsMessage, app: TaipyApp): boolean;
-}
+export declare const createApp: (
+    onInit?: OnInitHandler,
+    onChange?: OnChangeHandler,
+    path?: string,
+    socket?: Socket,
+) => TaipyApp;
+
+export { TaipyApp as default };