UNPKG

nodejs-cloud-taskmq

Version:

Node.js TypeScript library for integrating Google Cloud Tasks with MongoDB/Redis/Memory/Custom for a BullMQ-like queue system. Compatible with NestJS but framework-agnostic.

52 lines (51 loc) 2 kB
import 'reflect-metadata'; /** * Utility functions for working with reflect-metadata */ /** * Get metadata for a class or method */ export declare function getMetadata<T = any>(metadataKey: string | symbol, target: any, propertyKey?: string | symbol): T | undefined; /** * Define metadata for a class or method */ export declare function defineMetadata(metadataKey: string | symbol, metadataValue: any, target: any, propertyKey?: string | symbol): void; /** * Check if metadata exists */ export declare function hasMetadata(metadataKey: string | symbol, target: any, propertyKey?: string | symbol): boolean; /** * Get all metadata keys for a target */ export declare function getMetadataKeys(target: any, propertyKey?: string | symbol): any[]; /** * Get own metadata (not inherited) */ export declare function getOwnMetadata<T = any>(metadataKey: string | symbol, target: any, propertyKey?: string | symbol): T | undefined; /** * Get own metadata keys (not inherited) */ export declare function getOwnMetadataKeys(target: any, propertyKey?: string | symbol): any[]; /** * Delete metadata */ export declare function deleteMetadata(metadataKey: string | symbol, target: any, propertyKey?: string | symbol): boolean; /** * Get all method names of a class instance that have specific metadata */ export declare function getMethodsWithMetadata(instance: any, metadataKey: string | symbol): string[]; /** * Get all methods with their metadata */ export declare function getMethodsWithMetadataValues<T = any>(instance: any, metadataKey: string | symbol): Array<{ methodName: string; metadata: T; }>; /** * Helper to merge metadata arrays */ export declare function mergeMetadataArrays<T>(target: any, metadataKey: string | symbol, newItems: T[], propertyKey?: string | symbol): void; /** * Helper to add single metadata item to an array */ export declare function addMetadataItem<T>(target: any, metadataKey: string | symbol, item: T, propertyKey?: string | symbol): void;