How can I set TypeScript declarations for packages with scope / namespace via @types?

I use the typescript, and I want to use package with an area (eg @foo/bar, @babel/coreetc.), which does not send its own ad types.

I tried to run something like

npm install @types/@foo/bar

but it seems inaccessible.

Is there a way to get these files .d.tsfrom DefinitelyTyped in an area @types? Is there a way to write my own domain packages if I need to?

+5
source share
1 answer

Is there any way to get these files .d.tsout of @typesscope @types?

, npm @ , @.

, @foo/bar,

npm install @types/foo__bar

, ?

! README.md:

types/foo__bar @foo/bar types/foo__bar types/foo__bar. .

+5

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


All Articles