-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common/store/cache sagas to typescript (#7373)
- Loading branch information
1 parent
d69458f
commit 72c0af4
Showing
22 changed files
with
308 additions
and
235 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,29 @@ | ||
import { ID, UID } from 'models/Identifiers' | ||
import { Kind } from 'models/Kind' | ||
|
||
export type CacheType = 'normal' | 'fast' | 'safe-fast' | ||
|
||
export type Entry<EntryT extends Metadata = Metadata> = { | ||
id: ID | ||
uid?: UID | ||
metadata: EntryT | ||
timestamp?: number | ||
} | ||
|
||
export type EntriesByKind<EntryT extends Metadata = Metadata> = { | ||
[key in Kind]?: Entry<EntryT>[] | ||
} | ||
|
||
export type Metadata = { | ||
blocknumber?: number | ||
local?: boolean | ||
} & Record<string, any> | ||
|
||
export type SubscriberInfo = { | ||
uid: UID | ||
id?: string | number | ||
} | ||
|
||
export type SubscriptionInfo = SubscriberInfo & { | ||
kind: Kind | ||
} |
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
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
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
Oops, something went wrong.