diff --git a/TS.fsx b/TS.fsx index 755dc8be1..30d565e46 100644 --- a/TS.fsx +++ b/TS.fsx @@ -698,7 +698,7 @@ module Emit = | "DOMString" -> "string" | "DOMTimeStamp" -> "number" | "EndOfStreamError" -> "number" - | "EventListener" -> "EventListenerOrEventListenerObject" + | "EventListener" -> "EventListenerOrEventListenerObject" | "double" | "float" -> "number" | "Function" -> "Function" | "long" | "long long" | "signed long" | "signed long long" | "unsigned long" | "unsigned long long" -> "number" @@ -854,8 +854,8 @@ module Emit = String.Join(", ", (List.map paramToString ps)) let EmitCallBackInterface (i:Browser.Interface) = - Pt.Printl "interface %s {" i.Name - Pt.PrintWithAddedIndent "(evt: Event): void;" + Pt.Printl "interface %s {" i.Name + Pt.PrintWithAddedIndent "(evt: Event): void;" Pt.Printl "}" Pt.Printl "" @@ -1071,8 +1071,8 @@ module Emit = if shouldEmitStringEventHandler then Pt.Printl - "%saddEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;" - fPrefix + "%saddEventListener(type: string, listener: EventListenerOrEventListenerObject<%s>, useCapture?: boolean): void;" + fPrefix i.Name let EmitConstructorSignature (i:Browser.Interface) = let emitConstructorSigFromJson (c: InputJsonType.Root) = @@ -1466,7 +1466,7 @@ module Emit = // Add missed interface definition from the spec InputJson.getAddedItems InputJson.Interface flavor |> Array.iter EmitAddedInterface - Pt.Printl "declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;" + Pt.Printl "declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;" Pt.Printl "" EmitCallBackFunctions flavor