Migrate Pegasus Electron app to TypeScript with gradual migration infrastructure#142
Draft
Migrate Pegasus Electron app to TypeScript with gradual migration infrastructure#142
Conversation
Co-authored-by: volta2030 <65960990+volta2030@users.noreply.github.com>
Co-authored-by: volta2030 <65960990+volta2030@users.noreply.github.com>
Co-authored-by: volta2030 <65960990+volta2030@users.noreply.github.com>
Co-authored-by: volta2030 <65960990+volta2030@users.noreply.github.com>
Co-authored-by: volta2030 <65960990+volta2030@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate project to TypeScript
Migrate Pegasus Electron app to TypeScript with gradual migration infrastructure
Dec 23, 2025
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.
Establishes TypeScript infrastructure for gradual migration of ~4000 lines of JavaScript. Converts main process and IPC bridge to TypeScript with full type safety while allowing coexistence of JS/TS files.
Infrastructure
allowJs: true,noImplicitAny: false)@types/electronType Definitions (
types.d.ts)Comprehensive type system covering:
ImageInfo,ImageProcessOptions,Color,CropCoordinatesContextMenuOptions,MenuItemConfig,LayerEventPayloadConverted Files
main.ts(372 lines)BrowserWindow,ipcMain,dialog,Menuutils/ipc_bridge.ts(118 lines)(event: IpcMainEvent, ...args: any[]) => voidExample
Migration Path
Remaining 17 files can be migrated incrementally using
TYPESCRIPT_MIGRATION.mdguide. Priority order:Build scripts updated:
npm run compile→npm startOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.