Skip to content

Test - migration javascript to typescript#1109

Closed
opslevel[bot] wants to merge 1 commit intomainfrom
opslevel-test-migration-javascript-to-typescript-9ed53331
Closed

Test - migration javascript to typescript#1109
opslevel[bot] wants to merge 1 commit intomainfrom
opslevel-test-migration-javascript-to-typescript-9ed53331

Conversation

@opslevel
Copy link
Contributor

@opslevel opslevel bot commented Dec 18, 2025

Summary

Successfully migrated all remaining JavaScript source files to TypeScript, completing the gradual migration process. The migration involved converting three JavaScript files to TypeScript with proper type annotations and interface definitions, while maintaining backward compatibility with existing imports.

Key Changes

  • Migrated level_color_helper.js to TypeScript with a new LevelColor interface and strongly-typed function signatures for color palette management
  • Migrated maturity_report_helper.js to TypeScript with interfaces for Level, LevelEntry, ServiceLevelCount, and CategoryLevelCount, ensuring type safety for data aggregation functions
  • Migrated test utility textEncoder.js to TypeScript using ES6 import syntax instead of CommonJS require
  • Updated jest.config.js to reference the new TypeScript test setup file
  • Updated tsconfig.json to include all test TypeScript files with the pattern test/**/*.ts
  • Removed all @ts-nocheck directives from migrated files, enabling full TypeScript strict checking

All source files in the src and test directories are now TypeScript, while configuration files (babel.config.js, jest.config.js, .eslintrc.js) remain in JavaScript as per common practice. The TypeScript compiler configuration already has @typescript-eslint parser and plugin configured, and the build tooling is properly set up to handle TypeScript alongside the existing JavaScript configuration files.

@p25marti p25marti closed this Dec 18, 2025
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.

2 participants