codice-fiscale-utils icon indicating copy to clipboard operation
codice-fiscale-utils copied to clipboard

Handle tsconfig.json `verbatimModuleSyntax` errors

Open carmelone opened this issue 2 years ago • 0 comments

When using "verbatimModuleSyntax": true in tsconfig.json I get 74 errors using your amazing package.

All like this one:

Error: 'Genders' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
import Omocodes from "./enums/omocodes.enum";
import Genders from "./types/genders.type";

I think the solution is to change imports like this:

import Genders from "./types/genders.type";

to this:

import type Genders from "./types/genders.type";

Am I right?

carmelone avatar Jan 14 '24 21:01 carmelone