//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// TypeScript helpers (universal micro-lib.) | Author: Sergei Y.Kitaev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Primitive operations (static class):
class HOps {
    static Nop() { }
    static ObjectTypeName(obj) {
        return obj.constructor.name;
    }
    static NullSubst(value, subst) {
        return value ? value : subst;
    }
    static NullAsUndefined(value) {
        return value === null ? undefined : value;
    }
    static UndefinedAsNull(value) {
        return value === undefined ? null : value;
    }
    static Bool(value) {
        return value ? true : false;
    }
    static BoolDefaultFalse(value) {
        return value === true ? true : false;
    }
    static BoolDefaultTrue(value) {
        return value === true || value == null ? true : false;
    }
    static InvokeIfNotNull(action) {
        if (action != null) {
            action();
            return true;
        }
        return false;
    }
} // HOps
//# sourceMappingURL=HOps.js.map