Skip to content

Commit 73b29a8

Browse files
refactor: convert src/index.js and src/epics/trackerCapture.epics.js from Flow to TypeScript (#4360)
* refactor: convert src/index.js and src/epics/trackerCapture.epics.js from Flow to TypeScript - Convert src/index.js to src/index.tsx with TypeScript syntax - Convert src/epics/trackerCapture.epics.js to src/epics/trackerCapture.epics.ts with TypeScript syntax - Remove Flow annotations and keep all existing imports and structure - Use type assertion for combineEpics to handle mixed action payload types - Remove original .js files after conversion - Verify TypeScript compilation and linting pass Co-Authored-By: [email protected] <[email protected]> * refactor: remove original Flow files after TypeScript conversion - Remove src/index.js (converted to src/index.tsx) - Remove src/epics/trackerCapture.epics.js (converted to src/epics/trackerCapture.epics.ts) - Complete the Flow to TypeScript migration for these files Co-Authored-By: [email protected] <[email protected]> * fix: update entrypoint in d2.config.js to point to TypeScript file - Change entrypoint from './src/index' to './src/index.tsx' - Resolves build failure: 'Could not resolve entrypoint ./src/index' - Build system now correctly finds the converted TypeScript entry file Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
1 parent 9820ec0 commit 73b29a8

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

d2.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const config = {
88
coreApp: true,
99

1010
entryPoints: {
11-
app: './src/index',
11+
app: './src/index.tsx',
1212
},
1313
};
1414

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @flow
21
import { combineEpics } from 'redux-observable';
32
import {
43
cancelNewEventEpic,
@@ -235,7 +234,7 @@ import {
235234
openRelationshipTeiRegisterWidgetEpic,
236235
} from '../core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/TrackedEntityRelationshipsWrapper';
237236

238-
export const epics = combineEpics(
237+
export const epics = (combineEpics as any)(
239238
resetProgramAfterSettingOrgUnitIfApplicableEpic,
240239
calculateSelectionsCompletenessEpic,
241240
triggerLoadCoreEpic,

src/index.js renamed to src/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// @flow
21
import React from 'react';
32
import 'capture-core-utils/extensions/asyncForEachArray';
43
import 'capture-core-utils/extensions/arrayToHashMap';
5-
// $FlowFixMe
64
import './locales'; //eslint-disable-line
75
import { AppStart } from './components/AppStart';
86

0 commit comments

Comments
 (0)