forked from claude-did-this/claude-hub
Convert all 11 JavaScript source files to TypeScript with comprehensive type definitions and maintain existing functionality. ## Major Changes - **Type System**: Created comprehensive src/types/ directory with 7 type definition files - **File Conversions**: All 11 source files (.js → .ts) with proper TypeScript typing - **Interface Definitions**: Complete GitHub, Claude, AWS, Express, and Config interfaces - **Type Safety**: Enhanced security-critical components with strong typing - **Backward Compatibility**: Maintained existing CommonJS module structure ## Type Definitions Created - `github.ts` - GitHub webhook payloads, API responses, interfaces - `claude.ts` - Claude API interfaces, command structures, operation types - `aws.ts` - AWS credential types, configuration interfaces - `express.ts` - Custom Express request/response types, middleware interfaces - `config.ts` - Environment variables, application configuration types - `metrics.ts` - Performance metrics, monitoring, health check types - `index.ts` - Central export file with type guards and utilities ## Converted Files **Controllers**: githubController.js → githubController.ts **Services**: claudeService.js → claudeService.ts, githubService.js → githubService.ts **Utilities**: All 5 utility files converted with enhanced type safety **Routes & Entry**: claude.js → claude.ts, github.js → github.ts, index.js → index.ts ## Configuration Updates - Relaxed TypeScript strict settings for pragmatic migration - Maintained existing functionality and behavior - Enhanced security-critical components with proper typing ## Success Criteria Met ✅ All source files converted to TypeScript ✅ Comprehensive type definitions created ✅ Existing functionality preserved ✅ Security-critical components strongly typed ✅ Docker container builds successfully ✅ No runtime behavior changes This establishes the complete TypeScript foundation for the project while maintaining full backward compatibility and operational functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.1 KiB
JSON
49 lines
1.1 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "CommonJS",
|
|
"lib": ["ES2022"],
|
|
"outDir": "./dist",
|
|
"rootDir": "./src",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"resolveJsonModule": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"sourceMap": true,
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"removeComments": false,
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"noImplicitThis": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"exactOptionalPropertyTypes": false,
|
|
"noImplicitOverride": true,
|
|
"noPropertyAccessFromIndexSignature": false,
|
|
"noUncheckedIndexedAccess": false,
|
|
"allowUnusedLabels": false,
|
|
"allowUnreachableCode": false,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noErrorTruncation": true,
|
|
"types": ["node", "jest"]
|
|
},
|
|
"include": [
|
|
"src/**/*",
|
|
"test/**/*"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
"dist",
|
|
"coverage",
|
|
"test-results"
|
|
],
|
|
"ts-node": {
|
|
"files": true,
|
|
"compilerOptions": {
|
|
"module": "CommonJS"
|
|
}
|
|
}
|
|
} |