Convert codebase to TypeScript with comprehensive type annotations#7
Draft
Convert codebase to TypeScript with comprehensive type annotations#7
Conversation
Co-authored-by: HenryQuan <6754708+HenryQuan@users.noreply.github.com>
Co-authored-by: HenryQuan <6754708+HenryQuan@users.noreply.github.com>
- Converted DetailedInfo.js to DetailedInfo.tsx with proper interfaces for PvpData, WeaponData, and component props/state - Converted PlayerRecord.js to PlayerRecord.tsx with interfaces for WeaponRecord and PlayerRecordData - Converted WarshipStat.js to WarshipStat.tsx with interfaces for WarshipProfile and related types - Converted index.js to index.ts for barrel exports - Also converted PlayerCell.js to PlayerCell.tsx (already done in previous work) - Updated InfoLabel.tsx to accept string | number | undefined for the info prop to support various data types - Added proper type annotations for all function parameters, return types, and event handlers - Used LayoutChangeEvent type for layout callbacks - Added null checks and type guards for optional data properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove debug console.log statements from DetailedInfo.tsx - Change loose equality (==) to strict equality (===) in DetailedInfo.tsx - Change let to const for variables that are not reassigned in PlayerRecord.tsx Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Convert Loading.js to Loading.tsx with proper type annotations - Convert Filter.js to Filter.tsx with props and state interfaces - Convert Setup.js to Setup.tsx with typed state and methods - Convert Search.js to Search.tsx with player/clan item interfaces - Convert RS.js to RS.tsx with typed props, state and player info - Convert Friend.js to Friend.tsx with typed friend list data - Convert Menu.js to Menu.tsx with menu item interfaces - Add proper return type annotations (JSX.Element, void) - Add LayoutChangeEvent types for layout handlers - Add typed event handlers and callbacks - Fix optional properties in MenuItem interface Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Renamed src/page/index.js to index.tsx (barrel export file) - Renamed src/wowsinfo.js to wowsinfo.tsx (main app component) - Added proper TypeScript interfaces for AppProps and AppState - Typed all function parameters and return types - Added Theme type from react-native-paper - Updated global.ts theme types to use 'any' for flexibility - Added import for './value/global' to access AppGlobalData Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: HenryQuan <6754708+HenryQuan@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Convert JavaScript files to TypeScript with type annotations
Convert codebase to TypeScript with comprehensive type annotations
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrated 38 JavaScript files to TypeScript across the entire source tree, adding full type safety to components, pages, and utilities.
Type System Additions
WarshipFilterData)Files Converted
Core & Components (10 files)
src/core/util/SafeGuard.js→.tssrc/component/common/*(Space, SafeView, PlayerCell, AdmobBanner, Donation)src/component/player/*(DetailedInfo, PlayerRecord)src/component/wiki/WarshipStat.js→.tsxPages (26 files)
Entry points (2 files)
src/wowsinfo.js→.tsxwith App component typingsrc/page/index.js→.tsxbarrel exportsCode Quality Fixes
==with===for strict equality (8+ occurrences)anytoThemefrom react-native-paperCompatibility
.js(eslint, babel, jest, metro)index.jsunchanged (entry point convention)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.