M
M
Michael2017-05-28 00:36:56
Node.js
Michael, 2017-05-28 00:36:56

Why can't I connect the .d.ts file?

Hello. I write in node.js and typescript. I set the types for the node like this:
npm i @types/node -D
Everything is fine with them. Then I took types for node-telegram-bot-api from this repository . I include them in the main.ts file like this:

///<reference path="./../typings/node-telegram-bot-api.d.ts" />

And types are not seen. The code is like this:
///<reference path="./../typings/node-telegram-bot-api.d.ts" />

import http = require('http');
import telegram = require('node-telegram-bot-api');

const server: http.Server = http.createServer(); //всё нормально

tsconfig.json
PS No errors when compiling to js

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question