instanceof

Typescript

catch문의 error 타입이 any 또는 unknown여야 하는 이유

Catch clause variable type annotation must be 'any' or 'unknown' if specified. 캐치문의 error 타입은 왜 any와 unknown이어야 하는 걸까? 개발하다가 아래와 같은 타입 에러를 만났다. 왜 캐치문의 에러는 any, unknown이어야 하는 걸까? https://stackoverflow.com/questions/69021040/why-catch-clause-variable-type-annotation-must-be-any Why Catch clause variable type annotation must be any? I'm using yup to validate a form, and I encountered this type erro..

2DC
'instanceof' 태그의 글 목록