UNPKG

dino-core

Version:

A dependency injection framework for NodeJS applications

30 lines (29 loc) 906 B
/** * A value object responsible to carry information about the runtime of a service or component. * * @typedef State * @public */ export declare class State { private readonly properties; constructor(); /** * Allows to access the internal property Map * @returns {Map} the properties Map */ getProperties(): Map<string, any>; /** * Allows to add a property to the internal Map. * @param {String} name the name of the property * @param {Any} value the value associated with the property * @returns {State} this object */ setProperty(name: string, value: any): State; static create(): State; /** * Convenient method to create a State with the provided properties. * @param {Map<String, Any>} properties the properties to add to thi state */ static from(properties: any): State; static measures(): object; }