Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19505,7 +19505,8 @@ declare var location: Location;
declare var locationbar: BarProp;
declare var menubar: BarProp;
declare var msContentScript: ExtensionScriptApis;
declare const name: never;
/** @deprecated */
declare const name: void;
declare var navigator: Navigator;
declare var offscreenBuffering: string | boolean;
declare var oncompassneedscalibration: ((this: Window, ev: Event) => any) | null;
Expand Down
7 changes: 5 additions & 2 deletions src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,12 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor, iterator: boo
function emitProperty(prefix: string, i: Browser.Interface, emitScope: EmitScope, p: Browser.Property) {
emitComments(p, printer.printLine);

// Treat window.name specially because of https://github.com/Microsoft/TypeScript/issues/9850
// Treat window.name specially because of
// - https://github.com/Microsoft/TypeScript/issues/9850
// - https://github.com/microsoft/TypeScript/issues/18433
if (p.name === "name" && i.name === "Window" && emitScope === EmitScope.All) {
printer.printLine("declare const name: never;");
printer.printLine("/** @deprecated */");
printer.printLine("declare const name: void;");
}
else {
let pType: string;
Expand Down