UNPKG

@sentry/utils

Version:
14 lines 726 B
/** * Polyfill for the nullish coalescing operator (`??`). * * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior. * * Adapted from Sucrase (https://github.com/alangpierce/sucrase) * * @param lhs The value of the expression to the left of the `??` * @param rhsFn A function returning the value of the expression to the right of the `??` * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value */ export declare function _nullishCoalesce(lhs: unknown, rhsFn: () => unknown): unknown; //# sourceMappingURL=_nullishCoalesce.d.ts.map