chibat / chrome-extension-typescript-starter

Chrome Extension TypeScript Starter
MIT License
2.39k stars 403 forks source link

Why @types/chrome are not picking up by IDE? #3

Closed rafis closed 5 years ago

rafis commented 6 years ago

NetBeans IDE: netbeans

When I add the following to the tsconfig.json also nothing happens:

        "types": [
            "chrome"
        ],

But when I add the following in any of the files it starts to work only after a while, not immediately, why? IDE Bug?

/// <reference types="chrome"/>

And still showing some error "Project: error: Cannot find type definition file for 'chrome'". But chrome object types are now picked up by IDE, I'm happy: netbeans2

MT-- commented 6 years ago

This may help: edit tsconfig.json to include:

"compilerOptions": {
  "typeRoots": [ "node_modules/@types" ]
}

What TypeScript version are you using?

chibat commented 5 years ago

Sorry for late reply. I checked with https://github.com/Everlaw/nbts . I fixed the compilerOptions.

Thanks.