Reputation: 451
I have installed the gulp
definition from the DefinitelyTyped repository, along with node.d.ts, but in Code I see no intellisense.
// gulpfile.ts
/// <reference path="./typings/gulp/gulp.d.ts" />
let gulp: Gulp = require("gulp"); // Cannot find name Gulp
What am I doing wrong?
Thanks
Upvotes: 1
Views: 72
Reputation: 22352
/// <reference ...>
import * as gulp from 'gulp';
To be sure follow these steps:
"postinstall": "typings install --save"
Add typings.json alongside package.json
{
"globalDependencies": {
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts",
"gulp": "github:DefinitelyTyped/DefinitelyTyped/gulp/gulp.d.ts"
}
}
npm install
These steps should get you working gulp + typings for it.
Upvotes: 1