Skip to content

fix: remove duplicate Range interface (DRY violation) - #21

Merged
GoBeromsu merged 1 commit into
masterfrom
fix/dry-duplicate-range-interface
Dec 28, 2025
Merged

fix: remove duplicate Range interface (DRY violation)#21
GoBeromsu merged 1 commit into
masterfrom
fix/dry-duplicate-range-interface

Conversation

@GoBeromsu

Copy link
Copy Markdown
Owner

Summary

DRY (Don't Repeat Yourself) 원칙 위반 수정

문제

Range 인터페이스가 두 곳에 중복 정의되어 있었음:

  • src/api/types.ts:1-4
  • src/frontmatter/types.ts:5-8

해결

  • api/types.tsRange는 실제로 사용되지 않음
  • frontmatter/types.tsRangeFrontmatterField.count에서 사용
  • 사용되지 않는 api/types.ts의 중복 정의 제거

DRY 원칙이란?

"Every piece of knowledge must have a single, unambiguous representation"

같은 코드/정의가 여러 곳에 있으면:

  • 한 곳만 수정하고 다른 곳을 잊어버릴 위험
  • 시간이 지나며 정의가 서로 달라질 수 있음
  • 어떤 것이 "진짜"인지 혼란

Test Results

  • Build: ✅ Pass

Range interface was defined in both api/types.ts and frontmatter/types.ts.
Only frontmatter/types.ts actually uses it, so removed the unused duplicate.
@GoBeromsu
GoBeromsu merged commit 4eed2d6 into master Dec 28, 2025
1 check passed
@GoBeromsu
GoBeromsu deleted the fix/dry-duplicate-range-interface branch April 11, 2026 07:26
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