Skip to content

Commit

Permalink
fix(koa): Make Koa app inspectable (#3069)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Feb 22, 2023
1 parent 612032e commit 4fbbfff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/koa/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ export function koa<S = any, C = any>(

koaQs(app as any)

Object.getOwnPropertySymbols(koaApp).forEach((symbol) => {
const target = app as any
const source = koaApp as any

target[symbol] = source[symbol]
})

// This reinitializes hooks
app.setup = feathersApp.setup as any
app.teardown = feathersApp.teardown as any
Expand Down

0 comments on commit 4fbbfff

Please # to comment.