Skip to content

Commit 7fde085

Browse files
committed
feat(query): export helper types
1 parent 392f8ff commit 7fde085

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ export {
1313
} from './lib/model'
1414

1515
export {
16+
ExtractDocType,
1617
FieldsQuery,
1718
FilterQuery,
1819
IncludeQuery,
1920
default as Query,
21+
RawResultType,
2022
SortQuery
2123
} from './lib/query'
2224

src/lib/query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { JsonApiBody, JsonApiQueryParams, JsonApiResource } from "../types/jsona
22
import { fromJsonApi, Model, ModelConstructor, ModelInstance, models } from "./model";
33
import Schema from "./schema";
44

5-
type RawResultType<T> = {
5+
export type RawResultType<T> = {
66
result: T;
77
body: JsonApiBody<T extends ModelInstance<unknown>[] ? JsonApiResource[] : JsonApiResource>;
88
}
99

10-
type ExtractDocType<T> =
10+
export type ExtractDocType<T> =
1111
T extends Model<infer DocType> ? DocType :
1212
T extends Model<infer DocType>[] ? DocType :
1313
never;

0 commit comments

Comments
 (0)