Skip to content

Commit

Permalink
Fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Beal committed Jan 15, 2023
1 parent 6b416de commit 210f8b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/in-memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export class InMemoryDataRepo<T extends DataObject> extends AbstractDataRepo<T>
if (found.keyString === keyString) {
return Promise.resolve({
data: found.record,
result: ReadResult.FOUND
result: ReadResult.FOUND,
});
}
}
return Promise.resolve({
data: undefined,
result: ReadResult.NOT_FOUND
result: ReadResult.NOT_FOUND,
});
}
putObject(obj: T): Promise<WriteResults<T>> {
Expand Down Expand Up @@ -60,7 +60,7 @@ export class InMemoryDataRepo<T extends DataObject> extends AbstractDataRepo<T>
}
}
return Promise.resolve({
data:foundRecords,
data: foundRecords,
result: foundRecords.length > 0 ? ReadResult.FOUND : ReadResult.NOT_FOUND,
hasMore: false,
next: undefined,
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export type GetResponse<T extends DataObject> = {
result: ReadResult;
error?: string;
errorCode?: number;
}
};

export type ListResponse<T extends DataObject> = {
data: T[];
Expand All @@ -86,12 +86,12 @@ export type ListResponse<T extends DataObject> = {
next: Keys<T> | undefined;
error?: string;
errorCode?: number;
}
};

export enum ReadResult {
FOUND = 'found',
NOT_FOUND = 'not_found',
ERROR = 'error'
ERROR = 'error',
}

export type KeyConfig<T extends DataObject> = {
Expand Down

0 comments on commit 210f8b9

Please sign in to comment.