You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
877 B

4 months ago
import type { Graph } from '../runtime/graph';
export type PluginOptions = (string | CustomPluginOption | ((this: Graph) => CustomPluginOption))[];
export interface UpdatePluginOption {
key: string;
[key: string]: unknown;
}
export interface CustomPluginOption extends Record<string, any> {
/**
* <zh/>
*
* <en/> Plugin type
*/
type: string;
/**
* <zh/> key
*
* <en/> Plugin key, that is, the unique identifier
* @remarks
* <zh/>
*
* <en/> Used to identify the plugin for further operations
*
* ```ts
* // Get plugin instance
* const plugin = graph.getPluginInstance('key');
* // Update plugin options
* graph.updatePlugin({key: 'key', ...});
* ```
*/
key?: string;
}