I hereby claim:
- I am flushentitypacket on github.
- I am flushentitypack (https://keybase.io/flushentitypack) on keybase.
- I have a public key ASDvnbfDbNd7WbFLT-uvUaBBxjRIKQtPF1dCOWKqGPmDnAo
To claim this, I am signing this object:
local ret_status="%(?:%{$fg_bold[green]%}$ :%{$fg_bold[red]%}$ %s)" | |
PROMPT='%{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info) ${ret_status}%{$fg_bold[blue]%}% %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}%{$fg[yellow]%}*%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" |
// store/redux.d.ts | |
import {Action as ReduxAction} from 'redux' | |
export interface Action< | |
T extends string, | |
P = undefined | |
> extends ReduxAction { | |
type: T | |
payload: P |
// store/todo/addTodo.ts | |
import {Reducer} from 'redux' | |
import {Action} from 'store/redux' // our fancy new generic type! | |
interface Todo { | |
id: number | |
text: string | |
} |
// store/todo/addTodo.ts | |
import {Reducer} from 'redux' | |
import {Action} from 'store/redux' // our fancy new generic type! | |
interface Todo { | |
id: number | |
text: string | |
completed: boolean | |
} |
// store/todo/index.ts | |
import {combineReducers} from 'redux' | |
import { | |
State as TodoState, | |
reducer as todoReducer, | |
actions as todoActions, | |
} from './todo' | |
import { | |
State as RewardState, |
I hereby claim:
To claim this, I am signing this object:
# Assumes that you already have Homebrew installed. If not, do that! | |
# Helpful link: https://brew.sh/ | |
# Install nvm by following instructions at https://github.com/creationix/nvm | |
nvm install --lts # installs latest LTS version | |
brew install yarn --without-node # installs yarn, a node package manager |
import * as React from 'react' | |
type DragScrollProvisions = { | |
onMouseDown: React.MouseEventHandler<HTMLElement>, | |
ref: React.Ref<HTMLElement>, | |
} | |
export type Props = { | |
children: (provisions: DragScrollProvisions) => React.ReactNode, | |
} |
import * as React from 'react' | |
type HoverProps = { | |
onMouseEnter: () => void, | |
onMouseLeave: () => void, | |
} | |
type ChildrenArgs = HoverProps & { | |
hoverProps: HoverProps, | |
isHover: boolean, | |
} |
type Selector<State, R = any> = (state: State) => R | |
// TODO: | |
// Preferred call signature: | |
// ``` | |
// wrapSelector<S>(fn, key) | |
// ``` | |
// But currently not possible due to "all-or-nothing" type arguments: | |
// https://github.com/Microsoft/TypeScript/issues/10571 | |
export const wrapSelector = <S, SS extends Selector<S[keyof S]>>( |