Skip to content

Add support for verbatimModuleSyntax #242

@JoA-MoS

Description

@JoA-MoS

When using verbatim module syntax flag and the included configuration builds will fail because the model import does not have the type keyword.

libs/common-ui/icons-feather/src/icons/index.ts:3:10 - error TS1484: 'FthrIcon' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

  1 | /* 🤖 this file was generated by svg-to-ts */
  2 | 
> 3 | import { FthrIcon } from './build/fthr-icons.model';
    |          ^
  4 | 
  5 | export type FthrIconNameSubset<T extends Readonly<FthrIcon[]>> = T[number]['name'];
  6 | 

.svg-to-tsrc

{
    "delimiter": "KEBAB",
    "generateType": true,
    "interfaceName": "FthrIcon",
    "modelFileName": "fthr-icons.model",
    "namePrefix": "fthr-",
    "optimizeForLazyLoading": true,
    "outputDirectory": "./src/icons",
    "prefix": "fthr",
    "srcFiles": [
        "../../../node_modules/feather-icons/dist/icons/**/*.svg"
    ],
    "typeName": "FthrIcons",
    "svgoConfig": {
        "plugins": [
            {
                "name": "preset-default",
                "params": {
                    "overrides": {
                        "removeViewBox": false
                    }
                }
            }
        ]
    }
}

I am Willing to contribute with a little guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions