Skip to content

Commit

Permalink
ensure that other interfaces still get original
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Apr 5, 2017
1 parent 89a1586 commit f1c26da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions TS.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -1177,10 +1177,15 @@ module Emit =
Pt.Printl "declare var %s: {new (%s): %s; };" nc.Name (ParamsToString ncParams) i.Name)

let EmitInterfaceDeclaration (i:Browser.Interface) =
let getConflict iName = Map.tryFind iName extendConflictsBaseTypes;
let processIName iName =
match Map.tryFind iName extendConflictsBaseTypes with
match getConflict iName with
| Some _ -> iName + "Base"
| _ -> iName
let processExtendIName iName =
match getConflict iName with
| Some conflict -> if List.contains i.Name conflict.ExtendType then iName + "Base" else iName
| _ -> iName

let processedIName = processIName i.Name
if processedIName <> i.Name then
Expand All @@ -1205,7 +1210,7 @@ module Emit =
else
overridenExtendsFromJson

combinedExtends |> List.map processIName
combinedExtends |> List.map processExtendIName

match finalExtends with
| [] -> ()
Expand Down

0 comments on commit f1c26da

Please sign in to comment.