11import * as CR from 'typings'
22import * as G from 'typings/graphql'
3- import { EditorEvent , ClientEvent } from 'typings/events'
3+ import { EditorEvents , ClientEvents } from 'typings/events'
44import * as vscode from 'vscode'
55import saveCommit from '../actions/saveCommit'
66import setupActions from '../actions/setupActions'
@@ -11,18 +11,18 @@ import logger from '../services/logger'
1111import Context from './context'
1212
1313interface Channel {
14- receive ( action : EditorEvent ) : Promise < void >
15- send ( action : ClientEvent ) : Promise < void >
14+ receive ( action : EditorEvents ) : Promise < void >
15+ send ( action : ClientEvents ) : Promise < void >
1616}
1717
1818interface ChannelProps {
19- postMessage : ( action : ClientEvent ) => Thenable < boolean >
19+ postMessage : ( action : ClientEvents ) => Thenable < boolean >
2020 workspaceState : vscode . Memento
2121 workspaceRoot : vscode . WorkspaceFolder
2222}
2323
2424class Channel implements Channel {
25- private postMessage : ( action : ClientEvent ) => Thenable < boolean >
25+ private postMessage : ( action : ClientEvents ) => Thenable < boolean >
2626 private workspaceState : vscode . Memento
2727 private workspaceRoot : vscode . WorkspaceFolder
2828 private context : Context
@@ -35,7 +35,7 @@ class Channel implements Channel {
3535 }
3636
3737 // receive from webview
38- public receive = async ( action : EditorEvent ) => {
38+ public receive = async ( action : EditorEvents ) => {
3939 // action may be an object.type or plain string
4040 const actionType : string = typeof action === 'string' ? action : action . type
4141 const onError = ( error : CR . ErrorMessage ) => this . send ( { type : 'ERROR' , payload : { error } } )
@@ -98,7 +98,7 @@ class Channel implements Channel {
9898 if ( ! tutorialContinue ) {
9999 throw new Error ( 'Invalid tutorial to continue' )
100100 }
101- const continueConfig : T . TutorialConfig = tutorialContinue . version . data . config
101+ const continueConfig : CR . TutorialConfig = tutorialContinue . version . data . config
102102 tutorialConfig (
103103 {
104104 config : continueConfig ,
@@ -127,7 +127,7 @@ class Channel implements Channel {
127127 }
128128 }
129129 // send to webview
130- public send = async ( action : ClientEvent ) => {
130+ public send = async ( action : ClientEvents ) => {
131131 // action may be an object.type or plain string
132132 const actionType : string = typeof action === 'string' ? action : action . type
133133 switch ( actionType ) {
0 commit comments