22 karma · joined Jun 25, 2015 (11y ago) · 8 submissions
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 9y ago · link · parent
For non-js imports, you can create global module declarations (like the below snippet):
declare module "*.css" { const value: any; export { value }; export default value; }
But you will still need to use some bundler tool like webpack. It will just stop TypeScript from complaining.
Type definitions are the biggest issue even today, but things are much better now. Most popular npm packages already have type definitions, but if you need some exotic package, then you can write your own defnitions (probably only necessary bits).