No overload matches this call. Type 'string' is not assignable to type 'Signals'

前端 未结 3 1123
[愿得一人]
[愿得一人] 2021-02-11 16:40

I am using typescript to build a microservice and handling signals as well. The code was working fine till a few days ago but recently it started throwing errors. Couldn\'t find

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-11 17:03

    This sometimes happens when you have passed an incorrect number of arguments to an anonymous function:

        Object.keys(data).reduce((key: string) => {
    
        }, {}); 
    

    will raise error:

    No overload matches this call. Overload 1 of 3

    Pass it the correct number of arguments:

        Object.keys(data).reduce((acc: any, key: string) => {
        }, {});
    

提交回复
热议问题