문제
`npm run build` 실행 시 `tsc` 단계에서 에러가 발생하여 빌드가 실패한다.
`tsconfig.json`은 `strict: true`로 설정되어 있으며, 우회(bypass) 없이 코드 수정으로 해결해야 한다.
에러 목록
TS2341: private 멤버 외부 접근
```
src/command/commands/file.ts(136,28): error TS2341: Property 'doc' is private and only accessible within class 'WasmBridge'.
src/main.ts(532,20): error TS2341: Property 'doc' is private and only accessible within class 'WasmBridge'.
```
원인: WasmBridge.doc가 private으로 선언되어 있으나 클래스 외부에서 직접 접근하고 있음.
수정 방향: doc를 public으로 변경하거나, 접근용 public 메서드/getter를 추가한다.
TS2551: 존재하지 않는 메서드명
```
src/hwpctl/index.ts(351,27): error TS2551: Property 'create_empty' does not exist on type 'typeof HwpDocument'. Did you mean 'createEmpty'?
```
원인: WASM API 메서드명이 createEmpty인데 create_empty로 잘못 호출하고 있음.
수정 방향: create_empty → createEmpty로 수정.
TS2304: chrome 전역 타입 미선언
```
src/main.ts(461,16): error TS2304: Cannot find name 'chrome'.
src/main.ts(461,42): error TS2304: Cannot find name 'chrome'.
src/main.ts(466,30): error TS2304: Cannot find name 'chrome'.
```
원인: Chrome 익스텐션 API(chrome.*)에 대한 타입 선언이 없음.
수정 방향: @types/chrome 패키지를 devDependency에 추가하고 tsconfig.json에 반영한다.
수정 금지 사항
tsconfig.json에서 strict: false 또는 skipLibCheck, noEmit 등으로 우회 금지
// @ts-ignore / // @ts-expect-error 주석으로 무시 금지
any 타입으로 캐스팅하여 우회 금지
문제
`npm run build` 실행 시 `tsc` 단계에서 에러가 발생하여 빌드가 실패한다.
`tsconfig.json`은 `strict: true`로 설정되어 있으며, 우회(bypass) 없이 코드 수정으로 해결해야 한다.
에러 목록
TS2341: private 멤버 외부 접근
```
src/command/commands/file.ts(136,28): error TS2341: Property 'doc' is private and only accessible within class 'WasmBridge'.
src/main.ts(532,20): error TS2341: Property 'doc' is private and only accessible within class 'WasmBridge'.
```
원인:
WasmBridge.doc가private으로 선언되어 있으나 클래스 외부에서 직접 접근하고 있음.수정 방향:
doc를public으로 변경하거나, 접근용 public 메서드/getter를 추가한다.TS2551: 존재하지 않는 메서드명
```
src/hwpctl/index.ts(351,27): error TS2551: Property 'create_empty' does not exist on type 'typeof HwpDocument'. Did you mean 'createEmpty'?
```
원인: WASM API 메서드명이
createEmpty인데create_empty로 잘못 호출하고 있음.수정 방향:
create_empty→createEmpty로 수정.TS2304:
chrome전역 타입 미선언```
src/main.ts(461,16): error TS2304: Cannot find name 'chrome'.
src/main.ts(461,42): error TS2304: Cannot find name 'chrome'.
src/main.ts(466,30): error TS2304: Cannot find name 'chrome'.
```
원인: Chrome 익스텐션 API(
chrome.*)에 대한 타입 선언이 없음.수정 방향:
@types/chrome패키지를 devDependency에 추가하고tsconfig.json에 반영한다.수정 금지 사항
tsconfig.json에서strict: false또는skipLibCheck,noEmit등으로 우회 금지// @ts-ignore/// @ts-expect-error주석으로 무시 금지any타입으로 캐스팅하여 우회 금지