Skip to content

Commit f1c26da

Browse files
committed
ensure that other interfaces still get original
1 parent 89a1586 commit f1c26da

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

TS.fsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,10 +1177,15 @@ module Emit =
11771177
Pt.Printl "declare var %s: {new (%s): %s; };" nc.Name (ParamsToString ncParams) i.Name)
11781178

11791179
let EmitInterfaceDeclaration (i:Browser.Interface) =
1180+
let getConflict iName = Map.tryFind iName extendConflictsBaseTypes;
11801181
let processIName iName =
1181-
match Map.tryFind iName extendConflictsBaseTypes with
1182+
match getConflict iName with
11821183
| Some _ -> iName + "Base"
11831184
| _ -> iName
1185+
let processExtendIName iName =
1186+
match getConflict iName with
1187+
| Some conflict -> if List.contains i.Name conflict.ExtendType then iName + "Base" else iName
1188+
| _ -> iName
11841189

11851190
let processedIName = processIName i.Name
11861191
if processedIName <> i.Name then
@@ -1205,7 +1210,7 @@ module Emit =
12051210
else
12061211
overridenExtendsFromJson
12071212

1208-
combinedExtends |> List.map processIName
1213+
combinedExtends |> List.map processExtendIName
12091214

12101215
match finalExtends with
12111216
| [] -> ()

0 commit comments

Comments
 (0)