Skip to content

Commit 4d03610

Browse files
liujupingJackLian
authored andcommitted
feat: update types define
1 parent ebdcc41 commit 4d03610

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface IPublicTypePluginConfig {
2-
init(): Promise<void>;
3-
destroy?(): Promise<void>;
2+
init(): Promise<void> | void;
3+
destroy?(): Promise<void> | void;
44
exports?(): any;
55
}

packages/types/src/shell/type/resource-type-config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import { IPublicTypeEditorView } from './editor-view';
23

34
export interface IPublicResourceTypeConfig {
@@ -6,7 +7,7 @@ export interface IPublicResourceTypeConfig {
67
description?: string;
78

89
/** 资源 icon 标识 */
9-
icon?: React.ReactElement;
10+
icon?: React.ReactElement | React.FunctionComponent | React.ComponentClass;
1011

1112
/**
1213
* 默认视图类型

packages/types/src/shell/type/resource-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IPublicResourceTypeConfig } from './resource-type-config';
44
export interface IPublicTypeResourceType {
55
resourceName: string;
66

7-
resourceType: 'editor' | 'webview';
7+
resourceType: 'editor' | 'webview' | string;
88

99
(ctx: IPublicModelPluginContext, options: Object): IPublicResourceTypeConfig;
1010
}

0 commit comments

Comments
 (0)