Skip to content

Commit abebefe

Browse files
committed
chore: fix wrong plugin ts type
1 parent 13489a0 commit abebefe

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

esbuild.config.js

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,27 @@ const typeDeclaration = `// Type definitions for @matdata/yasgui-graph-plugin
5454
// Project: https://github.com/Matdata-eu/yasgui-graph-plugin
5555
5656
declare module '@matdata/yasgui-graph-plugin' {
57-
import type { Plugin } from '@zazuko/yasgui/build/ts/plugins';
57+
import type { Plugin, DownloadInfo } from '@zazuko/yasr/build/ts/plugins';
58+
import type Yasr from '@zazuko/yasr';
5859
5960
/**
6061
* YASGUI plugin for visualizing SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs
6162
*/
62-
export default class GraphPlugin extends Plugin {
63+
export default class GraphPlugin implements Plugin<any> {
6364
/**
6465
* Plugin priority (higher = shown first in tabs)
6566
*/
66-
static priority: number;
67+
priority: number;
6768
6869
/**
6970
* Plugin label for tab display
7071
*/
71-
static label: string;
72+
label?: string;
73+
74+
/**
75+
* Reference to help documentation
76+
*/
77+
helpReference?: string;
7278
7379
/**
7480
* Check if plugin can handle the current results
@@ -79,12 +85,22 @@ declare module '@matdata/yasgui-graph-plugin' {
7985
/**
8086
* Render the graph visualization
8187
*/
82-
draw(): void;
88+
draw(persistentConfig: any, runtimeConfig?: any): Promise<void> | void;
89+
90+
/**
91+
* Get icon element for plugin tab
92+
*/
93+
getIcon(): Element | undefined;
8394
8495
/**
8596
* Download the current visualization as PNG
8697
*/
87-
download(): void;
98+
download(filename?: string): DownloadInfo | undefined;
99+
100+
/**
101+
* Cleanup resources when plugin is destroyed
102+
*/
103+
destroy?(): void;
88104
89105
/**
90106
* Get vis-network configuration options

0 commit comments

Comments
 (0)