No overload matches this call (1) 썸네일형 리스트형 [TypeScript] overload 함수에서 No overload matches this call 에러 다음과 같이 오버로딩으로 된 코드를 작성했는데, No overload matches this call 이라는 error 가 발생 했다. function func(str: 'hi'): string; function func(str: 'bakery'): string; function func(arg: 'hi' | 'bakery'): string { return arg; } function callExample(str: 'hi' | 'bakery') { return func(str); // error occurred! } 급한 사람은 해결 방법부터 보자. 원인 에러 메시지를 자세히 보면 다음과 같다. No overload matches this call. Overload 1 of 2, '(str: "hi"):.. 이전 1 다음