Skip to content

Commit 528df78

Browse files
refactor: make types more accurate
1 parent a5b3faa commit 528df78

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/types/system.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import { PropChangedAction } from 'plugins/props-change-watcher/actions';
22
import { Action } from 'types/actions';
3+
import { ComponentType } from 'react';
34

45
export interface SystemValues {
5-
getComponent: () => void;
6+
getComponent: (
7+
componentName: string,
8+
container?: boolean,
9+
config?: object
10+
) => ComponentType | null;
611
editorSelectors: {
712
selectContent: () => string;
813
selectInferFileNameWithExtensionFromContent: () => string;
914
};
1015
editorActions: {
11-
convertContentToJSON: (content: string) => Action<string>;
16+
convertContentToJSON: (content: string) => Action<string | Error>;
1217
setContent: (content: string) => Action<string>;
1318
propChanged: PropChangedAction;
1419
};

0 commit comments

Comments
 (0)