ts2fable generates invalid DU case names
baronfel opened this issue · 0 comments
baronfel commented
for this TS definition (specifically the character union for the separator field):
export interface ResourceLabelFormatting {
label: string; // myLabel:/${path}
// For historic reasons we use an or string here. Once we finalize this API we should start using enums instead and adopt it in extensions.
// eslint-disable-next-line vscode-dts-literal-or-types
separator: '/' | '\\' | '';
tildify?: boolean;
normalizeDriveLetter?: boolean;
workspaceSuffix?: string;
workspaceTooltip?: string;
authorityPrefix?: string;
stripPathStartingSeparator?: boolean;
}ts2fable 0.8.0-build.616 generates the following types:
type [<StringEnum>] [<RequireQualifiedAccess>] ResourceLabelFormattingSeparator =
| [<CompiledName "/">] ``/``
| [<CompiledName "\\">] ``\\``
| [<CompiledName "">] EmptyThese DU case names are invalid and as a result throw errors 883 (Invalid namespace, module, type or union case name) and 53 (Discriminated union cases and exception labels must be uppercase identifiers)