UNPKG

@manuth/interceptor

Version:

Provides a convenient way to intercept method- property- and accessor-calls of an object.

43 lines 1.02 kB
/** * Represents a collection of interceptions. * * @template T * The type of the target of the interceptions. */ // eslint-disable-next-line @typescript-eslint/ban-types export class InterceptionCollection extends Map { /** * Gets an interception of the collection. * * @template TKey * The type of the specified {@linkcode key}. * * @param key * The key whose interception to get. * * @returns * The interception with the specified {@linkcode key}. */ get(key) { return super.get(key); } /** * Sets an interception of the collection. * * @template TKey * The type of the specified {@linkcode key}. * * @param key * The key whose interception to set. * * @param interception * The interception to set. * * @returns * This collection. */ set(key, interception) { return super.set(key, interception); } } //# sourceMappingURL=InterceptionCollection.js.map