UNPKG

@stnekroman/tstools

Version:

Set of handy tools for TypeScript development

23 lines (22 loc) 484 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RefCountedValue = void 0; class RefCountedValue { constructor(value) { this.value = value; this.refCount = 1; } getValue() { return this.value; } increment() { return ++this.refCount; } decrement() { return --this.refCount; } getRefCount() { return this.refCount; } } exports.RefCountedValue = RefCountedValue;