Skip to content

Commit

Permalink
feat: export Selector type
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed Apr 22, 2024
1 parent bfd3cf1 commit b59ed45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export {
createNullableResourceSelector,
createResourceCollectionSelector,
createDataSelector,
type Selector,
} from "./selector.ts";
export type {
ResourceCollectionDocumentResult,
Expand Down
2 changes: 1 addition & 1 deletion src/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const flattenResource = <TDeserializer extends AnyResourceDeserializer>(
return flat as ResourceResult<TDeserializer>;
};

type Selector<T> = (raw: unknown) => T;
export type Selector<T> = (raw: unknown) => T;

const createFlattenedDocumentFromData = <TData, TMetaSchema extends ZodTypeAny>(
result: z.output<DocumentSchema<z.ZodTypeAny, TMetaSchema>>,
Expand Down

0 comments on commit b59ed45

Please sign in to comment.