{"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":";;;AA2BA;;;GAGG;AACU,QAAA,aAAa,GAAkB,MAAM,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { Middleware, ParameterizedContext, DefaultState } from 'koa';\nimport type * as Router from '@koa/router';\n\n/**\n * Type compatibility note:\n *\n * This package uses @types/koa@3.x, but @types/koa__router@12.x depends on\n * @types/koa@2.x. This creates type conflicts when working with router middleware.\n * At runtime, koa@3.x is used throughout, so all methods exist and work correctly.\n *\n * The type casts in instrumentation.ts are necessary to bridge this gap.\n *\n * TODO: Remove type casts when @types/koa__router@13+ with @types/koa@3.x support is available\n */\n\nexport type KoaContext = ParameterizedContext<\n  DefaultState,\n  Router.RouterParamContext\n>;\nexport type KoaMiddleware = Middleware<DefaultState, KoaContext> & {\n  router?: Router;\n};\n\n/**\n * This symbol is used to mark a Koa layer as being already instrumented\n * since its possible to use a given layer multiple times (ex: middlewares)\n */\nexport const kLayerPatched: unique symbol = Symbol('koa-layer-patched');\n\nexport type KoaPatchedMiddleware = KoaMiddleware & {\n  [kLayerPatched]?: boolean;\n};\n"]}