How to configure tsconfig.json for typings not in @types?

You just have to add zone.js to the types in your tsconfig.json:

{
   "compilerOptions": {
       "types" : ["node", "lodash", "express", "zone.js"]
   }
}

Note that you do not have to include all types like this. Type definitions from the @types/* packages are automatically included.

So you could remove the types declaration in your tsconfig.json and all the @types/* packages would be automatically referenced.

In order to get zone.js to work you can either include it in a single file like this:

/// <reference types="zone.js" />

Or if you want it available in your whole project you can add a index.d.ts at the root of your project and put int the reference there.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)