analogcoding

TS 에서 interface , type 을 가져와서 사용할 때 Eslint error 본문

Be well coding/Mine

TS 에서 interface , type 을 가져와서 사용할 때 Eslint error

be well 2020. 3. 8. 16:56

Type 을 선언하고 여러 파일에서 import 해서 사용할 때 ESlint error 발생 

 

문제는 typescript-eslint/no-unused-vars 가 단순히 태그 types와 interfaces(파일에서 가져 오거나 정의 된) 태그 

사용하더라도 사용되지 않는 것으로 표시한다는 것이였는데 해당 링크를 참조하여 해결

https://github.com/typescript-eslint/typescript-eslint/issues/46

 

Improve documentation for `typescript/no-unused-vars` · Issue #46 · typescript-eslint/typescript-eslint

There are several use cases typescript/no-unused-vars does not yet support, such as type declarations: type Foo = string; // unexpected error const foo: Foo = 'foo'; Would it be possible to...

github.com

'Be well coding > Mine' 카테고리의 다른 글

react - ROSLIB 사용기  (0) 2020.04.17
react 에서 naver MAP api 사용  (0) 2020.03.16
blob type ? javascript 요청  (0) 2020.01.15
window npm set up error issue  (0) 2019.09.16
react native expo 실행 시 오류  (0) 2019.08.28
Comments