Skip to content

Commit

Permalink
Improve type safety of name global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
falsandtru committed Apr 28, 2017
1 parent fb07b70 commit 017e881
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TS.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ module Emit =

// Treat window.name specially because of https://github.com/Microsoft/TypeScript/issues/9850
if p.Name = "name" && i.Name = "Window" && emitScope = EmitScope.All then
printLine "declare const name: never;"
printLine "declare const name: undefined;"
elif Option.isNone (getRemovedItemByName p.Name ItemKind.Property i.Name) then
match getOverriddenItemByName p.Name ItemKind.Property i.Name with
| Some p' -> emitPropertyFromJson p'
Expand Down
2 changes: 1 addition & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14734,7 +14734,7 @@ declare var locationbar: BarProp;
declare var menubar: BarProp;
declare var msContentScript: ExtensionScriptApis;
declare var msCredentials: MSCredentials;
declare const name: never;
declare const name: undefined;
declare var navigator: Navigator;
declare var offscreenBuffering: string | boolean;
declare var onabort: (this: Window, ev: UIEvent) => any;
Expand Down

0 comments on commit 017e881

Please sign in to comment.