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

Conversion of Resolutions to typescript (and named export) #1959

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

garyhuntddn
Copy link
Contributor

No description provided.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

saghul
saghul previously approved these changes Mar 14, 2022
@saghul
Copy link
Member

saghul commented Mar 14, 2022

Jenkins please test this please.

@NewEraCracker
Copy link
Contributor

@garyhuntddn Currently as you have declared the IDE gives this suggestion.
image

However you could change it so to alias each individual member to Resolution giving a suggestion that enumerates the object keys
image

My two cents.

@garyhuntddn
Copy link
Contributor Author

Weird - my reply by email whilst I was on hols didn't get to you.

@NewEraCracker - I agree with what you are saying and that it's better to have the intellisense there.

I'd originally tried something similar as I want enum semantics but with a Resolution rather than string value (something that typescript doesn't support as far as I am aware)

I've just pushed an update which attempts to satisfy both requirements (ensuring that all member properties are of type Resolution and that the intellisense works well) - see what you think.

If anybody knows better type manipulation that can do this is a better way then please make a suggestion - I'm sure there is a better way but I can't seem to find it

@garyhuntddn garyhuntddn marked this pull request as draft March 21, 2022 09:39
@garyhuntddn garyhuntddn marked this pull request as ready for review March 21, 2022 09:45
@garyhuntddn
Copy link
Contributor Author

Cracked what I was trying to do - we now have a type ResolutionsMap which means that any member of resolutions must be of type Resolution without the need to use as Resolution which I consider a bit dangerous (and not very DRY)

@saghul
Copy link
Member

saghul commented Mar 29, 2022

Jenkins please test this please.

@garyhuntddn
Copy link
Contributor Author

garyhuntddn commented Oct 11, 2022 via email

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.

4 participants