phil294 / coffeesense

IntelliSense for CoffeeScript. LSP implementation / VSCode extension
MIT License
47 stars 8 forks source link

False report: Declared value never read [TS](6133) #3

Closed n-smits closed 2 years ago

n-smits commented 2 years ago

window.wait = (t, f) => setTimeout f, t reports 't' is declared but its value is never read. CoffeeSense [TS](6133)

phil294 commented 2 years ago

Hi @n-smits, thanks for your report, unfortunately I cannot reproduce it.

# file.coffee

# No errors, only implicitAny warnings (as expected)
# Even GoTo action works if cursor is at the t
window.wait = (t, f) => setTimeout f, t
// jsconfig.json
{
  "compilerOptions": {
    "lib": [
      "dom"
    ],
    "checkJs": true
  }
}
// global.ts
export {};

declare global {
    interface Window {
        wait:any;
    }
}

Maybe your coffeesense version is outdated? Latest release is v0.5.1.

n-smits commented 2 years ago

Ok, thanks. Will revisit. (coffee 2.5.1)