feat: update types define

This commit is contained in:
liujuping 2023-11-30 20:38:12 +08:00 committed by 林熠
parent ebdcc41461
commit 4d03610fd3
3 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
export interface IPublicTypePluginConfig {
init(): Promise<void>;
destroy?(): Promise<void>;
init(): Promise<void> | void;
destroy?(): Promise<void> | void;
exports?(): any;
}

View File

@ -1,3 +1,4 @@
import React from 'react';
import { IPublicTypeEditorView } from './editor-view';
export interface IPublicResourceTypeConfig {
@ -6,7 +7,7 @@ export interface IPublicResourceTypeConfig {
description?: string;
/** 资源 icon 标识 */
icon?: React.ReactElement;
icon?: React.ReactElement | React.FunctionComponent | React.ComponentClass;
/**
*

View File

@ -4,7 +4,7 @@ import { IPublicResourceTypeConfig } from './resource-type-config';
export interface IPublicTypeResourceType {
resourceName: string;
resourceType: 'editor' | 'webview';
resourceType: 'editor' | 'webview' | string;
(ctx: IPublicModelPluginContext, options: Object): IPublicResourceTypeConfig;
}