|
|
|
|
|
by orif
3460 days ago
|
|
For packages with default export, you can use synthetic imports options in tsconfig. 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). |
|