Add Window interface to app.d.ts for file handling and logging
- Extended the Window interface to include a go property with methods for saving and loading files, as well as logging messages from the frontend. - This enhancement supports improved interaction with the application’s file management features.
This commit is contained in:
13
src/app.d.ts
vendored
13
src/app.d.ts
vendored
@@ -8,6 +8,19 @@ declare global {
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
}
|
||||
|
||||
interface Window {
|
||||
go?: {
|
||||
main: {
|
||||
App: {
|
||||
SaveFile(filename: string, content: string): Promise<string>;
|
||||
LoadFile(): Promise<string>;
|
||||
LogFrontend(message: string): void;
|
||||
};
|
||||
};
|
||||
};
|
||||
runtime?: unknown;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user