오류관리

TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.

k9e4h 2016. 8. 4. 10:29

오류




TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.




오류 상황


에러난 부분들 아무것도 건드린적 없는데 값자기..




오류 원인


아래 사이트를 참고해 보면

return 값의 type이 명확하지 않아서 ts가 js로 변환되면서 생기는 오류인 듯하다.




오류 해결


http://codeinreview.com/184/not-all-code-paths-return-a-value-in-typescript/

반응형