Skip to content

fix: code review improvements#2

Open
drvoss wants to merge 1 commit intogolbin:mainfrom
drvoss:fix/code-review-improvements
Open

fix: code review improvements#2
drvoss wants to merge 1 commit intogolbin:mainfrom
drvoss:fix/code-review-improvements

Conversation

@drvoss
Copy link

@drvoss drvoss commented Mar 11, 2026

Summary

Code review improvements for ssaju library.

Bug Fixes

  • Age label: Changed 만 X세 to X세 (Korean age was mislabeled as international age)
  • Hour default: Changed default from 0 to 12 to match README documentation

Refactoring

  • Removed interpretation prefix add/strip pattern (generateInterpretation no longer adds prefix, format.ts no longer strips it)
  • Added currentYear field to SajuResult, removed fragile reverse-calculation in format.ts
  • Unified type property names to camelCase:
    • WolunItem: month_name -> monthName, stem_tengod -> stemTenGod, branch_tengod -> branchTenGod
    • DaeunItem/WolunItem: 12unsung -> stage12
  • Extracted sal lookup tables (cheonEulGwiin, yeokma, dohwa, hwagae) to module-level constants

Chore

  • Added typecheck script (tsc --noEmit)

Verification

  • All 15 tests pass
  • Build succeeds (gzip 14.7KB)
  • Type check passes

- fix age label and hour default
- refactor interpretation prefix pattern
- add currentYear to SajuResult
- unify type property names to camelCase
- extract sal lookup tables to module level
- add typecheck script

Co-authored-by: Copilot <[email protected]>
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