@@ -32,6 +32,7 @@ import { performCompileToLlvmIrOnly } from './reducers/output/llvmIr';
3232import { performCompileToMirOnly } from './reducers/output/mir' ;
3333import { performCompileToWasmOnly } from './reducers/output/wasm' ;
3434import { navigateToHelp , navigateToIndex } from './reducers/page' ;
35+ import { addCrateType , editCode } from './reducers/code' ;
3536
3637export type ThunkAction < T = void > = ReduxThunkAction < T , State , { } , Action > ;
3738export type SimpleThunkAction < T = void > = ReduxThunkAction < T , State , { } , AnyAction > ;
@@ -56,11 +57,6 @@ export enum ActionType {
5657 ChangeMode = 'CHANGE_MODE' ,
5758 ChangeEdition = 'CHANGE_EDITION' ,
5859 ChangeBacktrace = 'CHANGE_BACKTRACE' ,
59- EditCode = 'EDIT_CODE' ,
60- AddMainFunction = 'ADD_MAIN_FUNCTION' ,
61- AddImport = 'ADD_IMPORT' ,
62- AddCrateType = 'ADD_CRATE_TYPE' ,
63- EnableFeatureGate = 'ENABLE_FEATURE_GATE' ,
6460 SelectText = 'SELECT_TEXT' ,
6561 NotificationSeen = 'NOTIFICATION_SEEN' ,
6662 BrowserWidthChanged = 'BROWSER_WIDTH_CHANGED' ,
@@ -196,21 +192,6 @@ export const performCompileToNightlyHir =
196192export const performCompileToWasm =
197193 performAndSwitchPrimaryAction ( performCompileToCdylibWasmOnly , PrimaryActionCore . Wasm ) ;
198194
199- export const editCode = ( code : string ) =>
200- createAction ( ActionType . EditCode , { code } ) ;
201-
202- export const addMainFunction = ( ) =>
203- createAction ( ActionType . AddMainFunction ) ;
204-
205- export const addImport = ( code : string ) =>
206- createAction ( ActionType . AddImport , { code } ) ;
207-
208- export const addCrateType = ( crateType : string ) =>
209- createAction ( ActionType . AddCrateType , { crateType } ) ;
210-
211- export const enableFeatureGate = ( featureGate : string ) =>
212- createAction ( ActionType . EnableFeatureGate , { featureGate } ) ;
213-
214195export const selectText = ( start : Position , end : Position ) =>
215196 createAction ( ActionType . SelectText , { start, end } ) ;
216197
@@ -323,14 +304,11 @@ export type Action =
323304 | ReturnType < typeof changeProcessAssembly >
324305 | ReturnType < typeof changeAceTheme >
325306 | ReturnType < typeof changeMonacoTheme >
326- | ReturnType < typeof editCode >
327- | ReturnType < typeof addMainFunction >
328- | ReturnType < typeof addImport >
329- | ReturnType < typeof addCrateType >
330- | ReturnType < typeof enableFeatureGate >
331307 | ReturnType < typeof selectText >
332308 | ReturnType < typeof notificationSeen >
333309 | ReturnType < typeof browserWidthChanged >
310+ | ReturnType < typeof editCode >
311+ | ReturnType < typeof addCrateType >
334312 | ReturnType < typeof navigateToIndex >
335313 | ReturnType < typeof wsExecuteRequest >
336314 ;
0 commit comments