Skip to content

Commit 8470b9a

Browse files
committed
Added todo about duplicate enum detection
1 parent 0815e0f commit 8470b9a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/WebApiToTypeScript/Enums/EnumsService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public TypeScriptBlock CreateEnumsBlock()
1919

2020
public void AddEnum(TypeDefinition thingType)
2121
{
22+
// todo-balki duplicate enums detection
23+
// fullname might be the issue here, since we are actually going by final namespaced name
24+
// but we might want to detect that AFTER adding all unique types so we can complain correctly what conflicted
25+
2226
if (Enums.All(e => e.FullName != thingType.FullName))
2327
Enums.Add(thingType);
2428
}

0 commit comments

Comments
 (0)