Skip to content

Commit

Permalink
Merge pull request #6 from js-items/develop
Browse files Browse the repository at this point in the history
fix: added exports to interfaces
  • Loading branch information
mariocoski authored Sep 1, 2019
2 parents 3f1ec4e + cd14ea1 commit 7a27445
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
8 changes: 5 additions & 3 deletions src/interfaces/EnvelopedResponse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { OutgoingHttpHeaders } from "http";
export interface OutgoingHttpHeaders {
[header: string]: number | string | string[] | undefined;
}

export interface EnvelopedResponse<T> {
export default interface EnvelopedResponse<T> {
readonly status: number;
readonly body: T;
readonly headers: OutgoingHttpHeaders;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface PaginationMetadata {
readonly before: string | null;
readonly totalCount: number;
}
export interface PaginatedResponse<I extends Item> {
export default interface PaginatedResponse<I extends Item> {
readonly data: I[];
readonly pagination: PaginationMetadata;
}
31 changes: 22 additions & 9 deletions src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
import Cursor from "./Cursor";
import CursorResult from "./CursorResult";
import Filter from "./Filter";
import Item from "./Item";
import Options from "./Options";
import Pagination from "./Pagination";
import Sort from "./Sort";
import SortOrder from "./SortOrder";
import Cursor from './Cursor';
import CursorResult from './CursorResult';
import {
default as EnvelopedResponse,
OutgoingHttpHeaders,
} from './EnvelopedResponse';

import Filter from './Filter';
import Item from './Item';
import Options from './Options';
import {
default as PaginatedResponse,
PaginationMetadata,
} from './PaginatedResponse';
import Pagination from './Pagination';
import Sort from './Sort';
import SortOrder from './SortOrder';

export {
Cursor,
CursorResult,
EnvelopedResponse,
Filter,
Item,
Options,
OutgoingHttpHeaders,
Pagination,
PaginationMetadata,
PaginatedResponse,
Sort,
SortOrder
SortOrder,
};

0 comments on commit 7a27445

Please sign in to comment.