type: add extension.span to api.d.ts

This commit is contained in:
KernelDeimos
2025-12-09 19:09:57 -05:00
committed by Eric Dubé
parent 2e4a504cda
commit 2aa4cd857d

4
extensions/api.d.ts vendored
View File

@@ -68,6 +68,10 @@ interface ServiceNameMap {
}
interface Extension extends RouterMethods {
exports: Record<string, unknown>,
span: (<T>(label: string, fn: () => T) => () => T) & {
run<T>(label: string, fn: () => T): T;
run<T>(fn: () => T): T;
},
on<T extends unknown[]>(event: string, listener: (...args: T) => void): void, // TODO DS: type events better
import(module: 'data'): { db: BaseDatabaseAccessService, kv: DBKVStore, cache: unknown }// TODO DS: type cache better
import(module: 'core'): CoreRuntimeModule,