Skip to content

Commit

Permalink
fix: added exports to interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocoski committed Sep 1, 2019
1 parent 9fca3f2 commit cd14ea1
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 cd14ea1

Please sign in to comment.