From 00756fbdb58b8acb56639ffd49720b8a9fcbf4df Mon Sep 17 00:00:00 2001 From: zhengbli Date: Fri, 29 Jan 2016 15:40:58 -0800 Subject: [PATCH] Choose to not expose some property for "window" interface --- TS.fsx | 2 +- inputfiles/sample.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TS.fsx b/TS.fsx index 411f75660..45a18403c 100644 --- a/TS.fsx +++ b/TS.fsx @@ -234,7 +234,7 @@ let EmitProperties flavor prefix (emitScope: EmitScope) (i: Browser.Interface)= | None -> () getAddedItems ItemKind.Property flavor - |> Array.filter (matchInterface i.Name) + |> Array.filter (fun addedItem -> (matchInterface i.Name addedItem) && (prefix <> "declare var " || not(OptionCheckValue false addedItem.ExposeGlobally))) |> Array.iter emitPropertyFromJson let EmitMethods flavor prefix (emitScope: EmitScope) (i: Browser.Interface) = diff --git a/inputfiles/sample.json b/inputfiles/sample.json index ed0e2ef43..8103e7515 100644 --- a/inputfiles/sample.json +++ b/inputfiles/sample.json @@ -2,6 +2,7 @@ { "kind": "property", "interface": "Window", + "exposeGlobally": false, "name": "URL", "type": "URL" },