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

fix: flattened optional type not optional #4317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebws
Copy link
Contributor

@sebws sebws commented Apr 1, 2024

when flattening an argument, if the type is optional, it should be a union with undefined.

the PR implements this by adding a union node for the type of the arg. if the type is required, then the union node function is given just the original type and returns it. if the type is not required, then the union node function is given the original type and the undefined keyword, creating an optional type.

see issue #4304 for inspiration

Copy link

codesandbox bot commented Apr 1, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit ade18b1
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/660aadf1f754f800086ceec7
😎 Deploy Preview https://deploy-preview-4317--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codesandbox-ci bot commented Apr 1, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ade18b1:

Sandbox Source
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@krasevych
Copy link

when will you merge it?

@sebws
Copy link
Contributor Author

sebws commented Apr 11, 2024

when will you merge it?

the maintainers aren’t as familiar with code gen so mightn’t be too quick. if you’d like, by clicking on “details” next to the code sandbox merge workflow, there are instructions to use this PR in your package.json

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

2 participants