@rimbu/base
Version:
Utilities to implement Rimbu collections
42 lines (41 loc) • 1.32 kB
text/typescript
import { ErrBase } from '@rimbu/common';
/**
* Error thrown when an operation assumes a collection is non-empty but it is empty.
*/
export declare class EmptyCollectionAssumedNonEmptyError extends ErrBase.CustomError {
constructor();
}
/**
* Error thrown when a builder is modified while it is being iterated.
*/
export declare class ModifiedBuilderWhileLoopingOverItError extends ErrBase.CustomError {
constructor();
}
/**
* Error indicating an unexpected internal state. Users are encouraged to file an issue.
*/
export declare class InvalidStateError extends ErrBase.CustomError {
constructor();
}
/**
* Error indicating incorrect usage of the API.
*/
export declare class InvalidUsageError extends ErrBase.CustomError {
}
/**
* Throws an `EmptyCollectionAssumedNonEmptyError`.
*/
export declare function throwEmptyCollectionAssumedNonEmptyError(): never;
/**
* Throws a `ModifiedBuilderWhileLoopingOverItError`.
*/
export declare function throwModifiedBuilderWhileLoopingOverItError(): never;
/**
* Throws an `InvalidStateError`.
*/
export declare function throwInvalidStateError(): never;
/**
* Throws an `InvalidUsageError` with the provided message.
* @param msg - context message describing the invalid usage
*/
export declare function throwInvalidUsageError(msg: string): never;