Skip to content

feat: migrate to TypeScript#24

Merged
dirkjanfaber merged 1 commit into
mainfrom
feat/typescript-migration
Jun 12, 2026
Merged

feat: migrate to TypeScript#24
dirkjanfaber merged 1 commit into
mainfrom
feat/typescript-migration

Conversation

@dirkjanfaber

Copy link
Copy Markdown
Owner

Summary

  • Migrates source files to TypeScript (threshold-control.ts, threshold-logic.ts) with strict type checking
  • Extracts pure logic into threshold-logic.ts with exported types (DesiredState, TransitionResult)
  • Wires up getInitialState to set the initial on/off state immediately on first message (no countdown)
  • Adds 22 tests for threshold-control.ts covering input validation, initial state, countdown lifecycle, message overrides, and node lifecycle
  • Pins neostandard to ^0.12.2 for Node 18 compatibility

Test plan

  • npm test — 44 tests pass (22 logic + 22 node)
  • npm run build — compiles cleanly
  • npm run lint — no issues

🤖 Generated with Claude Code

Use getInitialState on the first received message to set the initial
on/off state immediately without triggering a countdown. Add 22 tests
covering input validation, initial state, countdown lifecycle,
message overrides, and node lifecycle.
@dirkjanfaber dirkjanfaber merged commit cc6c9b4 into main Jun 12, 2026
0 of 2 checks passed
@dirkjanfaber dirkjanfaber deleted the feat/typescript-migration branch June 12, 2026 06:47
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