feat(backend-github): add pagination (#3379)

This commit is contained in:
Erez Rokah
2020-03-05 11:58:49 +01:00
committed by GitHub
parent 5339735994
commit 39f1307e3a
4 changed files with 295 additions and 7 deletions

View File

@ -40,6 +40,7 @@ const jsToMap = (obj: {}) => {
const knownMetaKeys = Set([
'index',
'page',
'count',
'pageSize',
'pageCount',
@ -85,8 +86,10 @@ const getActionHandlers = (store: CursorStore, handler: ActionHandler) =>
export default class Cursor {
store?: CursorStore;
actions?: Set<string>;
data?: Map<string, unknown>;
meta?: Map<string, unknown>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data?: Map<string, any>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
meta?: Map<string, any>;
static create(...args: {}[]) {
return new Cursor(...args);