-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Hello,
I have a simple enum:
[ExportTsEnum(AsUnionType = true)]
public enum Digit
{
Zero,
One,
Two,
Three
}
It correctly generates:
export type Digit = "Zero" |
"One" |
"Two" |
"Three"
The enum is used by a class:
public class Number
{
public Digit FirstDigit { get; set; }
}
Which is transpiled in number.ts with this import:
import { Digit } from "./digit";
Which generates error (TS) 'Digit' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled..
I can manually fix the import :
import { type Digit } from "./digit";
But of course it is overriden on each build.
What is the correct way to fix this inconsistency?
I see that I can workaround the issue by tweaking the TSC configuration: //"verbatimModuleSyntax": true, but I guess it is a sensible default I should keep if possible.
Thanks and best regards
Metadata
Metadata
Assignees
Labels
No labels