Skip to content
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

docs: process.getProcessMemoryInfo() returns a Promise #16593

Merged
merged 2 commits into from Mar 20, 2019

Conversation

miniak
Copy link
Contributor

@miniak miniak commented Jan 29, 2019

Description of Change

Fix process.getProcessMemoryInfo() return type, which is Promise<ProcessMemoryInfo>, not just ProcessMemoryInfo.

/cc @nitsakh

Checklist

Release Notes

Notes: Fixed process.getProcessMemoryInfo() return type to Promise<ProcessMemoryInfo in electron.d.ts.

@miniak miniak requested review from nitsakh and a team January 29, 2019 19:42
@miniak miniak self-assigned this Jan 29, 2019
@miniak miniak force-pushed the miniak/doc-fix-process-memory-info branch from aa098a1 to 54b95ad Compare January 29, 2019 19:49
@miniak
Copy link
Contributor Author

miniak commented Jan 29, 2019

The artifact comparison is broken after #16416

@miniak
Copy link
Contributor Author

miniak commented Jan 29, 2019

There is an issue with the generator. It's producing getProcessMemoryInfo(): Electron.Promise; @MarshallOfSound can you please help?

@miniak
Copy link
Contributor Author

miniak commented Jan 30, 2019

@zcbenz it's still not working properly, it's generating
getProcessMemoryInfo(): Promise<ProcessMemoryInfo>;
instead of
getProcessMemoryInfo(): Promise<Electron.ProcessMemoryInfo>;

@miniak miniak force-pushed the miniak/doc-fix-process-memory-info branch from 54b95ad to 66be611 Compare January 30, 2019 02:09
@miniak miniak requested a review from a team January 30, 2019 02:09
@alexeykuzmin
Copy link
Contributor

@miniak Since #16591 is merged, I added the "target/4-0-x" label to this PR to ensure it's backported.
cc @nitsakh

@alexeykuzmin
Copy link
Contributor

@miniak Can you please fix conflicts here?

@miniak miniak force-pushed the miniak/doc-fix-process-memory-info branch from 66be611 to e181cef Compare January 31, 2019 15:13
@miniak
Copy link
Contributor Author

miniak commented Jan 31, 2019

@alexeykuzmin rebased. It's still not generated properly:

-    getProcessMemoryInfo(): Electron.ProcessMemoryInfo;
+    getProcessMemoryInfo(): Promise<ProcessMemoryInfo>;

@codebytere
Copy link
Member

codebytere commented Feb 4, 2019

@miniak

index.d.ts(10015,37): error TS2304: Cannot find name 'ProcessMemoryInfo'

is likely why it's not generating properly. Check relative paths maybe?

@MarshallOfSound
Copy link
Member

@codebytere This is a bug in the typescript generator not prefixing the innerType correctly in this case, can hack it in tonight

@miniak
Copy link
Contributor Author

miniak commented Feb 14, 2019

@MarshallOfSound did you have time to check the code generator?

@miniak
Copy link
Contributor Author

miniak commented Mar 2, 2019

@MarshallOfSound ping on the typescript generator

@MarshallOfSound
Copy link
Member

@miniak electron/typescript-definitions#136 will fix this 👍

@MarshallOfSound
Copy link
Member

@miniak Bumping electron-typescript-definitions in this PR should get everything working again 👍

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated electron-typescript-definitions and it all looks good now 👍

@alexeykuzmin alexeykuzmin merged commit de1bacd into master Mar 20, 2019
@release-clerk
Copy link

release-clerk bot commented Mar 20, 2019

Release Notes Persisted

Fixed process.getProcessMemoryInfo() return type to Promise<ProcessMemoryInfo in electron.d.ts.

@alexeykuzmin alexeykuzmin deleted the miniak/doc-fix-process-memory-info branch March 20, 2019 16:27
kiku-jw pushed a commit to kiku-jw/electron that referenced this pull request May 16, 2019
* docs: process.getProcessMemoryInfo() returns a Promise
* chore: bump electron-typescript-definitions to get Promise<T> fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants