exclude

· TypeScript
RequireAtLeastOne 타입의 필요성 아래와 같은 인터페이스가 있다고 가정 해 봅시다. 아래의 인터페이스는 targetIdentifier를 통해 DOM의 특정 요소를 가져와서 extraClass 혹은 extraId를 추가할 수 있는 옵션을 정의합니다. interface DOMElementIdentifierOptions { targetIdentifier: ValidTargetIdentifier extraClass?: string[] extraId?: string } extraClass 혹은 extarId라는 값은 Optional 하긴 하지만, 반드시 둘 중 하나 이상은 필수인 인자가 됩니다. 이럴 때 필요한 것이 바로 아래에서 만들어 볼 RequireAtLeastOne Type 입니다. Gener..
· TypeScript
프로젝트를 진행 중에 갑자기 아래와 같은 오류가 발생하기 시작했다. 어떻게 해결 할 수 있는지 알아보자. Error 메시지 Solution 구글링을 해보니, 2가지 방법으로 할 수 있었다. 1. 컴파일러옵션에서 allowJs 옵션을 제거한다. 2. exclude 항목에 outDir(JS로 컴파일된 파일들이 모이는 장소)에 등록한 폴더를 추가하기 나의 경우, 애초에 allowJS옵션을 적용하지 않고 있었기에, 2번째 방법으로 해결하였다. { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true,..
moyanglee
'exclude' 태그의 글 목록