neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

'Argument of type x is not assingable to paramter of type y' false positive #280

Closed hugbubby closed 3 years ago

hugbubby commented 3 years ago

Currently trying to use this library: https://github.com/wsmd/reattempt

Reattempt.run() includes a second argument that can accept either an 'AsyncAttemptFunction' or a 'CallbackAttemptFunction'. If I try to use the latter, I get a linting error, despite the program compiling just fine. Coc-Tsserver seems not to respect the fact that the function accepts two different arguments.

Some sample code is here:

    const queuedInput = await Reattempt.run({times: 3}, done => {
        redc.get("EXAM_OPERATOR_INPUT", done)
    })

The library is small and contains really only one line of code: https://github.com/wsmd/reattempt/blob/master/lib/index.ts

hugbubby commented 3 years ago

I'm just stupid.