// Common type guards used across the library
export function hasIndexSignature(v) {
    return (typeof v === 'object' && v !== null);
}
export function isErrorLike(v) {
    return (typeof v === 'object' && v !== null && ('message' in (v)));
}
export function hasValueProp(v) {
    return (typeof v === 'object' && v !== null && ('value' in (v)));
}
export function isContextTagged(v) {
    if (!(typeof v === 'object' && v !== null)) {
        return (false);
    }
    if (!('type' in v) || !('kind' in v) || !('value' in v) || !('contains' in v)) {
        return (false);
    }
    // Now TS knows v has these keys
    const obj = v;
    if (obj.type !== 'context') {
        return (false);
    }
    if (!(obj.kind === 'explicit' || obj.kind === 'implicit')) {
        return (false);
    }
    if (typeof obj.value !== 'number') {
        return (false);
    }
    return (true);
}
//# sourceMappingURL=guards.js.map