What is the proper type when using an imported icon (e.g. SVG) in TypeScript
import icon_name from './icon_file.svg'
function icon(): MISSING_TYPE
{
return icon_name;
}
I am particularly interested in React but I don't feel React.ReactNode is appropriate.
In your function this is only one return possibility? In typescript is type inference, so compiler specify returned type by itself.
Btw solution is here: What is the type of the <svg> element in typescript