TS2307: Cannot find module '~/assets/images/initial-image.png' or its corresponding type declarations. code example
Example: vscode react cannot find moudle when import image
create global.d.ts file in folder src,and add this line
declare module "*.jpg" {
export default "" as string;
}
declare module "*.png" {
export default "" as string;
}