Commit 9820ec0
refactor: convert capture-core-utils and AppStart/unload files from Flow to TypeScript (#4359)
* refactor: convert capture-core-utils and AppStart/unload files from Flow to TypeScript
- Convert chunk.js to chunk.ts with proper TypeScript types
- Convert WebWorker/index.js to WebWorker/index.ts with type annotations
- Convert capture-core-utils/index.js to index.ts and add CaptureClientEvent export
- Convert AppStart/unload files from .js to .ts with PlainReduxStore type
- Fix ReduxStore interface in AppStart.component.tsx to include getState method
- Remove original .js files after creating .ts versions
- Maintain minimal changes following TypeScript migration guidelines
Co-Authored-By: [email protected] <[email protected]>
* fix: resolve SonarCloud code smells in TypeScript conversions
- Replace deprecated e.returnValue with e.preventDefault() in beforeunload handler
- Convert WebWorker class to factory function to fix constructor return issue
- Export both createWebWorker and WebWorker for backward compatibility
- Address 'Unexpected class with only a constructor' code smell
- Address 'Unexpected return statement in constructor' code smell
Co-Authored-By: [email protected] <[email protected]>
* fix: update pipe function signature to support zero-argument calls
- Use any types to support both zero-argument calls like pipe(...)()
Co-Authored-By: [email protected] <[email protected]>
* fix: resolve asyncForEach TypeScript error with type assertion
- Add type assertion to handle pre-existing asyncForEach extension method
- This resolves the final TypeScript compilation error preventing CI from passing
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 68f7091 commit 9820ec0
File tree
9 files changed
+20
-20
lines changed- src
- components/AppStart
- unload
- core_modules
- capture-core-utils
- WebWorker
- misc
- capture-core/metaDataStoreLoaders/categories
9 files changed
+20
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | | - | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
src/core_modules/capture-core-utils/chunk.js renamed to src/core_modules/capture-core-utils/chunk.ts
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
| 11 | + | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
src/core_modules/capture-core-utils/index.js renamed to src/core_modules/capture-core-utils/index.ts
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
0 commit comments