fix: remove duplicate Range interface (DRY violation) - #21
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DRY (Don't Repeat Yourself) 원칙 위반 수정
문제
Range인터페이스가 두 곳에 중복 정의되어 있었음:src/api/types.ts:1-4src/frontmatter/types.ts:5-8해결
api/types.ts의Range는 실제로 사용되지 않음frontmatter/types.ts의Range만FrontmatterField.count에서 사용api/types.ts의 중복 정의 제거DRY 원칙이란?
같은 코드/정의가 여러 곳에 있으면:
Test Results