diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 2cd4e55ee..0e2ad4620 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -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; diff --git a/src/emitter.ts b/src/emitter.ts index 9ceadb9af..da35037da 100644 --- a/src/emitter.ts +++ b/src/emitter.ts @@ -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;