Commit 712d33d
refactor: convert localeData and portal utils from Flow to TypeScript (#4328)
* refactor: convert localeData and portal utils from Flow to TypeScript
- Convert useUserLocale.js to useUserLocale.ts with proper return type annotation
- Convert CurrentLocaleData.js to CurrentLocaleData.ts with TypeScript type definitions
- Convert usePlacementDomNode.js to usePlacementDomNode.ts with proper React hook types
- Convert portal index.js to index.ts
- Remove Flow directives and convert Flow types to TypeScript equivalents
- Replace Flow Array<T> syntax with TypeScript T[] syntax
- Replace Flow Object type with TypeScript any type
- Ensure compatibility with existing consuming components
All files pass TypeScript compilation (yarn tsc:check) and linting (yarn linter:check).
Co-Authored-By: [email protected] <[email protected]>
* fix: make CurrentLocaleData static property private to resolve SonarCloud issue
- Change static currentData property from public to private
- Resolves SonarCloud Code Analysis failure: 'Make this public static property readonly'
- Property is accessed through existing getter/setter methods, so private access is appropriate
- Maintains existing functionality while improving encapsulation
Verified locally with yarn tsc:check and yarn linter:check
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 bd7e270 commit 712d33d
File tree
4 files changed
+13
-12
lines changed- src/core_modules/capture-core/utils
- localeData
- portal
4 files changed
+13
-12
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
| 15 | + | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
0 commit comments