phil294 / coffeesense

IntelliSense for CoffeeScript. LSP implementation / VSCode extension
MIT License
48 stars 9 forks source link

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

Closed n-smits closed 3 years ago

n-smits commented 3 years ago

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

phil294 commented 3 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 3 years ago

Ok, thanks. Will revisit. (coffee 2.5.1)