전반코드
구조요약
런타임 예제 결과
타입 디버깅: ts-toolbelt 사용
- F.Parameters<T>: 함수의 인자 타입 추출
- F.Return<T>: 함수의 반환 타입 추출
- 디버깅 시 각 단계의 타입을 비교하기 좋습니다
2. npm publish 가능한 라이브러리 구조화 (index.ts, types.ts, tests/) 과 실제 프로젝트에 통합하는 샘플 리포지토리 확장
아래는 TypeScript 기반 migration-pipeline 유틸리티를 npm publish 가능한 구조로 정리한 라이브러리 템플릿과, 이를 실제 프로젝트에 통합하는 샘플 리포지토리 구성입니다. tsconfig, package.json, tests, dist, src 폴더까지 포함해 실제 배포도 가능한 구조입니다.
src/types.ts
src/compose.ts
src/index.ts
test/compose.test.ts (Vitest or Jest 기반)
package.json
tsconfig.json
npm publish 준비
npm install
npm run build # dist/ 생성
npm publish --access public
2. 실제 프로젝트에서 사용 예시 (my-app/)
npm install migration-pipeline
추가: 타입 디버깅 도구 (ts-toolbelt)
npm install --save-dev ts-toolbelt
깃허브 리포지토리 예시명
https://github.com/your-username/migration-pipeline