File tree 3 files changed +15
-2
lines changed
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ module JsonItems =
69
69
| Indexer
70
70
| SignatureOverload
71
71
| TypeDef
72
+ | Extends
72
73
override x.ToString () = ( unionToString x) .ToLower()
73
74
74
75
let findItem ( allItems : ItemsType.Root []) ( itemName : string ) ( kind : ItemKind ) otherFilter =
Original file line number Diff line number Diff line change @@ -381,8 +381,15 @@ let EmitNamedConstructors () =
381
381
382
382
let EmitInterfaceDeclaration ( i : Browser.Interface ) =
383
383
Pt.printl " interface %s " i.Name
384
- match i.Extends::( List.ofArray i.Implements) with
385
- | [ " " ] | [] | [ " Object" ] -> ()
384
+ let extendsFromSpec =
385
+ match i.Extends::( List.ofArray i.Implements) with
386
+ | [ " " ] | [] | [ " Object" ] -> []
387
+ | specExtends -> specExtends
388
+ let extendsFromJson =
389
+ JsonItems.getAddedItemsByInterfaceName ItemKind.Extends Flavor.All i.Name
390
+ |> Array.map ( fun e -> e.BaseInterface.Value) |> List.ofArray
391
+ match List.concat [ extendsFromSpec; extendsFromJson] with
392
+ | [] -> ()
386
393
| allExtends -> Pt.print " extends %s " ( String.Join( " , " , allExtends))
387
394
Pt.print " {"
388
395
Original file line number Diff line number Diff line change 330
330
"kind" : " typedef" ,
331
331
"name" : " IDBValidKey" ,
332
332
"type" : " number | string | Date | IDBArrayKey"
333
+ },
334
+ {
335
+ "kind" : " extends" ,
336
+ "baseInterface" : " ParentNode" ,
337
+ "interface" : " Document"
333
338
}
334
339
]
You can’t perform that action at this time.
0 commit comments