0

I am generating icon with svg-generator which uses svgo. I wish I could generate icons with property name as const.

I get:

export const appScoutIcon = {
    data: `<svg...,
    name: 'scout'
};

but I would like to make:

export const appScoutIcon = {
    data: `<svg...,
    name: 'scout' as const
};

so I could have more typescript support for generated variables. Is it possible?

I did not found any svgo plugin for this :/

0 Answers0