Skip to content

feat: convert to TypeScript following @mat3ra/made pattern - #19

Draft
timurbazhirov with Copilot wants to merge 2 commits into
mainfrom
copilot/convert-to-typescript
Draft

feat: convert to TypeScript following @mat3ra/made pattern#19
timurbazhirov with Copilot wants to merge 2 commits into
mainfrom
copilot/convert-to-typescript

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown

Converts @mat3ra/ide to TypeScript using the same tooling setup as @mat3ra/made: tsc for transpilation, ts-node for test execution, and @mat3ra/tsconfig for shared compiler config.

Source files

  • All src/js/*.js*.ts with type annotations
  • compute.ts exports ComputedEntityMixin and WithComputedEntity types, replacing the hand-maintained compute.d.ts
  • default.ts exports ComputeConfig and ExternalBucket interfaces
  • enums.ts: typed class members; ?? instead of || in abe getter for correct undefined handling
  • utils/time.ts: Math.trunc() replaces parseInt(String(...))

Tests

  • All tests/js/*.js*.ts
  • src/js/utils/time.tests.js moved to tests/js/utils/time.tests.ts — was never discovered by mocha before (6 tests now run vs. 2)

Build tooling

Before After
transpile babel --out-dir dist/js src/js tsc -p tsconfig-transpile.json
Test require @babel/register/lib ts-node/register
  • Added tsconfig.json / tsconfig-transpile.json (both extend @mat3ra/tsconfig)
  • Added typescript, ts-node, @mat3ra/tsconfig, @typescript-eslint/*, @types/* to deps
  • Removed @babel/cli; babel deps moved to devDependencies
  • Updated @mat3ra/code/@mat3ra/esse2026.5.27-0, mocha10.3.0

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