import type { Accessor } from '../accessor/base.ts'; import type { IndexCacheStore } from '../cache/index/store.ts'; import type { Resource } from '../resource/base.ts'; import type { PathSpec } from '../types.ts'; export interface OpKwargs { index?: IndexCacheStore; filetype?: string | null; [k: string]: unknown; } export type OpFn = (accessor: Accessor, path: PathSpec, args: readonly unknown[], kwargs: OpKwargs) => unknown; export interface RegisteredOp { name: string; resource: string | null; filetype: string | null; fn(this: void, accessor: Accessor, path: PathSpec, args: readonly unknown[], kwargs: OpKwargs): unknown; write: boolean; } export interface OpOptions { resource: string | string[]; filetype?: string | null; write?: boolean; } export declare function op(name: string, options: OpOptions): (target: OpFn, _context: ClassMethodDecoratorContext) => void; export declare class OpsRegistry { private readonly registered; register(ro: RegisteredOp): void; unregisterResource(resourceKind: string): void; registerResource(resource: Resource): void; find(name: string, resource: string | null, filetype?: string | null): RegisteredOp | null; resolve(name: string, resource: string, filetype?: string | null): OpFn; call(name: string, resourceKind: string, accessor: Accessor, path: PathSpec, args?: readonly unknown[], kwargs?: OpKwargs): Promise; } export declare function registerOp(registry: OpsRegistry, name: string, fn: OpFn, options: OpOptions): void; //# sourceMappingURL=registry.d.ts.map