Created
January 12, 2021 17:44
-
-
Save bnayae/060025410e0b7b633871dba9e6168f71 to your computer and use it in GitHub Desktop.
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
import { DefaultValue } from 'recoil'; | |
export const guardRecoilDefaultValue = ( | |
candidate: any | |
): candidate is DefaultValue => { | |
if (candidate instanceof DefaultValue) return true; | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment