-
Notifications
You must be signed in to change notification settings - Fork 1
TypeScript Support #9
Copy link
Copy link
Open
Labels
enhancementImprovements to existing features or code qualityImprovements to existing features or code quality
Description
TypeScript Support
Problem Description
authpool is currently written in JavaScript, which limits type safety, editor support, and long-term scalability. This can lead to runtime errors and makes it harder to onboard contributors or consumers using TypeScript-based projects.
Proposed Solution
- Refactor the codebase to TypeScript (
.tsfiles). - Add appropriate types for:
- Express request/response
- User model
- Config options (
startAuthServer)
- Include
tsconfig.jsonand update NPM build scripts accordingly. - Ensure backwards compatibility for JS users (via compiled output).
Why this matter
TypeScript increases developer confidence, improves DX, and enables easier maintenance. Most modern Node.js libraries now offer or prefer TypeScript support.
Acceptance Criteria
- Codebase successfully migrated to TypeScript.
- No runtime errors after build.
- Types are exported for external usage (e.g., types for
startAuthServer()config). - Instructions updated in README for building the package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementImprovements to existing features or code qualityImprovements to existing features or code quality