"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isKnownError = void 0;
/**
 * Type guard that checks whether a value is a {@link T.KnownError}.
 * Returns true if the value is an object containing an `error` or `error-code` property.
 *
 * @param e - The value to check
 * @returns True if `e` is a KnownError
 */
const isKnownError = (e) => e instanceof Object && ('error' in e || 'error-code' in e);
exports.isKnownError = isKnownError;
function test() {
    // prettier-ignore
    const t = (a) => { };
    t(null);
    // @ts-expect-error
    t(null);
}
//# sourceMappingURL=typeHelpers.js.map