File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -545,13 +545,20 @@ let EmitAddedInterface (ai: JsonItems.ItemsType.Root) =
545
545
match ai.Extends with
546
546
| Some e -> Pt.printl " interface %s extends %s {" ai.Name.Value ai.Extends.Value
547
547
| None -> Pt.printl " interface %s {" ai.Name.Value
548
-
548
+
549
549
ai.Properties |> Array.iter ( fun p -> Pt.printWithAddedIndent " %s : %s ;" p.Name p.Type)
550
550
ai.Methods |> Array.collect ( fun m -> m.Signatures) |> Array.iter ( Pt.printWithAddedIndent " %s ;" )
551
551
ai.Indexer |> Array.collect ( fun i -> i.Signatures) |> Array.iter ( Pt.printWithAddedIndent " %s ;" )
552
552
Pt.printl " }"
553
553
Pt.printl " "
554
554
555
+ if ai.ConstructorSignatures.Length > 0 then
556
+ Pt.printl " declare var %s : {" ai.Name.Value
557
+ Pt.printWithAddedIndent " prototype: %s ;" ai.Name.Value
558
+ ai.ConstructorSignatures |> Array.iter ( Pt.printWithAddedIndent " %s ;" )
559
+ Pt.printl " }"
560
+ Pt.printl " "
561
+
555
562
let EmitTheWholeThing flavor ( target : TextWriter ) =
556
563
Pt.reset()
557
564
Pt.printl " /////////////////////////////"
Original file line number Diff line number Diff line change 53
53
{
54
54
"kind" : " interface" ,
55
55
"name" : " BlobPropertyBag" ,
56
+ "constructorSignatures" : [
57
+ " new(): NodeList"
58
+ ],
56
59
"properties" : [
57
60
{
58
61
"name" : " type?" ,
You can’t perform that action at this time.
0 commit comments