frontend/.pnpm-store/v3/files/dd/4a669771b47199beec0bd546298c87f85820f7672db5a5c4cbb7cdcab75a4ff5df232b5912f91d5ae5f3dffca6627f31d2f59cb958df9ecc08be326cbacd7d

31 lines
643 B
Plaintext

export interface EmptyError extends Error {
}
export interface EmptyErrorCtor {
new(): EmptyError;
}
const EmptyErrorImpl = (() => {
function EmptyErrorImpl(this: any) {
Error.call(this);
this.message = 'no elements in sequence';
this.name = 'EmptyError';
return this;
}
EmptyErrorImpl.prototype = Object.create(Error.prototype);
return EmptyErrorImpl;
})();
/**
* An error thrown when an Observable or a sequence was queried but has no
* elements.
*
* @see {@link first}
* @see {@link last}
* @see {@link single}
*
* @class EmptyError
*/
export const EmptyError: EmptyErrorCtor = EmptyErrorImpl as any;