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

check for value before using methods #400

Merged
merged 3 commits into from
May 28, 2022
Merged

Conversation

bryceosterhaus
Copy link
Contributor

@bryceosterhaus bryceosterhaus commented Oct 30, 2019

Not sure if this is the best way to fix this, but I was running into this error when using using typescript with this sort of type

const VALUES = ['one', 'two'];

interface IProps {
    values?: typeof VALUES[number]
}

Check out the failing fixture for an example

@bryceosterhaus
Copy link
Contributor Author

Any update on this?

@bryceosterhaus
Copy link
Contributor Author

Hey @danez, just curious if you think this might be able to make it into a release at any point. Not sure how active this project is, but wanted to follow up in case this PR got lost in the mix of notifications.

@danez danez merged commit 85ea6a5 into reactjs:main May 28, 2022
@danez
Copy link
Collaborator

danez commented May 28, 2022

I do not know what happened to this PR. It must have fallen under the radar. I'm really sorry. It is merged now, I will backport this to 5.x and cut a release soon.

danez pushed a commit that referenced this pull request May 28, 2022
Co-authored-by: Daniel Tschinder <[email protected]>
# Conflicts:
#	src/__tests__/__snapshots__/main-test.js.snap
#	src/utils/__tests__/getTSType-test.js
danez pushed a commit that referenced this pull request May 28, 2022
Co-authored-by: Daniel Tschinder <[email protected]>
# Conflicts:
#	src/__tests__/__snapshots__/main-test.js.snap
#	src/utils/__tests__/getTSType-test.js
@bryceosterhaus
Copy link
Contributor Author

No worries! Thanks for merging

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants