Skip to content

Commit

Permalink
fetch, and some improvement on caller
Browse files Browse the repository at this point in the history
  • Loading branch information
unnoq committed Dec 19, 2024
1 parent de6138a commit a04d95d
Show file tree
Hide file tree
Showing 13 changed files with 335 additions and 340 deletions.
1 change: 0 additions & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@orpc/transformer": "workspace:*"
},
"devDependencies": {
"@orpc/openapi": "workspace:*",
"zod": "^3.24.1"
}
}
242 changes: 0 additions & 242 deletions packages/server/src/fetch/handler.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/server/src/fetch/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './handle-request'
export * from './handler'
export * from './orpc-handler'
export * from './types'
21 changes: 21 additions & 0 deletions packages/server/src/fetch/orpc-handler.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { handleFetchRequest } from './handle-request'
import { createORPCHandler } from './orpc-handler'

it('assignable to handlers', () => {
handleFetchRequest({
request: new Request('https://example.com', {}),
router: {},
handlers: [
createORPCHandler(),
],
})

handleFetchRequest({
request: new Request('https://example.com', {}),
router: {},
handlers: [
// @ts-expect-error - invalid handler
createORPCHandler,
],
})
})
Loading

0 comments on commit a04d95d

Please sign in to comment.