-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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: webContents return type incorrect #38026
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.
@BlackHole1 you'll need to update some tests in order to account for new possible null webContents
values;
An error occurred while running the spec runner
electron/spec/api-web-contents-spec.ts(495,14): error TS2531: Object is possibly 'null'.
electron/spec/api-web-contents-spec.ts(500,14): error TS2531: Object is possibly 'null'.
electron/spec/api-web-contents-spec.ts(504,14): error TS2531: Object is possibly 'null'.
@BlackHole1, another failing test:
|
@dsanders11 I fixed this issue locally before leaving work, but I forgot to push it 🤣 I'll update it when I come back to work tomorrow. |
1142052
to
bfa12f7
Compare
bfa12f7
to
62526bf
Compare
Ci failure has nothing to do with the current PR |
No Release Notes |
I was unable to backport this PR to "24-x-y" cleanly; |
I was unable to backport this PR to "23-x-y" cleanly; |
I have automatically backported this PR to "25-x-y", please check out #38107 |
* fix: webContents type incorrect * fix: ci failed * fix: ci failed 2
@BlackHole1 has manually backported this PR to "24-x-y", please check out #38111 |
* fix: webContents type incorrect * fix: ci failed * fix: ci failed 2
@BlackHole1 has manually backported this PR to "23-x-y", please check out #38112 |
fix: webContents return type incorrect (#38026) * fix: webContents type incorrect * fix: ci failed * fix: ci failed 2
fix: webContents return type incorrect (#38026) * fix: webContents type incorrect * fix: ci failed * fix: ci failed 2
Description of Change
Some APIs may have undefined return values, but they are not reflected in d.ts.
Before:
![image](https://user-images.githubusercontent.com/8198408/233009287-eb36714d-1f0f-44a5-9337-047d542a479b.png)
After:
![image](https://user-images.githubusercontent.com/8198408/233009586-9893fa5c-6051-4a3d-8c38-9bad95a63807.png)
Checklist
npm test
passesRelease Notes
Notes: none