-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support double quote string enum #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on adding the "
Also +1 on removing |
here; doesn't look like we have any docs that use that notation
dismissing as I fundamentally changed the entire PR after the initial approval
5a0ec10
to
d0e9865
Compare
d0e9865
to
3cca864
Compare
The diff compared to current Electron main: diff --git a/electron.d.ts.old b/electron.d.ts
index 4410ccb4bc..f79ddb47af 100644
--- a/electron.d.ts.old
+++ b/electron.d.ts
@@ -2883,7 +2883,7 @@ declare namespace Electron {
* setting this, the window is still a normal window, not a toolbox window which
* can not be focused on.
*/
- setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock', relativeLevel?: number): void;
/**
* Sets the properties for the window's taskbar button.
*
@@ -5492,7 +5492,7 @@ declare namespace Electron {
* setting this, the window is still a normal window, not a toolbox window which
* can not be focused on.
*/
- setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock', relativeLevel?: number): void;
/**
* Sets the properties for the window's taskbar button.
*
@@ -18513,7 +18513,7 @@ declare namespace Electron {
* `strict-origin-when-cross-origin`. Defaults to
* `strict-origin-when-cross-origin`.
*/
- referrerPolicy?: string;
+ referrerPolicy?: ('""' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'unsafe-url' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin');
/**
* can be `default`, `no-store`, `reload`, `no-cache`, `force-cache` or
* `only-if-cached`.
Seems correct |
🎉 This PR is included in version 1.2.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #97
Fixes #98
The comment in #98 was correct, the regex method here isn't great and is one of the few regex smells we have left in this module. This rewrites our string enum extractor as a token-parser state-machine thing. Hope the comments I left are helpful, I'll note that this method already had really solid tests that helped me catch edge cases and this PR adds even more.