File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -6,26 +6,25 @@ const frames: {
6
6
} = { } ;
7
7
let frameIndex = 1 ;
8
8
9
- /** Codesandbox dispatcher message types */
10
- export const MessageTypes = {
11
- START : 'START' ,
12
- STOP : 'STOP' ,
13
- FILES : 'FILES' ,
14
- SKETCH : 'SKETCH' ,
15
- REGISTER : 'REGISTER' ,
16
- EXECUTE : 'EXECUTE'
17
- } as const ;
18
-
19
- /** Codesandbox dispatcher message types */
20
- export type MessageType = typeof MessageTypes [ keyof typeof MessageTypes ] ;
9
+ /* eslint-disable no-shadow */
10
+ /** Codesandbox dispatcher message types: */
11
+ export enum MessageTypes {
12
+ START = 'START' ,
13
+ STOP = 'STOP' ,
14
+ FILES = 'FILES' ,
15
+ SKETCH = 'SKETCH' ,
16
+ REGISTER = 'REGISTER' ,
17
+ EXECUTE = 'EXECUTE'
18
+ }
19
+ /* eslint-enable no-shadow */
21
20
22
21
/**
23
22
* Codesandbox dispatcher message
24
23
* - type: 'START', 'STOP' etc
25
24
* - payload: additional data for that message type
26
25
*/
27
26
export type Message = {
28
- type : MessageType ;
27
+ type : MessageTypes ;
29
28
payload ?: any ;
30
29
} ;
31
30
You can’t perform that action at this time.
0 commit comments