Repository: electron/electron (language: cpp)

Issue:
[Bug]: `TitleBarOverlay` is empty interface
### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

26.2.0

### What operating system are you using?

macOS

### Operating System Version

MacOS Sonoma

### What arch are you using?

x64

### Last Known Working Electron version

25.3.2

### Expected Behavior

In [`BrowserWindow`'s documentation](https://www.electronjs.org/docs/latest/api/browser-window) I see this:

```
titleBarOverlay Object | Boolean (optional) - When using a frameless window in conjunction with win.setWindowButtonVisibility(true) on macOS or using a titleBarStyle so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs](https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis) and [CSS Environment Variables](https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables). Specifying true will result in an overlay with default system colors. Default is false.

    color String (optional) Windows - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
    symbolColor String (optional) Windows - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
    height Integer (optional) macOS Windows - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
```

However, in `electron.d.ts` this has the following type: `    titleBarOverlay?: (TitleBarOverlay) | (boolean);` where `TitleBarOverlay` is: 

```
  interface TitleBarOverlay {
  }
```

In Electron 25 it was identical to `TitleBarOverlayOptions`:

```
  interface TitleBarOverlayOptions {
    /**
     * The CSS color of the Window Controls Overlay when enabled.
     *
     * @platform win32
     */
    color?: string;
    /**
     * The CSS color of the symbols on the Window Controls Overlay when enabled.
     *
     * @platform win32
     */
    symbolColor?: string;
    /**
     * The height of the title bar and Window Controls Overlay in pixels.
     *
     * @platform win32
     */
    height?: number;
  }
```

It may cause a lot of TypeScript checks to fail when Electron users migrate their apps from Electron 25 to Electron 26.
I am not able to investigate this problem further, but it seems as only bug with generating electron.d.ts




Discussion / hints:
Also, in `ClientRequestConstructorOptions` the type of `protocol` has changed from `string` to `('http:' | 'https:')`.
I believe some apps uses `https` or `http` strings as values (it's not according docs, but it works). 
From 26 it will be mandatory to migrate to value with `:`, but I did not find any breaking changes in release notes.
> From 26 it will be mandatory to migrate to value with :, but I did not find any breaking changes in release notes.

Typescript type narrowing is not considered a breaking change IMO

> In Electron 25 it was identical to TitleBarOverlayOptions:

Not sure exactly what caused this but https://github.com/electron/typescript-definitions/pull/242 should fix this 👍 
Hey @MarshallOfSound 
Thanks for your quick response!

May I ask additional question? I want to understand why strings without `:` were accepted before, but I am not able to locate where native `net` module is exposed from C++ to NodeJS world. I tried to find with substring `prototype->SetClassName`, but nothing related to network appeared :( 

Fix patch:
diff --git a/yarn.lock b/yarn.lock
index 4ceb1ed2870e7..fef82eb894e3c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -220,9 +220,9 @@
     vscode-uri "^3.0.7"
 
 "@electron/typescript-definitions@^8.14.5":
-  version "8.14.5"
-  resolved "https://registry.yarnpkg.com/@electron/typescript-definitions/-/typescript-definitions-8.14.5.tgz#07ffc7dac6008e0f659215e3b88bc0d7c6bc6ece"
-  integrity sha512-68JfMTcj6X7B0dhjhj8lGGnnOlfuiR4f+2UBEtQDYRHfeSuFriKErno3Lh+jAolGSqhw39qr4lLO+FGToVdCew==
+  version "8.14.6"
+  resolved "https://registry.yarnpkg.com/@electron/typescript-definitions/-/typescript-definitions-8.14.6.tgz#78ba1fa8314f06255bb9309791b33c9695ac42ef"
+  integrity sha512-HK70Q3nrp6h4cCxb/P65vFixdJ99vABLIG8TpqU21/fmuHdYboL4zcleWaYhXhU2EwduuOPfORFMrUTdBRc+lw==
   dependencies:
     "@types/node" "^11.13.7"
     chalk "^2.4.2"


Test patch: