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 create from '../src/index' | |
import { persist } from '../src/middleware' | |
const consoleError = console.error | |
afterEach(() => { | |
console.error = consoleError | |
}) | |
it('can rehydrate state', () => { | |
let postRehydrationCallbackCallCount = 0 |
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 { | |
GetState, | |
PartialState, | |
SetState, | |
State, | |
StateCreator, | |
StoreApi, | |
} from './vanilla' | |
export const redux = <S extends State, A extends { type: unknown }>( |
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
# Get the Git branch | |
function parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# Source: kirsle.net/wizards/ps1.html | |
export PS1="\[$(tput setaf 6)\]\w\[$(tput setaf 3)\]\$(parse_git_branch) \[$(tput sgr0)\]" |
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 { ReactElement } from 'react' | |
import { ReactComponentLike } from 'prop-types' | |
type Meta = { | |
parent: { [key: string]: any } | |
path: string[] | |
document: { [key: string]: any } | |
} | |
type CustomRuleCallback = (field: any, meta: Meta) => true | string | Promise<true | string> |