TsconfigCache
Defined in: core/index.ts:393
tsconfig autodiscover walk 결과 캐시 (#2367). 다수 파일을 in-process 반복 transpile 하는 NAPI consumer (Vite/Rollup plugin 등) 가 인스턴스 1 회 생성해 transpile 호출들에 재사용 → file 당 5–10 fs syscall 절약.
transpile() 의 cache 옵션으로 패스. tsconfigPath / tsconfigRaw 가 명시되면 캐시는
무시되고 명시 값 사용. 인스턴스는 GC 시 자동 cleanup — 명시 dispose 불필요.
rolldown TsconfigCache 와 정합 (디자인은 1-slot 이 아니라 N-slot HashMap).
Example
섹션 제목: “Example”const cache = new TsconfigCache(); for (const file of files) { transpile(source, { filename: file, cache }); }Constructors
섹션 제목: “Constructors”Constructor
섹션 제목: “Constructor”new TsconfigCache():
TsconfigCache
Defined in: core/index.ts:397
Returns
섹션 제목: “Returns”TsconfigCache
Accessors
섹션 제목: “Accessors”size
섹션 제목: “size”Get Signature
섹션 제목: “Get Signature”get size():
number
Defined in: core/index.ts:408
현재 캐시된 entry 수 (테스트 / 디버깅).
Returns
섹션 제목: “Returns”number
Methods
섹션 제목: “Methods”[dispose]()
섹션 제목: “[dispose]()”[dispose]():
void
Defined in: core/index.ts:417
Explicit Resource Management (TC39 Stage 4) — using cache = new TsconfigCache();
스코프 종료 시 자동 clear(). 메모리 자체는 GC finalizer 가 회수하므로 본 메서드는
“cache 비움” 만 수행 (인스턴스 재사용 가능).
Returns
섹션 제목: “Returns”void
clear()
섹션 제목: “clear()”clear():
void
Defined in: core/index.ts:403
모든 cache entry 와 내부 string 메모리 회수. 인스턴스는 재사용 가능.
Returns
섹션 제목: “Returns”void