Skip to content

Centralize TypeScript types by overloading them in class definitions#1

Open
MortallicaXxX wants to merge 3 commits intovaultys:mainfrom
MortallicaXxX:main
Open

Centralize TypeScript types by overloading them in class definitions#1
MortallicaXxX wants to merge 3 commits intovaultys:mainfrom
MortallicaXxX:main

Conversation

@MortallicaXxX
Copy link
Copy Markdown

This pull request introduces significant changes to the Plakar CLI codebase, focusing on simplifying the exports, restructuring the PlakarInstaller module, and removing the types file entirely. The most notable updates include the creation of a namespace for PlakarInstaller, renaming several interfaces for clarity, and removing unused type definitions.

Simplification of exports:

  • [src/index.ts] : Removed the export of types and streamlined the export of installation utilities by omitting type definitions from the export list.

Restructuring of PlakarInstaller:

  • [src/installer.ts]: Introduced a PlakarInstaller namespace to encapsulate related interfaces (Options, Result, and CheckResult) and methods. Updated all references to use the namespace for better organization and readability.

Removal of types file:

  • [src/types.ts]: Deleted the file entirely, removing numerous type definitions that were no longer in use or necessary, such as CommonOptions, Repository, and Snapshot.

MortallicaXxX and others added 3 commits July 10, 2025 09:46
Deleted src/types.ts and refactored code in src/index.ts and src/plakar.ts to inline or locally define types previously imported from types.ts. This simplifies the codebase by reducing indirection and consolidating type definitions.
Moved InstallOptions, InstallResult, and CheckResult interfaces into a PlakarInstaller namespace for better encapsulation and type organization. Updated all references to use the new namespaced types. Removed direct exports of these types from the installer module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant