Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

11.3.0

What operating system are you using?

Windows

Operating System Version

Windows 10 version 20H2 - build 19042.870

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Calling BrowserWindow.setBounds() (or BrowserWindow.setSize()) before calling BrowserWindow.show() should show the window with correct size without showing transition flashing between previous size and the new size.

Actual Behavior

The window flashes from the previous lower size to the new higher size (not viceversa).

Testcase Gist URL

https://gist.github.com/xpirt/4e3e92fcd866fcf812c49d8439b6f6d2

This has been tested on Windows 10 and macOS (although here seems to be less noticeable, more with transparency enabled).

The window show a flash tranisition between previous size (height: 200) to new one (height: 600). This seems to happen only from a lower size to a higher one. In fact, from height: 600 to height: 200 the transition flash does not seem to occur.

The gist test I've created registers a global shortcut Ctrl(Cmd)+Shift+T that shows/hides the window changing its bounds before toggling the visibility.

(For flash I mean a few milliseconds you can see the previous window size and right after the new size gets applied)

Issue 2:
TypeScript definitions for electron are a mess.

Dear ladies and gentlemen.

Recently I tried to start a TypeScript project using the electron framework. For that purpose

I started a new TypeScript / node.js project from scratch and installed the electron npm

package as well as the electron typedefinitions.

Unfortunately the electron typedefinitions are in a disastrous state. The compiler stopped

counting the errors in the electron typedefinitions at 99.

It appears that no one ever considered to test the type definition.

I also figured out that the latest electron typedefinition is the one for the electron

framework "1.4.38" while the latest electron framework shows a release number of "1.6.10".

You should really consider to make typedefinitions an integral part of your framework.

That way you wouldn't release a new framework version without a matching typedefinition.

(That typedefinition should be tested of course.)

If you want to make it perfect, make the tyepdefinition also an integral part of your npm

package. That way no one has ever to wonder where the right typedefinition four your

framework can be found.

Below is a picture of the compiler output after installing the electron typedefinitions.

Your framework might be a respected piece of software in the JavaScript community,

but for a programmer who has a strong focus on code quality our framework is a

no go. I guess most TypeScript programmers chose to use TypeScript because they

have a strong focus on code quality like I.

I'm not writing this to diminish your work. I haven't enough experience with your

framework to be qualified for a meaningful opinion. But I can tell you this. If

want to make your framework shiny, give the TypeScript integration more attention.

Kind regards, Lord Saumagen.