Skip to content

Instantly share code, notes, and snippets.

@mariusandra
Created July 30, 2020 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariusandra/00babbdafdcd04488a0e78e876cb685a to your computer and use it in GitHub Desktop.
Save mariusandra/00babbdafdcd04488a0e78e876cb685a to your computer and use it in GitHub Desktop.
// Auto-generated with kea-typegen. DO NOT EDIT!
export interface githubLogicType<Repository> {
key: undefined
actionCreators: {
setUsername: (
username: string,
) => {
type: 'set username (samples.githubLogic)'
payload: { username: string }
}
setRepositories: (
repositories: Repository[],
) => {
type: 'set repositories (samples.githubLogic)'
payload: { repositories: Repository[] }
}
setFetchError: (
error: string,
) => {
type: 'set fetch error (samples.githubLogic)'
payload: { error: string }
}
}
actionKeys: {
'set username (samples.githubLogic)': 'setUsername'
'set repositories (samples.githubLogic)': 'setRepositories'
'set fetch error (samples.githubLogic)': 'setFetchError'
}
actionTypes: {
setUsername: 'set username (samples.githubLogic)'
setRepositories: 'set repositories (samples.githubLogic)'
setFetchError: 'set fetch error (samples.githubLogic)'
}
actions: {
setUsername: (username: string) => void
setRepositories: (repositories: Repository[]) => void
setFetchError: (error: string) => void
}
cache: Record<string, any>
constants: any
defaults: {
username: string
repositories: Repository[]
isLoading: boolean
error: string | null
}
events: any
path: ['samples', 'githubLogic']
pathString: 'samples.githubLogic'
props: Record<string, unknown>
reducer: (
state: any,
action: () => any,
fullState: any,
) => {
username: string
repositories: Repository[]
isLoading: boolean
error: string | null
}
reducerOptions: any
reducers: {
username: (state: string, action: any, fullState: any) => string
repositories: (state: Repository[], action: any, fullState: any) => Repository[]
isLoading: (state: boolean, action: any, fullState: any) => boolean
error: (state: string | null, action: any, fullState: any) => string | null
}
selector: (
state: any,
) => {
username: string
repositories: Repository[]
isLoading: boolean
error: string | null
}
selectors: {
username: (state: any, props: any) => string
repositories: (state: any, props: any) => Repository[]
isLoading: (state: any, props: any) => boolean
error: (state: any, props: any) => string | null
sortedRepositories: (state: any, props: any) => Repository[]
}
values: {
username: string
repositories: Repository[]
isLoading: boolean
error: string | null
sortedRepositories: Repository[]
}
_isKea: true
__keaTypeGenInternalSelectorTypes: {
sortedRepositories: (arg1: Repository[]) => Repository[]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment