Skip to content

Commit

Permalink
feat: update types define
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping committed Nov 30, 2023
1 parent 19bf6ad commit 073df6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/types/src/shell/type/plugin-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface IPublicTypePluginConfig {
init(): Promise<void>;
destroy?(): Promise<void>;
init(): Promise<void> | void;
destroy?(): Promise<void> | void;
exports?(): any;
}
3 changes: 2 additions & 1 deletion packages/types/src/shell/type/resource-type-config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { IPublicTypeEditorView } from './editor-view';

export interface IPublicResourceTypeConfig {
Expand All @@ -6,7 +7,7 @@ export interface IPublicResourceTypeConfig {
description?: string;

/** 资源 icon 标识 */
icon?: React.ReactElement;
icon?: React.ReactElement | React.FunctionComponent | React.ComponentClass;

/**
* 默认视图类型
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/shell/type/resource-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 073df6a

Please sign in to comment.