Skip to content

Commit 09ec5b4

Browse files
authored
feat(server): reexport common things from contract (#194)
1 parent e7ee5a9 commit 09ec5b4

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

packages/contract/src/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ValidationError extends Error {
1717
}
1818
}
1919

20-
export type ErrorMapItem<TDataSchema extends Schema> = {
20+
export interface ErrorMapItem<TDataSchema extends Schema> {
2121
status?: number
2222
message?: string
2323
description?: string

packages/server/src/index.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,22 @@ export * from './utils'
2121

2222
export { isDefinedError, ORPCError, safe } from '@orpc/client'
2323
export { eventIterator, type, ValidationError } from '@orpc/contract'
24+
export type {
25+
ContractProcedure,
26+
ContractProcedureDef,
27+
ContractRouter,
28+
ErrorMap,
29+
ErrorMapItem,
30+
HTTPMethod,
31+
HTTPPath,
32+
InputStructure,
33+
Meta,
34+
ORPCErrorFromErrorMap,
35+
OutputStructure,
36+
Route,
37+
Schema,
38+
SchemaInput,
39+
SchemaOutput,
40+
} from '@orpc/contract'
2441
export { onError, onFinish, onStart, onSuccess } from '@orpc/shared'
2542
export { getEventMeta, withEventMeta } from '@orpc/standard-server'

0 commit comments

Comments
 (0)