You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add feature to generate typescript declaration file per svg file. So you can import svg directly and with path intellisense and ts validation for that svg file.
Motivation
Current approach is to create module declaration for any svg file. That makes typescript not to validate import path at all. In addition this enforces developers creating index file for all icons and constantly keep up to date with manual control.
Generating d.ts file nearby svg icon will help to avoid possible mistakes and improve IDE support.
Example
As another improvement will be using rootDirs from typescript. User can generate d.ts in another folder under gitignore, but with rootDirs you still have TS support and the project files tree is not poluted with d.ts files.
Pitch
SVGR already generate typescript files, so generating d.ts is close.
The text was updated successfully, but these errors were encountered:
🚀 Feature Proposal
Add feature to generate typescript declaration file per svg file. So you can import svg directly and with path intellisense and ts validation for that svg file.
Motivation
Current approach is to create module declaration for any svg file. That makes typescript not to validate import path at all. In addition this enforces developers creating index file for all icons and constantly keep up to date with manual control.
Generating d.ts file nearby svg icon will help to avoid possible mistakes and improve IDE support.
Example
As another improvement will be using rootDirs from typescript. User can generate d.ts in another folder under gitignore, but with rootDirs you still have TS support and the project files tree is not poluted with d.ts files.
Pitch
SVGR already generate typescript files, so generating d.ts is close.
The text was updated successfully, but these errors were encountered: