Files
hoppscotch/packages/hoppscotch-common/src/platform/interceptors.ts
Andrew Bastin be57255bf7 refactor: update to dioc v3 (#4009)
Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
2024-04-29 19:06:18 +05:30

18 lines
531 B
TypeScript

import { Container, ServiceClassInstance } from "dioc"
import { Interceptor } from "~/services/interceptor.service"
export type PlatformInterceptorDef =
| { type: "standalone"; interceptor: Interceptor }
| {
type: "service"
// TODO: I don't think this type is effective, we have to come up with a better impl
service: ServiceClassInstance<unknown> & {
new (c: Container): Interceptor
}
}
export type InterceptorsPlatformDef = {
default: string
interceptors: PlatformInterceptorDef[]
}