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

Improve Type Union Typings in the Docs #38339

Closed
dsanders11 opened this issue May 17, 2023 · 4 comments · Fixed by #39258
Closed

Improve Type Union Typings in the Docs #38339

dsanders11 opened this issue May 17, 2023 · 4 comments · Fixed by #39258

Comments

@dsanders11
Copy link
Member

The phrasings that electron/docs-parser recognizes for string union types is fairly narrow, and it looks like there's a handful of places in the docs where the phrasing is not being picked up as string union types.

Fix these and add smoke tests with // @ts-expect-error to ensure type unions are being used. See #38336 for an example.

Alternatively, extend the phrasings that electron/docs-parser recognizes, and add the smoke tests.

A (possibly non-exhaustive) list of ones which aren't being picked up. There's an upstream issue preventing certain values from being picked up.

* `inputFieldType` string - If the context menu was invoked on an input
field, the type of that field. Possible values are `none`, `plainText`,
`password`, `other`.

* `inputFieldType` string - If the context menu was invoked on an input
field, the type of that field. Possible values are `none`, `plainText`,
`password`, `other`.

* `quality` string (optional) - The desired quality of the resize image.
Possible values are `good`, `better`, or `best`. The default is `best`.

* `storages` string[] (optional) - The types of storages to clear, can contain:
`cookies`, `filesystem`, `indexdb`, `localstorage`,
`shadercache`, `websql`, `serviceworkers`, `cachestorage`. If not
specified, clear all storage types.

* `quotas` string[] (optional) - The types of quotas to clear, can contain:
`temporary`, `syncable`. If not specified, clear all quotas.

* `types` string[] - An array of strings that lists the types of desktop sources
to be captured, available types are `screen` and `window`.

@avionicharshit-byte
Copy link

I wanna pick this issue, allow me to contribute it

@saloni0419
Copy link

hey, I want to solve this issue can you please assign me this

@sr-04
Copy link

sr-04 commented Jul 10, 2023

Anyone working on this?

@dsanders11
Copy link
Member Author

If anyone wants to work on this, please just create a PR rather then comment here. If a PR mentions this issue it will be visible here, so in the absence of said linked PRs, please feel free to create a PR - we don't assign issues like this to external contributors. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants