패키지 타입 확인
package.json의 types 또는 exports 타입 조건이 먼저 후보가 됩니다.
Bundled타입 선언 충돌은 패키지 자체 타입, DefinitelyTyped, typeRoots, module augmentation이 어떤 순서로 적용되는지 보면 풀립니다.
package.json의 types 또는 exports 타입 조건이 먼저 후보가 됩니다.
Bundled패키지에 선언이 없으면 node_modules/@types에서 이름이 맞는 선언을 찾습니다.
DefinitelyTypedtypes가 지정되면 포함할 전역 타입 패키지가 명시 목록으로 줄어듭니다.
typestypeRoots는 탐색 위치 자체를 바꾸므로 기본 @types 탐색을 의도치 않게 끊을 수 있습니다.
typeRootsmodule augmentation과 global 선언이 기존 타입에 합쳐지는 위치를 확인합니다.
Merge