UNPKG

@rxap/reflect-metadata

Version:

Provides utilities for working with Reflect Metadata. It includes functions for setting, getting, and manipulating metadata on objects and properties. This package also offers functionalities for change detection using proxies and metadata.

14 lines (13 loc) 1.61 kB
import 'reflect-metadata'; export declare function hasMetadata(metadataKey: string, target: any, propertyKey?: string | symbol): boolean; export declare function setMetadata<V>(metadataKey: string, metadataValue: V, target: any, propertyKey?: string | symbol): void; export declare function clearMetadata<V>(metadataKey: string, target: any, propertyKey?: string | symbol): void; export declare function getMetadata<V>(metadataKey: string, target: any, propertyKey?: string | symbol): V | null; export declare function getOwnMetadata<V>(metadataKey: string, target: any, propertyKey?: string | symbol): V | null; export declare function getMetadataKeys(target: any, propertyKey?: string | symbol): string[]; export declare function addToMetadata<V>(metadataKey: string, metadataValue: V, target: any, propertyKey?: string | symbol): void; export declare function mergeWithMetadata<V extends object>(metadataKey: string, metadataValue: V, target: any, propertyKey?: string | symbol): void; export declare function removeFromMetadata<V>(metadataKey: string, metadataValue: V, target: any, propertyKey?: string | symbol, isEqual?: (a: V, b: V) => boolean): void; export declare function setMetadataMap<V = any, K = string>(key: K, value: V, metadataKey: string, target: any, propertyKey?: string): void; export declare function setMetadataMapSet<V = any, K = string>(key: K, value: V, metadataKey: string, target: any, propertyKey?: string): void; export declare function setMetadataMapMap<V = any, K = string, K2 = string>(key: K, key2: K2, value: V, metadataKey: string, target: any, propertyKey?: string): void;