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

refactor(types): enable exactOptionalPropertyTypes #839

Merged
merged 3 commits into from
Nov 19, 2021

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Nov 16, 2021

@vercel
Copy link

vercel bot commented Nov 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/jotai/9X8ggkzNitoUK2yHGunjDXtPJPnu
✅ Preview: https://jotai-git-refactor-typesexactoptionalpropertytypes-pmndrs.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 16, 2021

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 62b1292:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

@github-actions
Copy link

github-actions bot commented Nov 16, 2021

Size Change: +441 B (+1%)

Total Size: 40.5 kB

Filename Size Change
dist/esm/urql.js 1.44 kB +3 B (0%)
dist/esm/utils.js 4.35 kB +86 B (+2%)
dist/esm/xstate.js 1.13 kB +185 B (+20%) 🚨
dist/index.js 5.05 kB +3 B (0%)
dist/urql.js 1.49 kB +6 B (0%)
dist/utils.js 5.22 kB +10 B (0%)
dist/xstate.js 1.19 kB +148 B (+14%) ⚠️
ℹ️ View Unchanged
Filename Size
dist/babel/plugin-debug-label.js 794 B
dist/babel/plugin-react-refresh.js 947 B
dist/babel/preset.js 1.21 kB
dist/devtools.js 1.73 kB
dist/esm/babel/plugin-debug-label.js 622 B
dist/esm/babel/plugin-react-refresh.js 763 B
dist/esm/babel/preset.js 1.01 kB
dist/esm/devtools.js 1.57 kB
dist/esm/immer.js 592 B
dist/esm/index.js 4.2 kB
dist/esm/optics.js 640 B
dist/esm/query.js 1.25 kB
dist/esm/redux.js 251 B
dist/esm/valtio.js 526 B
dist/esm/zustand.js 284 B
dist/immer.js 729 B
dist/optics.js 935 B
dist/query.js 1.36 kB
dist/redux.js 314 B
dist/valtio.js 586 B
dist/zustand.js 344 B

compressed-size-action

@dai-shi
Copy link
Member Author

dai-shi commented Nov 16, 2021

@devanshj Curious if you know how to resolve the type error. Seems like it's coming from the xstate types.

@devanshj
Copy link

Yep xstate does not have --exactOptionalPropertyTypes enabled in their codebase, hence they can emit these less strict types. You can solve this by turning on --skipLibCheck in this repo or sending a PR to xstate to fix these types. The fix would probably be rather trivial just removing | undefined in these three places (onDone, exec and target)

@dai-shi
Copy link
Member Author

dai-shi commented Nov 19, 2021

Merging this. We will remove the patch when the new xstate package is released.

@dai-shi dai-shi merged commit 9eb6fec into main Nov 19, 2021
@dai-shi dai-shi deleted the refactor/types/exactOptionalPropertyTypes branch November 19, 2021 07:23
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.

2 participants