Answer the question
In order to leave comments, you need to log in
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" />
///<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(); //всё нормально
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question