Answer the question
In order to leave comments, you need to log in
How to work with typescript in jetbrains products?
The situation is as follows - I create a typescripts folder in src, I'm going to write all the ts code in it. I want to connect one js library, which will be in the release version, so I connect it using bower and now it is in bower_components. I want to register this library in the dependencies of the system.js loader in order to get it by alias. Here the first problem begins - typescript does not want to understand what an alias is, what should I do? It seems that you need to register some kind of card in its settings, but I could not find it in the docks, everywhere only set the value to true \ false. This is what I looked at in the options to the compiler and in the config. Perhaps he didn’t see it or saw it, but thought that it was not right and the translation confirmed this.
If I translated well, as a translator, then I would not ask you for help.
Here. And then I don’t understand what to do with the downloaded .d.ts file.
I know that in vs you just need to connect it in a comment, but how?
UPD:
// ./test.d.ts
declare module test {
export function execute(): void;
}
/// <reference path="./test.d.ts"/>
import {execute} from 'test';
export default class Configuration {
constructor(){
console.log('configuration', execute());
}
}
// и далее ошибка
..../test.d.ts' is not a module.
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