-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dispatch's payload type is actionType and run lint #772
Merged
shuding
merged 2 commits into
vercel:master
from
matamatanot:chore/update-dispatch-payload-type
Nov 15, 2020
Merged
dispatch's payload type is actionType and run lint #772
shuding
merged 2 commits into
vercel:master
from
matamatanot:chore/update-dispatch-payload-type
Nov 15, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matamatanot
requested review from
pacocoursey,
shuding and
Timer
as code owners
November 13, 2020 12:37
shuding
reviewed
Nov 13, 2020
src/use-swr.ts
Outdated
Comment on lines
27
to
30
// @ts-ignore | ||
const IS_SERVER = typeof window === 'undefined' || !!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno) | ||
const IS_SERVER = | ||
typeof window === 'undefined' || | ||
!!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the tests pass, you need to move that // @ts-ignore
(line 28) here.
matamatanot
changed the title
dispatch's payload type is actionType
dispatch's payload type is actionType and run lint
Nov 13, 2020
shuding
approved these changes
Nov 15, 2020
shuding
added a commit
that referenced
this pull request
Dec 16, 2020
* 0.3.8 * replace rIC with rAF (#744) * Fix race condition when calling mutate synchronously (#735) * fix race condition when calling mutate synchronously * fix test * add comment * fix code reviews * refactor: support SSR in Deno (#754) * refactor: support SSR in Deno * refactor: improve Deno determining * Add @ts-ignore Co-authored-by: Shu Ding <[email protected]> Co-authored-by: Shu Ding <[email protected]> * fix eslint error (#768) * Fix `mutateCallback` types (#745) * Fix `mutateCallback` types * WIP * Add CodeSandbox CI (#769) * add CodeSandbox CI * add new line * fix install cmd Co-authored-by: Paco <[email protected]> * dispatch's payload type is actionType and run lint (#772) * chore: payload is actionType * chore: move a ts-ignore comment * Fix suspense (#777) * fix #494 * add comment * rename to initialMountedRef * 0.3.9 * fix: mark isValidating as false when key is falsy (#757) * fix: tear down when key turns to empty * use false for empty key * Fix README.md typo (#783) '/api/data' => '/api/user' in "Multiple Arguments" * fix: do mount check in config callback (#787) * Update api-hooks example README.md (#790) Updated the Vercel deploy link to the correct directory * Return '@null' if args is null ASAP (#767) * chore: return 'null' if arg[i] is null ASAP * chore: update comment * chore: use continue * Bump ini from 1.3.5 to 1.3.8 (#806) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update test Co-authored-by: Shu Ding <[email protected]> Co-authored-by: X <[email protected]> Co-authored-by: Umidbek Karimov <[email protected]> Co-authored-by: Paco <[email protected]> Co-authored-by: matamatanot <[email protected]> Co-authored-by: Jiachi Liu <[email protected]> Co-authored-by: sAy <[email protected]> Co-authored-by: William Crutchfield <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #773
When I started reading
use-swr.ts
, it was hard to imagine what arguments dispatch was receiving at first. I think it will be somewhat more readable.Also, after
yarn run lint:fix
, a line break occurred around line 30.