log4js2
Version:
[](https://travis-ci.org/anigenero/log4js2) [](https://codecov.io/gh/anigenero/log4js2)
42 lines (41 loc) • 1.09 kB
TypeScript
export default class Marker {
/**
* Gets the marker for the specified name
* @param {string} name
* @returns {Marker}
*/
static getMarker(name: string): Marker;
private static _markers;
private _parents;
private _name;
/**
* Hide the constructor. We don't want people to arbitrarily make these without access to Marker#getMarker
* @param {string} name
*/
private constructor();
/**
* The name of the marker
* @returns {string}
*/
readonly name: string;
/**
* Gets the parents of the marker. This converts the WeakSet into an array
* @returns {Marker[]}
*/
getParents(): Marker[];
/**
* Returns whether or not the marker has parents
* @returns {boolean}
*/
hasParents(): boolean;
/**
* Removes the specified marker as a parent
* @param {Marker} marker
*/
remove(marker: Marker): void;
/**
* Sets the parent markers by replacing the current set
* @param {Marker} markers
*/
setParents(...markers: Marker[]): void;
}