How to include specifically typed files in an Angular2 angular-cli project

What is the best practice for this scenario:

I created an Angular2 project using angular-cli (i.e. using ng new )

I want to include TypeScript types from specifically printed

For example, should typings be used to set types? How to make sure types are included in ng build ?

If you answer that I have to somehow hack the webpack settings, please indicate how I will do this, since I only have the angular-cli.json

+5
source share
1 answer

Angular-cli uses typescript 2.0, you just need to find typing on npm, let's say you want to use jquery types, just set them:

 npm install --save @types/jquery 

What is it. More here

+5
source

Source: https://habr.com/ru/post/1258880/


All Articles